Ver Fonte

feature 代码提交

xiahan há 7 meses atrás
pai
commit
bed1ebd7e4

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

@@ -2,6 +2,7 @@ package com.rongwei.bscommon.sys.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.rongwei.bscommon.sys.service.JtZbrygwjzrfgqdService;
 import com.rongwei.bscommon.sys.service.SynchronizationDataService;
 import com.rongwei.bscommon.sys.strategy.api.*;
 import com.rongwei.bscommon.sys.utils.AttendanceAssessmentSdk;
@@ -74,6 +75,12 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
     private JtJsglcgqdServiceImpl jtJsglcgqdService;
     @Autowired
     private JtXysjyqServiceImpl jtXysjyqService;
+    @Autowired
+    private JtZbrygwjzrfgqdService jtZbrygwjzrfgqdService;
+    @Autowired
+    private JtPxjhqdServiceImpl jtPxjhqdService;
+    @Autowired
+    private JtNdjhqdServiceImpl jtNdjhqdService;
 
     /**
      * allPush数据推送
@@ -228,6 +235,19 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
             log.info("项目考核-设计变更清单数据为 null");
         }
 
+        List<JtZbrygwjzrfgqd> jtZbrygwjzrfgqds = jtZbrygwjzrfgqdService.list(new LambdaQueryWrapper<JtZbrygwjzrfgqd>()
+                .in(JtZbrygwjzrfgqd::getMainid, ids)
+                .eq(BaseDo::getDeleted, "0"));
+        if (!jtZbrygwjzrfgqds.isEmpty()) {
+            // 遍历每一行数据
+            for (JtZbrygwjzrfgqd jtsjbgqd : jtZbrygwjzrfgqds) {
+                String id = jtsjbgqd.getId();
+                this.pushDataSync(id, "KC125");
+            }
+        } else {
+            log.info("项目考核-总部人员岗位及责任分工 null");
+        }
+
         List<JtZdxmszmn> jtZdxmszmnList = jtZdxmszmnService.list(new LambdaQueryWrapper<JtZdxmszmn>()
                 .in(JtZdxmszmn::getMainid, ids)
                 .eq(JtZdxmszmn::getDeleted, "0"));
@@ -241,6 +261,29 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
             log.info("项目考核-数值模拟材料数据为 null");
         }
 
+        // 培训计划(项目级) KC127
+        List<JtPxjhqd> jtPxjhqdList = jtPxjhqdService.list(new LambdaQueryWrapper<JtPxjhqd>().in(JtPxjhqd::getMainid, ids).eq(BaseDo::getDeleted, "0"));
+
+        if (!jtPxjhqdList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtPxjhqd jtZdxmszmn : jtPxjhqdList) {
+                String id = jtZdxmszmn.getId();
+                this.pushDataSync(id, "KC127");
+            }
+        } else {
+            log.info("项目考核-数值模拟材料数据为 null");
+        }
+        // 年度计划 KC129
+        List<JtNdjhqd> jtNdjhqdList = jtNdjhqdService.list(new LambdaQueryWrapper<JtNdjhqd>().in(JtNdjhqd::getMainid, ids).eq(BaseDo::getDeleted, "0"));
+        if (!jtNdjhqdList.isEmpty()) {
+            // 遍历每一行数据
+            for (JtNdjhqd jtZdxmszmn : jtNdjhqdList) {
+                String id = jtZdxmszmn.getId();
+                this.pushDataSync(id, "KC129");
+            }
+        } else {
+            log.info("项目考核-年度计划数据为 null");
+        }
         return R.ok();
     }
 
@@ -282,6 +325,23 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
         if (!JtXysjyqList.isEmpty()) {
             this.pushDataSync(JtXysjyqList.stream().map(JtXysjyq::getId).collect(Collectors.joining(",")), "KC143");
         }
+        // 响应上级要求 KC125
+        List<JtZbrygwjzrfgqd> jtZbrygwjzrfgqds = jtZbrygwjzrfgqdService.list(new LambdaQueryWrapper<JtZbrygwjzrfgqd>().in(JtZbrygwjzrfgqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtZbrygwjzrfgqds.isEmpty()) {
+            this.pushDataSync(jtZbrygwjzrfgqds.stream().map(JtZbrygwjzrfgqd::getId).collect(Collectors.joining(",")), "KC125");
+        }
+        // 响应上级要求 KC127
+        List<JtPxjhqd> jtPxjhqdList = jtPxjhqdService.list(new LambdaQueryWrapper<JtPxjhqd>().in(JtPxjhqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtPxjhqdList.isEmpty()) {
+            this.pushDataSync(jtPxjhqdList.stream().map(JtPxjhqd::getId).collect(Collectors.joining(",")), "KC127");
+        }
+
+        // 年度计划 KC129
+        List<JtNdjhqd> jtNdjhqdList = jtNdjhqdService.list(new LambdaQueryWrapper<JtNdjhqd>().in(JtNdjhqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtNdjhqdList.isEmpty()) {
+            this.pushDataSync(jtNdjhqdList.stream().map(JtNdjhqd::getId).collect(Collectors.joining(",")), "KC129");
+        }
+
         return R.ok();
     }
 
@@ -335,6 +395,28 @@ public class SynchronizationDataServiceImpl implements SynchronizationDataServic
             List<String> dataIds = JtXysjyqList.stream().map(data -> data.getDataid() == null ? " " : data.getDataid()).collect(Collectors.toList());
             this.deleteDataSync(ids, dataIds, "KC144");
         }
+        // 响应上级要求 KC125
+        List<JtZbrygwjzrfgqd> jtZbrygwjzrfgqds = jtZbrygwjzrfgqdService.list(new LambdaQueryWrapper<JtZbrygwjzrfgqd>().in(JtZbrygwjzrfgqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtZbrygwjzrfgqds.isEmpty()) {
+            List<String> ids = jtZbrygwjzrfgqds.stream().map(JtZbrygwjzrfgqd::getId).collect(Collectors.toList());
+            List<String> dataIds = jtZbrygwjzrfgqds.stream().map(data -> data.getDataid() == null ? " " : data.getDataid()).collect(Collectors.toList());
+            this.deleteDataSync(ids, dataIds, "KC125");
+        }
+        // 响应上级要求 KC127
+        List<JtPxjhqd> jtPxjhqdList = jtPxjhqdService.list(new LambdaQueryWrapper<JtPxjhqd>().in(JtPxjhqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtPxjhqdList.isEmpty()) {
+            List<String> ids = jtPxjhqdList.stream().map(JtPxjhqd::getId).collect(Collectors.toList());
+            List<String> dataIds = jtPxjhqdList.stream().map(data -> data.getDataid() == null ? " " : data.getDataid()).collect(Collectors.toList());
+            this.deleteDataSync(ids, dataIds, "KC127");
+        }
+
+        // 年度计划 KC129
+        List<JtNdjhqd> jtNdjhqdList = jtNdjhqdService.list(new LambdaQueryWrapper<JtNdjhqd>().in(JtNdjhqd::getMainid, id).eq(BaseDo::getDeleted, "0"));
+        if (!jtNdjhqdList.isEmpty()) {
+            List<String> ids = jtNdjhqdList.stream().map(JtNdjhqd::getId).collect(Collectors.toList());
+            List<String> dataIds = jtNdjhqdList.stream().map(data -> data.getDataid() == null ? " " : data.getDataid()).collect(Collectors.toList());
+            this.deleteDataSync(ids, dataIds, "KC129");
+        }
         return R.ok();
     }
 

+ 2 - 2
jsglkh-common/src/main/java/com/rongwei/bscommon/sys/strategy/api/KC127ApiRequestAndProcessing.java

@@ -50,8 +50,8 @@ public class KC127ApiRequestAndProcessing implements ApiRequestAndProcessingStra
         assembleData.add(setOrdinaryData("pxfl", JtPxjhqd::getPxfl));
         assembleData.add(setDatePattern("jhpxsj", JtPxjhqd::getJhpxsj,DATE_PATTERN_YMD));
         assembleData.add(setDatePattern("pxkzsj", JtPxjhqd::getPxkzsj,DATE_PATTERN_YMD));
-        assembleData.add(setOrdinaryData("pxhytz", JtPxjhqd::getPxhytz));
-        assembleData.add(setOrdinaryData("xxywpxryqd", JtPxjhqd::getXxywpxryqd));
+        assembleData.add(setFileInfo("pxhytz", JtPxjhqd::getPxhytz,true));
+        assembleData.add(setFileInfo("xxywpxryqd", JtPxjhqd::getXxywpxryqd,true));
         JtPxjhqd jtPxjhqd = jtPxjhqdService.getById(id);
         Map<String, Object> stringObjectMap = assembleApiData(jtPxjhqd, assembleData);
         return stringObjectMap;