浏览代码

Merge remote-tracking branch 'origin/V0.0.4' into V0.0.4

jingyuanchao 1 年之前
父节点
当前提交
adb24db127
共有 16 个文件被更改,包括 265 次插入64 次删除
  1. 58 2
      project_data/sql/0.0.4/soc/soc.sql
  2. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/service/impl/CockpitServiceImpl.java
  3. 3 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/panel/service/impl/PanelServiceImpl.java
  4. 1 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/vo/MonitoringAccessVO.java
  5. 24 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/controller/ResumptionReportController.java
  6. 3 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/service/impl/ResumptionReportServiceImpl.java
  7. 11 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/vo/IntrusionTestReportVO.java
  8. 24 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/vo/ResumptionDayVO.java
  9. 9 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/controller/SafetyInspectReportController.java
  10. 5 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/vo/SafetyInspectVO.java
  11. 9 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/dto/register/AppPageDto.java
  12. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/mapper/CoreSafetyTaskMapper.java
  13. 28 18
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/SafetyCheckRegisterSericeImpl.java
  14. 37 26
      soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml
  15. 49 2
      soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml
  16. 1 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeviceController.java

+ 58 - 2
project_data/sql/0.0.4/soc/soc.sql

@@ -12,10 +12,66 @@ update sys_dict_data set dict_label='登记中' where dict_type='edu_training_do
 -- 履职状态描述变更
 update sys_dict_data set dict_label='履职中' where dict_type='resumption_status' and dict_label='进行中' and dict_value=2 LIMIT 1;
 
-delete from sys_menu where id in (1729308502301728769);
+delete from sys_menu where id in (1731503585113534466,1729308502301728769,1731496383090913282,1731498925506031618,1731499700525330433,1731501484262158338,1731502833360039937);
 INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark)
 VALUES (1729308502301728769, '导出全省农信系统物防建设达标情况', 103, 5, '', null, null, 1, 0, 'F', '0', '0', 'system:dept:exportConstruction', '1', null, null, null, now(), '', null, '');
-delete from sys_role_menu where menu_id=1729308502301728769;
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+ VALUES (1731496383090913282, '导出', 1720000571298115585, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:monitorAccessReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (1731498925506031618, '导出', 1722523915868221442, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:resumptionReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (1731499700525330433, '导出', 1723993298998222849, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:resumptionReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (1731501484262158338, '导出', 1724355771043504129, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:resumptionReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (1731502833360039937, '导出', 1724607752400044034, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:resumptionReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (1731503585113534466, '导出', 1726904309791121409, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:safetyInspectReport:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+
+
+delete from sys_role_menu where menu_id in (1731503585113534466,1731502833360039937,1729308502301728769,1731496383090913282,1731498925506031618,1731499700525330433,1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731503585113534466);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731503585113534466);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731503585113534466);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731503585113534466);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731503585113534466);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731503585113534466);
+
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731502833360039937);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731502833360039937);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731502833360039937);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731502833360039937);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731502833360039937);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731502833360039937);
+
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731501484262158338);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731501484262158338);
+
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731499700525330433);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731499700525330433);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731499700525330433);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731499700525330433);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731499700525330433);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731499700525330433);
+
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731498925506031618);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731498925506031618);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731498925506031618);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731498925506031618);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731498925506031618);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731498925506031618);
+
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1731496383090913282);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1731496383090913282);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1731496383090913282);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1731496383090913282);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1731496383090913282);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1731496383090913282);
+
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1729308502301728769);
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1729308502301728769);
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1729308502301728769);

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/service/impl/CockpitServiceImpl.java

