| | |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.entity.param.Review; |
| | | import com.zy.asrs.mapper.ReportQueryMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.PostMesDataUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | private TestMastService testMastService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | @Autowired |
| | | private PackQualifiedService packQualifiedService; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | |
| | | @Value("${mes.url}") |
| | | private String mesUrl; |
| | |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | * 测试库信息 |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<LocMast> packTestBasicInformation() { |
| | | return locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_type1", 1).and().ne("loc_sts","O")); |
| | | } |
| | | /* |
| | | * 测试库使用情况 |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<PackUsageRate> packUsageRate() { |
| | | ArrayList<PackUsageRate> packUsageRates = new ArrayList<>(); |
| | | for (int i = 0 ;i<5;i++){ |
| | | PackUsageRate packUsageRate = new PackUsageRate(); |
| | | packUsageRate.setTotal(locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_type1", i))); |
| | | packUsageRate.setCurrentQuantity(locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_type1", i).and().ne("loc_sts","O"))); |
| | | packUsageRates.add(packUsageRate); |
| | | } |
| | | return packUsageRates; |
| | | } |
| | | |
| | | @Data |
| | | public static class PackUsageRate{ |
| | | private int total; |
| | | private int currentQuantity; |
| | | } |
| | | |
| | | @Data |
| | | public static class PackUsageRate2{ |
| | | private int total; |
| | | private int qualified; |
| | | private int unqualified; |
| | | private String week; |
| | | } |
| | | /* |
| | | * 测试库合格数 |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<PackUsageRate2> packQualified() { |
| | | Date now = new Date(); |
| | | Date date7 = Utils.timeYesterday(now); |
| | | Date date14 = Utils.timeYesterday(date7); |
| | | ArrayList<PackUsageRate2> packUsageRates = new ArrayList<>(); |
| | | |
| | | PackUsageRate2 packUsageRate = new PackUsageRate2(); |
| | | packUsageRate.setTotal(packQualifiedService.selectTotal(date7,now)); |
| | | packUsageRate.setQualified(packQualifiedService.selectCurrentQuantity(true,date7,now)); |
| | | packUsageRate.setUnqualified(packQualifiedService.selectCurrentQuantity(false,date7,now)); |
| | | packUsageRate.setWeek("本周"); |
| | | packUsageRates.add(packUsageRate); |
| | | |
| | | PackUsageRate2 packUsageRate2 = new PackUsageRate2(); |
| | | packUsageRate2.setTotal(packQualifiedService.selectTotal(date14,date7)); |
| | | packUsageRate2.setQualified(packQualifiedService.selectCurrentQuantity(true,date14,date7)); |
| | | packUsageRate2.setUnqualified(packQualifiedService.selectCurrentQuantity(false,date14,date7)); |
| | | packUsageRate2.setWeek("上周"); |
| | | packUsageRates.add(packUsageRate2); |
| | | |
| | | return packUsageRates; |
| | | } |
| | | |
| | | /* |
| | | * 测试库合格数 |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<WorkChartAxis> chartAxisEvening() { |
| | | return reportQueryMapper.getChartAxisEvening(); |
| | | } |
| | | |
| | | /* |
| | | * 测试库合格数 |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<WorkChartAxis> chartAxisMorning() { |
| | | return reportQueryMapper.getChartAxisMorning(); |
| | | } |
| | | /*...........................赣州新增..............以上.............赣州新增...........................*/ |
| | | } |