luowei vor 1 Jahr
Ursprung
Commit
52fe770ff2

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

@@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 【请填写功能名称】Mapper接口
@@ -101,6 +102,29 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
 
     Integer selectNetworkNumberByPath(String orgPath);
 
+    Integer getReachNumber(String orgPath);
+
+    Integer getOwnership(String orgPath);
+
+    Integer getOutside(String orgPath);
+
+    Map getLibrary(String orgPath);
+
+    Integer getCollectLibrary(String orgPath);
+
+    Map getOnLine(String orgPath);
+
+    Map getDeparture(String orgPath);
+
+    Map getSelfEquipment(String orgPath);
+
+    Map getCenterConstruction(Long orgId);
+
+    Map getCamera(String orgPath);
+
+    Map getRemote(String orgPath);
+    Map getDuty(String orgPath);
+
     /**
      * 物防达标情况
      *

+ 3 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysOrgService.java

@@ -93,7 +93,9 @@ public interface ISysOrgService extends IService<SysOrg> {
      * @return
      */
     List<OrgPhysicalDefenseConstructionExport> excel(SysOrg dept);
-List<SecurityWorkExport>securityWorkExport(SysOrg sysOrg);
+
+    List<SecurityWorkExport> securityWorkExport(SysOrg sysOrg);
+
     List<SysOrg> selectSysOrgByPathAndType(String path, Integer type);
 
     List<ConstructionDetailExport> selectConstructionDetail(SysOrg dept);

+ 57 - 5
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -154,18 +154,18 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         if (sysOrg2.getType() < 3 || sysOrg2.getShortName().endsWith("地区行社") || sysOrg2.getType() == 9) {
             sysOrgs = this.selectSysOrgByPathAndType(sysOrg.getPath(), 3);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs =this.selectSysOrgByPathAndType(sysOrg.getPath(), 4);
+            sysOrgs = this.selectSysOrgByPathAndType(sysOrg.getPath(), 4);
         } else {
             return Collections.emptyList();
         }
-        List<SecurityWorkExport>securityWorkExportList=new ArrayList<>();
-        sysOrgs.forEach(s->{
-            SecurityWorkExport securityWorkExport=new SecurityWorkExport();
+        List<SecurityWorkExport> securityWorkExportList = new ArrayList<>();
+        sysOrgs.forEach(s -> {
+            SecurityWorkExport securityWorkExport = new SecurityWorkExport();
             SysOrg sysOrg1;
             if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
                 sysOrg1 = baseMapper.selectSysOrgById(s.getParentId());
             } else {
-                sysOrg1 =  baseMapper.selectSysOrgById( baseMapper.selectSysOrgById(s.getParentId()).getParentId());
+                sysOrg1 = baseMapper.selectSysOrgById(baseMapper.selectSysOrgById(s.getParentId()).getParentId());
                 if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
                     sysOrg1 = baseMapper.selectSysOrgById(baseMapper.selectSysOrgById(baseMapper.selectSysOrgById(s.getParentId()).getParentId()).getParentId());
                 }
@@ -174,6 +174,58 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             securityWorkExport.setOrgName(s.getShortName());
             Integer integer = baseMapper.selectNetworkNumberByPath(s.getPath());
             securityWorkExport.setNetworkNumber(integer);
+            //营业网点达标
+            Integer reachNumber = baseMapper.getReachNumber(s.getPath());
+            securityWorkExport.setReachNumber(reachNumber);
+            //自有产权
+            Integer ownership = baseMapper.getOwnership(s.getPath());
+            securityWorkExport.setOwnPropertyNumber(ownership);
+            //区域外网点
+            Integer outside = baseMapper.getOutside(s.getPath());
+            securityWorkExport.setAreaOutsideNumber(outside);
+            //业务库
+            Map library = baseMapper.getLibrary(s.getPath());
+            securityWorkExport.setBusinessLibraryTotal(Integer.valueOf(library.get("total").toString()));
+            securityWorkExport.setOneLibrary(Integer.valueOf(library.get("one").toString()));
+            securityWorkExport.setTwoLibrary(Integer.valueOf(library.get("two").toString()));
+            securityWorkExport.setThreeLibrary(Integer.valueOf(library.get("three").toString()));
+            securityWorkExport.setFourLibrary(Integer.valueOf(library.get("four").toString()));
+            //保管箱库
+            Integer collectLibrary = baseMapper.getCollectLibrary(s.getPath());
+            securityWorkExport.setCollectLibrary(collectLibrary);
+            //在行式
+            Map onLine = baseMapper.getOnLine(s.getPath());
+            securityWorkExport.setOnLineTotal(Integer.valueOf(onLine.get("onLineTotal").toString()));
+            securityWorkExport.setOnLineReachNumber(Integer.valueOf(onLine.get("onLineReachNumber").toString()));
+            //离行式
+            Map departure = baseMapper.getDeparture(s.getPath());
+            securityWorkExport.setDepartureTotal(Integer.valueOf(departure.get("departureTotal").toString()));
+            securityWorkExport.setDepartureReachNumber(Integer.valueOf(departure.get("departureReachNumber").toString()));
+            //自助设备
+            Map selfEquipment = baseMapper.getSelfEquipment(s.getPath());
+            securityWorkExport.setSelfServiceDevicesTotal(Integer.valueOf(selfEquipment.get("selfServiceDevicesTotal").toString()));
+            securityWorkExport.setOnLineLobbyImplement(Integer.valueOf(selfEquipment.get("onLineLobbyImplement").toString()));
+            securityWorkExport.setOnLineThroughWalls(Integer.valueOf(selfEquipment.get("onLineThroughWalls").toString()));
+            securityWorkExport.setDepartureLobbyImplement(Integer.valueOf(selfEquipment.get("departureLobbyImplement").toString()));
+            securityWorkExport.setDepartureThroughWalls(Integer.valueOf(selfEquipment.get("departureThroughWalls").toString()));
+            //中心建设时间
+            Map centerConstruction = baseMapper.getCenterConstruction(s.getId());
+            securityWorkExport.setCenterConstructionTime(centerConstruction.get("centerConstructionTime").toString());
+            securityWorkExport.setTransformTime(centerConstruction.get("transformTime").toString());
+            securityWorkExport.setBrand(centerConstruction.get("brand").toString());
+            //高清摄像头
+            Map camera = baseMapper.getCamera(s.getPath());
+            securityWorkExport.setCameraTotal(Integer.valueOf(camera.get("cameraTotal").toString()));
+            securityWorkExport.setDefinitionNumber(Integer.valueOf(camera.get("definitionNumber").toString()));
+            //是否实现远程控制
+            Map remote = baseMapper.getRemote(s.getPath());
+            securityWorkExport.setCashAddingRoom(Integer.valueOf(remote.get("cashAddingRoom").toString()));
+            securityWorkExport.setRemoteCount(Integer.valueOf(remote.get("remoteCount").toString()));
+            //夜间值守
+            Map duty = baseMapper.getDuty(s.getPath());
+            securityWorkExport.setLocalDutyNetworkNumber(Integer.valueOf(duty.get("localDutyNetworkNumber").toString()));
+            securityWorkExport.setRemoteDutyNetworkNumber(Integer.valueOf(duty.get("remoteDutyNetworkNumber").toString()));
+
         });
         return null;
     }

