Parcourir la source

履职代码优化

gaoxiong il y a 1 an
Parent
commit
120db6db99

+ 47 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/enums/ResumptionStatus.java

@@ -0,0 +1,47 @@
+package com.xunmei.core.resumption.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * 1 待履职,2 进行中,3 已完成,4 已过期
+ */
+@Slf4j
+@Getter
+@AllArgsConstructor
+public enum ResumptionStatus {
+    NO_START(1, "待履职"),
+    PROGRESS(2, "进行中"),
+    COMPLETED(3, "已完成"),
+    OUT_DATE(4, "已逾期"),
+
+
+    ;
+
+
+    /**
+     * 所有枚举
+     */
+    private static final Map<Integer, ResumptionStatus> enumMap = new LinkedHashMap<>();
+
+    static {
+        for (ResumptionStatus enumNode : ResumptionStatus.values()) {
+            enumMap.put(enumNode.code, enumNode);
+        }
+    }
+
+    private final Integer code;
+    private final String name;
+
+    /**
+     * 根据code获取name
+     */
+    public static String getName(Integer code) {
+        ResumptionStatus e = enumMap.get(code);
+        return e != null ? e.getName() : "";
+    }
+}

+ 155 - 174
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/gx/service/ResumptionServiceImpl.java

@@ -19,6 +19,7 @@ import com.xunmei.core.question.QuestionSrcType;
 import com.xunmei.core.question.domain.Question;
 import com.xunmei.core.question.service.IQuestionService;
 import com.xunmei.core.resumption.domain.*;
+import com.xunmei.core.resumption.enums.ResumptionStatus;
 import com.xunmei.core.resumption.gx.vo.*;
 import com.xunmei.core.resumption.mapper.*;
 import com.xunmei.core.resumption.service.AppPlanService;
