update 发泡详情、返修率、焊漏率

master
zhouhy 7 months ago
parent 4506c174ee
commit 975873eac4

@ -118,38 +118,68 @@ public class BoxTraceabilityDetailReport extends BaseEntity {
//产线编号
private String PRODUCT_LINE_CODE;
@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;
private String CODE1105;
private String CODE1109;
@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;
public String getEXECUTION_SORT() {
return EXECUTION_SORT;
}

@ -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<RepairRateReport> 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<RepairRateReport> repairRateReports1 = reportMapper.repairRateReportListMONTH(hashMap);
hashMap.put("year",endTime.substring(0,4));
List<RepairRateReport> repairRateReports2 = reportMapper.repairRateReportListMONTH(hashMap);
repairRateReports.addAll(repairRateReports1);
repairRateReports.addAll(repairRateReports2);
}
List<RepairRateReport> repairRateReports = reportMapper.repairRateReportListMONTH(hashMap);
List<RepairRateReport> 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;
}

@ -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

Loading…
Cancel
Save