luowei 1 vuosi sitten
vanhempi
commit
0626581ab1

+ 7 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java

@@ -128,6 +128,7 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
     Map getDuty(String orgPath);
 
     Map getCertificate(String orgPath);
+
     Integer getHaveSecurityNetworkNumber(String orgPath);
 
     Map getMonitorPeople(String orgPath);
@@ -142,6 +143,12 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
 
     Integer getSafe(@Param("orgPath") String orgPath, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
 
+    Integer getHeadSafeCheckNumber(String orgPath);
+
+    Integer getHeadSafeCheckNetworkNumber(String orgPath);
+
+    Map getDangerNumber(String orgPath);
+
     Integer getSafeHeadToNetwork(@Param("type") Integer type, @Param("level") Integer level, @Param("orgPath") String orgPath);
 
     Integer getJointHeadToNetwork(@Param("type") Integer type, @Param("level") Integer level, @Param("orgPath") String orgPath);

+ 12 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -274,13 +274,23 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             Integer safeHeadToNetwork = baseMapper.getSafeHeadToNetwork(1, 1, s.getPath());
             securityWorkExport.setSafeHeadToNetwork(safeHeadToNetwork);
             Integer safeHeadToNetwork1 = baseMapper.getSafeHeadToNetwork(1, 2, s.getPath());
-            securityWorkExport.setJointNetworkToPeople(safeHeadToNetwork1);
+            securityWorkExport.setSafeNetworkToPeople(safeHeadToNetwork1);
             Integer jointHeadToNetwork = baseMapper.getJointHeadToNetwork(2, 1, s.getPath());
             securityWorkExport.setJointHeadToNetwork(jointHeadToNetwork);
             Integer jointHeadToNetwork1 = baseMapper.getJointHeadToNetwork(2, 2, s.getPath());
             securityWorkExport.setJointNetworkToPeople(jointHeadToNetwork1);
             //总行安全检查
-
+            //组织开展次数
+            Integer headSafeCheckNumber = baseMapper.getHeadSafeCheckNumber(s.getPath());
+            securityWorkExport.setHeadSafeCheckNumber(headSafeCheckNumber);
+            //检查网点数量
+            Integer headSafeCheckNetworkNumber = baseMapper.getHeadSafeCheckNetworkNumber(s.getPath());
+            securityWorkExport.setHeadSafeCheckNetworkNumber(headSafeCheckNetworkNumber);
+            //隐患
+            Map dangerNumber = baseMapper.getDangerNumber(s.getPath());
+            securityWorkExport.setFoundDangerNumber(Integer.valueOf(dangerNumber.get("foundDangerNumber").toString()));
+            securityWorkExport.setRectificationDangerNumber(Integer.valueOf(dangerNumber.get("rectificationDangerNumber").toString()));
+            securityWorkExport.setNoRectificationDangerNumber(Integer.valueOf(dangerNumber.get("noRectificationDangerNumber").toString()));
             //安全检查
             DateTime beginOfQuarter = DateUtil.beginOfQuarter(new java.util.Date());
             DateTime endOfQuarter = DateUtil.endOfQuarter(new Date());

+ 53 - 43
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java

@@ -47,89 +47,99 @@ public class SecurityWorkExport {
     private Integer collectLibrary;
     @ExcelProperty(value = {"自助银行", "在行式总量"}, index = 13)
     private Integer onLineTotal;
-    @ExcelProperty(value = {"自助银行","在行式达标数量(符合GA38-2021标准)"}, index = 14)
+    @ExcelProperty(value = {"自助银行", "在行式达标数量(符合GA38-2021标准)"}, index = 14)
     private Integer onLineReachNumber;
-    @ExcelProperty(value ={"自助银行","离行式总量"} , index = 15)
+    @ExcelProperty(value = {"自助银行", "离行式总量"}, index = 15)
     private Integer departureTotal;
-    @ExcelProperty(value = {"自助银行","离行式达标数量(符合GA38-2021标准)"}, index = 16)
+    @ExcelProperty(value = {"自助银行", "离行式达标数量(符合GA38-2021标准)"}, index = 16)
     private Integer departureReachNumber;
-    @ExcelProperty(value = {"自助设备","自助设备总数"}, index = 17)
+    @ExcelProperty(value = {"自助设备", "自助设备总数"}, index = 17)
     private Integer selfServiceDevicesTotal;
-    @ExcelProperty(value = {"自助设备","在行大堂式机具"}, index = 18)
+    @ExcelProperty(value = {"自助设备", "在行大堂式机具"}, index = 18)
     private Integer onLineLobbyImplement;
-    @ExcelProperty(value = {"自助设备","在行式穿墙式机具"}, index = 19)
+    @ExcelProperty(value = {"自助设备", "在行式穿墙式机具"}, index = 19)
     private Integer onLineThroughWalls;
-    @ExcelProperty(value = {"自助设备","离行式大堂式机具"}, index = 20)
+    @ExcelProperty(value = {"自助设备", "离行式大堂式机具"}, index = 20)
     private Integer departureLobbyImplement;
-    @ExcelProperty(value = {"自助设备","离行式穿墙式机具"}, index = 21)
+    @ExcelProperty(value = {"自助设备", "离行式穿墙式机具"}, index = 21)
     private Integer departureThroughWalls;
-    @ExcelProperty(value = {"监控中心建设","中心建设时间(年)"}, index = 22)
+    @ExcelProperty(value = {"监控中心建设", "中心建设时间(年)"}, index = 22)
     private String centerConstructionTime;
-    @ExcelProperty(value = {"监控中心建设","监控平台最近一次升级改造时间(年)"}, index = 23)
+    @ExcelProperty(value = {"监控中心建设", "监控平台最近一次升级改造时间(年)"}, index = 23)
     private String transformTime;
-    @ExcelProperty(value = {"监控中心建设","监控中心平台品牌"}, index = 24)
+    @ExcelProperty(value = {"监控中心建设", "监控中心平台品牌"}, index = 24)
     private String brand;
-    @ExcelProperty(value = {"监控中心建设","视频监控摄像头总路数"}, index = 25)
+    @ExcelProperty(value = {"监控中心建设", "视频监控摄像头总路数"}, index = 25)
     private Integer cameraTotal;
-    @ExcelProperty(value = {"监控中心建设","视频监控摄像头高清摄像机路数"}, index = 26)
+    @ExcelProperty(value = {"监控中心建设", "视频监控摄像头高清摄像机路数"}, index = 26)
     private Integer definitionNumber;
-    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","离行式自助银行加钞间出入口设置数量"}, index = 27)
+    @ExcelProperty(value = {"监控中心建设", "是否实现远程控制和实时授权的功能", "离行式自助银行加钞间出入口设置数量"}, index = 27)
     private Integer cashAddingRoom;
-    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","业务库(不含保管箱库)防控隔离门出入口设置数量"}, index = 28)
+    @ExcelProperty(value = {"监控中心建设", "是否实现远程控制和实时授权的功能", "业务库(不含保管箱库)防控隔离门出入口设置数量"}, index = 28)
     private Integer remoteCount;
-    @ExcelProperty(value = {"营业网点夜间值守","本地值守网点数量(由员工进行同楼异地值守)"}, index = 29)
+    @ExcelProperty(value = {"营业网点夜间值守", "本地值守网点数量(由员工进行同楼异地值守)"}, index = 29)
     private Integer localDutyNetworkNumber;
-    @ExcelProperty(value = {"营业网点夜间值守","异地值守网点数量(由监控中心进行远程值守)"}, index = 30)
+    @ExcelProperty(value = {"营业网点夜间值守", "异地值守网点数量(由监控中心进行远程值守)"}, index = 30)
     private Integer remoteDutyNetworkNumber;
-    @ExcelProperty(value = {"机构及人员配备","是否设立独立机构数"}, index = 31)
+    @ExcelProperty(value = {"机构及人员配备", "是否设立独立机构数"}, index = 31)
     private Integer isAlone;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为专职人数"}, index = 32)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人为专职人数"}, index = 32)
     private Integer ManagerFullTime;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为兼职职人数"}, index = 33)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人为兼职职人数"}, index = 33)
     private Integer ManagerPartTime;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人安保持证人数"}, index = 34)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人安保持证人数"}, index = 34)
     private Integer ManagerCertificate;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职主任"}, index = 35)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "是否设专(兼)职主任"}, index = 35)
     private String isLeader;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职技术维护岗"}, index = 36)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "是否设专(兼)职技术维护岗"}, index = 36)
     private String isTechnology;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","人员合计"}, index = 37)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "人员合计"}, index = 37)
     private Integer monitorTotal;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,内部员工人数(含派遣)"}, index = 38)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "其中,内部员工人数(含派遣)"}, index = 38)
     private Integer innerPeople;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,外聘员工人数"}, index = 39)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "其中,外聘员工人数"}, index = 39)
     private Integer outPeople;
