Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

HD_wangm vor 3 Monaten
Ursprung
Commit
3111259582

+ 39 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtMonthScoreServiceImpl.java

@@ -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);
 
         // 根据维保机型类型统计维保工单

+ 1 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtWorkOrderMapper.xml

@@ -201,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ) p ON p.order_id = t.id
         <where>
             <if test="model != null and model != ''"> and t.model = #{model}</if>
-            <if test="inspectionType != null and inspectionType != ''"> and inspection_type = #{inspectionType}</if>
+            <if test="inspectionType != null and inspectionType != ''"> and FIND_IN_SET(#{inspectionType}, inspection_type) > 0</if>
             <if test="pcsStationPid != null"> and pcs_station_pid = #{pcsStationPid}</if>
             <if test="monthPeriod != null"> and DATE_FORMAT(t.create_time, '%Y-%m') = #{monthPeriod}</if>
             <if test="params.businessDataScope != null and params.businessDataScope != ''">