luowei hai 1 ano
pai
achega
b4efdb2886

+ 5 - 0
project_data/sql/0.0.4/soc/soc.sql

@@ -243,6 +243,11 @@ ALTER TABLE `sys_device` ADD COLUMN `definition` VARCHAR ( 2 ) NULL COMMENT '是
 
 END IF;
 
+    IF
+NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'sys_user_information' AND COLUMN_NAME = 'alone_dept' ) THEN
+ALTER TABLE `sys_user_information` ADD COLUMN `alone_dept` VARCHAR ( 2 ) NULL COMMENT '是否独立机构';
+
+END IF;
     -- 处理记录增加登记簿url字段
     IF NOT EXISTS(SELECT *
                   FROM information_schema.columns

+ 4 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUserInformation.java

@@ -66,7 +66,8 @@ public class SysUserInformation extends BaseEntity {
      */
     @ApiModelProperty(value = "是否专职0是1否")
     private String isFullTime = "Y";
-
+    @ApiModelProperty(value = "是否独立机构")
+    private String aloneDept = "Y";
     /**
      * 最高学历
      */
@@ -141,7 +142,8 @@ public class SysUserInformation extends BaseEntity {
      */
     private String delFlag;
 
-private String financialExperts;
+    private String financialExperts;
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java

@@ -128,7 +128,11 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
     Map getDuty(String orgPath);
 
     Map getCertificate(String orgPath);
-
+    Map getMonitorPeople(String orgPath);
+Integer getAlone(String orgPath);
+    Integer getManagerCertificate(String orgPath);
+    String getIsMonitor(@Param("orgPath") String orgPath,@Param("duties") String duties);
+Integer getManager(@Param("orgPath") String orgPath,@Param("isFull") String isFull);
     Integer getSafe(@Param("orgPath") String orgPath, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
 
     Integer getEduNumber(@Param("orgPath") String orgPath, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

+ 21 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -239,6 +239,27 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             Map duty = baseMapper.getDuty(s.getPath());
             securityWorkExport.setLocalDutyNetworkNumber(Integer.valueOf(duty.get("localDutyNetworkNumber").toString()));
             securityWorkExport.setRemoteDutyNetworkNumber(Integer.valueOf(duty.get("remoteDutyNetworkNumber").toString()));
+            //独立机构
+            Integer alone = baseMapper.getAlone(s.getPath());
+            securityWorkExport.setIsAlone(alone);
+            //部门负责人
+            Integer y = baseMapper.getManager(s.getPath(), "Y");
+            Integer n = baseMapper.getManager(s.getPath(), "N");
+            securityWorkExport.setManagerFullTime(y);
+            securityWorkExport.setManagerPartTime(n);
+            //部门负责人持证
+            Integer managerCertificate = baseMapper.getManagerCertificate(s.getPath());
+            securityWorkExport.setManagerCertificate(managerCertificate);
+            //是否设主任
+            String isMonitor = baseMapper.getIsMonitor(s.getPath(), "2");
+            String isMonitor1 = baseMapper.getIsMonitor(s.getPath(), "5");
+            securityWorkExport.setIsLeader(isMonitor);
+            securityWorkExport.setIsTechnology(isMonitor1);
+            //监控中心人员
+            Map monitorPeople = baseMapper.getMonitorPeople(s.getPath());
+            securityWorkExport.setMonitorTotal(Integer.valueOf(monitorPeople.get("monitorTotal").toString()));
+            securityWorkExport.setInnerPeople(Integer.valueOf(monitorPeople.get("innerPeople").toString()));
+            securityWorkExport.setOutPeople(Integer.valueOf(monitorPeople.get("outPeople").toString()));
             //安保人数
             Map certificate = baseMapper.getCertificate(s.getPath());
             securityWorkExport.setCertificatePeopleNumber(Integer.valueOf(certificate.get("certificatePeopleNumber").toString()));

+ 60 - 44
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java

@@ -15,97 +15,113 @@ import lombok.Data;
  */
 @Data
 @ColumnWidth(15) //列宽,最大值为255
-@HeadRowHeight(16) //表头行高
+@HeadRowHeight(32) //表头行高
 @ContentRowHeight(16) //数据行高
 public class SecurityWorkExport {
-    @ExcelProperty(value ={"序号",""} , index = 0)
+    @ExcelProperty(value = {"序号", ""}, index = 0)
     @TableField(exist = false)
     private String xh;
     @ExcelProperty(value = "地区", index = 1)
     private String city;
-    @ExcelProperty(value = {"项目","单位"}, index = 2)
+    @ExcelProperty(value = {"项目", "单位"}, index = 2)
     private String orgName;
-    @ExcelProperty(value = {"营业网点总数","营业网点总量"}, index = 3)
+    @ExcelProperty(value = {"营业网点总数", "营业网点总量"}, index = 3)
     private Integer networkNumber;
-    @ExcelProperty(value = {"营业网点总数","营业网点达标数量(符合GA38-2015、2021标准)"}, index = 4)
+    @ExcelProperty(value = {"营业网点总数", "营业网点达标数量(符合GA38-2015、2021标准)"}, index = 4)
     private Integer reachNumber;
-    @ExcelProperty(value = {"营业网点总数","自有产权网点数"}, index = 5)
+    @ExcelProperty(value = {"营业网点总数", "自有产权网点数"}, index = 5)
     private Integer ownPropertyNumber;
-    @ExcelProperty(value = {"营业网点总数","区域外网点数"}, index = 6)
+    @ExcelProperty(value = {"营业网点总数", "区域外网点数"}, index = 6)
     private Integer areaOutsideNumber;
-    @ExcelProperty(value = {"业务库","业务库总量"}, index = 7)
+    @ExcelProperty(value = {"业务库", "业务库总量"}, index = 7)
     private Integer businessLibraryTotal;
-    @ExcelProperty(value = {"业务库","一类库"}, index = 8)
+    @ExcelProperty(value = {"业务库", "一类库"}, index = 8)
     private Integer oneLibrary;
-    @ExcelProperty(value = {"业务库","二类库"}, index = 9)
+    @ExcelProperty(value = {"业务库", "二类库"}, index = 9)
     private Integer twoLibrary;
-    @ExcelProperty(value = {"业务库","三类库"}, index = 10)
+    @ExcelProperty(value = {"业务库", "三类库"}, index = 10)
     private Integer threeLibrary;
-    @ExcelProperty(value = {"业务库","四类库"}, index = 11)
+    @ExcelProperty(value = {"业务库", "四类库"}, index = 11)
     private Integer fourLibrary;
     @ExcelProperty(value = "保管箱库", index = 12)
     private Integer collectLibrary;
-    @ExcelProperty(value = {"自助银行","在行式总量"}, index = 13)
+    @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)
-    private String remoteControl;
-    @ExcelProperty(value = "离行式自助银行加钞间出入口设置数量", index = 28)
+    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","离行式自助银行加钞间出入口设置数量"}, index = 27)
     private Integer cashAddingRoom;
-    @ExcelProperty(value = "业务库(不含保管箱库)防控隔离门出入口设置数量", index = 29)
+    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","业务库(不含保管箱库)防控隔离门出入口设置数量"}, index = 28)
     private Integer remoteCount;
-    @ExcelProperty(value = "本地值守网点数量(由员工进行同楼异地值守)", index = 30)
+    @ExcelProperty(value = {"营业网点夜间值守","本地值守网点数量(由员工进行同楼异地值守)"}, index = 29)
     private Integer localDutyNetworkNumber;
-    @ExcelProperty(value = "异地值守网点数量(由监控中心进行远程值守)", index = 31)
+    @ExcelProperty(value = {"营业网点夜间值守","异地值守网点数量(由监控中心进行远程值守)"}, index = 30)
     private Integer remoteDutyNetworkNumber;
-    @ExcelProperty(value = "监控中心安保卫持证人数", index = 32)
+    @ExcelProperty(value = {"机构及人员配备","是否设立独立机构数"}, index = 31)
+    private Integer isAlone;
+    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为专职人数"}, index = 32)
+    private Integer ManagerFullTime;
+    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为兼职职人数"}, index = 33)
+    private Integer ManagerPartTime;
+    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人安保持证人数"}, index = 34)
+    private Integer ManagerCertificate;
+    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职主任"}, index = 35)
+    private String isLeader;
+    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职技术维护岗"}, index = 36)
+    private String isTechnology;
+    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","人员合计"}, index = 37)
+    private Integer monitorTotal;
+    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,内部员工人数(含派遣)"}, index = 38)
+    private Integer innerPeople;
+    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,外聘员工人数"}, index = 39)
+    private Integer outPeople;
+    @ExcelProperty(value = {"机构及人员配备","监控中心安保卫持证人数"}, index = 40)
     private Integer certificatePeopleNumber;
-    @ExcelProperty(value = "人员合计", index = 33)
+    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","人员合计"}, index = 41)
     private Integer certificateTotal;
-    @ExcelProperty(value = "其中,内部保安人数(含派遣)", index = 34)
+    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,内部保安人数(含派遣)"}, index = 42)
     private Integer internalCertificateNumber;
-    @ExcelProperty(value = "其中,外聘保安人数", index = 35)
+    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,外聘保安人数"}, index = 43)
     private Integer outsourceCertificateNumber;
-    @ExcelProperty(value = "配有保安网点数 ", index = 36)
+    @ExcelProperty(value = {"机构及人员配备","配有保安网点数"}, index = 44)
     private Integer haveSecurityNetworkNumber;
-    @ExcelProperty(value = "本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)", index = 37)
+    @ExcelProperty(value = {"营业网点安全检查","本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)"}, index = 45)
     private Integer quarterSelfInspectNumber;
-    @ExcelProperty(value = "本季度度总行(联社)组织开展安全教育次数", index = 38)
+    @ExcelProperty(value =  {"安全教育","本季度度总行(联社)组织开展安全教育次数"}, index = 46)
     private Integer quarterSafetyEducationNumber;
-    @ExcelProperty(value = "共计参与安全教育员工人次", index = 39)
+    @ExcelProperty(value = {"安全教育","共计参与安全教育员工人次"}, index = 47)
     private Integer safetyEducationPeopleNumber;
-    @ExcelProperty(value = "本季度开展预案演练次数", index = 40)
+    @ExcelProperty(value = {"总行(联社)预案演练","本季度开展预案演练次数"}, index = 48)
     private Integer quarterDrillNumber;
-    @ExcelProperty(value = "参与预案演练员工人次", index = 41)
+    @ExcelProperty(value = {"总行(联社)预案演练","参与预案演练员工人次"}, index = 49)
     private Integer quarterDrillPeopleNumber;
-    @ExcelProperty(value = "本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)", index = 42)
+    @ExcelProperty(value = {"营业网点预案演练","本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)"}, index = 50)
     private Integer quarterAllNetworkDrillNumber;
-    @ExcelProperty(value = "辖内所有营业网点参与预案演练员工人次", index = 43)
+    @ExcelProperty(value = {"营业网点预案演练","辖内所有营业网点参与预案演练员工人次"}, index = 51)
     private Integer quarterAllNetworkDrillPeopleNumber;
 
 

+ 55 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1016,6 +1016,61 @@ and a.org_path LIKE concat(#{orgPath}, '%')
             b.exec_org_type = 4
           and a.org_path    like concat(concat('%',#{orgPath}),'%')
     </select>
+    <select id="getAlone" resultType="java.lang.Integer">
+        SELECT
+            COUNT( a.id )
+        FROM
+            sys_user_information a
+                LEFT JOIN sys_user b ON a.user_id = b.id
+                LEFT JOIN sys_org c ON b.org_id = c.id
+        WHERE a.alone_dept='Y' AND c.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getManager" resultType="java.lang.Integer">
+        SELECT
+            COUNT( a.id )
+        FROM
+            sys_user_information a
+                LEFT JOIN sys_user b ON a.user_id = b.id
+                LEFT JOIN sys_org c ON b.org_id = c.id
+        WHERE a.is_full_time=#{isFull} AND a.duties=1 AND c.path like concat(#{orgPath}, '%')
+    </select>
+    <select id="getManagerCertificate" resultType="java.lang.Integer">
+        SELECT
+            COUNT( a.id )
+        FROM
+            sys_user_information a
+                LEFT JOIN sys_user b ON a.user_id = b.id
+                LEFT JOIN sys_org c ON b.org_id = c.id
+        WHERE
+            a.certificate_work = 1
+          AND a.duties = 1
+          AND c.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getIsMonitor" resultType="java.lang.String">
+        SELECT
+            IF
+                ( COUNT( a.id ) > 0, '是', '否' )
+        FROM
+            sys_user_information a
+                LEFT JOIN sys_user b ON a.user_id = b.id
+                LEFT JOIN sys_org c ON b.org_id = c.id
+        WHERE
+            a.duties = #{duties}
+          AND c.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getMonitorPeople" resultType="java.util.Map">
+        SELECT
+            COUNT( a.id ) AS monitorTotal,
+            IFNULL( SUM( IF ( a.work_type IN ( 0, 1 ), 1, 0 )), 0 ) AS innerPeople,
+            IFNULL( SUM( IF ( a.work_type = 2, 1, 0 )), 0 ) AS outPeople
+        FROM
+            sys_user_information a
+                LEFT JOIN sys_user b ON a.user_id = b.id
+                LEFT JOIN sys_org c ON b.org_id = c.id
+        WHERE
+            a.duties IN ( 2, 4, 5 )
+          AND c.path LIKE concat(#{orgPath}, '%')
+    </select>
 
 
 </mapper>