-    @ExcelProperty(value = {"机构及人员配备","监控中心安保卫持证人数"}, index = 40)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心安保卫持证人数"}, index = 40)
     private Integer certificatePeopleNumber;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","人员合计"}, index = 41)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "人员合计"}, index = 41)
     private Integer certificateTotal;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,内部保安人数(含派遣)"}, index = 42)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "其中,内部保安人数(含派遣)"}, index = 42)
     private Integer internalCertificateNumber;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,外聘保安人数"}, index = 43)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "其中,外聘保安人数"}, index = 43)
     private Integer outsourceCertificateNumber;
-    @ExcelProperty(value = {"机构及人员配备","配有保安网点数"}, index = 44)
+    @ExcelProperty(value = {"机构及人员配备", "配有保安网点数"}, index = 44)
     private Integer haveSecurityNetworkNumber;
-    @ExcelProperty(value = {"责任制落实","各级治安保卫责任书签订情况(份)","总行(联社)与各职能部门、营业网点签订数"}, index = 44)
-private Integer safeHeadToNetwork;
-    @ExcelProperty(value = {"责任制落实","各级治安保卫责任书签订情况(份)","各职能部门、营业网点与各员工签订数"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级治安保卫责任书签订情况(份)", "总行(联社)与各职能部门、营业网点签订数"}, index = 45)
+    private Integer safeHeadToNetwork;
+    @ExcelProperty(value = {"责任制落实", "各级治安保卫责任书签订情况(份)", "各职能部门、营业网点与各员工签订数"}, index = 46)
     private Integer safeNetworkToPeople;
-    @ExcelProperty(value = {"责任制落实","各级联防协议书签订情况(份)","总行(联社)与当地机关、单位或居民签订协议书数量"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级联防协议书签订情况(份)", "总行(联社)与当地机关、单位或居民签订协议书数量"}, index = 47)
     private Integer jointHeadToNetwork;
-    @ExcelProperty(value = {"责任制落实","各级联防协议书签订情况(份)"," 各营业网点(离行式自助银行)与当地机关、单位或居民签订协议书数量"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级联防协议书签订情况(份)", " 各营业网点(离行式自助银行)与当地机关、单位或居民签订协议书数量"}, index = 48)
     private Integer jointNetworkToPeople;
-    @ExcelProperty(value = {"营业网点安全检查","本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)"}, index = 45)
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "组织开展检查次数"}, index = 49)
+    private Integer headSafeCheckNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "检查网点数量"}, index = 50)
+    private Integer headSafeCheckNetworkNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "发现隐患数"}, index = 51)
+    private Integer foundDangerNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "已整改隐患数"}, index = 52)
+    private Integer rectificationDangerNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "未整改隐患数"}, index = 53)
+    private Integer noRectificationDangerNumber;
+    @ExcelProperty(value = {"营业网点安全检查", "本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)"}, index = 54)
     private Integer quarterSelfInspectNumber;
