فهرست منبع

feature 代码提交

xiahan 7 ماه پیش
والد
کامیت
c5ee75c490

+ 203 - 1
jsglkh-common/src/main/java/com/rongwei/bscommon/sys/service/impl/BusinessCommonServiceImpl.java

@@ -1,13 +1,18 @@
 package com.rongwei.bscommon.sys.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.rongwei.bscommon.sys.dao.BusinessCommonMapper;
 import com.rongwei.bscommon.sys.service.BusinessCommonService;
+import com.rongwei.bsentity.domain.*;
 import com.rongwei.rwcommon.base.R;
 import com.rongwei.rwcommon.base.exception.CustomException;
 import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -20,6 +25,33 @@ import java.util.Map;
 public class BusinessCommonServiceImpl implements BusinessCommonService {
     @Autowired
     private BusinessCommonMapper businessCommonMapper;
+    @Autowired
+    private JtFjglxmServiceImpl jtFjglxmService;
+    @Autowired
+    private JtKcsjxmServiceImpl jtKcsjxmService;
+    @Autowired
+    private JtGzdgServiceImpl jtGzdgService;
+    @Autowired
+    private JtZtfapsServiceImpl jtZtfapsService;
+    @Autowired
+    private JtWyysServiceImpl jtWyysService;
+    @Autowired
+    private JtYjbhglServiceImpl jtYjbhglService;
+    @Autowired
+    private JtScsdlServiceImpl jtScsdlService;
+    @Autowired
+    private JtWtbhglServiceImpl jtWtbhglService;
+    @Autowired
+    private JtScbhglServiceImpl jtScbhglService;
+    @Autowired
+    private JtSjjdqdServiceImpl jtSjjdqdService;
+    @Autowired
+    private JtSjbgqdServiceImpl jtSjbgqdService;
+    @Autowired
+    private JtZdxmszmnServiceImpl jtZdxmszmnService;
+    @Autowired
+    private SynchronizationDataServiceImpl synchronizationDataService;
+    private final Logger log = LoggerFactory.getLogger(synchronizationDataService.getClass().getName());
 
     @Override
     public R deletedAboutInfoByProjectName(Map<String, String> projectNameMap) {
@@ -34,6 +66,7 @@ public class BusinessCommonServiceImpl implements BusinessCommonService {
         businessCommonMapper.deletedAboutInfoByProjectName(projectName, mainId);
         return R.ok();
     }
+
     @Override
     public R deletedAboutInfoByProjectNamJlxm(Map<String, String> projectNameMap) {
         String projectName = projectNameMap.getOrDefault("projectName", "");
@@ -44,7 +77,176 @@ public class BusinessCommonServiceImpl implements BusinessCommonService {
         if (StringUtils.isBlank(mainId)) {
             throw new CustomException("数据异常");
         }
-        businessCommonMapper.deletedAboutInfoByProjectNameJlxm(projectName, mainId);
+        List<JtFjglxm> fjglxmList = jtFjglxmService.list(new LambdaQueryWrapper<JtFjglxm>()
+                .eq(JtFjglxm::getMainid, mainId)
+                .eq(JtFjglxm::getXmmc, projectName)
+                .eq(JtFjglxm::getDeleted, "0"));
+        if (!fjglxmList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtFjglxm fjglxm : fjglxmList) {
+                String id = fjglxm.getId();
+                synchronizationDataService.pushDataSync(id, "KC103");
+            }
+        } else {
+            log.info("项目考核-分级管理项目数据为 null");
+        }
+
+        List<JtKcsjxm> jtKcsjxmList = jtKcsjxmService.list(new LambdaQueryWrapper<JtKcsjxm>()
+                .eq(JtKcsjxm::getMainid, mainId)
+                .eq(JtKcsjxm::getXmmc, projectName)
+                .eq(JtKcsjxm::getDeleted, "0"));
+        if (!jtKcsjxmList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtKcsjxm jtKcsjxm : jtKcsjxmList) {
+                String id = jtKcsjxm.getId();
+                synchronizationDataService.pushDataSync(id, "KC105");
+            }
+        } else {
+            log.info("项目考核-勘察设计项目清单数据为 null");
+        }
+
+        List<JtGzdg> jtGzdgList = jtGzdgService.list(new LambdaQueryWrapper<JtGzdg>()
+                .eq(JtGzdg::getMainid, mainId)
+                .eq(JtGzdg::getXmmc, projectName)
+                .eq(JtGzdg::getDeleted, "0"));
+        if (!jtGzdgList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtGzdg jtGzdg : jtGzdgList) {
+                String id = jtGzdg.getId();
+                synchronizationDataService.pushDataSync(id, "KC107");
+            }
+        } else {
+            log.info("项目考核-工作大纲/指导书审查率数据为 null");
+        }
+
+        List<JtZtfaps> jtZtfapsList = jtZtfapsService.list(new LambdaQueryWrapper<JtZtfaps>()
+                .eq(JtZtfaps::getMainid, mainId)
+                .eq(JtZtfaps::getXmmc, projectName)
+                .eq(JtZtfaps::getDeleted, "0"));
+        if (!jtZtfapsList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtZtfaps jtZtfaps : jtZtfapsList) {
+                String id = jtZtfaps.getId();
+                synchronizationDataService.pushDataSync(id, "KC109");
+            }
+        } else {
+            log.info("项目考核-总体方案评审清单数据为 null");
+        }
+
+        List<JtWyys> jtWyysList = jtWyysService.list(new LambdaQueryWrapper<JtWyys>()
+                .eq(JtWyys::getMainid, mainId)
+                .eq(JtWyys::getXmmc, projectName)
+                .eq(JtWyys::getDeleted, "0"));
+        if (!jtWyysList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtWyys jtWyys : jtWyysList) {
+                String id = jtWyys.getId();
+                synchronizationDataService.pushDataSync(id, "KC111");
+            }
+        } else {
+            log.info("项目考核-外业验收清单数据为 null");
+        }
+
+        List<JtYjbhgl> jtYjbhglList = jtYjbhglService.list(new LambdaQueryWrapper<JtYjbhgl>()
+                .eq(JtYjbhgl::getMainid, mainId)
+                .eq(JtYjbhgl::getXmmc, projectName)
+                .eq(JtYjbhgl::getDeleted, "0"));
+        if (!jtYjbhglList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtYjbhgl jtYjbhgl : jtYjbhglList) {
+                String id = jtYjbhgl.getId();
+                synchronizationDataService.pushDataSync(id, "KC113");
+            }
+        } else {
+            log.info("项目考核-意见闭环管理数据为 null");
+        }
+
+        List<JtScsdl> jtScsdlList = jtScsdlService.list(new LambdaQueryWrapper<JtScsdl>()
+                .eq(JtScsdl::getMainid, mainId)
+                .eq(JtScsdl::getXmmc, projectName)
+                .eq(JtScsdl::getDeleted, "0"));
+        if (!jtScsdlList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtScsdl jtScsdl : jtScsdlList) {
+                String id = jtScsdl.getId();
+                synchronizationDataService.pushDataSync(id, "KC115");
+            }
+        } else {
+            log.info("项目考核- 审查审定率数据为 null");
+        }
+
+
+        List<JtWtbhgl> jtWtbhglList = jtWtbhglService.list(new LambdaQueryWrapper<JtWtbhgl>()
+                .eq(JtWtbhgl::getMainid, mainId)
+                .eq(JtWtbhgl::getXmmc, projectName)
+                .eq(JtWtbhgl::getDeleted, "0"));
+        if (!jtWtbhglList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtWtbhgl jtWtbhgl : jtWtbhglList) {
+                String id = jtWtbhgl.getId();
+                synchronizationDataService.pushDataSync(id, "KC117");
+            }
+        } else {
+            log.info("项目考核-问题闭环管理数据为 null");
+        }
+
+        List<JtScbhgl> jtScbhglList = jtScbhglService.list(new LambdaQueryWrapper<JtScbhgl>()
+                .eq(JtScbhgl::getMainid, mainId)
+                .eq(JtScbhgl::getXmmc, projectName)
+                .eq(JtScbhgl::getDeleted, "0"));
+        if (!jtScbhglList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtScbhgl jtScbhgl : jtScbhglList) {
+                String id = jtScbhgl.getId();
+                synchronizationDataService.pushDataSync(id, "KC119");
+            }
+        } else {
+            log.info("项目考核-审查闭环管理数据为 null");
+        }
+
+        List<JtSjjdqd> jtSjjdqdList = jtSjjdqdService.list(new LambdaQueryWrapper<JtSjjdqd>()
+                .eq(JtSjjdqd::getMainid, mainId)
+                .eq(JtSjjdqd::getXmmc, projectName)
+                .eq(JtSjjdqd::getDeleted, "0"));
+        if (!jtSjjdqdList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtSjjdqd jtSjjdqd : jtSjjdqdList) {
+                String id = jtSjjdqd.getId();
+                synchronizationDataService.pushDataSync(id, "KC121");
+            }
+        } else {
+            log.info("项目考核-设计交底清单数据为 null");
+        }
+
+        List<JtSjbgqd> jtSjbgqdList = jtSjbgqdService.list(new LambdaQueryWrapper<JtSjbgqd>()
+                .eq(JtSjbgqd::getMainid, mainId)
+                .eq(JtSjbgqd::getXmmc, projectName)
+                .eq(JtSjbgqd::getDeleted, "0"));
+        if (!jtSjbgqdList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtSjbgqd jtsjbgqd : jtSjbgqdList) {
+                String id = jtsjbgqd.getId();
+                synchronizationDataService.pushDataSync(id, "KC123");
+            }
+        } else {
+            log.info("项目考核-设计变更清单数据为 null");
+        }
+
+        List<JtZdxmszmn> jtZdxmszmnList = jtZdxmszmnService.list(new LambdaQueryWrapper<JtZdxmszmn>()
+                .eq(JtZdxmszmn::getMainid, mainId)
+                .eq(JtZdxmszmn::getXmmc, projectName)
+                .eq(JtZdxmszmn::getDeleted, "0"));
+        if (!jtZdxmszmnList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtZdxmszmn jtZdxmszmn : jtZdxmszmnList) {
+                String id = jtZdxmszmn.getId();
+                synchronizationDataService.pushDataSync(id, "KC131");
+            }
+        } else {
+            log.info("项目考核-数值模拟材料数据为 null");
+        }
+
+//        businessCommonMapper.deletedAboutInfoByProjectNameJlxm(projectName, mainId);
         return R.ok();
     }
 }

