Bladeren bron

Merge branch 'V0.1.1_alarm' into V1.0.11

# Conflicts:
#	soc-modules/soc-modules-iot/src/main/resources/mapper/IotAlarmDataMapper.xml
jingyuanchao 11 maanden geleden
bovenliggende
commit
d6ff4db480
20 gewijzigde bestanden met toevoegingen van 412 en 170 verwijderingen
  1. 33 80
      project_data/sql/0.1.1/soc/soc.sql
  2. 2 2
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysDevice.java
  3. 2 1
      soc-auth/src/main/java/com/xunmei/auth/controller/TokenController.java
  4. 3 0
      soc-auth/src/main/java/com/xunmei/auth/form/LoginBody.java
  5. 15 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/SystemParameterConstant.java
  6. 86 0
      soc-common/soc-common-security/src/main/java/com/xunmei/common/security/service/TokenService.java
  7. 85 11
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillPlanServiceImpl.java
  8. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java
  9. 76 10
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingPlanServiceImpl.java
  10. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  11. 15 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/controller/CoreIntroduceLetterController.java
  12. 29 9
      soc-modules/soc-modules-core/src/main/resources/mapper/device/ProtectionMapper.xml
  13. 2 1
      soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml
  14. 3 3
      soc-modules/soc-modules-iot/src/main/resources/mapper/IotAlarmDataMapper.xml
  15. 2 4
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysServerController.java
  16. 3 3
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java
  17. 11 14
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDeviceServiceImpl.java
  18. 6 4
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java
  19. 7 8
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/DeviceExport.java
  20. 30 18
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

+ 33 - 80
project_data/sql/0.1.1/soc/soc.sql

