Ver Fonte

feat(check): 增加设备检查和风险单元检查的人员配置功能

- 新增 AspPersonnelCheckConfigDao 接口和对应的 XML 文件,实现批量查询检查人员信息的功能
- 在 AspPersonnelCheckConfigService 接口中添加新的方法,实现检查人员信息的查询
- 修改 CheckTemplateServiceImpl 类,增加根据设备或风险单元获取检查人员的逻辑
- 在 ThemeCheckItemDo 类中添加 type 字段,用于区分检查类型
- 在 MlConstants 中添加检查类型和负责人岗位属性的常量
1229550909@qq.com há 2 semanas atrás
pai
commit
0c34079a22

+ 27 - 6
js-security/security-common/src/main/java/com/rongwei/sfcommon/sys/dao/AspPersonnelCheckConfigDao.java

@@ -7,15 +7,36 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 /**
-* @author libai
-* @description 针对表【asp_personnel_check_config(人员检查配置)】的数据库操作Mapper
-* @createDate 2025-07-11 09:31:16
-* @Entity generator.domain.AspPersonnelCheckConfig
-*/
+ * @author libai
+ * @description 针对表【asp_personnel_check_config(人员检查配置)】的数据库操作Mapper
+ * @createDate 2025-07-11 09:31:16
+ * @Entity generator.domain.AspPersonnelCheckConfig
+ */
 public interface AspPersonnelCheckConfigDao extends BaseMapper<AspPersonnelCheckConfigDo> {
+
+    /**
+     * 查询人员检查配置信息
+     *
+     * @param checkObjId 检查对象ID
+     * @param jobAttr    岗位属性
+     * @param checkType  检查类型
+     * @return 人员检查配置信息
+     */
     List<AspPersonnelCheckConfigDo> selectCheckUserInfo(@Param("checkObjId") String checkObjId,
                                                         @Param("jobAttr") String jobAttr,
-                                                        @Param("checkType")String checkType);
+                                                        @Param("checkType") String checkType);
+
+    /**
+     * 批量查询人员检查配置信息
+     *
+     * @param checkType   检查类型
+     * @param jobAttr     岗位属性
+     * @param checkObjIds 检查对象ID集合
+     * @return 人员检查配置信息
+     */
+    List<AspPersonnelCheckConfigDo> batchSelectCheckUserInfo(@Param("checkType") String checkType,
+                                                             @Param("checkObjIds") List<String> checkObjIds,
+                                                             @Param("jobAttr") String jobAttr);
 
 }
 

+ 25 - 0
js-security/security-common/src/main/java/com/rongwei/sfcommon/sys/service/AspPersonnelCheckConfigService.java

@@ -3,11 +3,36 @@ package com.rongwei.sfcommon.sys.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwe.scentity.domian.AspPersonnelCheckConfigDo;
 
+import java.util.List;
+
 /**
  * @author libai
  * @description 针对表【asp_personnel_check_config(人员检查配置)】的数据库操作Service
  * @createDate 2025-07-11 09:31:16
  */
 public interface AspPersonnelCheckConfigService extends IService<AspPersonnelCheckConfigDo> {
+    /**
+     * 查询人员检查配置信息
+     *
+     * @param checkObjId 检查对象ID
+     * @param jobAttr    岗位属性
+     * @param checkType  检查类型
+     * @return 人员检查配置信息
+     */
+    List<AspPersonnelCheckConfigDo> selectCheckUserInfo(String checkObjId,
+                                                        String jobAttr,
+                                                        String checkType);
+
+    /**
+     * 批量查询人员检查配置信息
+     *
+     * @param checkType   检查类型
+     * @param jobAttr     岗位属性
+     * @param checkObjIds 检查对象ID集合
+     * @return 人员检查配置信息
+     */
+    List<AspPersonnelCheckConfigDo> batchSelectCheckUserInfo(String checkType,
+                                                             List<String> checkObjIds,
+                                                             String jobAttr);
 
 }

+ 14 - 0
js-security/security-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/AspPersonnelCheckConfigServiceImpl.java

@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwe.scentity.domian.AspPersonnelCheckConfigDo;
 import com.rongwei.sfcommon.sys.dao.AspPersonnelCheckConfigDao;
 import com.rongwei.sfcommon.sys.service.AspPersonnelCheckConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * @author libai
  * @description 针对表【asp_personnel_check_config(人员检查配置)】的数据库操作Service实现
