Explorar o código

Merge branch 'V0.0.4' of http://10.87.21.221:8000/jzyd_yyds/soc into V0.0.4

jiawuxian hai 1 ano
pai
achega
b39bcf5410
Modificáronse 17 ficheiros con 167 adicións e 85 borrados
  1. 1 1
      project_data/sql/0.0.4/soc/soc.sql
  2. 2 2
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteFileService.java
  3. 3 2
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteRoleService.java
  4. 2 2
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteFileFallbackFactory.java
  5. 2 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteRoleFallbackFactory.java
  6. 7 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/controller/TMonitoringRetrievalPlanController.java
  7. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java
  8. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  9. 17 14
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java
  10. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/service/impl/CoreOutInRecordServiceImpl.java
  11. 4 4
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/controller/SysFileController.java
  12. 5 4
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysRoleController.java
  13. 7 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java
  14. 12 2
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java
  15. 1 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeSetServiceImpl.java
  16. 53 43
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java
  17. 45 2
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

+ 1 - 1
project_data/sql/0.0.4/soc/soc.sql

@@ -190,7 +190,7 @@ INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type
 delete  from sys_config where  config_key='is_display_password';
 INSERT INTO sys_config ( config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark )
 VALUES
-    ( '是否显示修改资料和修改密码', 'is_display_password', 'Y', 'Y', 'jwx', now(), 'jwx', now(), '' );
+    ( '是否显示修改资料和修改密码', 'is_display_password', 'Y', 'Y', 'jwx', now(), 'jwx', now(), 'Y不显示,N显示' );
 -- 修改菜单排序
 UPDATE `sys_menu` SET `order_num` = 2 WHERE `menu_name` = '驾驶舱';
 UPDATE `sys_menu` SET `order_num` = 4 WHERE `menu_name` = '日常履职';

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

