|
|
@@ -623,6 +623,45 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
monthFanInspection.setDeptId(deptId);
|
|
|
monthFanInspection.setMonthPeriod(monthPeriod);
|
|
|
List<GxtMonthFanInspection> monthFanInspections = gxtMonthFanInspectionMapper.selectGxtMonthFanInspectionListByTwice(monthFanInspection);
|
|
|
+ List<GxtMonthFanInspection> fanInspectionList = new ArrayList<>();
|
|
|
+ if (!monthFanInspections.isEmpty()) {
|
|
|
+ while (true) {
|
|
|
+ boolean isBreak = true;
|
|
|
+ for (GxtMonthFanInspection fanInspection : monthFanInspections) {
|
|
|
+ if (fanInspection.getInspectionTypeId().contains(",")) {
|
|
|
+ String[] ids = fanInspection.getInspectionTypeId().split(",");
|
|
|
+ for (int i = 0; i < ids.length; i++) {
|
|
|
+ GxtMonthFanInspection ft = new GxtMonthFanInspection();
|
|
|
+ ft.setModel(fanInspection.getModel());
|
|
|
+ ft.setDeviceCount(fanInspection.getDeviceCount());
|
|
|
+ ft.setInspectionTypeId(ids[i]);
|
|
|
+ fanInspectionList.add(ft);
|
|
|
+ }
|
|
|
+ monthFanInspections.remove(fanInspection);
|
|
|
+ isBreak = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isBreak) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!fanInspectionList.isEmpty()) {
|
|
|
+ for (GxtMonthFanInspection inspection:fanInspectionList) {
|
|
|
+ boolean isAdd = true;
|
|
|
+ for (GxtMonthFanInspection fanInspection : monthFanInspections) {
|
|
|
+ if (fanInspection.getModel().equals(inspection.getModel()) && fanInspection.getInspectionTypeId().equals(inspection.getInspectionTypeId())) {
|
|
|
+ fanInspection.setDeviceCount(fanInspection.getDeviceCount()+inspection.getDeviceCount());
|
|
|
+ isAdd = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isAdd) {
|
|
|
+ monthFanInspections.add(inspection);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
monthScore.setMonthFanInspections(monthFanInspections);
|
|
|
|
|
|
// 根据维保机型类型统计维保工单
|