luowei 1 年之前
父節點
當前提交
9d05498b4d

+ 4 - 8
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/controller/MonitorAccessReportController.java

@@ -1,16 +1,15 @@
 package com.xunmei.core.reportForms.monitor.controller;
-import com.xunmei.common.core.constant.SecurityConstants;
+
 import com.xunmei.common.core.web.domain.AjaxResult;
-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.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
 import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
-import com.xunmei.system.api.RemoteOrgService;
-import com.xunmei.system.api.domain.SysOrg;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,11 +17,8 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.time.LocalDate;
 import java.util.List;
 
 /**

+ 1 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/mapper/MonitorAccessReportMapper.java

@@ -1,13 +1,12 @@
 package com.xunmei.core.reportForms.monitor.mapper;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
+
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
 
 /**
  * @author :LuoWei

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

@@ -1,6 +1,5 @@
 package com.xunmei.core.reportForms.monitor.service;
 
-import com.xunmei.common.core.domain.retrieval.dto.RetrievalTaskPageDto;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;

+ 0 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java

@@ -4,11 +4,9 @@ import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.excel.EasyExcel;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.constant.SecurityConstants;
-import com.xunmei.common.core.domain.retrieval.vo.CoreMonitoringRetrievalTaskExcelVo;
 import com.xunmei.common.core.utils.DateHelper;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.security.utils.SecurityUtils;
-import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.mapper.MonitorAccessReportMapper;
 import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
@@ -16,8 +14,6 @@ import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
 import com.xunmei.core.reportForms.resumption.dto.ResumptionDTO;
 import com.xunmei.core.reportForms.resumption.service.ResumptionReportService;
 import com.xunmei.system.api.RemoteOrgService;
-import com.xunmei.system.api.RemoteRoleService;
-import com.xunmei.system.api.domain.SysDictData;
 import com.xunmei.system.api.domain.SysOrg;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -71,7 +67,6 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
         Date time = cal.getTime();
         monitoringAccessDTO.setStartTime(time);
         monitoringAccessDTO.setEndTime(new Date());
-        //    List<SysOrg> sysOrgs = orgService.selectSysOrgByParentId(resumptionDTO.getOrgId(), SecurityConstants.INNER);
         Page<MonitoringAccessVO> report = monitorAccessReportMapper.report(page, monitoringAccessDTO);
         report.getRecords().forEach(r -> {
             Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(r.getPath());

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

@@ -29,7 +29,7 @@ import java.util.List;
 public class ResumptionReportController {
     @Autowired
     private ResumptionReportService resumptionReportService;
-
+private static  final String TITLE="title";
     @ApiOperation(value = "每日安全保卫履职-日报表")
     @RequiresPermissions("core:resumptionReport:list")
     @GetMapping("/list")
@@ -46,9 +46,9 @@ public class ResumptionReportController {
         List<ResumptionDayVO> report = resumptionReportService.report(resumptionDTO);
         ajaxResult.put(AjaxResult.DATA_TAG, report);
         if (null == resumptionDTO.getCycle() || resumptionDTO.getCycle() == 1) {
-            ajaxResult.put("title", "日报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
+            ajaxResult.put(TITLE, "日报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
         } else {
-            ajaxResult.put("title", "月报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
+            ajaxResult.put(TITLE, "月报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
         }
         return ajaxResult;
     }
@@ -64,7 +64,7 @@ public class ResumptionReportController {
         AjaxResult ajaxResult = AjaxResult.success();
         List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.intrusionTest(resumptionDTO);
         ajaxResult.put(AjaxResult.DATA_TAG, intrusionTestReportVOList);
-        ajaxResult.put("title", "报警测试报表(" + resumptionDTO.getSearchTime() + ")");
+        ajaxResult.put(TITLE, "报警测试报表(" + resumptionDTO.getSearchTime() + ")");
         return ajaxResult;
     }
 
@@ -89,7 +89,7 @@ public class ResumptionReportController {
         AjaxResult ajaxResult = AjaxResult.success();
         List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.standbyPower(resumptionDTO);
         ajaxResult.put(AjaxResult.DATA_TAG, intrusionTestReportVOList);
-        ajaxResult.put("title", "备用电源维护报表(" + time + ")");
+        ajaxResult.put(TITLE, "备用电源维护报表(" + time + ")");
         return ajaxResult;
     }
 
@@ -104,7 +104,7 @@ public class ResumptionReportController {
         AjaxResult ajaxResult = AjaxResult.success();
         List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.serviceBank(resumptionDTO);
         ajaxResult.put(AjaxResult.DATA_TAG, intrusionTestReportVOList);
-        ajaxResult.put("title", "离行式自助银行巡检报表(" + resumptionDTO.getSearchTime() + ")");
+        ajaxResult.put(TITLE, "离行式自助银行巡检报表(" + resumptionDTO.getSearchTime() + ")");
         return ajaxResult;
     }
 

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

@@ -1,6 +1,5 @@
 package com.xunmei.core.reportForms.resumption.service.impl;
 
-import com.xunmei.common.core.constant.ErrorMsgConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.reportForms.monitor.mapper.MonitorAccessReportMapper;
@@ -11,7 +10,6 @@ import com.xunmei.core.reportForms.resumption.vo.IntrusionTestReportVO;
 import com.xunmei.core.reportForms.resumption.vo.ResumptionDayVO;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.domain.SysOrg;
-import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -19,6 +17,7 @@ import org.springframework.stereotype.Service;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -48,7 +47,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         } else if (sysOrg.getType() == 3) {
             sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
-            return null;
+            return Collections.emptyList();
         }
         List<ResumptionDayVO> resumptionDayVOS = new ArrayList<>();
         sysOrgs.forEach(o -> {
@@ -120,7 +119,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         } else if (sysOrg.getType() == 3) {
             sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
-            return null;
+            return Collections.emptyList();
         }
         List<IntrusionTestReportVO> intrusionTestReportVOList = new ArrayList<>(16);
         sysOrgs.forEach(o -> {
@@ -154,7 +153,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         } else if (sysOrg.getType() == 3) {
             sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
-            return null;
+            return Collections.emptyList();
         }
         List<IntrusionTestReportVO> intrusionTestReportVOList = new ArrayList<>(16);
         sysOrgs.forEach(o->{
@@ -204,7 +203,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         } else if (sysOrg.getType() == 3) {
             sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
-            return null;
+            return Collections.emptyList();
         }
         List<IntrusionTestReportVO> intrusionTestReportVOList = new ArrayList<>(16);
         sysOrgs.forEach(o -> {
@@ -232,7 +231,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 
         Date date;
 
-        String day_last;
+        String dayLast;
 
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
 
@@ -250,9 +249,9 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 
         calendar.add(Calendar.DATE, -1);    //再减一天即为上个月最后一天
 
-        day_last = format.format(calendar.getTime());
+        dayLast = format.format(calendar.getTime());
 
-        return day_last;
+        return dayLast;
 
     }
 }

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

@@ -2,12 +2,10 @@ package com.xunmei.core.reportForms.safetyInspect.controller;
 
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.web.domain.AjaxResult;
-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.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.safetyInspect.dto.SafetyInspectDTO;
 import com.xunmei.core.reportForms.safetyInspect.service.SafetyInspectService;
 import com.xunmei.core.reportForms.safetyInspect.vo.SafetyInspectVO;

+ 22 - 9
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/service/impl/SafetyInspectServiceImpl.java

@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -41,24 +42,36 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
     private RemoteOrgService orgService;
     @Override
     public List<SafetyInspectVO> report(SafetyInspectDTO safetyInspectDTO) {
-        Page<SafetyInspectVO> page;
-        if (safetyInspectDTO.getPageNum() != null && safetyInspectDTO.getPageSize() != null) {
-            page = new Page<>(safetyInspectDTO.getPageNum(), safetyInspectDTO.getPageSize());
-        } else {
-            page = new Page<>();
-        }
-        //    Page<SafetyInspectVO> report = safetyInspectMapper.report(page, safetyInspectDTO);
+
         if (null == safetyInspectDTO.getOrgId()) {
             safetyInspectDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
         }
+        //判断机构类型,如果机构类型大于行社,都展示行社数据
+        SysOrg sysOrg = orgService.selectSysOrgById(safetyInspectDTO.getOrgId(), SecurityConstants.INNER);
+        List<SysOrg> sysOrgs;
+        if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+        } else if (sysOrg.getType() == 3) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+        } else {
+            return Collections.emptyList();
+        }
         List<SafetyInspectVO>safetyInspectVOList=new ArrayList<>();
-        List<SysOrg> sysOrgs = orgService.selectSysOrgByParentId(safetyInspectDTO.getOrgId(), SecurityConstants.INNER);
         sysOrgs.forEach(s->{
             SafetyInspectVO safetyInspectVO=new SafetyInspectVO();
+            SysOrg sysOrg1;
+            if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
+                sysOrg1 = orgService.selectOrgById(s.getParentId(), SecurityConstants.INNER);
+            } else {
+                sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(s.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
+            }
+            safetyInspectVO.setCity(sysOrg1.getShortName().split("地区行社")[0]);
+            safetyInspectVO.setOrgName(s.getShortName());
+
             SafetyInspectVO safetyInspectVOS = safetyInspectMapper.selectAllByPath(s.getPath());
             Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(s.getPath());
             safetyInspectVO.setOrgName(s.getShortName());
-            safetyInspectVO.setNetworkNumber(integer);
+        //    safetyInspectVO.setNetworkNumber(integer);
             safetyInspectVO.setPlanInspectNumber(safetyInspectVOS.getPlanInspectNumber());
             safetyInspectVO.setRealityInspectNumber(safetyInspectVOS.getRealityInspectNumber());
             safetyInspectVO.setInspectRate(safetyInspectVOS.getInspectRate());

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

@@ -13,25 +13,39 @@ import lombok.Data;
 public class SafetyInspectVO {
     @ExcelProperty("序号")
     private Integer orderNum;
-    @ExcelProperty("机构名称")
-    @ApiModelProperty(value = "机构名称")
+    private String city;
+    @ExcelProperty("单位名称")
+    @ApiModelProperty(value = "单位名称")
     private String orgName;
-    @ExcelProperty("网点数量")
-    @ApiModelProperty(value = "网点数量")
-    private Integer networkNumber;
-    @ExcelProperty("应检查次数")
+    @ExcelProperty("被查机构数量")
+    @ApiModelProperty(value = "被查机构数量")
+    private Integer planInspectOrg;
+    @ExcelProperty("已查机构数量")
+    @ApiModelProperty(value = "已查机构数量")
+    private Integer realityInspectOrg;
+    @ExcelProperty("检查覆盖率")
+    @ApiModelProperty(value = "检查覆盖率")
+    private String inspectCoverRate;
+
+
+    @ExcelProperty("应检次数")
     @ApiModelProperty(value = "应检查次数")
     private Integer planInspectNumber;
-
-    @ExcelProperty("实际检查次数")
+    @ExcelProperty("已检次数")
     @ApiModelProperty(value = "实际检查次数")
     private Integer realityInspectNumber;
-    @ExcelProperty("检查率")
+    @ExcelProperty("检查完成率")
     @ApiModelProperty(value = "检查率")
     private String inspectRate;
-    @ExcelProperty("隐患数")
-    @ApiModelProperty(value = "隐患数")
+    @ExcelProperty("隐患数")
+    @ApiModelProperty(value = "隐患数")
     private Integer pitfallNumber;
+    @ExcelProperty("已整改数量")
+    @ApiModelProperty(value = "已整改数量")
+    private Integer rectificationNumber;
+    @ExcelProperty("整改完成率")
+    @ApiModelProperty(value = "整改完成率")
+    private String rectificationRate;
     @ExcelIgnore
     @ExcelProperty("机构路径")
     private String path;

+ 0 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafetyTaskController.java

@@ -43,8 +43,6 @@ import com.xunmei.common.core.web.page.TableDataInfo;
 public class CoreSafetyTaskController extends BaseController {
     @Autowired
     private ICoreSafetyTaskService coreSafetyTaskService;
-    @Autowired
-    private ICoreSafecheckPlanService planService;
 
     /**
      * 查询【请填写功能名称】列表