@@ -75,7 +75,7 @@ public interface RemoteFileService {
      * @return 结果
      */
     @GetMapping(value = "/file/getLocalPathPrefix")
-    String getLocalPathPrefix();
+    R<String> getLocalPathPrefix();
 
     /**
      * 获取nginx静态目录前缀
@@ -83,7 +83,7 @@ public interface RemoteFileService {
      * @return 结果
      */
     @GetMapping(value = "/file/getStaticPathPrefix")
-    String getStaticPathPrefix();
+    R<String> getStaticPathPrefix();
 
     @PostMapping(value = "/file/registerBookCompressPdf",consumes = MediaType.APPLICATION_JSON_VALUE)
     Response registerBookCompressPdf(@RequestBody ExportPdfDto exportDto);

+ 3 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteRoleService.java

@@ -2,6 +2,7 @@ package com.xunmei.system.api;
 
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.constant.ServiceNameConstants;
+import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.system.api.Eto.RoleConditionEto;
 import com.xunmei.system.api.domain.SysRole;
@@ -31,13 +32,13 @@ public interface RemoteRoleService {
     SysRole getRoleByName(@RequestParam("name") String name, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
     @GetMapping(value = "/role/selectRoleNameByUserId")
-    String selectRoleNameByUserId(@RequestParam("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    R<String> selectRoleNameByUserId(@RequestParam("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
     @GetMapping("/role/getNames")
     List<IdNameVo> getNames(@RequestBody RoleConditionEto condition);
 
     @GetMapping("/role/selectUserByRoleNameAndOrgId")
-    List<SysUser> selectUserByRoleNameAndOrgId(@RequestParam(value = "roleName") String roleName, @RequestParam(value = "orgId") Long orgId,@RequestParam(value = "isLock") Integer isLock, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    List<SysUser> selectUserByRoleNameAndOrgId(@RequestParam(value = "roleName") String roleName, @RequestParam(value = "orgId") Long orgId, @RequestParam(value = "isLock") Integer isLock, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
     @GetMapping("/userRole/getUserRoleId")
     List<Long> getUserRoleId(@RequestParam(value = "userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

+ 2 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteFileFallbackFactory.java

@@ -57,12 +57,12 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
             }
 
             @Override
-            public String getLocalPathPrefix() {
+            public R<String> getLocalPathPrefix() {
                 return null;
             }
 
             @Override
-            public String getStaticPathPrefix() {
+            public R<String> getStaticPathPrefix() {
                 return null;
             }
 

+ 2 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteRoleFallbackFactory.java

@@ -1,6 +1,7 @@
 package com.xunmei.system.api.factory;
 
 
+import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.system.api.Eto.RoleConditionEto;
 import com.xunmei.system.api.RemoteRoleService;
@@ -39,7 +40,7 @@ public class RemoteRoleFallbackFactory implements FallbackFactory<RemoteRoleServ
             }
 
             @Override
-            public String selectRoleNameByUserId(Long userId, String source) {
+            public R<String> selectRoleNameByUserId(Long userId, String source) {
                 return null;
             }
 

+ 7 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/controller/TMonitoringRetrievalPlanController.java

@@ -1,6 +1,7 @@
 package com.xunmei.core.access.controller;
 
 import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.utils.StringUtils;
 import com.xunmei.common.core.web.controller.BaseController;
 import com.xunmei.common.core.web.domain.AjaxResult;
@@ -21,6 +22,7 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
 import java.text.ParseException;
 
 
@@ -42,6 +44,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
     private RemoteOrgService remoteOrgService;
     @Autowired
     private MonitorAccessReportService monitorAccessReportService;
+
     /**
      * 查询监控调阅计划列表
      */
@@ -53,7 +56,8 @@ public class TMonitoringRetrievalPlanController extends BaseController {
         TableDataInfo<TMonitoringRetrievalPlan> tMonitoringRetrievalPlanTableDataInfo = tMonitoringRetrievalPlanService.selectPage(tMonitoringRetrievalPlan);
         ajax.put("data", tMonitoringRetrievalPlanTableDataInfo);
         boolean admin = false;
-        String s = remoteRoleService.selectRoleNameByUserId(SecurityUtils.getUserId(), SecurityConstants.INNER);
+        R<String> r = remoteRoleService.selectRoleNameByUserId(SecurityUtils.getUserId(), SecurityConstants.INNER);
+        String s = r.getData();
         SysOrg sysOrg = remoteOrgService.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
         if (StringUtils.isNotEmpty(s)) {
             int i = s.indexOf(",");
@@ -85,6 +89,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
     public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id) throws ParseException {
         return success(tMonitoringRetrievalPlanService.distribute(id));
     }
+
     /**
      * 撤回
      */
@@ -94,6 +99,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
     public AjaxResult withdraw(@PathVariable(value = "id", required = false) Long id) {
         return success(tMonitoringRetrievalPlanService.withdraw(id));
     }
+
     /**
      * 获取监控调阅计划详细信息
      */

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

@@ -754,8 +754,8 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
 
     private Map<String, Object> getFtlDrill(CoreDrillTaskDetailVo task) {
         Map<String, Object> data = new HashMap<>();
-        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
-        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
+        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
+        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
         String orgName = task.getOrgName();
         String drillSite = task.getDrillSite();
         String imageData = task.getImageList();

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

@@ -781,8 +781,8 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         String recorderName = task.getRecorderName() == null ? StringUtil.EMPTY_STRING : task.getRecorderName();
         String content = task.getContent();
         String note = task.getNote();
-        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
-        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
+        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
+        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
         data.put("time", StringUtils.isNotEmpty(time) ? time : StringUtil.EMPTY_STRING);
         data.put("address", StringUtils.isNotEmpty(address) ? address : StringUtil.EMPTY_STRING);
         data.put("hostName", StringUtils.isNotEmpty(hostName) ? hostName : StringUtil.EMPTY_STRING);

+ 17 - 14
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 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.R;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.StringUtils;
 import com.xunmei.common.core.web.page.TableDataInfo;
@@ -31,6 +32,7 @@ import com.xunmei.system.api.domain.SysUser;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.text.SimpleDateFormat;
@@ -160,7 +162,8 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
     }
 
     private boolean check(Long userId) {
-        String s = remoteRoleService.selectRoleNameByUserId(userId, SecurityConstants.INNER);
+        R<String> r = remoteRoleService.selectRoleNameByUserId(userId, SecurityConstants.INNER);
+        String s = r.getData();
         boolean admin = false;
         if (StringUtils.isNotEmpty(s)) {
             int i = s.indexOf(",");
@@ -307,13 +310,13 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
 
     @Override
     public void generate(String cycle) {
-        if (cycle.equals("0")){
+        if (cycle.equals("0")) {
             this.monthTask();
         }
-        if (cycle.equals("1")){
-           this.seasonTask();
+        if (cycle.equals("1")) {
+            this.seasonTask();
         }
-        if (cycle.equals("2")){
+        if (cycle.equals("2")) {
             this.yearTask();
         }
 //        List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectPlanByCycle(cycle);
@@ -406,14 +409,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
     @Override
     public void monthTask() {
         //查询月计划
-        CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
+        CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
         coreEvaluatePlan.setEvaluateCycle("0");
         coreEvaluatePlan.setIsDeleted("0");
         coreEvaluatePlan.setIsDistribute("1");
         coreEvaluatePlan.setStatus("0");
         List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
-        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
-            coreEvaluatePlans.forEach(c->{
+        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
+            coreEvaluatePlans.forEach(c -> {
                 SysOrg org = new SysOrg();
                 org.setType(Integer.valueOf(c.getOrgType()));
                 org.setPath(c.getOrgPath());
@@ -457,14 +460,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
     @Override
     public void seasonTask() {
         //查询季度计划
-        CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
+        CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
         coreEvaluatePlan.setEvaluateCycle("1");
         coreEvaluatePlan.setIsDeleted("0");
         coreEvaluatePlan.setIsDistribute("1");
         coreEvaluatePlan.setStatus("0");
         List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
-        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
-            coreEvaluatePlans.forEach(c->{
+        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
+            coreEvaluatePlans.forEach(c -> {
                 SysOrg org = new SysOrg();
                 org.setType(Integer.valueOf(c.getOrgType()));
                 org.setPath(c.getOrgPath());
@@ -508,14 +511,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
     @Override
     public void yearTask() {
         //查询季度计划
-        CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
+        CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
         coreEvaluatePlan.setEvaluateCycle("2");
         coreEvaluatePlan.setIsDeleted("0");
         coreEvaluatePlan.setIsDistribute("1");
         coreEvaluatePlan.setStatus("0");
         List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
-        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
-            coreEvaluatePlans.forEach(c->{
+        if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
+            coreEvaluatePlans.forEach(c -> {
                 SysOrg org = new SysOrg();
                 org.setType(Integer.valueOf(c.getOrgType()));
                 org.setPath(c.getOrgPath());

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/service/impl/CoreOutInRecordServiceImpl.java

@@ -254,8 +254,8 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
         final CoreIntroduceLetterApproveLog approveLog = letterMapper.findCheckLog(record.getLetterId(), record.getOrgId());
         final SysOrgVO inOrg = orgList.stream().filter(org -> ObjectUtil.equal(org.getId(), record.getOrgId())).findFirst().get();
         final SysOrgVO outOrg = orgList.stream().filter(org -> ObjectUtil.equal(org.getId(), record.getLetterOrgId())).findFirst().get();
-        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
-        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR);
+        String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
+        String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
 
         Map<String, Object> data = new HashMap<>();
 

+ 4 - 4
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/controller/SysFileController.java

@@ -178,14 +178,14 @@ public class SysFileController {
     }
     @ApiOperation(value = "获取本地存储路径前缀")
     @GetMapping(value = "/getLocalPathPrefix")
-    String getLocalPathPrefix() {
-        return this.localFilePath;
+    R<String> getLocalPathPrefix() {
+        return R.ok(this.localFilePath);
     }
 
     @ApiOperation(value = "获取nginx静态目录前缀")
     @GetMapping(value = "/getStaticPathPrefix")
-    String getStaticPathPrefix() {
-        return this.prefix;
+    R<String> getStaticPathPrefix() {
+        return R.ok(this.prefix);
     }
 
 

+ 5 - 4
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysRoleController.java

@@ -2,6 +2,7 @@ package com.xunmei.system.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xunmei.common.core.domain.IdName;
+import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.common.core.web.controller.BaseController;
 import com.xunmei.common.core.web.domain.AjaxResult;
@@ -246,8 +247,8 @@ public class SysRoleController extends BaseController {
      */
     @InnerAuth
     @GetMapping(value = "/selectRoleNameByUserId")
-    public String selectRoleNameByUserId(Long userId) {
-        return roleService.selectRoleNameByUserId(userId);
+    public R<String> selectRoleNameByUserId(Long userId) {
+        return R.ok(roleService.selectRoleNameByUserId(userId));
     }
 
     @RequiresPermissions("system:role:query")
@@ -270,8 +271,8 @@ public class SysRoleController extends BaseController {
     }
 
     @GetMapping("/selectUserByRoleNameAndOrgId")
-    public List<SysUser> selectUserByRoleNameAndOrgId(@RequestParam(value = "roleName") String roleName, @RequestParam(value = "orgId") Long orgId,@RequestParam(value = "isLock") Integer isLock) {
-        return roleService.selectUserByRoleNameAndOrgId(roleName, orgId,isLock);
+    public List<SysUser> selectUserByRoleNameAndOrgId(@RequestParam(value = "roleName") String roleName, @RequestParam(value = "orgId") Long orgId, @RequestParam(value = "isLock") Integer isLock) {
+        return roleService.selectUserByRoleNameAndOrgId(roleName, orgId, isLock);
     }
 
     @GetMapping("/getRoles")

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

@@ -128,6 +128,7 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
     Map getDuty(String orgPath);
 
     Map getCertificate(String orgPath);
+
     Integer getHaveSecurityNetworkNumber(String orgPath);
 
     Map getMonitorPeople(String orgPath);
@@ -142,6 +143,12 @@ 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 getHeadSafeCheckNetworkNumber(String orgPath);
+
+    Map getDangerNumber(String orgPath);
+
     Integer getSafeHeadToNetwork(@Param("type") Integer type, @Param("level") Integer level, @Param("orgPath") String orgPath);
 
     Integer getJointHeadToNetwork(@Param("type") Integer type, @Param("level") Integer level, @Param("orgPath") String orgPath);

+ 12 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -274,13 +274,23 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             Integer safeHeadToNetwork = baseMapper.getSafeHeadToNetwork(1, 1, s.getPath());
             securityWorkExport.setSafeHeadToNetwork(safeHeadToNetwork);
             Integer safeHeadToNetwork1 = baseMapper.getSafeHeadToNetwork(1, 2, s.getPath());
-            securityWorkExport.setJointNetworkToPeople(safeHeadToNetwork1);
+            securityWorkExport.setSafeNetworkToPeople(safeHeadToNetwork1);
             Integer jointHeadToNetwork = baseMapper.getJointHeadToNetwork(2, 1, s.getPath());
             securityWorkExport.setJointHeadToNetwork(jointHeadToNetwork);
             Integer jointHeadToNetwork1 = baseMapper.getJointHeadToNetwork(2, 2, s.getPath());
             securityWorkExport.setJointNetworkToPeople(jointHeadToNetwork1);
             //总行安全检查
-
+            //组织开展次数
+            Integer headSafeCheckNumber = baseMapper.getHeadSafeCheckNumber(s.getPath());
+            securityWorkExport.setHeadSafeCheckNumber(headSafeCheckNumber);
+            //检查网点数量
+            Integer headSafeCheckNetworkNumber = baseMapper.getHeadSafeCheckNetworkNumber(s.getPath());
+            securityWorkExport.setHeadSafeCheckNetworkNumber(headSafeCheckNetworkNumber);
+            //隐患
+            Map dangerNumber = baseMapper.getDangerNumber(s.getPath());
+            securityWorkExport.setFoundDangerNumber(Integer.valueOf(dangerNumber.get("foundDangerNumber").toString()));
+            securityWorkExport.setRectificationDangerNumber(Integer.valueOf(dangerNumber.get("rectificationDangerNumber").toString()));
+            securityWorkExport.setNoRectificationDangerNumber(Integer.valueOf(dangerNumber.get("noRectificationDangerNumber").toString()));
             //安全检查
             DateTime beginOfQuarter = DateUtil.beginOfQuarter(new java.util.Date());
             DateTime endOfQuarter = DateUtil.endOfQuarter(new Date());

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeSetServiceImpl.java

@@ -335,7 +335,7 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
                 workTimeSetIds.add(id);
             }
             //清除可能存在的旧作息数据
-//            sysWorkTimeSetDayofweekMapper.delete(new LambdaQueryWrapper<SysWorkTimeSetDayofweek>().in(SysWorkTimeSetDayofweek::getWorkTimeSetId, workTimeSetIds));
+            sysWorkTimeSetDayofweekMapper.delete(new LambdaQueryWrapper<SysWorkTimeSetDayofweek>().in(SysWorkTimeSetDayofweek::getWorkTimeSetId, workTimeSetIds));
             for (SysWorkTimeSetDayofweek s :
                     dayOfWeeks) {
                 sysWorkTimeSetDayofweekMapper.insert(s);

+ 53 - 43
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java

@@ -47,89 +47,99 @@ public class SecurityWorkExport {
     private Integer collectLibrary;
     @ExcelProperty(value = {"自助银行", "在行式总量"}, index = 13)
     private Integer onLineTotal;
-    @ExcelProperty(value = {"自助银行","在行式达标数量(符合GA38-2021标准)"}, index = 14)
+    @ExcelProperty(value = {"自助银行", "在行式达标数量(符合GA38-2021标准)"}, index = 14)
     private Integer onLineReachNumber;
-    @ExcelProperty(value ={"自助银行","离行式总量"} , index = 15)
+    @ExcelProperty(value = {"自助银行", "离行式总量"}, index = 15)
     private Integer departureTotal;
-    @ExcelProperty(value = {"自助银行","离行式达标数量(符合GA38-2021标准)"}, index = 16)
+    @ExcelProperty(value = {"自助银行", "离行式达标数量(符合GA38-2021标准)"}, index = 16)
     private Integer departureReachNumber;
-    @ExcelProperty(value = {"自助设备","自助设备总数"}, index = 17)
+    @ExcelProperty(value = {"自助设备", "自助设备总数"}, index = 17)
     private Integer selfServiceDevicesTotal;
-    @ExcelProperty(value = {"自助设备","在行大堂式机具"}, index = 18)
+    @ExcelProperty(value = {"自助设备", "在行大堂式机具"}, index = 18)
     private Integer onLineLobbyImplement;
-    @ExcelProperty(value = {"自助设备","在行式穿墙式机具"}, index = 19)
+    @ExcelProperty(value = {"自助设备", "在行式穿墙式机具"}, index = 19)
     private Integer onLineThroughWalls;
-    @ExcelProperty(value = {"自助设备","离行式大堂式机具"}, index = 20)
+    @ExcelProperty(value = {"自助设备", "离行式大堂式机具"}, index = 20)
     private Integer departureLobbyImplement;
-    @ExcelProperty(value = {"自助设备","离行式穿墙式机具"}, index = 21)
+    @ExcelProperty(value = {"自助设备", "离行式穿墙式机具"}, index = 21)
     private Integer departureThroughWalls;
-    @ExcelProperty(value = {"监控中心建设","中心建设时间(年)"}, index = 22)
+    @ExcelProperty(value = {"监控中心建设", "中心建设时间(年)"}, index = 22)
     private String centerConstructionTime;
-    @ExcelProperty(value = {"监控中心建设","监控平台最近一次升级改造时间(年)"}, index = 23)
+    @ExcelProperty(value = {"监控中心建设", "监控平台最近一次升级改造时间(年)"}, index = 23)
     private String transformTime;
-    @ExcelProperty(value = {"监控中心建设","监控中心平台品牌"}, index = 24)
+    @ExcelProperty(value = {"监控中心建设", "监控中心平台品牌"}, index = 24)
     private String brand;
-    @ExcelProperty(value = {"监控中心建设","视频监控摄像头总路数"}, index = 25)
+    @ExcelProperty(value = {"监控中心建设", "视频监控摄像头总路数"}, index = 25)
     private Integer cameraTotal;
-    @ExcelProperty(value = {"监控中心建设","视频监控摄像头高清摄像机路数"}, index = 26)
+    @ExcelProperty(value = {"监控中心建设", "视频监控摄像头高清摄像机路数"}, index = 26)
     private Integer definitionNumber;
-    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","离行式自助银行加钞间出入口设置数量"}, index = 27)
+    @ExcelProperty(value = {"监控中心建设", "是否实现远程控制和实时授权的功能", "离行式自助银行加钞间出入口设置数量"}, index = 27)
     private Integer cashAddingRoom;
-    @ExcelProperty(value = {"监控中心建设","是否实现远程控制和实时授权的功能","业务库(不含保管箱库)防控隔离门出入口设置数量"}, index = 28)
+    @ExcelProperty(value = {"监控中心建设", "是否实现远程控制和实时授权的功能", "业务库(不含保管箱库)防控隔离门出入口设置数量"}, index = 28)
     private Integer remoteCount;
-    @ExcelProperty(value = {"营业网点夜间值守","本地值守网点数量(由员工进行同楼异地值守)"}, index = 29)
+    @ExcelProperty(value = {"营业网点夜间值守", "本地值守网点数量(由员工进行同楼异地值守)"}, index = 29)
     private Integer localDutyNetworkNumber;
-    @ExcelProperty(value = {"营业网点夜间值守","异地值守网点数量(由监控中心进行远程值守)"}, index = 30)
+    @ExcelProperty(value = {"营业网点夜间值守", "异地值守网点数量(由监控中心进行远程值守)"}, index = 30)
     private Integer remoteDutyNetworkNumber;
-    @ExcelProperty(value = {"机构及人员配备","是否设立独立机构数"}, index = 31)
+    @ExcelProperty(value = {"机构及人员配备", "是否设立独立机构数"}, index = 31)
     private Integer isAlone;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为专职人数"}, index = 32)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人为专职人数"}, index = 32)
     private Integer ManagerFullTime;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人为兼职职人数"}, index = 33)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人为兼职职人数"}, index = 33)
     private Integer ManagerPartTime;
-    @ExcelProperty(value = {"机构及人员配备","部门负责人、一般管理人员和监控中心负责人安保持证人数"}, index = 34)
+    @ExcelProperty(value = {"机构及人员配备", "部门负责人、一般管理人员和监控中心负责人安保持证人数"}, index = 34)
     private Integer ManagerCertificate;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职主任"}, index = 35)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "是否设专(兼)职主任"}, index = 35)
     private String isLeader;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","是否设专(兼)职技术维护岗"}, index = 36)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "是否设专(兼)职技术维护岗"}, index = 36)
     private String isTechnology;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","人员合计"}, index = 37)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "人员合计"}, index = 37)
     private Integer monitorTotal;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,内部员工人数(含派遣)"}, index = 38)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "其中,内部员工人数(含派遣)"}, index = 38)
     private Integer innerPeople;
-    @ExcelProperty(value = {"机构及人员配备","监控中心人员情况","其中,外聘员工人数"}, index = 39)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心人员情况", "其中,外聘员工人数"}, index = 39)
     private Integer outPeople;
-    @ExcelProperty(value = {"机构及人员配备","监控中心安保卫持证人数"}, index = 40)
+    @ExcelProperty(value = {"机构及人员配备", "监控中心安保卫持证人数"}, index = 40)
     private Integer certificatePeopleNumber;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","人员合计"}, index = 41)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "人员合计"}, index = 41)
     private Integer certificateTotal;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,内部保安人数(含派遣)"}, index = 42)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "其中,内部保安人数(含派遣)"}, index = 42)
     private Integer internalCertificateNumber;
-    @ExcelProperty(value = {"机构及人员配备","营业网点保安人员数","其中,外聘保安人数"}, index = 43)
+    @ExcelProperty(value = {"机构及人员配备", "营业网点保安人员数", "其中,外聘保安人数"}, index = 43)
     private Integer outsourceCertificateNumber;
-    @ExcelProperty(value = {"机构及人员配备","配有保安网点数"}, index = 44)
+    @ExcelProperty(value = {"机构及人员配备", "配有保安网点数"}, index = 44)
     private Integer haveSecurityNetworkNumber;
-    @ExcelProperty(value = {"责任制落实","各级治安保卫责任书签订情况(份)","总行(联社)与各职能部门、营业网点签订数"}, index = 44)
-private Integer safeHeadToNetwork;
-    @ExcelProperty(value = {"责任制落实","各级治安保卫责任书签订情况(份)","各职能部门、营业网点与各员工签订数"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级治安保卫责任书签订情况(份)", "总行(联社)与各职能部门、营业网点签订数"}, index = 45)
+    private Integer safeHeadToNetwork;
+    @ExcelProperty(value = {"责任制落实", "各级治安保卫责任书签订情况(份)", "各职能部门、营业网点与各员工签订数"}, index = 46)
     private Integer safeNetworkToPeople;
-    @ExcelProperty(value = {"责任制落实","各级联防协议书签订情况(份)","总行(联社)与当地机关、单位或居民签订协议书数量"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级联防协议书签订情况(份)", "总行(联社)与当地机关、单位或居民签订协议书数量"}, index = 47)
     private Integer jointHeadToNetwork;
-    @ExcelProperty(value = {"责任制落实","各级联防协议书签订情况(份)"," 各营业网点(离行式自助银行)与当地机关、单位或居民签订协议书数量"}, index = 44)
+    @ExcelProperty(value = {"责任制落实", "各级联防协议书签订情况(份)", " 各营业网点(离行式自助银行)与当地机关、单位或居民签订协议书数量"}, index = 48)
     private Integer jointNetworkToPeople;
-    @ExcelProperty(value = {"营业网点安全检查","本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)"}, index = 45)
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "组织开展检查次数"}, index = 49)
+    private Integer headSafeCheckNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "检查网点数量"}, index = 50)
+    private Integer headSafeCheckNetworkNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "发现隐患数"}, index = 51)
+    private Integer foundDangerNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "已整改隐患数"}, index = 52)
+    private Integer rectificationDangerNumber;
+    @ExcelProperty(value = {"总行(联社)安全检查 ", "未整改隐患数"}, index = 53)
+    private Integer noRectificationDangerNumber;
+    @ExcelProperty(value = {"营业网点安全检查", "本季度辖内所有营业网点组织开展自查次数(每个网点检查数量的累计数)"}, index = 54)
     private Integer quarterSelfInspectNumber;
-    @ExcelProperty(value =  {"安全教育","本季度度总行(联社)组织开展安全教育次数"}, index = 46)
+    @ExcelProperty(value = {"安全教育", "本季度度总行(联社)组织开展安全教育次数"}, index = 55)
     private Integer quarterSafetyEducationNumber;
-    @ExcelProperty(value = {"安全教育","共计参与安全教育员工人次"}, index = 47)
+    @ExcelProperty(value = {"安全教育", "共计参与安全教育员工人次"}, index = 56)
     private Integer safetyEducationPeopleNumber;
-    @ExcelProperty(value = {"总行(联社)预案演练","本季度开展预案演练次数"}, index = 48)
+    @ExcelProperty(value = {"总行(联社)预案演练", "本季度开展预案演练次数"}, index = 57)
     private Integer quarterDrillNumber;
-    @ExcelProperty(value = {"总行(联社)预案演练","参与预案演练员工人次"}, index = 49)
+    @ExcelProperty(value = {"总行(联社)预案演练", "参与预案演练员工人次"}, index = 58)
     private Integer quarterDrillPeopleNumber;
-    @ExcelProperty(value = {"营业网点预案演练","本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)"}, index = 50)
+    @ExcelProperty(value = {"营业网点预案演练", "本季度辖内所有营业网点开展预案演练次数(每个网点演练次数的累计数)"}, index = 59)
     private Integer quarterAllNetworkDrillNumber;
-    @ExcelProperty(value = {"营业网点预案演练","辖内所有营业网点参与预案演练员工人次"}, index = 51)
+    @ExcelProperty(value = {"营业网点预案演练", "辖内所有营业网点参与预案演练员工人次"}, index = 60)
     private Integer quarterAllNetworkDrillPeopleNumber;
 
 

+ 45 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1078,8 +1078,8 @@ and a.org_path LIKE concat(#{orgPath}, '%')
             core_safety_book_new a
                 LEFT JOIN sys_org b ON a.party_b_org = b.id
         WHERE
-            type = #{type}
-          AND sign_level = #{level}
+            a.type = #{type}
+          AND a.sign_level = #{level}
           AND b.path LIKE concat(#{orgPath}, '%')
     </select>
     <select id="getJointHeadToNetwork" resultType="java.lang.Integer">
@@ -1111,6 +1111,49 @@ and a.org_path LIKE concat(#{orgPath}, '%')
                 GROUP BY
                     a.id)
     </select>
+    <select id="getHeadSafeCheckNumber" resultType="java.lang.Integer">
+        SELECT
+            COUNT( a.id )
+        FROM
+            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}, '%')
+    </select>
+    <select id="getHeadSafeCheckNetworkNumber" resultType="java.lang.Integer">
+        SELECT
+            COUNT( DISTINCT a.org_id )
+        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
+        WHERE
+            b.check_type = 1
+--           AND c.type = 4
+          AND a.org_path LIKE concat(#{orgPath}, '%')
+    </select>
+    <select id="getDangerNumber" resultType="java.util.Map">
+        SELECT
+            IFNULL( SUM( IF ( confirm_status >= 2 AND reform_status IN ( 10, 11 ), 1, 0 )), 0 ) AS foundDangerNumber,
+            IFNULL( SUM( IF ( reform_status = 11, 1, 0 )), 0 ) AS rectificationDangerNumber,
+            IFNULL(
+                        SUM(
+                                IF
+                                    ( confirm_status >= 2 AND reform_status IN ( 10, 11 ), 1, 0 ))- SUM(
+                                IF
+                                    ( reform_status = 11, 1, 0 )),
+                        0
+                ) AS noRectificationDangerNumber
+        FROM
+            core_question a
+                LEFT JOIN core_safety_task b ON a.src_task_id = b.id
+                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}, '%')
+    </select>
 
 
 </mapper>