@@ -72,7 +73,7 @@ public class ResumptionServiceImpl implements ResumptionService {
 
     @Override
     public ResumptionTaskDetailVo getTask(ResumptionTaskDetailVo taskDetailVo) throws Exception {
-        /**
+        /*
          * 逻辑梳理如下:
          * 1、根据任务获取plan_id
          * 2、根据任务的状态,进行不同的操作。根据数据分为:保存过数据任务,未保存过数据的任务
@@ -88,43 +89,34 @@ public class ResumptionServiceImpl implements ResumptionService {
          */
 
         DateHelper dateTime = new DateHelper(taskDetailVo.getTaskDate());
-        int year = dateTime.getYear();
-        int quarter = dateTime.getQuarter();
         //履职状态:1 待履职,2 进行中,3 已完成,4 已过期
-        Resumption resumption = resumptionMapper.findOneByTaskIdAndDate(taskDetailVo.getTaskId(), year, quarter);
+        Resumption resumption = resumptionMapper.findOneByTaskIdAndDate(taskDetailVo.getTaskId(), dateTime.getYear(), dateTime.getQuarter());
+
         Integer status = resumption.getStatus();
-        if (status == 1) {
+        if (ResumptionStatus.NO_START.getCode().equals(status)) {
             //增加待履职不能在未开始时打开逻辑
-            Date start = resumption.getPlanStartTime();
-            if (start.after(new Date())) {
+            if (resumption.getPlanStartTime().after(new Date())) {
                 throw new RuntimeException("任务未到开始时间!");
             }
-
         }
+
         List<ResumptionPlanVo> resumptionPlanVos = new ArrayList<>();
         boolean isExist = false;
-        if (status == 1 || status == 4) {
+        if (ResumptionStatus.NO_START.getCode().equals(status) || ResumptionStatus.OUT_DATE.getCode().equals(status)) {
             //待履职 和已过期的数据是没有保存过数据的只能根据计划获取
-            Long planId = resumption.getPlanId();
-            resumptionPlanVos = appPlanMapper.selectResumptionPlan(planId);
-            isExist = false;
+            resumptionPlanVos = appPlanMapper.selectResumptionPlan(resumption.getPlanId(),resumption.getOrgId());
         } else {
             resumptionPlanVos = resumptionMapper.selectResumptionPlan(taskDetailVo.getTaskId());
             isExist = true;
         }
 
-        /**
-         * 按区域组合的数据
-         */
-        ResumptionTaskDetailVo detailVo = assemblyData(resumptionPlanVos, isExist, resumption);
-
-        return detailVo;
+        return assemblyData(resumptionPlanVos, isExist, resumption);
     }
 
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void saveTask(ResumptionTaskDetailVo taskDetailVo) throws Exception {
-        /**
+        /*
          * subtype =1 表示保存数据
          * subtype = 2 表示提交数据
          */
@@ -245,9 +237,6 @@ public class ResumptionServiceImpl implements ResumptionService {
         List<ResumptionNFCVo> nfcs = taskDetailVo.getNfcs();
         AppResumptionDataNfc dataNfc = null;
         for (ResumptionNFCVo nfc : nfcs) {
-            if (nfc.getStatus() == 0) {
-                continue;
-            }
             dataNfc = new AppResumptionDataNfc();
             dataNfc.setResumptionId(taskId);
             dataNfc.setNfcId(nfc.getNfcId());
@@ -257,15 +246,11 @@ public class ResumptionServiceImpl implements ResumptionService {
             dataNfc.setStatus(nfc.getStatus());
             dataNfc.setSubmitTime(ObjectUtil.isNull(nfc.getSubmitTime()) ? new Date() : nfc.getSubmitTime());
             dataNfc.setSubmitBy(nfc.getSubmitBy());
-            IdWorker.getId(dataNfc);
+            long id = IdWorker.getId(dataNfc);
+            dataNfc.setId(id);
             dataNfcs.add(dataNfc);
-            //appResumptionDataNfcMapper.insert(dataNfc);
         }
 
-        /**
-         * 批量修改数据
-         */
-
         //1.批量插入 履职数据。
         if (ards.size() > 0) {
             resumptionMapper.batchInsertResumptionData(ards);
@@ -295,119 +280,157 @@ public class ResumptionServiceImpl implements ResumptionService {
 
     }
 
+
+
+
     /**
-     * 组装到前端的数据
-     *
-     * @param resumptionPlanVos
-     * @return
+     * 组装数据
+     * @param resumptionPlanVos 履职具体内容数据
+     * @param isExist 是否已保存或者提交数据
+     * @param resumption 履职任务信息
+     * @return 封装后的履职数据
      */
     private ResumptionTaskDetailVo assemblyData(List<ResumptionPlanVo> resumptionPlanVos, boolean isExist, Resumption resumption) {
 
-        ResumptionTaskDetailVo taskVo = new ResumptionTaskDetailVo();
-        taskVo.setTaskId(resumption.getId());
-        taskVo.setTaskName(resumption.getName());
-        taskVo.setStatus(resumption.getStatus());
-
-        /**
+        /*
          * 组装数据:
          *  1.对数据按区域分组。
          *  2.根据检查内容获取检查图片
          *  3.构建返回到前端的数据
          */
+
+        ResumptionTaskDetailVo taskVo = new ResumptionTaskDetailVo();
+        taskVo.setTaskId(resumption.getId());
+        taskVo.setTaskName(resumption.getName());
+        taskVo.setStatus(resumption.getStatus());
+
+        //获取任务的所有NFC信息
+        List<ResumptionNFCVo> nfcs = resumptionMapper.selectNFCOfOrg(resumption.getId(), resumption.getOrgId());
+        if(ResumptionStatus.COMPLETED.getCode().equals(resumption.getStatus())){
+            nfcs = nfcs.stream().filter(n -> n.getStatus() == 1).collect(Collectors.toList());
+        }
+
+        //获取任务的所有图片信息
         Map<Long, List<AppResumptionDataRemarkimg>> imgMap = new HashMap<>();
         if (isExist) {
             //数据存在,需要获取任务的所有图片信息
-            QueryWrapper<AppResumptionDataRemarkimg> qw = new QueryWrapper<>();
-            qw.lambda().eq(AppResumptionDataRemarkimg::getResumptionId, resumption.getId());
-            List<AppResumptionDataRemarkimg> imgs = appResumptionDataRemarkimgMapper.selectList(qw);
-            imgMap = imgs.stream().collect(Collectors.groupingBy(img -> img.getResumptionDataId()));
-//            for (AppResumptionDataRemarkimg img : imgs) {
-//                Long resumptionDataId = img.getResumptionDataId();
-//                List<AppResumptionDataRemarkimg> paths = imgMap.get(resumptionDataId);
-//                if (paths == null) {
-//                    paths = new ArrayList<>();
-//                }
-//                paths.add(img);
-//                imgMap.put(resumptionDataId, paths);
-//            }
+            imgMap = getResumptionDataImg(resumption.getId());
         }
 
-        List<ResumptionNFCVo> orgAllNFCs = resumptionMapper.selectNFCOfOrg(resumption.getId(), resumption.getOrgId());
-        final Set<Long> usedNFCID = new HashSet<>();
-        if (!isExist) {
-            //未保存过时,根据NFC-点位-区域的关系,将绑定到点位的履职内容拆解到各个区域。
-            List<ResumptionPlanVo> supplementItems = new ArrayList<>();
-
-            for (ResumptionPlanVo resumptionPlanVo : resumptionPlanVos) {
-                if (ObjectUtil.isNotNull(resumptionPlanVo.getCheckId()) && ObjectUtil.isNull(resumptionPlanVo.getAreaId())) {
-
-                    /*Map<Long, List<ResumptionNFCVo>> areaGroup = orgAllNFCs.stream()
-                            .filter(n -> ObjectUtil.equal(n.getCheckId(), resumptionPlanVo.getCheckId()))
-                            .collect(Collectors.groupingBy(n -> n.getAreaId()));
-                    */
-                    Map<Long, List<ResumptionNFCVo>> areaGroup = new HashMap<>();
-                    List<ResumptionNFCVo> vos = new ArrayList<>();
-                    for (ResumptionNFCVo nfcVo : orgAllNFCs) {
-                        if (nfcVo.getCheckId().equals(resumptionPlanVo.getCheckId())) {
-                            nfcVo.setPointScan(resumptionPlanVo.getPointScan());
-                            vos.add(nfcVo);
-                            usedNFCID.add(nfcVo.getNfcId());
-                        }
-                    }
-                    areaGroup = vos.stream().collect(Collectors.groupingBy(n -> n.getAreaId()));
+        //履职数据,统计分类
+        Integer yesPointNum = 0;
+        Integer noPointNum = 0;
 
+        //每个区域的检查项和检查内容数据
+        Map<String, ResumptionItemVo> itemMap = new HashMap<>();
+        //每个区域要点的总数和完成数
+        Map<Long, Map<String, Integer>> itComMap = new HashMap<>();
+        //区域数据
+        Map<Long, AreaResumptionVo> map = new HashMap<>();
 
-                    if (CollectionUtils.isEmpty(areaGroup)) {
-                        ResumptionPlanVo newVo = new ResumptionPlanVo();
-                        BeanUtils.copyProperties(resumptionPlanVo, newVo);
-                        newVo.setAreaId(-1L);
-                        supplementItems.add(newVo);
-                    } else {
-                        areaGroup.forEach((area, nfcs) -> {
-                            ResumptionPlanVo newVo = new ResumptionPlanVo();
-                            BeanUtils.copyProperties(resumptionPlanVo, newVo);
-                            newVo.setAreaId(area);
-                            newVo.setAreaName(nfcs.get(0).getAreaName());
-                            supplementItems.add(newVo);
-                        });
-                    }
-                } else {
-                    for (ResumptionNFCVo nfcVo : orgAllNFCs) {
-                        if (nfcVo.getAreaId().equals(resumptionPlanVo.getAreaId()) &&
-                                (ObjectUtil.isNull(resumptionPlanVo.getCheckId()) || ObjectUtil.equal(nfcVo.getCheckId(), resumptionPlanVo.getCheckId()))) {
-                            nfcVo.setPointScan(resumptionPlanVo.getPointScan());
-                            usedNFCID.add(nfcVo.getNfcId());
-                        }
-                    }
-                    //如果是绑定到区域的,直接使用
-                    supplementItems.add(resumptionPlanVo);
-                }
+        dealData(resumptionPlanVos, imgMap, itemMap, itComMap, map, noPointNum, yesPointNum,isExist);
+
+        Map<String, Integer> groupNFC = groupNFCByAreaId(nfcs);
+
+        int yesNFC = 0;
+        int noNFC = 0;
+        List<AreaResumptionVo> areas = new ArrayList<>();
+        for (Map.Entry<Long, AreaResumptionVo> entry : map.entrySet()) {
+            AreaResumptionVo vo = entry.getValue();
+            Long areaId = entry.getKey();
+            Integer unScan = groupNFC.get(areaId + "_0");
+            Integer scan = groupNFC.get(areaId + "_1");
+            if(unScan == null){
+                unScan = 0;
             }
+            if (scan == null) {
+                scan = 0;
+            }
+            noNFC = noNFC + unScan;
+            yesNFC = yesNFC + scan;
 
-            resumptionPlanVos = supplementItems;
-        } else {
-            //反馈给前端,只需要保存后的数据
-            if (resumption.getStatus() == 3 || resumption.getStatus() == 2) {
-                //如果已经提交
-                usedNFCID.addAll(orgAllNFCs.stream().filter(n -> n.getStatus() == 1).map(n -> n.getNfcId()).collect(Collectors.toSet()));
+            Map<String, Integer> com = itComMap.get(areaId);
+            Integer total = com.get("total");
+            Integer yes = com.get("yes");
+            if (total.equals(yes)) {
+                //总数等于处理数
+                vo.setAreaStatus("1");
+            } else if (yes > 0) {
+                vo.setAreaStatus("2");
+            } else if (yes == 0) {
+                vo.setAreaStatus("0");
             }
+            areas.add(vo);
         }
-        orgAllNFCs = orgAllNFCs.stream().filter(n -> usedNFCID.contains(n.getNfcId())).collect(Collectors.toList());
 
-        Integer yesPointNum = 0;
-        Integer noPointNum = 0;
-        Map<String, ResumptionItemVo> itemMap = new HashMap<>();
-        Map<Long, Map<String, Integer>> itComMap = new HashMap<>();
-        Map<Long, AreaResumptionVo> map = new HashMap<>();
+        taskVo.setNoNFCNums(noNFC);
+        taskVo.setYesNFCNums(yesNFC);
+        taskVo.setNoPointNums(noPointNum);
+        taskVo.setYesPointNums(yesPointNum);
+        taskVo.setAreas(areas);
+        taskVo.setChecks(ListUtil.toList(itemMap.values()));
+        taskVo.setNfcs(nfcs);
+        return taskVo;
+    }
+
+    /**
+     * 区域统计NFC扫描未扫描的数量
+     * @param nfcs
+     * @return
+     */
+    private Map<String,Integer> groupNFCByAreaId(List<ResumptionNFCVo> nfcs){
+        Map<String,Integer> map = new HashMap<>();
+        for (ResumptionNFCVo nfc : nfcs) {
+            Integer status = nfc.getStatus();
+            if(status == 0){
+                Integer count = map.get(nfc.getAreaId() + "_0");
+                if(count == null){
+                    count = 0;
+                }
+                count++;
+                map.put(nfc.getAreaId() + "_0",count);
+            }
+            if(status == 1){
+                Integer count = map.get(nfc.getAreaId() + "_1");
+                if(count == null){
+                    count = 0;
+                }
+                count++;
+                map.put(nfc.getAreaId() + "_1",count);
+            }
+        }
+        return map;
+    }
+
+
+    /**
+     * 封装处理数据
+     * @param resumptionPlanVos 任务检查数据
+     * @param imgMap 图片数据
+     * @param itemMap 要点数据
+     * @param itComMap 区域数据
+     * @param map 区域数据
+     * @param noPointNum 未执行的检查要点
+     * @param yesPointNum 已执行的检查要点
+     * @param isExist 是否已完成
+     */
+    private void dealData(List<ResumptionPlanVo> resumptionPlanVos,
+                          Map<Long, List<AppResumptionDataRemarkimg>> imgMap,
+                          Map<String, ResumptionItemVo> itemMap,
+                          Map<Long, Map<String, Integer>> itComMap,
+                          Map<Long, AreaResumptionVo> map,
+                          Integer noPointNum,
+                          Integer yesPointNum,boolean isExist){
+
         for (ResumptionPlanVo vo : resumptionPlanVos) {
-            //是否必捡,1必须检查,0非必须检查
-            Integer required = vo.getRequired();
+
             if (vo.getDataStatus() == 1) {
                 noPointNum++;
             } else {
                 yesPointNum++;
             }
 
+
             if (isExist) {
                 //如果存在数据则设置图片啊
                 List<AppResumptionDataRemarkimg> imgs = imgMap.get(vo.getDataId());
@@ -416,15 +439,16 @@ public class ResumptionServiceImpl implements ResumptionService {
                 }
             }
 
+            //区域数据 转换为map
             AreaResumptionVo areaVo = map.get(vo.getAreaId());
             if (ObjectUtil.isNull(areaVo)) {
                 areaVo = new AreaResumptionVo();
                 areaVo.setAreaId(vo.getAreaId());
-                areaVo.setAreaName(ObjectUtil.isNull(vo.getAreaName()) ? "其它" : vo.getAreaName());
+                areaVo.setAreaName(vo.getAreaName());
                 map.put(areaVo.getAreaId(), areaVo);
             }
 
-
+            //要点数据 转换为map
             ResumptionItemVo resumptionItemVo = itemMap.get(vo.getItemId() + "_" + vo.getAreaId());
             if (resumptionItemVo == null) {
                 resumptionItemVo = new ResumptionItemVo();
@@ -450,6 +474,9 @@ public class ResumptionServiceImpl implements ResumptionService {
             pointVo.setRectificationDeadline(vo.getRectificationDeadline());
             pointVo.setDataStatus(vo.getDataStatus());
             resumptionItemVo.getPoints().add(pointVo);
+
+
+            //统计区域完成的要点数量,未完成的要点数量
             Map<String, Integer> itCom = itComMap.get(vo.getAreaId());
             if (itCom == null) {
                 itCom = new HashMap<>();
@@ -470,67 +497,21 @@ public class ResumptionServiceImpl implements ResumptionService {
 
             itemMap.put(vo.getItemId() + "_" + vo.getAreaId(), resumptionItemVo);
         }
+    }
 
 
-//        List<ResumptionItemVo> items = new ArrayList<>();
-//        for (Map.Entry<Long, ResumptionItemVo> entry : itemMap.entrySet()) {
-//            ResumptionItemVo itemVo = entry.getValue();
-//            AreaResumptionVo areaData = map.get(itemVo.getAreaId());
-//            if (areaData == null) {
-//                areaData = new AreaResumptionVo();
-//                areaData.setAreaId(itemVo.getAreaId());
-//                areaData.setAreaName(itemVo.getAreaName());
-//                map.put(itemVo.getAreaId(), areaData);
-//            }
-//            items.add(itemVo);
-//        }
-
-        Integer yesNFC = 0;
-        Integer noNFC = 0;
-
-
-        List<ResumptionNFCVo> nfcs = new ArrayList<>();
-        List<AreaResumptionVo> areas = new ArrayList<>();
-        for (Map.Entry<Long, AreaResumptionVo> entry : map.entrySet()) {
-            AreaResumptionVo vo = entry.getValue();
-            Long areaId = entry.getKey();
-            //获取每个区域下的nfc
-            List<ResumptionNFCVo> resumptionNFCVos = orgAllNFCs.stream().filter(n -> ObjectUtil.equal(n.getAreaId(), areaId)).collect(Collectors.toList());
-            /*resumptionMapper.selectResumptionNFC(resumption.getId(), areaId, resumption.getOrgId());*/
-
-            for (ResumptionNFCVo resumptionNFCVo : resumptionNFCVos) {
-                Integer status = resumptionNFCVo.getStatus();
-                Map<String, Integer> com = itComMap.get(resumptionNFCVo.getAreaId());
-                com.put("total", com.get("total") + 1);
-                if (status == 0) {
-                    noNFC++;
-                    continue;
-                }
-                com.put("yes", com.get("yes") + 1);
-                yesNFC++;
-            }
-            nfcs.addAll(resumptionNFCVos);
-            Map<String, Integer> com = itComMap.get(areaId);
-            Integer total = com.get("total");
-            Integer yes = com.get("yes");
-            if (total.equals(yes)) {
-                //总数等于处理数
-                vo.setAreaStatus("1");
-            } else if (yes > 0) {
-                vo.setAreaStatus("2");
-            } else if (yes == 0) {
-                vo.setAreaStatus("0");
-            }
-            areas.add(vo);
-        }
 
-        taskVo.setNoNFCNums(noNFC);
-        taskVo.setYesNFCNums(yesNFC);
-        taskVo.setNoPointNums(noPointNum);
-        taskVo.setYesPointNums(yesPointNum);
-        taskVo.setAreas(areas);
-        taskVo.setChecks(ListUtil.toList(itemMap.values()));
-        taskVo.setNfcs(nfcs);
-        return taskVo;
+    /**
+     * 根据履职任务id,获取履职过程中产生的图片数据
+     * @param resumptionId 履职任务id
+     * @return 按照履职data数据id为key的map数据
+     */
+    private  Map<Long, List<AppResumptionDataRemarkimg>> getResumptionDataImg(Long resumptionId){
+        Map<Long, List<AppResumptionDataRemarkimg>> imgMap = new HashMap<>();
+        QueryWrapper<AppResumptionDataRemarkimg> qw = new QueryWrapper<>();
+        qw.lambda().eq(AppResumptionDataRemarkimg::getResumptionId, resumptionId);
+        List<AppResumptionDataRemarkimg> images = appResumptionDataRemarkimgMapper.selectList(qw);
+        imgMap = images.stream().collect(Collectors.groupingBy(AppResumptionDataRemarkimg::getResumptionDataId));
+        return imgMap;
     }
 }

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/mapper/AppPlanMapper.java

@@ -88,10 +88,10 @@ public interface AppPlanMapper extends BaseMapper<AppPlan> {
      * 根据计划id获取履职内容
      *
      * @param planId
-     * @param startDate 任务的开始日期
+     * @param orgId
      * @return
      */
-    List<ResumptionPlanVo> selectResumptionPlan(@Param("planId") Long planId);
+    List<ResumptionPlanVo> selectResumptionPlan(@Param("planId") Long planId,@Param("orgId") Long orgId);
 
     Integer updateParentPlanCompletedState(@Param("planId") Long planId);
 

+ 6 - 4
soc-modules/soc-modules-core/src/main/resources/bootstrap.yml

@@ -13,18 +13,20 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 4bb89334-98df-4ffc-904a-65bc848a8ea0
         # 服务注册地址
-        server-addr: 10.87.21.102:8848
+        server-addr: 47.92.229.224:8848
       config:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 4bb89334-98df-4ffc-904a-65bc848a8ea0
         # 配置中心地址
-        server-addr: 10.87.21.102:8848
+        server-addr: 47.92.229.224:8848
         # 配置文件格式
         file-extension: yml
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+      username: nacos
+      password: nacos
 logging:
   file:
     name: logs/${spring.application.name}/info.log

+ 11 - 3
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppPlanMapper.xml

@@ -405,8 +405,12 @@
                q.item_name,
                q.point_id,
                q.point_name,
-               q.area_id,
-               w.`name` as area_name,
+               CASE WHEN q.area_id IS NULL THEN 1
+                    ELSE q.area_id
+                   END AS area_id,
+               CASE WHEN  w.`name` IS NULL THEN '其他'
+                    ELSE  w.`name`
+                   END AS area_name,
                q.check_id,
                q.plan_id,
                q.point_scan,
@@ -415,7 +419,10 @@
                      c.`name` as item_name,
                      b.id     as point_id,
                      b.name   as point_name,
-                     b.area_id,
+                     CASE WHEN b.area_id IS NULL
+                              THEN d.area_id
+                          ELSE b.area_id
+                         END AS area_id,
                      b.check_id,
                      a.plan_id,
                      a.point_scan,
@@ -423,6 +430,7 @@
               from core_resumption_plan_to_point a
                        LEFT JOIN core_resumption_rule_point b on a.point_id = b.id
                        LEFT JOIN core_resumption_rule_item c on b.item_id = c.id
+                       LEFT JOIN (select area_id,check_id from  sys_nfc_bind  where org_id = #{orgId}) d on b.check_id = d.check_id
               where a.plan_id = #{planId}) q
                  LEFT JOIN sys_area w on q.area_id = w.id
     </select>