|
|
@@ -182,8 +182,10 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
else {
|
|
|
defective++;
|
|
|
Set<String> points = leakagePointsByProduct.get(leakagePointKey(record.getComponentNum(), record.getOprno()));
|
|
|
- if (!addLeakagePoints(points, pointCounts)) noPoint++;
|
|
|
- else addDefectOccurrences(occurrences, record.getComponentNum(), record.getTestTime(), points);
|
|
|
+ if (!addLeakagePoints(points, pointCounts)) {
|
|
|
+ noPoint++;
|
|
|
+ addDefectOccurrence(occurrences, "找不到漏点", record.getComponentNum(), record.getTestTime());
|
|
|
+ } else addDefectOccurrences(occurrences, record.getComponentNum(), record.getTestTime(), points);
|
|
|
}
|
|
|
}
|
|
|
for (MesProductRecord record : findProductRecords(startDate, endDate)) {
|
|
|
@@ -192,16 +194,20 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
else {
|
|
|
defective++;
|
|
|
Set<String> points = leakagePointsByProduct.get(leakagePointKey(record.getSn(), record.getOprno()));
|
|
|
- if (!addLeakagePoints(points, pointCounts)) noPoint++;
|
|
|
- else addDefectOccurrences(occurrences, record.getSn(), record.getUpdateDate(), points);
|
|
|
+ if (!addLeakagePoints(points, pointCounts)) {
|
|
|
+ noPoint++;
|
|
|
+ addDefectOccurrence(occurrences, "找不到漏点", record.getSn(), record.getUpdateDate());
|
|
|
+ } else addDefectOccurrences(occurrences, record.getSn(), record.getUpdateDate(), points);
|
|
|
}
|
|
|
}
|
|
|
for (MesProductHf record : hfRecords) {
|
|
|
if ("OK".equalsIgnoreCase(record.getResult())) { qualified++; continue; }
|
|
|
defective++;
|
|
|
Set<String> points = parseLeakagePoints(record.getHfFlag());
|
|
|
- if (!addLeakagePoints(points, pointCounts)) noPoint++;
|
|
|
- else addDefectOccurrences(occurrences, record.getSn(), record.getCreateDate(), points);
|
|
|
+ if (!addLeakagePoints(points, pointCounts)) {
|
|
|
+ noPoint++;
|
|
|
+ addDefectOccurrence(occurrences, "找不到漏点", record.getSn(), record.getCreateDate());
|
|
|
+ } else addDefectOccurrences(occurrences, record.getSn(), record.getCreateDate(), points);
|
|
|
}
|
|
|
List<Map<String, Object>> quality = new ArrayList<>();
|
|
|
Map<String, Object> ok = new LinkedHashMap<>(); ok.put("label", "合格数量"); ok.put("count", qualified); ok.put("color", "#2b8c70"); quality.add(ok);
|
|
|
@@ -250,14 +256,18 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
|
|
|
private void addDefectOccurrences(List<Map<String, Object>> occurrences, String sn, Date time, Set<String> points) {
|
|
|
for (String point : points) {
|
|
|
- Map<String, Object> occurrence = new LinkedHashMap<>();
|
|
|
- occurrence.put("point", point);
|
|
|
- occurrence.put("sn", sn);
|
|
|
- occurrence.put("time", time);
|
|
|
- occurrences.add(occurrence);
|
|
|
+ addDefectOccurrence(occurrences, point, sn, time);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void addDefectOccurrence(List<Map<String, Object>> occurrences, String point, String sn, Date time) {
|
|
|
+ Map<String, Object> occurrence = new LinkedHashMap<>();
|
|
|
+ occurrence.put("point", point);
|
|
|
+ occurrence.put("sn", sn);
|
|
|
+ occurrence.put("time", time);
|
|
|
+ occurrences.add(occurrence);
|
|
|
+ }
|
|
|
+
|
|
|
private String leakagePointKey(String sn, String oprno) {
|
|
|
return StringUtils.defaultString(sn) + "|" + StringUtils.defaultString(oprno);
|
|
|
}
|
|
|
@@ -438,6 +448,7 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
if ("framework".equals(dataType)) return "INSP030".equals(station);
|
|
|
if ("semiFinished".equals(dataType)) return "INSP080".equals(station);
|
|
|
if ("finishedPackage".equals(dataType)) return "INSP090".equals(station);
|
|
|
+ if ("liquidCoolingPlate".equals(dataType)) return "INSP100".equals(station);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -445,6 +456,7 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
if ("framework".equals(dataType)) return "框架气密";
|
|
|
if ("semiFinished".equals(dataType)) return "半成品气密";
|
|
|
if ("finishedPackage".equals(dataType)) return "整包气密";
|
|
|
+ if ("liquidCoolingPlate".equals(dataType)) return "液冷板气密";
|
|
|
return "全部";
|
|
|
}
|
|
|
|