@@ -14,7 +17,18 @@ import org.springframework.stereotype.Service;
 @Service
 public class AspPersonnelCheckConfigServiceImpl extends ServiceImpl<AspPersonnelCheckConfigDao, AspPersonnelCheckConfigDo>
         implements AspPersonnelCheckConfigService {
+    @Autowired
+    private AspPersonnelCheckConfigDao aspPersonnelCheckConfigDao;
+
+    @Override
+    public List<AspPersonnelCheckConfigDo> selectCheckUserInfo(String checkObjId, String jobAttr, String checkType) {
+        return aspPersonnelCheckConfigDao.selectCheckUserInfo(checkObjId, jobAttr, checkType);
+    }
 
+    @Override
+    public List<AspPersonnelCheckConfigDo> batchSelectCheckUserInfo(String checkType, List<String> checkObjIds, String jobAttr) {
+        return aspPersonnelCheckConfigDao.batchSelectCheckUserInfo(checkType, checkObjIds, jobAttr);
+    }
 }
 
 

+ 139 - 72
js-security/security-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/CheckTemplateServiceImpl.java

@@ -21,6 +21,7 @@ import com.rongwei.sfcommon.sys.dao.AspShiftTimeDao;
 import com.rongwei.sfcommon.sys.dao.CheckTemplateDao;
 import com.rongwei.sfcommon.sys.service.*;
 import com.rongwei.sfcommon.utils.MlConstants;
+import org.apache.logging.log4j.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,7 +30,6 @@ import org.springframework.stereotype.Service;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import static com.rongwei.safecommon.utils.JSCommonUtils.parameterCheck;
 import static com.rongwei.safecommon.utils.JSCommonUtils.streamCodeGeneration;
@@ -81,6 +81,8 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
     private ThemeCheckContentService themeCheckContentService;
     @Autowired
     private AspRiskUnitServiceImpl aspRiskUnitService;