@@ -98,7 +98,7 @@ public class CockpitServiceImpl implements CockpitService {
         r.sort(new Comparator<OrgGA38StatisticVo>() {
             @Override
             public int compare(OrgGA38StatisticVo o1, OrgGA38StatisticVo o2) {
-                return NumberUtil.compare(o1.getReachRate(), o2.getReachRate());
+                return NumberUtil.compare(o2.getReachRate(),o1.getReachRate());
             }
         });
 

+ 3 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/panel/service/impl/PanelServiceImpl.java

@@ -60,8 +60,9 @@ public class PanelServiceImpl implements PanelService {
     @Autowired
     @Qualifier(ThreadPoolConfig.SOC_EXECUTOR)
     private ThreadPoolTaskExecutor threadPoolTaskExecutor;
-@Autowired
-private ICoreEvaluateTaskService iCoreEvaluateTaskService;
+    @Autowired
+    private ICoreEvaluateTaskService iCoreEvaluateTaskService;
+
     @Override
     public List<PanelResultVo> selectPage() throws ExecutionException, InterruptedException, TimeoutException {
         List<Long> roles = RemoteCallHandlerExecutor.executeRemoteCall(

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/vo/MonitoringAccessVO.java

@@ -18,6 +18,7 @@ public class MonitoringAccessVO {
      */
     @ExcelProperty("序号")
     private Integer orderNum;
+    @ExcelProperty("地区")
     private String city;
 
     @ExcelProperty("单位名称")

+ 24 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/controller/ResumptionReportController.java

@@ -47,6 +47,14 @@ public class ResumptionReportController {
     @Log(title = "履职报表导出", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(ResumptionDTO request, HttpServletResponse response) throws IOException {
+        if (null == request.getSearchTime()) {
+            LocalDate currentDate = LocalDate.now();
+            if (null == request.getCycle() || request.getCycle() == 1) {
+                request.setSearchTime(currentDate.toString());
+            } else {
+                request.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
+            }
+        }
         resumptionReportService.export(request, response);
     }
     @ApiOperation(value = "每日安全保卫履职-日报表")
@@ -77,6 +85,10 @@ public class ResumptionReportController {
     @RequiresPermissions("core:resumptionReport:export")
     @PostMapping("/intrusionTestExport")
     public void intrusionTestExport(ResumptionDTO request, HttpServletResponse response) throws IOException {
+        if (null == request.getSearchTime()) {
+            LocalDate currentDate = LocalDate.now();
+            request.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
+        }
         resumptionReportService.intrusionTestExport(request, response);
     }
     @ApiOperation(value = "报警测试报表")
@@ -91,12 +103,20 @@ public class ResumptionReportController {
         List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.intrusionTest(resumptionDTO);
         ajaxResult.put(AjaxResult.DATA_TAG, intrusionTestReportVOList);
         ajaxResult.put(TITLE, "报警测试报表(" + resumptionDTO.getSearchTime() + ")");
+        SysOrg sysOrg = remoteOrgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
+        ajaxResult.put("orgName", sysOrg.getShortName());
         return ajaxResult;
     }
     @ApiOperation(value = "备用电源报表导出")
     @RequiresPermissions("core:resumptionReport:export")
     @PostMapping("/standbyPowerExport")
     public void standbyPowerExport(ResumptionDTO request, HttpServletResponse response) throws IOException {
+        if (null == request.getSearchTime()) {
+            DateTime beginOfQuarter = DateUtil.beginOfQuarter(new java.util.Date());
+            DateTime endOfQuarter = DateUtil.endOfQuarter(new Date());
+            request.setStartTime(beginOfQuarter);
+            request.setEndTime(endOfQuarter);
+        }
         resumptionReportService.standbyPowerExport(request, response);
     }
     @ApiOperation(value = "备用电源维护报表")
@@ -130,6 +150,10 @@ public class ResumptionReportController {
     @RequiresPermissions("core:resumptionReport:export")
     @PostMapping("/serviceBankExport")
     public void serviceBankExport(ResumptionDTO request, HttpServletResponse response) throws IOException {
+        if (null == request.getSearchTime()) {
+            LocalDate currentDate = LocalDate.now();
+            request.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
+        }
         resumptionReportService.serviceBankExport(request, response);
     }
     @ApiOperation(value = "离行式自助银行巡检报表")

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/service/impl/ResumptionReportServiceImpl.java

@@ -165,7 +165,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         String fileName = URLEncoder.encode("【" + orgName + "】-报警测试报表" + DateHelper.getDateString(new Date()), "UTF-8");
         response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
         // 调用EasyExcel的导出方法
-        EasyExcel.write(response.getOutputStream(), ResumptionDayVO.class).sheet("Sheet1").doWrite(report);
+        EasyExcel.write(response.getOutputStream(), IntrusionTestReportVO.class).sheet("Sheet1").doWrite(report);
     }
 
     @Override
@@ -229,7 +229,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         String fileName = URLEncoder.encode("【" + orgName + "】-备用电源维护报表" + DateHelper.getDateString(new Date()), "UTF-8");
         response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
         // 调用EasyExcel的导出方法
-        EasyExcel.write(response.getOutputStream(), ResumptionDayVO.class).sheet("Sheet1").doWrite(report);
+        EasyExcel.write(response.getOutputStream(), IntrusionTestReportVO.class).sheet("Sheet1").doWrite(report);
     }
 
 
@@ -342,7 +342,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         String fileName = URLEncoder.encode("【" + orgName + "】-离行式自助银行巡检报表" + DateHelper.getDateString(new Date()), "UTF-8");
         response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
         // 调用EasyExcel的导出方法
-        EasyExcel.write(response.getOutputStream(), ResumptionDayVO.class).sheet("Sheet1").doWrite(report);
+        EasyExcel.write(response.getOutputStream(), IntrusionTestReportVO.class).sheet("Sheet1").doWrite(report);
     }
 
 

+ 11 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/vo/IntrusionTestReportVO.java

@@ -6,7 +6,8 @@ import lombok.Data;
 
 /**
  * 入侵报警测试报表
- *
+ *离行
+ * 备用电源
  * @author :LuoWei
  * @date : 2023/11/13
  */
@@ -14,20 +15,29 @@ import lombok.Data;
 public class IntrusionTestReportVO {
     @ExcelProperty("序号")
     private Integer orderNum;
+    @ExcelProperty("地区")
     private String city;
+    @ExcelProperty("单位名称")
     private String orgName;
+    @ExcelProperty("网点数量")
     @ApiModelProperty(value = "网点数量")
     private Integer networkNumber;
+    @ExcelProperty("应履职次数")
     @ApiModelProperty(value = "应履职次数")
     private Integer planNumber;
+    @ExcelProperty("已履职次数")
     @ApiModelProperty(value = "已履职次数")
     private Integer realityNumber;
+    @ExcelProperty("履职完成率")
     @ApiModelProperty(value = "履职完成率")
     private String realityRate;
+    @ExcelProperty("隐患数量")
     @ApiModelProperty(value = "隐患数量")
     private Integer abnormalNumber;
+    @ExcelProperty("已整改数量")
     @ApiModelProperty(value = "已整改数量")
     private Integer realityRectificationNumber;
+    @ExcelProperty("整改完成率")
     @ApiModelProperty(value = "整改完成率")
     private String realityRectificationRate;
 }

+ 24 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/vo/ResumptionDayVO.java

@@ -1,5 +1,6 @@
 package com.xunmei.core.reportForms.resumption.vo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -12,48 +13,66 @@ import lombok.Data;
 public class ResumptionDayVO {
     @ExcelProperty("序号")
     private Integer orderNum;
+    @ExcelProperty("地区")
     private String city;
+    @ExcelProperty("单位名称")
     private String orgName;
+    @ExcelProperty("网点数量")
     @ApiModelProperty(value = "网点数量")
     private Integer networkNumber;
+    @ExcelProperty(value = {"总计","应履职次数"})
     @ApiModelProperty(value = "总计应履职次数")
     private Integer totalPlanNumber;
+    @ExcelProperty(value = {"总计","已履职次数"})
     @ApiModelProperty(value = "总计实际履职次数")
     private Integer totalRealityNumber;
+    @ExcelProperty(value = {"总计","履职完成率"})
     @ApiModelProperty(value = "总计检查率")
     private String totalRate;
+    @ExcelProperty(value = {"总计","隐患数量"})
+    @ApiModelProperty(value = "总计隐患问题数")
+    private Integer totalAbnormalNumber;
+    @ExcelProperty(value = {"总计","已整改数量"})
     @ApiModelProperty(value = "总计已整改数量")
     private Integer totalRealityRectificationNumber;
+    @ExcelProperty(value = {"总计","整改完成率"})
     @ApiModelProperty(value = "总计整改完成率")
     private String totalRealityRectificationRate;
 
-
-    @ApiModelProperty(value = "总计隐患问题数")
-    private Integer totalAbnormalNumber;
+    @ExcelIgnore
     @ApiModelProperty(value = "前应履职次数")
     private Integer frontPlanNumber;
+    @ExcelIgnore
     @ApiModelProperty(value = "前实际履职次数")
     private Integer frontRealityNumber;
+    @ExcelProperty(value = "营业前完成率")
     @ApiModelProperty(value = "前检查率")
     private String frontRate;
+    @ExcelIgnore
     @ApiModelProperty(value = "前隐患问题数")
     private Integer frontAbnormalNumber;
-
+    @ExcelIgnore
     @ApiModelProperty(value = "中应履职次数")
     private Integer centrePlanNumber;
+    @ExcelIgnore
     @ApiModelProperty(value = "中实际履职次数")
     private Integer centreRealityNumber;
+    @ExcelProperty(value = "营业期间完成率")
     @ApiModelProperty(value = "中检查率")
     private String centreRate;
+    @ExcelIgnore
     @ApiModelProperty(value = "中隐患问题数")
     private Integer centreAbnormalNumber;
-
+    @ExcelIgnore
     @ApiModelProperty(value = "中应履职次数")
     private Integer afterPlanNumber;
+    @ExcelIgnore
     @ApiModelProperty(value = "中实际履职次数")
     private Integer afterRealityNumber;
+    @ExcelProperty(value = "营业终了完成率")
     @ApiModelProperty(value = "中检查率")
     private String afterRate;
+    @ExcelIgnore
     @ApiModelProperty(value = "中隐患问题数")
     private Integer afterAbnormalNumber;
 

+ 9 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/controller/SafetyInspectReportController.java

@@ -88,6 +88,10 @@ public class SafetyInspectReportController {
     @Log(title = "行社全面检查报表", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(SafetyInspectDTO request, HttpServletResponse response) throws IOException {
+        if (null==request.getYear()){
+            LocalDate localDate= LocalDate.now();
+            request.setYear(String.valueOf(localDate.getYear()));
+        }
         safetyInspectService.export(request, response);
     }
     @ApiOperation(value = "网点负责人自查报表导出")
@@ -95,6 +99,11 @@ public class SafetyInspectReportController {
     @Log(title = "网点负责人自查报表导出", businessType = BusinessType.EXPORT)
     @PostMapping("/selfInspectExport")
     public void selfInspectExport(SafetyInspectDTO request, HttpServletResponse response) throws IOException {
+        if (null== request.getYear()){
+            request.setCycle(1);
+            LocalDate localDate= LocalDate.now();
+            request.setYear(localDate.getYear()+"-"+  localDate.getMonthValue());
+        }
         safetyInspectService.selfInspectExport(request, response);
     }
 }

+ 5 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/vo/SafetyInspectVO.java

@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
+ * 自查
  * @author :LuoWei
  * @date : 2023/10/31
  */
@@ -18,13 +19,13 @@ public class SafetyInspectVO {
     @ExcelProperty("单位名称")
     @ApiModelProperty(value = "单位名称")
     private String orgName;
-    @ExcelProperty("被查机构数量")
-    @ApiModelProperty(value = "被查机构数量")
+    @ExcelProperty("网点数量")
+    @ApiModelProperty(value = "网点数量")
     private Integer planInspectOrg;
-    @ExcelProperty("已查机构数量")
+    @ExcelIgnore
     @ApiModelProperty(value = "已查机构数量")
     private Integer realityInspectOrg;
-    @ExcelProperty("检查覆盖率")
+    @ExcelIgnore
     @ApiModelProperty(value = "检查覆盖率")
     private String inspectCoverRate;
 

+ 9 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/dto/register/AppPageDto.java

@@ -1,5 +1,7 @@
 package com.xunmei.core.safetyCheck.dto.register;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.xunmei.common.core.web.domain.PageDto;
 import com.xunmei.core.safetyCheck.vo.regsiter.AppPageVo;
 import lombok.Data;
@@ -33,8 +35,15 @@ public class AppPageDto extends PageDto<AppPageVo> {
     /**
      * 任务日期
      */
+    @JsonFormat(pattern = "yyyy-MM")
     private Date taskTime;
 
+    @JsonIgnore
+    private Date startTime;
+
+    @JsonIgnore
+    private Date endTime;
+
     /**
      * 任务状态
      */

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/mapper/CoreSafetyTaskMapper.java

@@ -95,6 +95,8 @@ public interface CoreSafetyTaskMapper extends BaseMapper<CoreSafetyTask> {
 
     Page<AppPageVo> selectTaskGroup(@Param("page") Page<AppPageVo> page, @Param("params") AppPageDto params, @Param("userId") Long userId);
 
+    List<CoreSafetyTask> selectTaskList( @Param("params") AppPageDto params, @Param("userId") Long userId);
+
     List<CheckNfcRecord> selectNfcRecord(String taskId);
 
     List<PanelListVo> selectCurUserTaskList(@Param("request") PanelListDto request);

+ 28 - 18
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/SafetyCheckRegisterSericeImpl.java

@@ -10,7 +10,10 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.domain.DateRange;
+import com.xunmei.common.core.enums.CycleCommonEnum;
 import com.xunmei.common.core.exception.ServiceException;
+import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.IDHelper;
 import com.xunmei.common.core.utils.StringUtils;
 import com.xunmei.common.core.utils.Ymd;
@@ -87,7 +90,13 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 
     @Override
     public TableDataInfo appList(AppPageDto dto) {
+        if(ObjectUtil.isNotNull(dto.getTaskTime())){
+            DateRange r= DateUtils.getStartAndEnd(dto.getTaskTime(), CycleCommonEnum.MONTHLY);
+            dto.setStartTime(r.getStartTime());
+            dto.setEndTime(r.getEndTime());
+        }
         Page<AppPageVo> page = dto.toPage();
+
         page = baseMapper.selectTaskGroup(page, dto, SecurityUtils.getUserId());
         if (CollectionUtil.isEmpty(page.getRecords())) {
             return TableDataInfo.success(page);
@@ -96,25 +105,26 @@ public class SafetyCheckRegisterSericeImpl extends ServiceImpl<CoreSafetyTaskMap
 //        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
 
 //        List<Long> batchIds = page.getRecords().stream().map(r -> r.getBatchId()).collect(Collectors.toList());
-        LambdaQueryWrapper<CoreSafetyTask> wrapper = new LambdaQueryWrapper<CoreSafetyTask>();
-        if (ObjectUtil.isNotNull(dto.getBeCheckedOrgId())) {
-            wrapper.eq(CoreSafetyTask::getOrgId, dto.getBeCheckedOrgId());
-        }
-        if (ObjectUtil.isNotNull(dto.getCheckOrgId())) {
-            wrapper.and(w -> w.eq(CoreSafetyTask::getCheckOrgId, dto.getCheckOrgId())
-                    .or()
-                    .eq(CoreSafetyTask::getGrantUserId, SecurityUtils.getUserId()));
-        }
-        if (ObjectUtil.isNotNull(dto.getStatus())) {
-            wrapper.eq(CoreSafetyTask::getStatus, dto.getStatus());
-        }
-        if (ObjectUtil.isNotNull(dto.getTaskTime())) {
-            wrapper.and(w -> w.and(w1 -> w1.ge(CoreSafetyTask::getPlanEndTime, dto.getTaskTime())
-                    .le(CoreSafetyTask::getPlanStartTime, dto.getTaskTime())).or().eq(CoreSafetyTask::getYmdDate, dto.getTaskTime()));
-        }
-        wrapper.in(CoreSafetyTask::getPlanId, page.getRecords().stream().map(r -> r.getPlanId()).collect(Collectors.toList()));
+//        LambdaQueryWrapper<CoreSafetyTask> wrapper = new LambdaQueryWrapper<CoreSafetyTask>();
+//        if (ObjectUtil.isNotNull(dto.getBeCheckedOrgId())) {
+//            wrapper.eq(CoreSafetyTask::getOrgId, dto.getBeCheckedOrgId());
+//        }
+//        if (ObjectUtil.isNotNull(dto.getCheckOrgId())) {
+//            wrapper.and(w -> w.eq(CoreSafetyTask::getCheckOrgId, dto.getCheckOrgId())
+//                    .or()
+//                    .eq(CoreSafetyTask::getGrantUserId, SecurityUtils.getUserId()));
+//        }
+//        if (ObjectUtil.isNotNull(dto.getStatus())) {
+//            wrapper.eq(CoreSafetyTask::getStatus, dto.getStatus());
+//        }
+//        if (ObjectUtil.isNotNull(dto.getTaskTime())) {
+//            wrapper.and(w -> w.and(w1 -> w1.ge(CoreSafetyTask::getPlanEndTime, dto.getTaskTime())
+//                    .le(CoreSafetyTask::getPlanStartTime, dto.getTaskTime()))
+//                    .or().eq(CoreSafetyTask::getYmdDate, dto.getTaskTime()));
+//        }
+//        wrapper.in(CoreSafetyTask::getPlanId, page.getRecords().stream().map(r -> r.getPlanId()).collect(Collectors.toList()));
 
-        List<CoreSafetyTask> list = baseMapper.selectList(wrapper);
+        List<CoreSafetyTask> list = baseMapper.selectTaskList(dto,SecurityUtils.getUserId());
 //        Map<Long, List<CoreSafetyTask>> grouped = list.stream().collect(Collectors.groupingBy(t -> t.getBatchId()));
 
         List<Long> planIds = page.getRecords().stream().map(r -> r.getPlanId()).distinct().collect(Collectors.toList());

+ 37 - 26
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml

@@ -101,32 +101,35 @@
     <select id="selectStandbyPower"
             resultType="com.xunmei.core.reportForms.resumption.vo.IntrusionTestReportVO">
         SELECT
-            IFNULL( a.exception_count, 0 ) AS abnormalNumber,
-            COUNT( a.id ) AS planNumber,
-            IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 ) AS realityNumber,
-            IF
-                (
-                            IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 )= 0
-                        OR COUNT( a.id )= 0,
-                            '0%',
-                            CONCAT(
-                                            IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 )/ COUNT( a.id )* 100,
-                                            '%'
-                                )) AS realityRate,
-            COUNT( c.id ) AS realityRectificationNumber,
-            IF
-                (
-                            COUNT( c.id )= 0
-                        OR IFNULL( a.exception_count, 0 )= 0,
-                            '0%',
-                            CONCAT( COUNT( c.id )/ IFNULL( a.exception_count, 0 )* 100, '%' )) AS realityRectificationRate
+        IFNULL( a.exception_count, 0 ) AS abnormalNumber,
+        COUNT( a.id ) AS planNumber,
+        IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 ) AS realityNumber,
+        IF
+        (
+        IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 )= 0
+        OR COUNT( a.id )= 0,
+        '0%',
+        CONCAT(
+        ROUND(
+        IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 )/ COUNT( a.id )* 100,
+        2
+        ),
+        '%'
+        )) AS realityRate,
+        COUNT( c.id ) AS realityRectificationNumber,
+        IF
+        (
+        COUNT( c.id )= 0
+        OR IFNULL( a.exception_count, 0 )= 0,
+        '0%',
+        CONCAT( COUNT( c.id )/ IFNULL( a.exception_count, 0 )* 100, '%' )) AS realityRectificationRate
         FROM
-            core_resumption a
-                LEFT JOIN core_resumption_plan b ON a.plan_id = b.id
-                LEFT JOIN core_question c ON c.src_task_id = a.id
-                AND reform_status = 11
+        core_resumption a
+        LEFT JOIN core_resumption_plan b ON a.plan_id = b.id
+        LEFT JOIN core_question c ON c.src_task_id = a.id
+        AND reform_status = 11
         WHERE
-            b.plan_type =5
+        b.plan_type =5
         <if test="startTime !=null and endTime !=null">
         and    a.ymd_date BETWEEN #{startTime} AND #{endTime}
         </if>
@@ -137,7 +140,7 @@
     <select id="selectServiceBankReport"
             resultType="com.xunmei.core.reportForms.resumption.vo.IntrusionTestReportVO">
         SELECT
-        IFNULL(a.exception_count,0) AS abnormalNumber,
+        IFNULL( a.exception_count, 0 ) AS abnormalNumber,
         COUNT( a.id ) AS planNumber,
         IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 ) AS realityNumber,
         IF
@@ -146,11 +149,19 @@
         OR COUNT( a.id )= 0,
         '0%',
         CONCAT(
+        ROUND(
         IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 )/ COUNT( a.id )* 100,
+        2
+        ),
         '%'
         )) AS realityRate,
         COUNT( c.id ) AS realityRectificationNumber,
-        IF(COUNT( c.id )=0 OR IFNULL(a.exception_count,0)=0,'0%',CONCAT(COUNT( c.id )/IFNULL(a.exception_count,0)*100,'%'))	 AS realityRectificationRate
+        IF
+        (
+        COUNT( c.id )= 0
+        OR IFNULL( a.exception_count, 0 )= 0,
+        '0%',
+        CONCAT( COUNT( c.id )/ IFNULL( a.exception_count, 0 )* 100, '%' )) AS realityRectificationRate
         FROM
         core_resumption a
         LEFT JOIN core_resumption_plan b ON a.plan_id = b.id

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

@@ -776,8 +776,18 @@ SELECT t.id,
             and t.org_id=#{params.beCheckedOrgId}
         </if>
         <if test="params.taskTime!=null">
-            and ((t.plan_start_time &lt;=#{params.taskTime} and t.plan_end_time&gt;=#{params.taskTime}) or
-            t.ymd_date=#{params.taskTime})
+            and ((
+            #{params.startTime}   <![CDATA[<=]]> t.plan_start_time
+            and #{params.endTime} >= t.plan_start_time
+            )
+            or (
+            #{params.startTime}    <![CDATA[<=]]> t.plan_end_time
+            and #{params.endTime} >= t.plan_end_time
+            )
+            or (
+            #{params.startTime} >= t.plan_start_time
+            and #{params.endTime}  <![CDATA[<=]]> t.plan_end_time
+            ))
         </if>
         <if test="params.status">
             and t.status=#{params.status}
@@ -796,6 +806,43 @@ SELECT t.id,
         ) or t.grant_user_id=#{userId})
         group by t.plan_id,t.title,t.plan_start_time,t.plan_end_time,t.count
     </select>
+    <select id="selectTaskList" resultType="com.xunmei.core.safetyCheck.domain.CoreSafetyTask">
+        select t.*
+        from core_safety_task t
+        where t.deleted=0
+        <if test="params.beCheckedOrgId!=null">
+            and t.org_id=#{params.beCheckedOrgId}
+        </if>
+        <if test="params.taskTime!=null">
+            and ((
+            #{params.startTime}   <![CDATA[<=]]> t.plan_start_time
+            and #{params.endTime} >= t.plan_start_time
+            )
+            or (
+            #{params.startTime}    <![CDATA[<=]]> t.plan_end_time
+            and #{params.endTime} >= t.plan_end_time
+            )
+            or (
+            #{params.startTime} >= t.plan_start_time
+            and #{params.endTime}  <![CDATA[<=]]> t.plan_end_time
+            ))
+        </if>
+        <if test="params.status">
+            and t.status=#{params.status}
+        </if>
+        and ((t.check_org_id = #{params.checkOrgId}
+        <if test="params.roleIds!=null and params.roleIds.size>0">
+            and (t.role_id in
+            <foreach collection="params.roleIds" item="roleId" open="(" separator="," close=")">
+                #{roleId}
+            </foreach>
+            or t.plan_id in (select plan_id from core_safecheck_plan_to_role where role_id in
+            <foreach collection="params.roleIds" item="roleId" open="(" separator="," close=")">
+                #{roleId}
+            </foreach>))
+        </if>
+        ) or t.grant_user_id=#{userId})
+    </select>
     <select id="selectNfcRecord" resultType="com.xunmei.core.safetyCheck.vo.CheckNfcRecord">
         select t.scan_method,
                n.area_name,

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeviceController.java

@@ -212,6 +212,7 @@ public class SysDeviceController extends BaseController {
                         List<SysDictData> deviceTypeByAssetType = dictTypeService.getDeviceTypeByAssetType(sys_asset_type);
                         List<String> collect = deviceTypeByAssetType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
                         Set<String> sc = new HashSet<>();
+                        sc.addAll(collect);
                         if (sc.contains(d.getDeviceType())) {
                             deviceTypeByAssetType.forEach(de -> {
                                 if (de.getDictLabel().equals(d.getDeviceType())) {