Переглянути джерело

报验点状态报表数据初始化

wangming 11 місяців тому
батько
коміт
8921467cf3

+ 1 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxInsideInspectionDao.java

@@ -78,6 +78,6 @@ public interface ZhcxInsideInspectionDao extends BaseMapper<ZhcxInsideInspection
             "  ZHCX_INSIDE_INSPECTION zii  " +
             " JOIN ZHCX_INSIDE_INSPECTION_DISPATCH ziid ON ziid.INSIDEID = zii.ID AND ziid.DELETED = '0'   " +
             " WHERE zii.DELETED = '0'   " +
-            " AND zii.INSPECTIONSTATUS IN ('30', '40') ORDER by itp.CREATEDATE ASC")
+            " AND zii.INSPECTIONSTATUS IN ('30', '40') ORDER by zii.CREATEDATE ASC")
     List<JSONObject> getInitNodeStateInspection();
 }

+ 4 - 4
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxItpProjectNodeStateServiceImpl.java

@@ -209,7 +209,7 @@ public class ZhcxItpProjectNodeStateServiceImpl extends ServiceImpl<ZhcxItpProje
     private List<RelactionNodeStateBo> initNodeStatusInside() {
         List<JSONObject> inspectionList = insideInspectionService.getInitNodeStateInspection();
 
-        return assembleInitNodeStatusList(inspectionList);
+        return assembleInitNodeStatusList(inspectionList, "inside");
     }
 
     /**
@@ -218,7 +218,7 @@ public class ZhcxItpProjectNodeStateServiceImpl extends ServiceImpl<ZhcxItpProje
     private List<RelactionNodeStateBo> initNodeStatusOutside() {
         List<JSONObject> inspectionList = outsideInspectionItpService.getInitNodeStateInspection();
 
-        return assembleInitNodeStatusList(inspectionList);
+        return assembleInitNodeStatusList(inspectionList, "outside");
     }
 
     /**
@@ -227,7 +227,7 @@ public class ZhcxItpProjectNodeStateServiceImpl extends ServiceImpl<ZhcxItpProje
      * @param inspectionList
      * @return
      */
-    private List<RelactionNodeStateBo> assembleInitNodeStatusList(List<JSONObject> inspectionList) {
+    private List<RelactionNodeStateBo> assembleInitNodeStatusList(List<JSONObject> inspectionList, String type) {
         if(ObjectUtil.isEmpty(inspectionList)) {
             return Collections.emptyList();
         }
@@ -255,7 +255,7 @@ public class ZhcxItpProjectNodeStateServiceImpl extends ServiceImpl<ZhcxItpProje
                         .conclusion(inspection.getString("INSPECTIONCONCLUSION"))
                         .inspectionCount(inspection.getInteger("INSPECTIONCOUNT"))
                         .complateTime(inspection.getDate("INSPECTIONCOMPLATETIME"))
-                        .type("outside")
+                        .type(type)
                         .build();
                 if("40".equals(inspection.getString("INSPECTIONSTATUS"))) {
                     nodeStateBo.setConclusion("40");