+    @Autowired
+    private AspPersonnelCheckConfigService aspPersonnelCheckConfigService;
 
     /**
      * 通用Map转自定义业务实体类
@@ -475,7 +477,9 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                 //发送消息提醒添加设备名称和设备编号拼接
                 String checkitemname = k.getCheckitemname();
                 String checkitemcode = k.getCheckitemcode();
-                SysDictDo sysDictDo = dictsByType.stream().filter(info -> info.getValue().equals(templatetype)).findFirst().orElse(null);
+                SysDictDo sysDictDo = dictsByType.stream().filter(info -> info.getValue().equals(templatetype))
+                        .findFirst()
+                        .orElse(null);
                 JSCommonUtils.sendNotify(INSPECTION_TITLE, String.format(INSPECTION_CONTENT, pointcheckname, checkitemname, checkitemcode, sysDictDo == null ? "" : sysDictDo.getName()),
                         null, v, k.getId(), INSPECTION + "-" + shift, false);
             });
@@ -523,10 +527,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
         Map<String, List<CheckTemplateItemsDo>> shiftTypeAndTempMap = new HashMap<>();
         // 获取工作时间信息
         List<AspShiftTimeDo> aspShiftTimeDos = aspShiftTimeDao.selectByMap(SHIFT_TIME_QUERY);
-        // 风险单元ID
-        String riskunitid = checkTemplateDo.getRiskunitid();
-        JSCommonUtils.parameterCheck(() -> StringUtils.isBlank(riskunitid), "风险单元为空", "风险单元为空");
-        List<AspRiskUnitDo> aspRiskUnitDos = aspRiskUnitService.getBaseMapper().selectBatchIds(Arrays.asList(riskunitid.split(",")));
+
         Map<String, String> checkUserMap = new HashMap<>();
         if (StringUtils.isNotBlank(checkTemplateDo.getInspectorsid())) {
             String[] ids = checkTemplateDo.getInspectorsid().split(",");
@@ -535,12 +536,49 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                 checkUserMap.put(ids[i], names[i]);
             }
         }
+
+        // 风险分析单元
+        List<AspRiskUnitDo> aspRiskUnitDos = Collections.emptyList();
+        // 设备
+        List<CheckItemsDo> checkitemList = Collections.emptyList();
+        List<String> checkAreaIds = new ArrayList<>();
+        String checkAttr;
+        String checkType;
+        if ("1".equals(checkTemplateDo.getObjclass())) {
+            // 设备 ID
+            String checkitemids = checkTemplateDo.getCheckitemids();
+            parameterCheck(() -> StringUtils.isBlank(checkitemids), "设备为空", "设备为空");
+            checkitemList = checkItemsService.getBaseMapper().selectBatchIds(Arrays.asList(checkitemids.split(",")));
+            checkAreaIds = checkitemList.stream().map(CheckItemsDo::getId).collect(Collectors.toList());
+            checkAttr = CheckType.EQU;
+            checkType = ResponsiblePositionAttribute.EQU_CHECK;
+        } else {
+            // 风险单元 ID
+            String riskunitid = checkTemplateDo.getRiskunitid();
+            parameterCheck(() -> StringUtils.isBlank(riskunitid), "风险单元为空", "风险单元为空");
+            aspRiskUnitDos = aspRiskUnitService.getBaseMapper().selectBatchIds(Arrays.asList(riskunitid.split(",")));
+            checkAreaIds = aspRiskUnitDos.stream().map(AspRiskUnitDo::getId).collect(Collectors.toList());
+            checkAttr = CheckType.RISK;
+            checkType = ResponsiblePositionAttribute.RISK_CHECK;
+        }
+        // 检查人员为空的时,从人员检查配置中获取人员,设置为检察人员
+        if (checkUserMap.isEmpty()) {
+            // 从设备中获取检查人
+            List<AspPersonnelCheckConfigDo> aspPersonnelCheckConfigDos = aspPersonnelCheckConfigService
+                    .batchSelectCheckUserInfo(checkType, checkAreaIds, checkAttr);
+            aspPersonnelCheckConfigDos.forEach(data -> {
+                checkUserMap.put(data.getDutyofficerid(), data.getDutyofficername());
+            });
+        }
+
         // 获取模板对应的检查项
         List<CheckTemplateItemsDo> templateItemsDos = checkTemplateItemsService.list(new LambdaQueryWrapper<CheckTemplateItemsDo>()
                 .in(CheckTemplateItemsDo::getChecktemplateid, checkTemplateDo.getId())
                 .eq(BaseDo::getDeleted, "0"));
         if (!mode) {
-            templateItemsDos = templateItemsDos.stream().filter(data -> isNowCreateByFrequency(data.getFrequency())).collect(Collectors.toList());
+            templateItemsDos = templateItemsDos.stream()
+                    .filter(data -> isNowCreateByFrequency(data.getFrequency()))
+                    .collect(Collectors.toList());
         }
         logger.debug("本次需要生成检查计划的模板数据有:{}", templateItemsDos.size());
 
@@ -562,8 +600,6 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
         List<ThemeCheckItemDo> themeCheckItemSaveDos = new ArrayList<>();
         // 检查任务对应的检查项
         List<ThemeCheckContentDo> themeCheckContentDos = new ArrayList<>();
-        ThemeCheckItemDo checkItemDo;
-        ThemeCheckContentDo themeCheckContentDo;
         Date startTime = startCalendar.getTime();
         Date endTime = endCalendar.getTime();
         templateItemsDos.forEach(tempDao -> {
@@ -594,79 +630,110 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                 // 长白班
                 shiftTypeAndTempMap.computeIfAbsent(CHECK_SHIFT_EVERY_CHANGBAI_CLASS_SHIFT, k -> new ArrayList<>()).add(tempDao);
             }
-
         });
 
-
-        // 模板对应的检查项
-        List<CheckTemplateItemsDo> items;
-        for (AspRiskUnitDo aspRiskUnitDo : aspRiskUnitDos) {
-            checkUserMap.put(aspRiskUnitDo.getDutyofficerid(), aspRiskUnitDo.getDutyofficername());
-            for (Map.Entry<String, String> nameAndId : checkUserMap.entrySet()) {
-                for (Map.Entry<String, List<CheckTemplateItemsDo>> entry : shiftTypeAndTempMap.entrySet()) {
-                    String k = entry.getKey();
-                    AspShiftTimeDo aspShiftTimeDo = aspShiftTimeDos.stream().filter(info -> k.equals(info.getShift())).findFirst().orElse(null);
-                    int maxFrequency = entry.getValue().stream()
-                            .mapToInt(item -> Optional.ofNullable(item.getShiftcount()).orElse(1))
-                            .max()
-                            .orElse(1);
-                    for (int i = 1; i <= maxFrequency; i++) {
-                        checkItemDo = new ThemeCheckItemDo();
-                        checkItemDo.setId(SecurityUtil.getUUID());
-                        JSCommonUtils.setBaseDetail(checkItemDo, currentUser);
-                        checkItemDo.setThemechecknum(JSCommonUtils.streamCodeGeneration("asp_theme_check_item_number",
-                                "SC@{date:yyyyMM}@{serialNumber:#000000}", "date:yyyyMM", ""));
-                        checkItemDo.setThemecheckid(checkTemplateDo.getId());
-                        checkItemDo.setThemecheckname(checkTemplateDo.getTemplatename());
-                        if (aspShiftTimeDo != null) {
-                            checkItemDo.setPlanstarttime(basedOnShiftGenerateTime(aspShiftTimeDo, AspShiftTimeDo::getStarttime));
-                            checkItemDo.setPlanendtime(basedOnShiftGenerateTime(aspShiftTimeDo, AspShiftTimeDo::getEndtime));
-                        } else {
-                            checkItemDo.setPlanstarttime(startTime);
-                            checkItemDo.setPlanendtime(endTime);
-                        }
-                        checkItemDo.setChecktype(checkTemplateDo.getTemplatetype());
-                        checkItemDo.setTenantid(checkTemplateDo.getTenantid());
-                        checkItemDo.setChecker(nameAndId.getValue());
-                        checkItemDo.setCheckerid(nameAndId.getKey());
-                        checkItemDo.setThemecheckworkspartid(aspRiskUnitDo.getResponsibledeptid());
-                        checkItemDo.setCheckworkspart(aspRiskUnitDo.getResponsibledept());
-                        checkItemDo.setCheckresult("20");
-                        checkItemDo.setCheckstatus(THEME_CHECK_STATUS_WAIT);
-                        checkItemDo.setTenantid(checkTemplateDo.getTenantid());
-                        themeCheckItemSaveDos.add(checkItemDo);
-                        int finalI = i;
-                        items = entry.getValue().stream()
-                                .peek(info -> {
-                                    Integer shiftcount = Optional.ofNullable(info.getShiftcount()).orElse(1);
-                                    info.setShiftcount(shiftcount);
-                                })
-                                .filter(info -> info.getShiftcount() >= finalI)
-                                .collect(Collectors.toList());
-                        for (int j = 0; j < items.size(); j++) {
-                            themeCheckContentDo = new ThemeCheckContentDo();
-                            themeCheckContentDo.setItemsort(j + 1);
-                            themeCheckContentDo.setTenantid(checkTemplateDo.getTenantid());
-                            themeCheckContentDo.setId(SecurityUtil.getUUID());
-                            themeCheckContentDo.setThemecheckitemid(checkItemDo.getId());
-                            JSCommonUtils.setBaseDetail(themeCheckContentDo, currentUser);
-                            themeCheckContentDo.setCheckposition(items.get(j).getCheckposition());
-                            themeCheckContentDo.setCheckmethod(items.get(j).getChecktype());
-                            themeCheckContentDo.setCheckcontent(items.get(j).getCheckcontent());
-                            themeCheckContentDo.setManagement(items.get(j).getCheckstandard());
-                            themeCheckContentDo.setTenantid(checkTemplateDo.getTenantid());
-                            themeCheckContentDos.add(themeCheckContentDo);
-                        }
-                    }
+        if ("1".equals(checkTemplateDo.getObjclass())) {
+            if (checkUserMap.isEmpty()) {
+                checkUserMap.put(Strings.EMPTY, Strings.EMPTY);
+            }
+            for (CheckItemsDo checkItemsDo : checkitemList) {
+                createThemeCheck(checkTemplateDo, checkUserMap, shiftTypeAndTempMap, aspShiftTimeDos,
+                        currentUser, startTime, endTime, themeCheckItemSaveDos, themeCheckContentDos,
+                        checkItemsDo.getUsedeptid(),
+                        checkItemsDo.getUsedeptname(), CheckType.EQU);
+            }
+        } else {
+            for (AspRiskUnitDo aspRiskUnitDo : aspRiskUnitDos) {
+                if (checkUserMap.isEmpty()) {
+                    checkUserMap.put(aspRiskUnitDo.getDutyofficerid(), aspRiskUnitDo.getDutyofficername());
                 }
+                createThemeCheck(checkTemplateDo, checkUserMap, shiftTypeAndTempMap, aspShiftTimeDos,
+                        currentUser, startTime, endTime, themeCheckItemSaveDos, themeCheckContentDos,
+                        aspRiskUnitDo.getResponsibledeptid(),
+                        aspRiskUnitDo.getResponsibledept(), CheckType.RISK);
+                checkUserMap.remove(aspRiskUnitDo.getDutyofficerid());
             }
-            checkUserMap.remove(aspRiskUnitDo.getDutyofficerid());
         }
+
         // 数据存表
         JSCommonUtils.batchChunk(themeCheckItemSaveDos, themeCheckItemService::saveBatch, 20);
         JSCommonUtils.batchChunk(themeCheckContentDos, themeCheckContentService::saveBatch, 20);
     }
 
+    private void createThemeCheck(CheckTemplateDo checkTemplateDo,
+                                  Map<String, String> checkUserMap,
+                                  Map<String, List<CheckTemplateItemsDo>> shiftTypeAndTempMap,
+                                  List<AspShiftTimeDo> aspShiftTimeDos, SysUserVo currentUser,
+                                  Date startTime, Date endTime, List<ThemeCheckItemDo> themeCheckItemSaveDos,
+                                  List<ThemeCheckContentDo> themeCheckContentDos,
+                                  String themecheckworkspartid,
+                                  String checkworkspart,
+                                  String type) {
+
+        ThemeCheckContentDo themeCheckContentDo;
+        List<CheckTemplateItemsDo> items;
+        ThemeCheckItemDo checkItemDo;
+        for (Map.Entry<String, String> nameAndId : checkUserMap.entrySet()) {
+            for (Map.Entry<String, List<CheckTemplateItemsDo>> entry : shiftTypeAndTempMap.entrySet()) {
+                String k = entry.getKey();
+                AspShiftTimeDo aspShiftTimeDo = aspShiftTimeDos.stream().filter(info -> k.equals(info.getShift())).findFirst().orElse(null);
+                int maxFrequency = entry.getValue().stream()
+                        .mapToInt(item -> Optional.ofNullable(item.getShiftcount()).orElse(1))
+                        .max()
+                        .orElse(1);
+                for (int i = 1; i <= maxFrequency; i++) {
+                    checkItemDo = new ThemeCheckItemDo();
+                    checkItemDo.setId(SecurityUtil.getUUID());
+                    JSCommonUtils.setBaseDetail(checkItemDo, currentUser);
+                    checkItemDo.setThemechecknum(streamCodeGeneration("asp_theme_check_item_number",
+                            "SC@{date:yyyyMM}@{serialNumber:#000000}", "date:yyyyMM", ""));
+                    checkItemDo.setThemecheckid(checkTemplateDo.getId());
+                    checkItemDo.setThemecheckname(checkTemplateDo.getTemplatename());
+                    if (aspShiftTimeDo != null) {
+                        checkItemDo.setPlanstarttime(basedOnShiftGenerateTime(aspShiftTimeDo, AspShiftTimeDo::getStarttime));
+                        checkItemDo.setPlanendtime(basedOnShiftGenerateTime(aspShiftTimeDo, AspShiftTimeDo::getEndtime));
+                    } else {
+                        checkItemDo.setPlanstarttime(startTime);
+                        checkItemDo.setPlanendtime(endTime);
+                    }
+                    checkItemDo.setChecktype(checkTemplateDo.getTemplatetype());
+                    checkItemDo.setTenantid(checkTemplateDo.getTenantid());
+                    checkItemDo.setChecker(nameAndId.getValue());
+                    checkItemDo.setCheckerid(nameAndId.getKey());
+                    checkItemDo.setThemecheckworkspartid(themecheckworkspartid);
+                    checkItemDo.setCheckworkspart(checkworkspart);
+                    checkItemDo.setCheckresult("20");
+                    checkItemDo.setCheckstatus(THEME_CHECK_STATUS_WAIT);
+                    checkItemDo.setTenantid(checkTemplateDo.getTenantid());
+                    checkItemDo.setType(type);
+                    themeCheckItemSaveDos.add(checkItemDo);
+                    int finalI = i;
+                    items = entry.getValue().stream()
+                            .peek(info -> {
+                                Integer shiftcount = Optional.ofNullable(info.getShiftcount()).orElse(1);
+                                info.setShiftcount(shiftcount);
+                            })
+                            .filter(info -> info.getShiftcount() >= finalI)
+                            .collect(Collectors.toList());
+                    for (int j = 0; j < items.size(); j++) {
+                        themeCheckContentDo = new ThemeCheckContentDo();
+                        themeCheckContentDo.setItemsort(j + 1);
+                        themeCheckContentDo.setTenantid(checkTemplateDo.getTenantid());
+                        themeCheckContentDo.setId(SecurityUtil.getUUID());
+                        themeCheckContentDo.setThemecheckitemid(checkItemDo.getId());
+                        JSCommonUtils.setBaseDetail(themeCheckContentDo, currentUser);
+                        themeCheckContentDo.setCheckposition(items.get(j).getCheckposition());
+                        themeCheckContentDo.setCheckmethod(items.get(j).getChecktype());
+                        themeCheckContentDo.setCheckcontent(items.get(j).getCheckcontent());
+                        themeCheckContentDo.setManagement(items.get(j).getCheckstandard());
+                        themeCheckContentDo.setTenantid(checkTemplateDo.getTenantid());
+                        themeCheckContentDos.add(themeCheckContentDo);
+                    }
+                }
+            }
+        }
+    }
+
     public Date basedOnShiftGenerateTime(AspShiftTimeDo aspShiftTimeDo,
                                          Function<AspShiftTimeDo, String> getTimeFunction) {
         if (aspShiftTimeDo == null) {

+ 43 - 0
js-security/security-common/src/main/java/com/rongwei/sfcommon/utils/MlConstants.java

@@ -124,4 +124,47 @@ public class MlConstants {
      * 零时一次性任务
      */
     public static final String JOB_START_TYPE_DISPOSABLE = "20";
