diff --git a/aucma-report/src/main/java/com/aucma/report/domain/BoxTraceabilityDetailReport.java b/aucma-report/src/main/java/com/aucma/report/domain/BoxTraceabilityDetailReport.java index 722003c..0367b9c 100644 --- a/aucma-report/src/main/java/com/aucma/report/domain/BoxTraceabilityDetailReport.java +++ b/aucma-report/src/main/java/com/aucma/report/domain/BoxTraceabilityDetailReport.java @@ -118,37 +118,67 @@ public class BoxTraceabilityDetailReport extends BaseEntity { //产线编号 private String PRODUCT_LINE_CODE; - private String CODE1000; - private String CODE1001; - private String CODE1002; - private String CODE1004; - private String CODE1005; - private String CODE1006; - private String CODE1007; - private String CODE1008; - private String CODE1009; - private String CODE1010; - private String CODE1011; - private String CODE1012; - private String CODE1020; + @Excel(name = "条码打印") + private String CODE1000; + @Excel(name = "前/后板自动成型") + private String CODE1001; + @Excel(name = "胆、壳组装") + private String CODE1002; + @Excel(name = "泡前库") + private String CODE1004; + @Excel(name = "箱体发泡") + private String CODE1005; + @Excel(name = "泡后库") + private String CODE1006; + @Excel(name = "灌注") + private String CODE1007; + @Excel(name = "MES/SN绑定") + private String CODE1008; + @Excel(name = "成品下线扫描") + private String CODE1009; + @Excel(name = "成品库分垛") + private String CODE1010; + @Excel(name = "泡后出库") + private String CODE1011; + @Excel(name = "泡后出库") + private String CODE1012; + @Excel(name = "门体发泡") + private String CODE1020; + @Excel(name = "内胆预装检漏") + private String CODE2001; + @Excel(name = "箱体发泡检验02") + private String CODE2002; + @Excel(name = "箱体发泡检验01") + private String CODE2003; + @Excel(name = "电检检验") + private String CODE2005; + @Excel(name = "低压检漏") + private String CODE2006; + @Excel(name = "高压检漏") + private String CODE2007; + @Excel(name = "测温检验01") + private String CODE2008; + @Excel(name = "测温检验02") + private String CODE2009; + @Excel(name = "终检01") + private String CODE2010; + @Excel(name = "终检02") + private String CODE2011; + @Excel(name = "终检03") + private String CODE2012; + @Excel(name = "OQC抽检工位") + private String CODE2013; + @Excel(name = "性能抽检工位") + private String CODE2014; + @Excel(name = "总装(灌注)质检") + private String CODE2015; + @Excel(name = "包装箱检验") + private String CODE2016; + @Excel(name = "门体检验") + private String CODE2020; + private String CODE1105; private String CODE1109; - private String CODE2001; - private String CODE2002; - private String CODE2003; - private String CODE2005; - private String CODE2006; - private String CODE2007; - private String CODE2008; - private String CODE2009; - private String CODE2010; - private String CODE2011; - private String CODE2012; - private String CODE2013; - private String CODE2014; - private String CODE2015; - private String CODE2016; - private String CODE2020; public String getEXECUTION_SORT() { return EXECUTION_SORT; diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java index 112e76d..4e6d5c8 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/QualityReportServiceImpl.java @@ -181,9 +181,10 @@ public class QualityReportServiceImpl implements IQualityReportService { //周 else if (hashMap.get("month").equals("2")){ - //将时间扩充到开始时间的周一和结束时间的周末 - String beginTime = getFirstDayOfWeek(String.valueOf(hashMap.get("beginBeginTime"))); - String endTime = getLastDayOfWeek(String.valueOf(hashMap.get("endBeginTime"))); + + Object year = String.valueOf(hashMap.get("year")); + String beginTime = year + "-01-01"; + String endTime = year + "-12-31"; hashMap.put("year",endTime.substring(0,4)); hashMap.put("beginBeginTime",beginTime); hashMap.put("endBeginTime",endTime); @@ -204,33 +205,19 @@ public class QualityReportServiceImpl implements IQualityReportService { collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE()); } } + collect.get(i).setINSPECTOR_TIME("第"+collect.get(i).getCOLUMN_A()+"周"); } return collect; } //月 - //todo 逻辑 数据库会根据每天、不合格数量、所有数量、合格率分组 拿回来根据周/月进行循环累加,然后返回给前端 else if (hashMap.get("month").equals("3")){ - List repairRateReports = new ArrayList<>(); - //将时间扩充到开始时间的月初和结束时间的月末 - String beginTime = String.valueOf(hashMap.get("beginBeginTime")).substring(0, 7) + "01"; - String endTime = String.valueOf(hashMap.get("endBeginTime")).substring(0, 7) + "31"; + Object year = String.valueOf(hashMap.get("year")); + String beginTime = year + "-01-01"; + String endTime = year + "-12-31"; hashMap.put("beginBeginTime",beginTime); hashMap.put("endBeginTime",endTime); - if (beginTime.substring(0,4).equals(endTime.substring(0,4))){ - hashMap.put("year",endTime.substring(0,4)); - repairRateReports = reportMapper.repairRateReportListMONTH(hashMap); - } - else { - hashMap.put("year",beginTime.substring(0,4)); - List repairRateReports1 = reportMapper.repairRateReportListMONTH(hashMap); - hashMap.put("year",endTime.substring(0,4)); - List repairRateReports2 = reportMapper.repairRateReportListMONTH(hashMap); - repairRateReports.addAll(repairRateReports1); - repairRateReports.addAll(repairRateReports2); - } - - + List repairRateReports = reportMapper.repairRateReportListMONTH(hashMap); List collect = repairRateReports.stream().collect(Collectors.collectingAndThen( Collectors.toCollection(()->new TreeSet<>(Comparator.comparing(RepairRateReport::getCOLUMN_A))),ArrayList::new )); @@ -247,7 +234,7 @@ public class QualityReportServiceImpl implements IQualityReportService { collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE()); } } - + collect.get(i).setINSPECTOR_TIME(collect.get(i).getINSPECTOR_TIME().substring(0,7)); } return collect; } diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index ebda990..4646248 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -902,7 +902,7 @@ COUNT(*) AS BEFORE_NUMBER, MAX(CASE WHEN OL.BOX_CODE IS NULL THEN 0 ELSE 1 END) AS SCAN_NUMBER, MAX(CASE WHEN QI.BAR_CODE IS NULL THEN 0 ELSE 1 END) AS SCRAP_NUMBER, - MC.COMPLETE_DATE, + TO_CHAR(MC.COMPLETE_DATE, 'YYYY-MM-DD HH24:MI:SS') COMPLETE_DATE, PL.EXECUTION_SORT EXECUTION_SORT, PL.PRODUCT_LINE_CODE, PL.PRODUCT_LINE_NAME