-    @ExcelProperty(value =  {"安全教育","本季度度总行(联社)组织开展安全教育次数"}, index = 46)
+    @ExcelProperty(value = {"安全教育", "本季度度总行(联社)组织开展安全教育次数"}, index = 55)
     private Integer quarterSafetyEducationNumber;
-    @ExcelProperty(value = {"安全教育","共计参与安全教育员工人次"}, index = 47)
+    @ExcelProperty(value = {"安全教育", "共计参与安全教育员工人次"}, index = 56)
     private Integer safetyEducationPeopleNumber;
-    @ExcelProperty(value = {"总行(联社)预案演练","本季度开展预案演练次数"}, index = 48)
+    @ExcelProperty(value = {"总行(联社)预案演练", "本季度开展预案演练次数"}, index = 57)
     private Integer quarterDrillNumber;
-    @ExcelProperty(value = {"总行(联社)预案演练","参与预案演练员工人次"}, index = 49)
+    @ExcelProperty(value = {"总行(联社)预案演练", "参与预案演练员工人次"}, index = 58)
     private Integer quarterDrillPeopleNumber;
-    @ExcelProperty(value = {"营业网点预案演练","本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)"}, index = 50)
+    @ExcelProperty(value = {"营业网点预案演练", "本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)"}, index = 59)
     private Integer quarterAllNetworkDrillNumber;