+
+    /**
+     * 检查类型  设备(equ),风险单元(risk)
+     */
+    public static class CheckType {
+
+        /**
+         * 设备
+         */
+        public static final String EQU = "equ";
+
+        /**
+         * 风险单元(risk)
+         */
+        public static final String RISK = "risk";
+    }
+
+    /**
+     * 负责人岗位属性
+     */
+    public static class ResponsiblePositionAttribute {
+
+        /**
+         * 隐患排查人
+         */
+        public static final String HIDDEN_DANGER_CHECK = "40";
+
+        /**
+         * 安全检查人
+         */
+        public static final String RISK_CHECK = "30";
+
+        /**
+         * 设备巡检
+         */
+        public static final String EQU_CHECK = "20";
+
+        /**
+         * 生产点检
+         */
+        public static final String POINT_CHECK = "10";
+    }
+
 }

+ 14 - 0
js-security/security-common/src/main/resources/mybatis/AspPersonnelCheckConfigDao.xml

@@ -11,4 +11,18 @@
           AND apcca.CHECKOBJID = #{checkObjId}
           AND find_in_set(#{jobAttr}, apcca.JOBATTR)
     </select>
+
+    <select id="batchSelectCheckUserInfo" resultType="com.rongwe.scentity.domian.AspPersonnelCheckConfigDo">
+        SELECT DISTINCT apcc.DUTYOFFICERNAME,
+                        apcc.DUTYOFFICERID
+        FROM asp_personnel_check_config apcc
+                LEFT JOIN asp_personnel_check_config_area apcca ON apcc.ID = apcca.CONFIGID AND apcca.DELETED = '0'
+        WHERE apcc.DELETED = '0'
+            AND apcca.TYPE = #{checkType}
+            AND apcca.CHECKOBJID IN
+            <foreach collection="checkObjIds" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+            AND find_in_set(#{jobAttr}, apcca.JOBATTR)
+    </select>
 </mapper>

+ 5 - 0
js-security/security-entity/src/main/java/com/rongwe/scentity/domian/CheckTemplateDo.java

@@ -122,4 +122,9 @@ public class CheckTemplateDo extends BaseDo implements Serializable {
 
     // 同步时间
     private Date synctime;
+
+    /**
+     * 对象属性
+     */
+    private String objclass;
 }

+ 5 - 0
js-security/security-entity/src/main/java/com/rongwe/scentity/domian/ThemeCheckItemDo.java

@@ -166,4 +166,9 @@ public class ThemeCheckItemDo extends BaseDo implements Serializable {
 
     // 同步时间
     private Date synctime;
+
+    /**
+     * 类型  设备(equ),风险单元(risk)
+     */
+    private String type;
 }