+ 12 - 24
jsglkh-common/src/main/java/com/rongwei/bscommon/sys/service/impl/SynchronizationDataServiceImpl.java

@@ -73,7 +73,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtFjglxm> fjglxmList = jtFjglxmService.list(new LambdaQueryWrapper<JtFjglxm>()
                 .in(JtFjglxm::getMainid, ids)
                 .eq(JtFjglxm::getDeleted, "0"));
-        if (fjglxmList != null && !fjglxmList.isEmpty()) {
+        if (!fjglxmList.isEmpty()) {
             // 遍历每一行数据
             for (JtFjglxm fjglxm : fjglxmList) {
                 String id = fjglxm.getId();
@@ -86,7 +86,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtKcsjxm> jtKcsjxmList = jtKcsjxmService.list(new LambdaQueryWrapper<JtKcsjxm>()
                 .in(JtKcsjxm::getMainid, ids)
                 .eq(JtKcsjxm::getDeleted, "0"));
-        if (jtKcsjxmList != null && !jtKcsjxmList.isEmpty()) {
+        if (!jtKcsjxmList.isEmpty()) {
             // 遍历每一行数据
             for (JtKcsjxm jtKcsjxm : jtKcsjxmList) {
                 String id = jtKcsjxm.getId();
@@ -99,7 +99,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtGzdg> jtGzdgList = jtGzdgService.list(new LambdaQueryWrapper<JtGzdg>()
                 .in(JtGzdg::getMainid, ids)
                 .eq(JtGzdg::getDeleted, "0"));
-        if (jtGzdgList != null && !jtGzdgList.isEmpty()) {
+        if (!jtGzdgList.isEmpty()) {
             // 遍历每一行数据
             for (JtGzdg jtGzdg : jtGzdgList) {
                 String id = jtGzdg.getId();
@@ -112,7 +112,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtZtfaps> jtZtfapsList = jtZtfapsService.list(new LambdaQueryWrapper<JtZtfaps>()
                 .in(JtZtfaps::getMainid, ids)
                 .eq(JtZtfaps::getDeleted, "0"));
-        if (jtZtfapsList != null && !jtZtfapsList.isEmpty()) {
+        if (!jtZtfapsList.isEmpty()) {
             // 遍历每一行数据
             for (JtZtfaps jtZtfaps : jtZtfapsList) {
                 String id = jtZtfaps.getId();
@@ -125,7 +125,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtWyys> jtWyysList = jtWyysService.list(new LambdaQueryWrapper<JtWyys>()
                 .in(JtWyys::getMainid, ids)
                 .eq(JtWyys::getDeleted, "0"));
-        if (jtWyysList != null && !jtWyysList.isEmpty()) {
+        if (!jtWyysList.isEmpty()) {
             // 遍历每一行数据
             for (JtWyys jtWyys : jtWyysList) {
                 String id = jtWyys.getId();
@@ -138,7 +138,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtYjbhgl> jtYjbhglList = jtYjbhglService.list(new LambdaQueryWrapper<JtYjbhgl>()
                 .in(JtYjbhgl::getMainid, ids)
                 .eq(JtYjbhgl::getDeleted, "0"));
-        if (jtYjbhglList != null && !jtYjbhglList.isEmpty()) {
+        if (!jtYjbhglList.isEmpty()) {
             // 遍历每一行数据
             for (JtYjbhgl jtYjbhgl : jtYjbhglList) {
                 String id = jtYjbhgl.getId();
@@ -151,7 +151,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtScsdl> jtScsdlList = jtScsdlService.list(new LambdaQueryWrapper<JtScsdl>()
                 .in(JtScsdl::getMainid, ids)
                 .eq(JtScsdl::getDeleted, "0"));
-        if (jtScsdlList != null && !jtScsdlList.isEmpty()) {
+        if (!jtScsdlList.isEmpty()) {
             // 遍历每一行数据
             for (JtScsdl jtScsdl : jtScsdlList) {
                 String id = jtScsdl.getId();
@@ -165,7 +165,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtWtbhgl> jtWtbhglList = jtWtbhglService.list(new LambdaQueryWrapper<JtWtbhgl>()
                 .in(JtWtbhgl::getMainid, ids)
                 .eq(JtWtbhgl::getDeleted, "0"));
-        if (jtWtbhglList != null && !jtWtbhglList.isEmpty()) {
+        if (!jtWtbhglList.isEmpty()) {
             // 遍历每一行数据
             for (JtWtbhgl jtWtbhgl : jtWtbhglList) {
                 String id = jtWtbhgl.getId();
@@ -178,7 +178,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtScbhgl> jtScbhglList = jtScbhglService.list(new LambdaQueryWrapper<JtScbhgl>()
                 .in(JtScbhgl::getMainid, ids)
                 .eq(JtScbhgl::getDeleted, "0"));
-        if (jtScbhglList != null && !jtScbhglList.isEmpty()) {
+        if (!jtScbhglList.isEmpty()) {
             // 遍历每一行数据
             for (JtScbhgl jtScbhgl : jtScbhglList) {
                 String id = jtScbhgl.getId();
@@ -191,7 +191,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtSjjdqd> jtSjjdqdList = jtSjjdqdService.list(new LambdaQueryWrapper<JtSjjdqd>()
                 .in(JtSjjdqd::getMainid, ids)
                 .eq(JtSjjdqd::getDeleted, "0"));
-        if (jtSjjdqdList != null && !jtSjjdqdList.isEmpty()) {
+        if (!jtSjjdqdList.isEmpty()) {
             // 遍历每一行数据
             for (JtSjjdqd jtSjjdqd : jtSjjdqdList) {
                 String id = jtSjjdqd.getId();
@@ -204,7 +204,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtSjbgqd> jtSjbgqdList = jtSjbgqdService.list(new LambdaQueryWrapper<JtSjbgqd>()
                 .in(JtSjbgqd::getMainid, ids)
                 .eq(JtSjbgqd::getDeleted, "0"));
-        if (jtSjbgqdList != null && !jtSjbgqdList.isEmpty()) {
+        if (!jtSjbgqdList.isEmpty()) {
             // 遍历每一行数据
             for (JtSjbgqd jtsjbgqd : jtSjbgqdList) {
                 String id = jtsjbgqd.getId();
@@ -217,7 +217,7 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         List<JtZdxmszmn> jtZdxmszmnList = jtZdxmszmnService.list(new LambdaQueryWrapper<JtZdxmszmn>()
                 .in(JtZdxmszmn::getMainid, ids)
                 .eq(JtZdxmszmn::getDeleted, "0"));
-        if (jtZdxmszmnList != null && !jtZdxmszmnList.isEmpty()) {
+        if (!jtZdxmszmnList.isEmpty()) {
             // 遍历每一行数据
             for (JtZdxmszmn jtZdxmszmn : jtZdxmszmnList) {
                 String id = jtZdxmszmn.getId();
@@ -227,18 +227,6 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
             log.info("项目考核-数值模拟材料数据为 null");
         }
 
-        List<JtXcjhqd> jtXcjhqdList = jtXcjhqdService.list(new LambdaQueryWrapper<JtXcjhqd>()
-                .in(JtXcjhqd::getMainid, ids)
-                .eq(JtXcjhqd::getDeleted, "0"));
-        if (jtXcjhqdList != null && !jtXcjhqdList.isEmpty()) {
-            // 遍历每一行数据
-            for (JtXcjhqd jtXcjhqd : jtXcjhqdList) {
-                String id = jtXcjhqd.getId();
-                this.pushDataSync(id, "KC133");
-            }
-        } else {
-            log.info("项目考核-巡查通报清单数据为 null");
-        }
         return R.ok();
     }