-    @ExcelProperty(value = {"营业网点预案演练","辖内所有营业网点参与预案演练员工人次"}, index = 51)
+    @ExcelProperty(value = {"营业网点预案演练", "辖内所有营业网点参与预案演练员工人次"}, index = 60)
     private Integer quarterAllNetworkDrillPeopleNumber;
 
 

+ 45 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1078,8 +1078,8 @@ and a.org_path LIKE concat(#{orgPath}, '%')
             core_safety_book_new a
                 LEFT JOIN sys_org b ON a.party_b_org = b.id
         WHERE
-            type = #{type}
-          AND sign_level = #{level}
+            a.type = #{type}
+          AND a.sign_level = #{level}
           AND b.path LIKE concat(#{orgPath}, '%')
     </select>
     <select id="getJointHeadToNetwork" resultType="java.lang.Integer">
@@ -1111,6 +1111,49 @@ and a.org_path LIKE concat(#{orgPath}, '%')
                 GROUP BY
                     a.id)
     </select>
+    <select id="getHeadSafeCheckNumber" resultType="java.lang.Integer">
+        SELECT
+            COUNT( a.id )
+        FROM
+            core_safety_task a
+                LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
+        WHERE
+            b.check_type = 1
+          AND a.org_path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getHeadSafeCheckNetworkNumber" resultType="java.lang.Integer">
+        SELECT
+            COUNT( DISTINCT a.org_id )
+        FROM
+            core_safety_task a
+                LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
+                LEFT JOIN sys_org c ON c.id = a.org_id
+        WHERE
+            b.check_type = 1
+--           AND c.type = 4
+          AND a.org_path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getDangerNumber" resultType="java.util.Map">
+        SELECT
+            IFNULL( SUM( IF ( confirm_status >= 2 AND reform_status IN ( 10, 11 ), 1, 0 )), 0 ) AS foundDangerNumber,
+            IFNULL( SUM( IF ( reform_status = 11, 1, 0 )), 0 ) AS rectificationDangerNumber,
+            IFNULL(
+                        SUM(
+                                IF
+                                    ( confirm_status >= 2 AND reform_status IN ( 10, 11 ), 1, 0 ))- SUM(
+                                IF
+                                    ( reform_status = 11, 1, 0 )),
+                        0
+                ) AS noRectificationDangerNumber
+        FROM
+            core_question a
+                LEFT JOIN core_safety_task b ON a.src_task_id = b.id
+                LEFT JOIN core_safecheck_plan c ON c.id = b.plan_id
+        WHERE
+            src_type = 2
+          AND c.check_type = 1
+          AND b.org_path LIKE concat(#{orgPath}, '%')
+    </select>
 
 
 </mapper>