+ 6 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java

@@ -71,8 +71,14 @@ public class SecurityWorkExport {
     private String brand;
     @ExcelProperty(value = "视频监控摄像头总路数", index = 7)
     private Integer cameraTotal;
+    @ExcelProperty(value = "视频监控摄像头高清摄像机路数", index = 7)
+    private Integer definitionNumber;
     @ExcelProperty(value = "是否实现远程控制和实时授权的功能", index = 7)
     private String remoteControl;
+    @ExcelProperty(value = "离行式自助银行加钞间出入口设置数量", index = 7)
+    private Integer cashAddingRoom;
+    @ExcelProperty(value = "业务库(不含保管箱库)防控隔离门出入口设置数量", index = 7)
+    private Integer remoteCount;
     @ExcelProperty(value = "本地值守网点数量(由员工进行同楼异地值守)", index = 7)
     private Integer localDutyNetworkNumber;
     @ExcelProperty(value = "异地值守网点数量(由监控中心进行远程值守)", index = 7)

+ 10 - 10
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/UserExport.java

@@ -21,24 +21,24 @@ public class UserExport {
     @ExcelProperty(value = "序号", index = 0)
     @TableField(exist = false)
     private String xh;
-    @ExcelProperty(value = "账号", index = 1)
+    @ExcelProperty(value = "账号")
     private String username;
-    @ExcelProperty(value = "姓名", index = 2)
+    @ExcelProperty(value = "姓名")
     private String name;
-    @ExcelProperty(value = "所属机构", index = 3)
+    @ExcelProperty(value = "所属机构")
     private String orgName;
-    @ExcelProperty(value = "用户角色", index = 4)
+    @ExcelProperty(value = "用户角色")
     private String roleNames;
-    @ExcelProperty(value = "账号状态", index = 5, converter = UserStatusConverter.class)
+    @ExcelProperty(value = "账号状态", converter = UserStatusConverter.class)
     private String isLock;
-    @ExcelProperty(value = "登录IP", index = 6)
+    @ExcelProperty(value = "登录IP")
     private String lastIp;
-    @ExcelProperty(value = "登录时间", index = 7)
+    @ExcelProperty(value = "登录时间")
     private Date lastTime;
-    @ExcelProperty(value = "安保部门从业人员", index = 8, converter = UserManagerConverter.class)
+    @ExcelProperty(value = "安保部门从业人员", converter = UserManagerConverter.class)
     private String isManage;
-    @ExcelProperty(value = "手机号码", index = 9)
+    @ExcelProperty(value = "手机号码")
     private String phone;
-    @ExcelProperty(value = "性别", index = 10, converter = GenderConverter.class)
+    @ExcelProperty(value = "性别", converter = GenderConverter.class)
     private String gender;
 }

+ 137 - 1
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -800,10 +800,146 @@ and
         FROM
             sys_org_physical_defense_construction a
                 LEFT JOIN sys_org_extend b ON a.org_id = b.org_id LEFT JOIN sys_org c ON c.id=b.org_id
-        WHERE c.type=4 and c.path like concat(concat(#{orgPath}),'%')
+        WHERE c.type=4 and c.path like concat(#{orgPath}, '%')
         GROUP BY
             a.org_id
     </select>
+    <select id="getReachNumber" resultType="java.lang.Integer">
+        SELECT
+            IFNULL( SUM( IF ( a.standard IN ( 1, 2 ), 1, 0 )), 0 )
+        FROM
+            sys_org_physical_defense_construction a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE b.type=4 and b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getOwnership" resultType="java.lang.Integer">
+        SELECT
+            IFNULL( SUM( IF ( a.ownership = 2, 1, 0 )), 0 )
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE b.type=4 and b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getOutside" resultType="java.lang.Integer">
+        SELECT
+            IFNULL( SUM( IF ( a.outside_area = 1, 1, 0 )), 0 )
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+                where
+            b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getLibrary" resultType="java.util.Map">
+        SELECT
+            COUNT(a.business_library_type ) as total,
+            sum(IF(a.business_library_type=1,1,0)) AS one,
+            SUM(IF(a.business_library_type=2,1,0)) as two,
+            SUM(IF(a.business_library_type=3,1,0)) AS three,
+            SUM(IF(a.business_library_type=4,1,0)) AS four
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+                where
+            b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getCollectLibrary" resultType="java.lang.Integer">
+        SELECT
+            SUM(
+                    IF
+                        ( a.safe_box = 1, 1, 0 ))
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+              b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getOnLine" resultType="java.util.Map">
+        SELECT
+            SUM(
+                    IF
+                        ( a.type = 3, 1, 0 )) AS onLineTotal,
+            SUM(
+                    IF
+                        ( a.type = 3 AND a.standard =1, 1, 0 )) AS onLineReachNumber
+        FROM
+            sys_org_physical_defense_construction a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+            b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getDeparture" resultType="java.util.Map">
+        SELECT
+            SUM(
+                    IF
+                        ( a.type = 4, 1, 0 )) AS departureTotal,
+            SUM(
+                    IF
+                        ( a.type = 4 AND a.standard = 1, 1, 0 )) AS departureReachNumber
+        FROM
+            sys_org_physical_defense_construction a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+            b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getSelfEquipment" resultType="java.util.Map">
+        SELECT
+            SUM( a.lobby_equipment ) AS onLineLobbyImplement,
+            SUM( a.wall_penetrating_equipment ) AS onLineThroughWalls,
+            SUM( a.detached_lobby_equipment ) AS departureLobbyImplement,
+            SUM( a.detached_wall_penetrating_equipment ) AS departureThroughWalls,
+            SUM( a.lobby_equipment ) + SUM( a.wall_penetrating_equipment ) + SUM( a.detached_lobby_equipment ) + SUM( a.detached_wall_penetrating_equipment ) AS selfServiceDevicesTotal
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+            b.path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getCenterConstruction" resultType="java.util.Map">
+        SELECT
+            IF
+                ( a.construction_time IS NULL, '', SUBSTR( a.construction_time, 1, 4 ) ) AS centerConstructionTime,
+            IF
+                ( a.last_update_time IS NULL, '', SUBSTR( a.last_update_time, 1, 4 ) ) AS transformTime,
+            a.platform_brand AS brand
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+WHERE b.id=#{orgId}
+    </select>
+    <select id="getCamera" resultType="java.util.Map">
+        SELECT
+            COUNT( 1 ) AS cameraTotal,
+            SUM(
+                    IF
+                        ( definition = 1, 1, 0 )) AS definitionNumber
+        FROM
+            sys_device
+        WHERE
+            del_flag=0 AND
+            device_type =2 AND org_path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getRemote" resultType="java.util.Map">
+        SELECT
+            SUM( a.cash_adding_room ) AS cashAddingRoom,
+            SUM( a.remote_count ) AS remoteCount
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+where org_path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getDuty" resultType="java.util.Map">
+        SELECT
+            SUM(
+                    IF
+                        ( duty_mode = 2, 1, 0 )) AS localDutyNetworkNumber,
+            SUM(
+                    IF
+                        ( duty_mode = 1, 1, 0 )) AS remoteDutyNetworkNumber
+        FROM
+            sys_org_extend a
+                LEFT JOIN sys_org b ON a.org_id = b.id
+        where org_path LIKE concat(#{orgPath}, '%')
+    </select>
 
 
 </mapper>