@@ -995,86 +995,27 @@ CREATE TABLE `sys_multi_layer_dictionary` (
       KEY `idx_dictionary_parentId` (`parent_id`) USING BTREE
 ) ENGINE=InnoDB AUTO_INCREMENT=1951 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1, '04', '海康', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1-', '', '2024-10-09 14:27:11.000000', '超级管理员', '2024-10-09 14:26:14.156000', NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (2, '05', '大华', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '2-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3, '0801', 'Hik_DS19A', 1, 'BrandModelType', '品牌型号类', 2, 0, '0', '0', '1-3-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (4, '0901', 'VGSII_DaHua', 2, 'BrandModelType', '品牌型号类', 2, 0, '0', '0', '2-4-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (6, '226', '报警控制器', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '1', '3713670431768576-6-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1001, '22', 'UPS', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1001-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1002, '23', '机柜', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1002-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1003, '24', '显示器', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1003-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1004, '25', '配电箱', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1004-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396885624111104, '19', '指纹验证设备', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396885624111104-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396885854699520, '20', '人脸验证设备', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396885854699520-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396886337634304, '21', '网络交换机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396886337634304-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712194117894144, '1', '边缘巡检类', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3712194117894144-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712194381643776, '2', '物联网网关类', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3712194381643776-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712194584903680, '3', '物联采集类', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3712194584903680-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712194930442240, '4', '烟雾传感器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712194930442240-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712195941285888, '5', '温湿度采集器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712195941285888-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712196701503488, '6', '水浸传感器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712196701503488-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712197092999168, '7', '门磁、窗磁传感器(Lora无线)', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712197092999168-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712197283692544, '8', '卷帘门门磁', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712197283692544-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712197446270976, '9', '地磁传感器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712197446270976-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712197694111744, '10', '燃气报警器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712197694111744-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712197882822656, '11', '断电检测传感器、总控、传输模块', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712197882822656-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712198046793728, '12', '蓝牙标签', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712198046793728-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712198166118400, '13', '蓝牙接收器', 3712194584903680, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194584903680-3712198166118400-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712198717341696, '2', '传感器接入网关', 3712194381643776, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194381643776-3712198717341696-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712198908510208, '3', 'Lora无线网关', 3712194381643776, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194381643776-3712198908510208-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3712199107215360, '1', '视频物联网监测主机/IOT BOX', 3712194117894144, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3712194117894144-3712199107215360-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713670431768576, '4', '主机设备类', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713670431768576-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671510851584, '14', '监控主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671510851584-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671711473664, '18', '摄像头', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671711473664-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671920926720, '15', '报警主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671920926720-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672073773056, '16', '对讲主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672073773056-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842112, '17', '门禁主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672266842112-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842113, '5', '报警主机传感器', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713672266842113-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842114, '111', '紧急按钮', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842114-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842115, '112', '微波', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842115-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842116, '113', '红外', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842116-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842117, '114', '红外微波双鉴', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842117-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842118, '115', '烟感', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842118-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842119, '116', '门磁', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842119-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842120, '117', '入侵', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842120-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842121, '118', '温度', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842121-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842122, '119', '湿度', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842122-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842123, '120', '水浸', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842123-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842124, '121', '防拆', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842124-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842125, '122', '震动', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842125-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842126, '123', '破碎', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842126-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842127, '124', '位移', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842127-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842128, '125', '其它', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842128-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842129, '6', '巡检主机传感器', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713672266842129-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842130, '111', '卷帘门门磁', 3713672266842129, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842129-3713672266842130-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842131, '126', '红外对射', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842131-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842132, '26', '智能分析仪', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672266842132-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842133, '127', '联动门', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842133-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842134, '128', '安全门', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842134-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842135, '129', '语音播报器', 3713672266842113, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842113-3713672266842135-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842136, '201', '安防设施', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713672266842136-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842137, '202', '狼牙棒', 3713672266842136, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842136-3713672266842137-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842138, '203', '电警棍', 3713672266842136, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842136-3713672266842138-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842139, '203', '橡胶棍', 3713672266842136, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842136-3713672266842139-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842140, '204', '防暴钢叉', 3713672266842136, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842136-3713672266842140-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842141, '301', '消防设施', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713672266842141-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842142, '302', '烟感器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842142-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842144, '303', '水喷淋', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842144-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842145, '304', '消防广播', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842145-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842146, '305', '广播联动器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842146-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842147, '306', '声光报警器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842147-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842148, '307', '禁烟标牌', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842148-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842149, '308', '消防栓箱', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842149-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842150, '309', '1211灭火器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842150-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842151, '310', '干粉灭火器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842151-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842152, '311', '悬挂式干粉灭火器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842152-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842153, '312', '防烟面罩', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842153-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842154, '313', '紧急疏散标牌', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842154-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842155, '314', '紧急消防报警器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842155-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842156, '315', '火灾报警控制器', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842156-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842157, '316', '防火门', 3713672266842141, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713672266842141-3713672266842157-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1849277638232182785, '500', '霍尼韦尔', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1849277638232182785-', NULL, NULL, NULL, NULL, NULL, 0);
-INSERT INTO `sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1849277638232182790, '600', '域适都', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1849277638232182790-', NULL, NULL, NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1, '04', '海康', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1-', '', '2024-10-09 14:27:11.000000', '超级管理员', '2024-10-09 14:26:14.156000', NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (2, '05', '大华', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '2-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3, '0801', 'Hik_DS19A', 1, 'BrandModelType', '品牌型号类', 2, 0, '0', '0', '1-3-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (4, '0901', 'VGSII_DaHua', 2, 'BrandModelType', '品牌型号类', 2, 0, '0', '0', '2-4-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (6, '226', '报警控制器', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '1', '3713670431768576-6-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1001, '22', 'UPS', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1001-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1002, '23', '机柜', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1002-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1003, '24', '显示器', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1003-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1004, '25', '配电箱', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-1004-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396885624111104, '19', '指纹验证设备', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396885624111104-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396885854699520, '20', '人脸验证设备', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396885854699520-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3396886337634304, '21', '网络交换机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3396886337634304-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713670431768576, '4', '主机设备类', -1, 'AssetDeviceType', '资产设备类', 1, 0, '0', '0', '3713670431768576-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671510851584, '14', '监控主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671510851584-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671711473664, '18', '摄像头', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671711473664-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713671920926720, '15', '报警主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713671920926720-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672073773056, '16', '对讲主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672073773056-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842112, '17', '门禁主机', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672266842112-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (3713672266842132, '26', '智能分析仪', 3713670431768576, 'AssetDeviceType', '资产设备类', 2, 0, '0', '0', '3713670431768576-3713672266842132-', NULL, '2024-10-09 14:27:11.000000', NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1849277638232182785, '500', '霍尼韦尔', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1849277638232182785-', NULL, NULL, NULL, NULL, NULL, 0);
+INSERT INTO `soc`.`sys_multi_layer_dictionary` (`id`, `code`, `name`, `parent_id`, `type`, `type_name`, `level`, `sort`, `status`, `is_system`, `path`, `remark`, `create_time`, `modified_name`, `update_time`, `modified_id`, `deleted`) VALUES (1849277638232182790, '600', '域适都', -1, 'BrandModelType', '品牌型号类', 1, 0, '0', '0', '1849277638232182790-', NULL, NULL, NULL, NULL, NULL, 0);
 
 
 delete from sys_dict_type where dict_type='sys_yes_no_num';
@@ -1419,4 +1360,16 @@ update  sys_device  set device_brand = '1849277638232182790' WHERE device_brand
 -- 处理设备品牌为空字符串的
 update  sys_device  set device_brand = null WHERE device_brand ='';
 
+delete from sys_config where config_key = 'TOKEN_LARGESCREEN_EXPIRETIME';
+INSERT INTO `sys_config`(config_name,config_key,config_value,config_type,create_by,create_time,update_by,update_time,remark)
+VALUES ('终端token过期时间(单位:分钟)', 'TOKEN_LARGESCREEN_EXPIRETIME', '1500', 'Y', null, null, '', null, null);
+
+-- delete from sys_config where config_key = 'TOKEN_WEB_EXPIRETIME';
+-- INSERT INTO `sys_config`(config_name,config_key,config_value,config_type,create_by,create_time,update_by,update_time,remark)
+-- VALUES ('web token过期时间(单位:分钟)', 'TOKEN_WEB_EXPIRETIME', '1500', 'Y', null, null, '', null, null);
+--
+-- delete from sys_config where config_key = 'TOKEN_APP_EXPIRETIME';
+-- INSERT INTO `sys_config`(config_name,config_key,config_value,config_type,create_by,create_time,update_by,update_time,remark)
+-- VALUES ('app token过期时间(单位:分钟)', 'TOKEN_APP_EXPIRETIME', '1500', 'Y', null, null, '', null, null);
+
 -- 升级脚本执行完成

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

@@ -49,7 +49,7 @@ public class SysDevice extends BaseEntity {
     @ApiModelProperty(value = "设备状态")
     @TableField("device_status")
     @JsonSerialize(using = ToStringSerializer.class)
-    private Integer deviceStatus;
+    private Integer deviceStatus = 1;
 
     @ApiModelProperty(value = "设备型号")
     @TableField("device_model")
@@ -109,7 +109,7 @@ public class SysDevice extends BaseEntity {
     private String definition;
 
     @TableField(exist = false)
-    @ApiModelProperty(value = "是否关联登记簿",notes = "0否1是")
+    @ApiModelProperty(value = "是否关联登记簿", notes = "0否1是")
     private Integer inBook;
 
     @TableField(exist = false)

+ 2 - 1
soc-auth/src/main/java/com/xunmei/auth/controller/TokenController.java

@@ -67,9 +67,10 @@ public class TokenController {
                 //登录重放问题处理,待前端完成放开
                 //loginService.checkLogin(form.getAuthCode());
             }
+
             LoginUser userInfo = loginService.loginByPassword(form.getUsername(), form.getPassword(), Constants.LOGIN_TYPE_0);
             // 获取登录token
-            return R.ok(tokenService.createToken(userInfo));
+            return R.ok(tokenService.createTokenNew(userInfo,form.getDeviceFrom()));
         } catch (Exception e) {
             return R.fail(e.getMessage());
         }

+ 3 - 0
soc-auth/src/main/java/com/xunmei/auth/form/LoginBody.java

@@ -20,4 +20,7 @@ public class LoginBody {
     @ApiModelProperty(value = "随机码", required = true)
     private String authCode;
 
+    @ApiModelProperty(value = "登录终端 0大屏 1app 2web", required = false)
+    private Integer deviceFrom;
+
 }

+ 15 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/SystemParameterConstant.java

@@ -189,4 +189,19 @@ public class SystemParameterConstant {
      */
     public static final String ALARM_LOSE_DURATION = "ALARM_LOSE_DURATION";
 
+    /**
+     *  终端token过期时间(单位:分钟)
+     */
+    public static final String TOKEN_LARGESCREEN_EXPIRETIME = "TOKEN_LARGESCREEN_EXPIRETIME";
+
+    /**
+     *  WEB token过期时间(单位:分钟)
+     */
+    public static final String TOKEN_WEB_EXPIRETIME = "TOKEN_WEB_EXPIRETIME";
+
+    /**
+     *  APP token过期时间(单位:分钟)
+     */
+    public static final String TOKEN_APP_EXPIRETIME = "TOKEN_APP_EXPIRETIME";
+
 }

+ 86 - 0
soc-common/soc-common-security/src/main/java/com/xunmei/common/security/service/TokenService.java

@@ -1,7 +1,9 @@
 package com.xunmei.common.security.service;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.xunmei.common.core.constant.CacheConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.constant.SystemParameterConstant;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.JwtUtils;
 import com.xunmei.common.core.utils.ServletUtils;
@@ -10,11 +12,14 @@ import com.xunmei.common.core.utils.ip.IpUtils;
 import com.xunmei.common.core.utils.uuid.IdUtils;
 import com.xunmei.common.redis.utils.RedisUtils;
 import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.system.api.RemoteConfigService;
 import com.xunmei.system.api.RemoteUserService;
+import com.xunmei.system.api.domain.SysConfig;
 import com.xunmei.system.api.model.LoginUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.time.Duration;
 import java.util.Date;
@@ -43,6 +48,9 @@ public class TokenService {
 
     private final static Long MILLIS_MINUTE_TEN = CacheConstants.REFRESH_TIME * MILLIS_MINUTE;
 
+    @Resource
+    RemoteConfigService remoteConfigService;
+
     /**
      * 创建令牌
      */
@@ -78,6 +86,66 @@ public class TokenService {
     }
 
     /**
+     * 创建令牌
+     */
+    public Map<String, Object> createTokenNew(LoginUser loginUser, Integer loginFrom) {
+        Long userId = loginUser.getSysUser().getId();
+
+        String userName = loginUser.getSysUser().getName();
+        if(StringUtils.isEmpty(loginUser.getToken())){
+            String token = userId + "_" + IdUtils.fastUUID();
+            loginUser.setToken(token);
+        }
+
+        loginUser.setUserid(userId);
+        loginUser.setUsername(userName);
+        loginUser.setOrgId(loginUser.getSysUser().getOrgId());
+        loginUser.setName(loginUser.getSysUser().getName());
+        loginUser.setIpaddr(IpUtils.getIpAddr());
+
+        long configExpireTime = expireTime;
+        if(loginFrom != null){
+            if(loginFrom == 0){
+                //大屏
+                final SysConfig config = remoteConfigService.findSysConfigByCode(SystemParameterConstant.TOKEN_LARGESCREEN_EXPIRETIME, SecurityConstants.INNER);
+                if (ObjectUtil.isNotEmpty(config)){
+                    configExpireTime = Long.parseLong(config.getConfigValue());
+                }
+            }
+            else if(loginFrom == 1){
+                //app
+                final SysConfig config = remoteConfigService.findSysConfigByCode(SystemParameterConstant.TOKEN_APP_EXPIRETIME, SecurityConstants.INNER);
+                if (ObjectUtil.isNotEmpty(config)){
+                    configExpireTime = Long.parseLong(config.getConfigValue());
+                }
+            }else if(loginFrom == 2){
+                //app
+                final SysConfig config = remoteConfigService.findSysConfigByCode(SystemParameterConstant.TOKEN_WEB_EXPIRETIME, SecurityConstants.INNER);
+                if (ObjectUtil.isNotEmpty(config)){
+                    configExpireTime = Long.parseLong(config.getConfigValue());
+                }
+            }
+        }
+
+
+        refreshTokenNew(loginUser,configExpireTime);
+
+        // Jwt存储信息
+        Map<String, Object> claimsMap = new HashMap<String, Object>();
+        claimsMap.put(SecurityConstants.USER_KEY, loginUser.getToken());
+        claimsMap.put(SecurityConstants.DETAILS_USER_ID, userId);
+        claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
+        claimsMap.put(SecurityConstants.DETAILS_MASTER_USER_ID, loginUser.getMasterUserId());
+        claimsMap.put(SecurityConstants.DETAILS_MASTERUSERNAME, loginUser.getMasterUserName());
+
+        // 接口返回信息
+        Map<String, Object> rspMap = new HashMap<String, Object>();
+        rspMap.put("access_token", JwtUtils.createToken(claimsMap));
+        rspMap.put("expires_in", configExpireTime);
+        return rspMap;
+    }
+
+    /**
      * 获取用户身份信息
      *
      * @return 用户信息
@@ -167,6 +235,24 @@ public class TokenService {
         // redisService.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
     }
 
+    /**
+     * 刷新令牌有效期
+     *
+     * @param loginUser 登录信息
+     */
+    public void refreshTokenNew(LoginUser loginUser,long configExpireTime) {
+        loginUser.setLoginTime(System.currentTimeMillis());
+        loginUser.setExpireTime(loginUser.getLoginTime() + configExpireTime * MILLIS_MINUTE);
+        // 根据uuid将loginUser缓存
+        String userKey = getTokenKey(loginUser.getToken());
+        remoteUserService.userLoginInfo(loginUser.getUserid(), DateUtils.getNowDate(), loginUser.getIpaddr(), SecurityConstants.INNER);
+        //登陆后删除之前的token
+        RedisUtils.deleteByPrefix(userKey);
+        RedisUtils.setCacheObject(userKey, loginUser, Duration.ofMinutes(configExpireTime));
+        //redisService.deleteByPrefix(userKey);
+        // redisService.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
+    }
+
     private String getTokenKey(String token) {
         return ACCESS_TOKEN + token;
     }

+ 85 - 11
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillPlanServiceImpl.java

@@ -29,6 +29,7 @@ import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanDataVo;
 import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanDetailVo;
 import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanPageVo;
 import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanRoleVo;
+import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlan;
 import com.xunmei.common.core.domain.reminder.domain.CoreReminderSchedule;
 import com.xunmei.common.core.domain.reminder.vo.CoreReminderConfigurationFullVo;
 import com.xunmei.common.core.enums.BusinessPlanType;
@@ -39,6 +40,7 @@ import com.xunmei.common.core.enums.drill.DrillPlanCycleEnum;
 import com.xunmei.common.core.enums.drill.DrillPlanStatus;
 import com.xunmei.common.core.enums.edu.EduTrainingDoStatus;
 import com.xunmei.common.core.enums.edu.EduTrainingPlanCycleEnum;
+import com.xunmei.common.core.enums.edu.EduTrainingPlanStatus;
 import com.xunmei.common.core.exception.ServiceException;
 import com.xunmei.common.core.thread.ThreadPoolConfig;
 import com.xunmei.common.core.util.BeanHelper;
@@ -695,29 +697,101 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
                 final List<CoreDrillPlan> sLsPlanList = getPlanList(orgId, 1, 1);
                 return sLsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(toList());
             case 2:
-                //办事处
-                SysOrg topOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectTopOrg(SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
-                final List<CoreDrillPlan> lsPlanList = getPlanList(topOrg.getId(), 1, 1);
+                //办事处查询 办事处自己下发、以及省联社下发且在该办事处下有参与机构的任务
+                //1、由办事处机构获取到省联社机构,并获取到计划数据
+                //2、由办事处计划获取到下辖行社机构,并获取到由省联社下发到行社的计划数据
+                //3、对比第一步和第二步的计划,两种相同的任务名称交集才是该办事处需要看到的省联社下发计划
+                //4、办事处自己下发的任务
+
+//                SysOrg topOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectTopOrg(SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+//                final List<CoreDrillPlan> lsPlanList = getPlanList(topOrg.getId(), 1, 1);
+
+                //1、由办事处机构获取到省联社机构,并获取到计划数据
+                List<SysOrgVO> parentOrgList= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.getSelfAndAllParentOrgs(orgId), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                SysOrgVO slsOrgVo = parentOrgList.stream().filter(x -> ObjectUtil.equal(x.getType(), 1)).findFirst().orElse(null);
+                List<CoreDrillPlan> lsPlanList =new ArrayList<>();
+                if(ObjectUtil.isNotNull(slsOrgVo))
+                {
+                    lsPlanList = getPlanList(slsOrgVo.getId(), 1, 1);
+                }
+                //2、由办事处计划获取到下辖行社机构,并获取到由省联社下发到行社的计划数据
+                List<SysOrg> hsOrgList= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectChildHs(orgId,SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                List<CoreDrillPlan> bscHsPlanList = getPlanList(hsOrgList.stream().map(x->x.getId()).collect(toList()), 0,0);
+                //3、对比第一步和第二步的计划,两种相同的任务名称交集才是该办事处需要看到的省联社下发计划
+                lsPlanList=lsPlanList.stream().filter(ls->bscHsPlanList.stream().anyMatch(hs->ls.getPlanName().equals(hs.getPlanName()))).collect(toList());
+
+                //4、办事处自己下发的任务
                 final List<CoreDrillPlan> bscPlanList = getPlanList(orgId, 1, 1);
                 return Stream.of(lsPlanList, bscPlanList).flatMap(Collection::stream).map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(toList());
             case 3:
                 //行社
-                final List<CoreDrillPlan> hsPlanList = getPlanList(orgId, 0, 0);
+                final List<CoreDrillPlan> hsPlanList = getPlanList(orgId, null, null);
                 return hsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(toList());
+            case 4:
+                //网点
+                List<SysOrgVO> parentOrgList1= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.getSelfAndAllParentOrgs(orgId), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                SysOrgVO hsOrgVo = parentOrgList1.stream().filter(x -> ObjectUtil.equal(x.getType(), 3)).findFirst().orElse(null);
+                Long tempOrgId=orgId;
+                if(ObjectUtil.isNotNull(hsOrgVo))
+                {
+                    tempOrgId=hsOrgVo.getId();
+                }
+                final List<CoreDrillPlan> wdhsPlanList = getPlanList(tempOrgId, null, null);
+                return wdhsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(Collectors.toList());
             default:
                 return new ArrayList<>();
         }
     }
 
     private List<CoreDrillPlan> getPlanList(Long orgId, Integer standard, Integer issue) {
-        return coreDrillPlanMapper.selectList(new LambdaQueryWrapper<CoreDrillPlan>()
-                .eq(CoreDrillPlan::getBelongOrgId, orgId)
-                .eq(CoreDrillPlan::getStandard, standard)
-                .eq(CoreDrillPlan::getIssue, issue)
+        LambdaQueryWrapper<CoreDrillPlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(CoreDrillPlan::getBelongOrgId, orgId)
                 .eq(CoreDrillPlan::getDeleted, 0)
-                .eq(CoreDrillPlan::getPlanStatus, DrillPlanStatus.USING.getCode())
-                .select(CoreDrillPlan::getId, CoreDrillPlan::getPlanName)
-        );
+                .eq(CoreDrillPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode());
+        if(ObjectUtil.isNotNull(standard))
+        {
+            queryWrapper.eq(CoreDrillPlan::getStandard, standard);
+        }
+        if(ObjectUtil.isNotNull(issue))
+        {
+            queryWrapper.eq(CoreDrillPlan::getIssue, issue);
+        }
+        return coreDrillPlanMapper.selectList(queryWrapper.select(CoreDrillPlan::getId, CoreDrillPlan::getPlanName));
+
+//        return coreDrillPlanMapper.selectList(new LambdaQueryWrapper<CoreDrillPlan>()
+//                .eq(CoreDrillPlan::getBelongOrgId, orgId)
+//                .eq(CoreDrillPlan::getStandard, standard)
+//                .eq(CoreDrillPlan::getIssue, issue)
+//                .eq(CoreDrillPlan::getDeleted, 0)
+//                .eq(CoreDrillPlan::getPlanStatus, DrillPlanStatus.USING.getCode())
+//                .select(CoreDrillPlan::getId, CoreDrillPlan::getPlanName)
+//        );
+    }
+
+    private List<CoreDrillPlan> getPlanList(List<Long> orgIds, Integer standard, Integer issue) {
+
+        LambdaQueryWrapper<CoreDrillPlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(CoreDrillPlan::getBelongOrgId, orgIds)
+                .eq(CoreDrillPlan::getDeleted, 0)
+                .eq(CoreDrillPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode());
+        if(ObjectUtil.isNotNull(standard))
+        {
+            queryWrapper.eq(CoreDrillPlan::getStandard, standard);
+        }
+        if(ObjectUtil.isNotNull(issue))
+        {
+            queryWrapper.eq(CoreDrillPlan::getIssue, issue);
+        }
+        return coreDrillPlanMapper.selectList(queryWrapper.select(CoreDrillPlan::getId, CoreDrillPlan::getPlanName));
+
+//        return coreDrillPlanMapper.selectList(new LambdaQueryWrapper<CoreDrillPlan>()
+//                .in(CoreDrillPlan::getBelongOrgId, orgIds)
+//                .eq(CoreDrillPlan::getStandard, standard)
+//                .eq(CoreDrillPlan::getIssue, issue)
+//                .eq(CoreDrillPlan::getDeleted, 0)
+//                .eq(CoreDrillPlan::getPlanStatus, DrillPlanStatus.USING.getCode())
+//                .select(CoreDrillPlan::getId, CoreDrillPlan::getPlanName)
+//        );
     }
 
     private List<CoreDrillPlan> buildPlanData(CoreDrillPlan plan, int status) {

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java

@@ -701,7 +701,7 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社")) {
             sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
-        } else if (sysOrg.getType() == 3) {
+        } else if (sysOrg.getType() == 3 || sysOrg.getType() == 4) {
             sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             sysOrgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgTreeListByCurOrgId(orgId, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);

+ 76 - 10
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingPlanServiceImpl.java

@@ -19,6 +19,7 @@ import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.DateRange;
 import com.xunmei.common.core.domain.IdName;
 import com.xunmei.common.core.domain.compensate.dto.CompensateDto;
+import com.xunmei.common.core.domain.drill.domain.CoreDrillPlan;
 import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlan;
 import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToExecOrg;
 import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToRole;
@@ -819,28 +820,93 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
                 return sLsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(Collectors.toList());
             case 2:
                 //办事处
-                SysOrg topOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectTopOrg(SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
-                final List<CoreEduTrainingPlan> lsPlanList = getPlanList(topOrg.getId(), 1, 1);
+//                SysOrg topOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectTopOrg(SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+//                List<SysOrgVO> parentOrgList= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.getSelfAndAllParentOrgs(orgId), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+//                SysOrgVO slsOrgVo = parentOrgList.stream().filter(x -> ObjectUtil.equal(x.getType(), 1)).findFirst().orElse(null);
+//                List<CoreEduTrainingPlan> lsPlanList =new ArrayList<>();
+//                if(ObjectUtil.isNotNull(slsOrgVo) )
+//                {
+//                    lsPlanList = getPlanList(slsOrgVo.getId(), 1, 1);
+//                }
+
+                //1、由办事处机构获取到省联社机构,并获取到计划数据
+                List<SysOrgVO> parentOrgList= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.getSelfAndAllParentOrgs(orgId), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                SysOrgVO slsOrgVo = parentOrgList.stream().filter(x -> ObjectUtil.equal(x.getType(), 1)).findFirst().orElse(null);
+                List<CoreEduTrainingPlan> lsPlanList =new ArrayList<>();
+                if(ObjectUtil.isNotNull(slsOrgVo))
+                {
+                    lsPlanList = getPlanList(slsOrgVo.getId(), 1, 1);
+                }
+                //2、由办事处计划获取到下辖行社机构,并获取到由省联社下发到行社的计划数据
+                List<SysOrg> hsOrgList= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectChildHs(orgId,SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                List<CoreEduTrainingPlan> bscHsPlanList = getPlanList(hsOrgList.stream().map(x->x.getId()).collect(toList()), 0,0);
+                //3、对比第一步和第二步的计划,两种相同的任务名称交集才是该办事处需要看到的省联社下发计划
+                lsPlanList=lsPlanList.stream().filter(ls->bscHsPlanList.stream().anyMatch(hs->ls.getPlanName().equals(hs.getPlanName()))).collect(toList());
+
+                //4、办事处自己下发的任务
+
                 final List<CoreEduTrainingPlan> bscPlanList = getPlanList(orgId, 1, 1);
                 return Stream.of(lsPlanList, bscPlanList).flatMap(Collection::stream).map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(Collectors.toList());
             case 3:
                 //行社
-                final List<CoreEduTrainingPlan> hsPlanList = getPlanList(orgId, 0, 0);
+                final List<CoreEduTrainingPlan> hsPlanList = getPlanList(orgId, null, null);
                 return hsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(Collectors.toList());
+            case 4:
+                //网点
+                List<SysOrgVO> parentOrgList1= RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.getSelfAndAllParentOrgs(orgId), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+                SysOrgVO hsOrgVo = parentOrgList1.stream().filter(x -> ObjectUtil.equal(x.getType(), 3)).findFirst().orElse(null);
+                Long tempOrgId=orgId;
+                if(ObjectUtil.isNotNull(hsOrgVo))
+                {
+                    tempOrgId=hsOrgVo.getId();
+                }
+                final List<CoreEduTrainingPlan> wdhsPlanList = getPlanList(tempOrgId, null, null);
+                return wdhsPlanList.stream().map(x -> new IdName<>(x.getId().toString(), x.getPlanName())).collect(Collectors.toList());
             default:
                 return new ArrayList<>();
         }
     }
 
     private List<CoreEduTrainingPlan> getPlanList(Long orgId, Integer standard, Integer issue) {
-        return coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
-                .eq(CoreEduTrainingPlan::getBelongOrgId, orgId)
-                .eq(CoreEduTrainingPlan::getStandard, standard)
-                .eq(CoreEduTrainingPlan::getIssue, issue)
+         LambdaQueryWrapper<CoreEduTrainingPlan> queryWrapper = new LambdaQueryWrapper<>();
+         queryWrapper.eq(CoreEduTrainingPlan::getBelongOrgId, orgId)
+                .eq(CoreEduTrainingPlan::getDeleted, 0)
+                .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode());
+         if(ObjectUtil.isNotNull(standard))
+         {
+             queryWrapper.eq(CoreEduTrainingPlan::getStandard, standard);
+         }
+        if(ObjectUtil.isNotNull(issue))
+        {
+            queryWrapper.eq(CoreEduTrainingPlan::getIssue, issue);
+        }
+        return coreEduTrainingPlanMapper.selectList(queryWrapper.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanName));
+
+    }
+
+
+    private List<CoreEduTrainingPlan> getPlanList(List<Long> orgIds, Integer standard, Integer issue) {
+        LambdaQueryWrapper<CoreEduTrainingPlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(CoreEduTrainingPlan::getBelongOrgId, orgIds)
                 .eq(CoreEduTrainingPlan::getDeleted, 0)
-                .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
-                .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanName)
-        );
+                .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode());
+        if(ObjectUtil.isNotNull(standard))
+        {
+            queryWrapper.eq(CoreEduTrainingPlan::getStandard, standard);
+        }
+        if(ObjectUtil.isNotNull(issue))
+        {
+            queryWrapper.eq(CoreEduTrainingPlan::getIssue, issue);
+        }
+        return coreEduTrainingPlanMapper.selectList(queryWrapper.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanName));
+//        return coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
+//                .in(CoreEduTrainingPlan::getBelongOrgId, orgIds)
+//                .eq(CoreEduTrainingPlan::getStandard, standard)
+//                .eq(CoreEduTrainingPlan::getIssue, issue)
+//                .eq(CoreEduTrainingPlan::getDeleted, 0)
+//                .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
+//                .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanName)
+//        );
     }
 
     @Override

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -720,7 +720,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社")) {
             sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
-        } else if (sysOrg.getType() == 3) {
+        } else if (sysOrg.getType() == 3 || sysOrg.getType() == 4) {
             sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             sysOrgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgTreeListByCurOrgId(orgId, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);

+ 15 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/controller/CoreIntroduceLetterController.java

@@ -1,5 +1,6 @@
 package com.xunmei.core.letter.controller;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.xunmei.common.core.domain.letter.domain.CoreIntroduceLetterOutInRequest;
 import com.xunmei.common.core.domain.letter.dto.*;
 import com.xunmei.common.core.domain.letter.vo.CoreIntroduceLetterOutInRequestVo;
@@ -10,6 +11,7 @@ import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.log.annotation.Log;
 import com.xunmei.common.log.enums.BusinessType;
 import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.letter.service.ICoreIntroduceLetterService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -44,6 +46,19 @@ public class CoreIntroduceLetterController extends BaseController {
     @RequiresPermissions("core:letter:approveList")
     @GetMapping("/approve/list")
     public TableDataInfo<CoreIntroduceLetterOutInRequestVo> approveList(CoreIntroduceLetterApproveRequestDto requestDto) {
+        if(ObjectUtil.isNull(requestDto))
+        {
+            throw new RuntimeException("请求参数不能为空");
+        }
+        if(ObjectUtil.isEmpty( requestDto.getOrgId()))
+        {
+            requestDto.setOrgId(SecurityUtils.getLoginUser().getOrgId());
+        }
+        if(ObjectUtil.isNull(requestDto.getOrgId()))
+        {
+            throw new RuntimeException("请求参数机构编码不能为空");
+        }
+
         return coreIntroduceLetterService.selectApproveListPage(requestDto);
     }
 

+ 29 - 9
soc-modules/soc-modules-core/src/main/resources/mapper/device/ProtectionMapper.xml

@@ -13,6 +13,7 @@
     <!--    </select>-->
 
     <select id="pageList" resultType="com.xunmei.core.resumption.vo.protection.ProtectionPageVo">
+        SELECT * FROM (
         select a.id,
         a.name as name,
         a.status as status,
@@ -28,26 +29,45 @@
         a.code as code,
         a.alarm_host_code as deviceCode,
         a.iot_token as iotToken,
-        a.source
-        from iot_alarm_subsystem a inner join sys_device d on (d.business_device_id = a.id or d.id=a.device_id) and d.device_status = 1
+        a.source, c.path
+        from iot_alarm_subsystem a inner join sys_device d on (d.business_device_id = a.id) and d.device_status = 1 and d.del_flag=0 and a.deleted=0
         inner join sys_org c on a.org_id = c.id and c.deleted=0 and c.is_lock=0
+        UNION ALL
+        select a.id,
+        a.name as name,
+        a.status as status,
+        a.org_id as orgId,
+        c.short_name as orgName,
+        a.all_hour as allHour,
+        a.status_update_time as statusUpdateTime,
+        a.status_updator_name as statusUpdatorName,
+        a.status_change_time as statusChangeTime,
+        c.affiliated_area ,
+        c.affiliated_bank,
+        a.in_book,
+        a.code as code,
+        a.alarm_host_code as deviceCode,
+        a.iot_token as iotToken,
+        a.source, c.path
+        from iot_alarm_subsystem a inner join sys_device d on (d.id=a.device_id) and d.device_status = 1 and d.del_flag=0 and a.deleted=0
+        inner join sys_org c on a.org_id = c.id and c.deleted=0 and c.is_lock=0 ) t where  1= 1
         <if test="request.checkSub==true">
-            and c.path like concat((select path from sys_org where id=#{request.orgId}), '%')
+            and t.path like concat((select path from sys_org where id=#{request.orgId}), '%')
         </if>
-        where a.deleted=0 and d.del_flag=0
+
         <if test="request.checkSub==false">
-            and a.org_id = #{request.orgId}
+            and t.orgId = #{request.orgId}
         </if>
         <if test="request.status!=null ">
-            and a.status = #{request.status}
+            and t.status = #{request.status}
         </if>
         <if test="request.key!=null and request.key!=''">
-            and a.name like concat('%',#{request.key},'%')
+            and t.name like concat('%',#{request.key},'%')
         </if>
         <if test="request.startTime!=null and request.endTime!=null">
-            and a.status_change_time >= #{request.startTime} and a.status_change_time&lt;=#{request.endTime}
+            and t.statusChangeTime >= #{request.startTime} and t.statusChangeTime&lt;=#{request.endTime}
         </if>
-        order by a.org_Id asc,a.name,a.id desc
+        order by t.orgId asc,t.name,t.id desc
     </select>
 
     <select id="getHostName" resultType="String">

+ 2 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -948,7 +948,8 @@
             and t.title like concat('%', #{task.title}, '%')
         </if>
         <if test="task.roleId != null  and task.roleId != ''">
-            and csptr.role_id =#{task.roleId}
+<!--            and csptr.role_id =#{task.roleId}-->
+            and (csptr.role_id =#{task.roleId} or t.role_id = #{task.roleId})
         </if>
         <if test="task.planStartTime != null ">
             and DATE_FORMAT(t.plan_start_time, '%Y-%m-%d') = DATE_FORMAT(#{task.planStartTime}, '%Y-%m-%d')

+ 3 - 3
soc-modules/soc-modules-iot/src/main/resources/mapper/IotAlarmDataMapper.xml

@@ -10,6 +10,9 @@
         FROM
         iot_alarm_data a
         LEFT JOIN sys_org b ON a.org_id = b.id
+        <if test="param.orgPath != null and param.orgPath != ''">
+            and b.path like concat(#{param.orgPath},'%')
+        </if>
         LEFT JOIN iot_device_info d ON a.device_id = d.id
         where 1=1 and d.deleted = 0 and d.enable=0
         <if test="param.deviceName != null and param.deviceName != ''">
@@ -18,9 +21,6 @@
         <if test="param.orgId != null and param.orgId != ''">
             and a.org_id = #{param.orgId}
         </if>
-        <if test="param.orgPath != null and param.orgPath != ''">
-            and b.path like concat(#{param.orgPath},'%')
-        </if>
         <if test="param.dataType != null">
             and a.data_type = #{param.dataType}
         </if>

+ 2 - 4
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysServerController.java

@@ -75,15 +75,13 @@ public class SysServerController extends BaseController {
 
     @ApiOperation(value = "转存目标服务器上的日志")
     @PostMapping("/transferLog")
-    public AjaxResult transferLog(@RequestBody TransferLogDto req) {
+    public void transferLog(@RequestBody TransferLogDto req) {
         sysServerService.transferLog(req);
-        return success();
     }
 
     @ApiOperation(value = "转存目标服务器上的日志")
     @PostMapping("/downloadLogData")
-    public AjaxResult downloadLogData(TransferLogDto req, HttpServletResponse response) {
+    public void downloadLogData(TransferLogDto req, HttpServletResponse response) {
         sysServerService.downloadLogData(req,response);
-        return success();
     }
 }

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

@@ -146,11 +146,11 @@ 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 getHeadSafeCheckNumber(@Param("orgId") Long orgId,@Param("year") int year);
 
-    Integer getHeadSafeCheckNetworkNumber(String orgPath);
+    Integer getHeadSafeCheckNetworkNumber(@Param("orgId") Long orgId,@Param("year") int year);
 
-    Map getDangerNumber(String orgPath);
+    Map getDangerNumber(@Param("orgId") Long orgId,@Param("year") int year);
 
     Integer getSafeHeadToNetwork(@Param("type") Integer type, @Param("level") Integer level, @Param("orgPath") String orgPath);
 

+ 11 - 14
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDeviceServiceImpl.java

@@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.CacheConstants;
 import com.xunmei.common.core.constant.Constants;
-import com.xunmei.common.core.constant.DictConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.device.domain.SysMultiLayerDictionary;
 import com.xunmei.common.core.domain.device.vo.DictionaryTreeVo;
@@ -21,11 +20,9 @@ import com.xunmei.common.core.utils.DateHelper;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.redis.utils.RedisUtils;
-import com.xunmei.common.security.utils.DictUtils;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.system.api.RemoteProtectionService;
 import com.xunmei.system.api.domain.SysDevice;
-import com.xunmei.system.api.domain.SysDictData;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.dto.ProtectionDTO;
 import com.xunmei.system.api.dto.SysDeviceInnerListDto;
@@ -129,7 +126,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
     @Override
     public SysDevice selectSysDeviceById(Long id) {
         SysDevice sysDevice = sysDeviceMapper.selectById(id);
-        if (ObjectUtil.equal(sysDevice.getDeviceType(), "1")) {
+        if (ObjectUtil.equal(sysDevice.getDeviceType(), "6")) {
             ProtectionVO byDeviceId = remoteProtectionService.getByDeviceId(id, SecurityConstants.INNER);
             if (byDeviceId != null) {
                 sysDevice.setInBook(byDeviceId.getInBook());
@@ -265,9 +262,9 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
         if (null != sysDevice1) {
             throw new RuntimeException("设备名称重复");
         }
-        if (!checkAssetNoRepeat(sysDevice.getOrgId(), sysDevice.getAssetNo(), null)) {
+        /*if (!checkAssetNoRepeat(sysDevice.getOrgId(), sysDevice.getAssetNo(), null)) {
             throw new RuntimeException("资产编号重复");
-        }
+        }*/
         int insert = sysDeviceMapper.insert(sysDevice);
         //如果已经存在了主机同步上来的子系统,那么设备新增的就不能再同步到子系统表去
         final int exitDevice = remoteProtectionService.checkExitDevice(sysOrg.getId(), null, SecurityConstants.INNER);
@@ -305,7 +302,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
         /**
          * 这块逻辑代码,上层出错时,会导致新增设备出错
          */
-        if (sysDevice.getDeviceType().equals("1")) {
+        if (sysDevice.getDeviceType().equals("6")) {
             ProtectionDTO protectionDTO = new ProtectionDTO();
             protectionDTO.setName(sysDevice.getDeviceName());
             protectionDTO.setOrgPath(sysOrg.getPath());
@@ -339,9 +336,9 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
      */
     @Override
     public int updateSysDevice(SysDevice sysDevice) {
-        if (!checkAssetNoRepeat(sysDevice.getOrgId(), sysDevice.getAssetNo(), sysDevice.getId())) {
+        /*if (!checkAssetNoRepeat(sysDevice.getOrgId(), sysDevice.getAssetNo(), sysDevice.getId())) {
             throw new RuntimeException("资产编号重复");
-        }
+        }*/
         sysDevice.setUpdateTime(DateUtils.getNowDate());
         sysDevice.setUpdateBy(SecurityUtils.getUsername());
         SysOrg sysOrg = orgService.selectSysOrgById(sysDevice.getOrgId());
@@ -476,7 +473,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
             device.setOrgPath(orgVO.getPath());
         }
 
-        String assetNo = deviceExport.getAssetNo();
+       /* String assetNo = deviceExport.getAssetNo();
         if (StringUtils.isEmpty(assetNo)) {
             msgList.add("资产编号为空");
         } else {
@@ -485,7 +482,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
             } else {
                 device.setAssetNo(assetNo);
             }
-        }
+        }*/
 
         String deviceName = deviceExport.getDeviceName();
         if (StringUtils.isEmpty(deviceName)) {
@@ -500,7 +497,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
         String assetType = deviceExport.getAssetType();
         Optional<DictionaryTreeVo> assetOptional = dictionaryList.stream().filter(r -> ObjectUtil.equal(r.getName(), assetType)).findFirst();
         if (!assetOptional.isPresent()) {
-            msgList.add("资产分类未填写或填写不正确");
+            msgList.add("设备类别未填写或填写不正确");
         } else {
             device.setAssetType(assetOptional.get().getId().toString());
         }
@@ -595,7 +592,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
             } catch (Exception e) {
                 msgList.add("投产时间格式错误");
             }
-        }*/
+        }
         String deviceStatus = deviceExport.getDeviceStatus();
         if (StringUtils.isEmpty(deviceStatus)) {
             msgList.add("资产状态未填写");
@@ -607,7 +604,7 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
             } else {
                 msgList.add("资产状态填写错误");
             }
-        }
+        }*/
         if (msgList.isEmpty()) {
             result.add(device);
         } else {

+ 6 - 4
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -19,6 +19,7 @@ import com.xunmei.common.core.domain.OrgTreeReq;
 import com.xunmei.common.core.domain.OrgTreeResp;
 import com.xunmei.common.core.enums.OrgTypeEnum;
 import com.xunmei.common.core.exception.ServiceException;
+import com.xunmei.common.core.utils.DateHelper;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.bean.BeanUtils;
 import com.xunmei.common.core.web.page.TableDataInfo;
@@ -534,14 +535,15 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             Integer jointHeadToNetwork1 = baseMapper.getJointHeadToNetwork(2, 2, s.getPath());
             securityWorkExport.setJointNetworkToPeople(jointHeadToNetwork1);
             //总行安全检查
-            //组织开展次数
-            Integer headSafeCheckNumber = baseMapper.getHeadSafeCheckNumber(s.getPath());
+            //组织开展次数 省联社下发的,行社做的“行社全面安全检查”登记的任务
+            DateHelper dateHelper = new DateHelper(new Date());
+            Integer headSafeCheckNumber = baseMapper.getHeadSafeCheckNumber(s.getId(),dateHelper.getYear());
             securityWorkExport.setHeadSafeCheckNumber(headSafeCheckNumber);
             //检查网点数量
-            Integer headSafeCheckNetworkNumber = baseMapper.getHeadSafeCheckNetworkNumber(s.getPath());
+            Integer headSafeCheckNetworkNumber = baseMapper.getHeadSafeCheckNetworkNumber(s.getId(),dateHelper.getYear());
             securityWorkExport.setHeadSafeCheckNetworkNumber(headSafeCheckNetworkNumber);
             //隐患
-            Map dangerNumber = baseMapper.getDangerNumber(s.getPath());
+            Map dangerNumber = baseMapper.getDangerNumber(s.getId(),dateHelper.getYear());
             securityWorkExport.setFoundDangerNumber(Integer.valueOf(dangerNumber.get("foundDangerNumber").toString()));
             securityWorkExport.setRectificationDangerNumber(Integer.valueOf(dangerNumber.get("rectificationDangerNumber").toString()));
             securityWorkExport.setNoRectificationDangerNumber(Integer.valueOf(dangerNumber.get("noRectificationDangerNumber").toString()));

+ 7 - 8
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/DeviceExport.java

@@ -4,7 +4,6 @@ import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 /**
@@ -18,15 +17,15 @@ import lombok.Data;
 public class DeviceExport {
     @ExcelProperty(value = "所属机构(必填)", index = 0)
     private String orgName;
-    @ExcelProperty(value = "资产编号(必填)", index = 1)
-    private String assetNo;
-    @ExcelProperty(value = "设备名称(必填)", index = 2)
+//    @ExcelProperty(value = "资产编号", index = 1)
+//    private String assetNo;
+    @ExcelProperty(value = "设备名称(必填)", index = 1)
     private String deviceName;
-    @ExcelProperty(value = "资产分类(必填)", index = 3)
+    @ExcelProperty(value = "设备类别(必填)", index = 2)
     private String assetType;
-    @ExcelProperty(value = "设备分类(必填)", index = 4)
+    @ExcelProperty(value = "设备分类(必填)", index = 3)
     private String deviceType;
-    @ExcelProperty(value = "设备品牌", index = 5)
+   /* @ExcelProperty(value = "设备品牌", index = 5)
     private String deviceBrand;
     @ExcelProperty(value = "设备型号", index = 6)
     private String deviceModel;
@@ -42,5 +41,5 @@ public class DeviceExport {
     @ExcelProperty(value = "投产时间", index = 11)
     private String useTime;
     @ExcelProperty(value = "资产状态(必填)", index = 12)
-    private String deviceStatus;
+    private String deviceStatus;*/
 }

+ 30 - 18
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1124,6 +1124,7 @@ and
           AND b.deleted = 0
           and b.is_lock = 0
           AND c.check_type =3
+          AND a.`status` =3
           and a.org_path LIKE concat(#{orgPath}, '%')
           AND a.start_time BETWEEN #{startTime} and #{endTime}
     </select>
@@ -1132,11 +1133,11 @@ and
             COUNT( a.id )
         FROM
             core_edu_training_task a
-                LEFT JOIN core_edu_training_plan b ON a.plan_id = b.id
+                LEFT JOIN sys_org c ON a.org_id = c.id
         WHERE
-            b.exec_org_type = 3
-          AND b.deleted =0
-        and a.org_path    like concat(concat('%',#{orgPath}),'%')
+          c.type =3
+          AND a.`status`=2
+          and a.org_path    like concat(concat('%',#{orgPath}),'%')
           AND a.training_start_date_time BETWEEN #{startTime} and #{endTime}
     </select>
     <select id="getEduUser" resultType="java.lang.Integer">
@@ -1153,8 +1154,10 @@ and
             COUNT(a.id)
         FROM
             core_drill_task a
-                LEFT JOIN core_drill_plan b ON a.plan_id = b.id
-        WHERE b.exec_org_type=3
+              --  LEFT JOIN core_drill_plan b ON a.plan_id = b.id
+            LEFT JOIN sys_org c ON a.org_id = c.id
+        WHERE c.type=3
+          AND a.`status`=2
           and a.org_path    like concat(concat('%',#{orgPath}),'%')
           AND a.drill_start_time BETWEEN #{startTime} and #{endTime}
     </select>
@@ -1176,6 +1179,7 @@ and
             core_drill_task a
                 LEFT JOIN core_drill_plan b ON a.plan_id = b.id
         WHERE b.exec_org_type=4
+          and a.`status`=2
           and a.org_path    like concat(concat('%',#{orgPath}),'%')
           AND a.drill_start_time BETWEEN #{startTime} and #{endTime}
     </select>
@@ -1294,13 +1298,16 @@ and
     </select>
     <select id="getHeadSafeCheckNumber" resultType="java.lang.Integer">
         SELECT
-            COUNT( a.id )
+        count(a.id)
         FROM
-            core_safety_task a
-                LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
+        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}, '%')
+        b.check_type = 4
+        AND b.plan_create_org_id != b.plan_of_org_id
+        AND a.`status` =3
+        AND a.ymd_year =#{year}
+        AND a.check_org_id =#{orgId}
     </select>
     <select id="getHeadSafeCheckNetworkNumber" resultType="java.lang.Integer">
         SELECT
@@ -1308,13 +1315,16 @@ and
         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
+--                LEFT JOIN sys_org c ON c.id = a.org_id
         WHERE
-            b.check_type = 1
-            AND c.deleted = 0
-            and c.is_lock = 0
+            b.check_type = 4
+            AND b.plan_create_org_id != b.plan_of_org_id
+            AND a.`status` =3
+--            AND c.deleted = 0
+--            and c.is_lock = 0
 --           AND c.type = 4
-          AND a.org_path LIKE concat(#{orgPath}, '%')
+            AND a.ymd_year =#{year}
+            AND a.check_org_id =#{orgId}
     </select>
     <select id="getDangerNumber" resultType="java.util.Map">
         SELECT
@@ -1334,8 +1344,10 @@ and
                 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}, '%')
+          AND c.check_type = 4
+          AND c.plan_create_org_id != c.plan_of_org_id
+          AND b.ymd_year =#{year}
+          AND b.check_org_id =#{orgId}
     </select>
     <select id="selectSysOrgByPathAndType" resultType="com.xunmei.system.api.domain.SysOrg">
         SELECT