luowei před 1 rokem
rodič
revize
27f1000a50

+ 14 - 4
project_data/sql/0.0.3/soc/soc.sql

@@ -723,24 +723,34 @@ ALTER TABLE `core_protection_log`
 MODIFY COLUMN `status_updator_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上报人姓名' AFTER `status_updator_id`;
 -- 修改安全指数机构分数表机构path字段长度
 alter table core_safe_month_score modify org_path varchar(225) null comment '机构path';
-DELETE FROM sys_menu WHERE id IN(01719287834364436482,01719288533101928450,01719892877586239490,01720000571298115585,1722135552494403586);
+DELETE FROM sys_menu WHERE id IN(01719287834364436482,01719288533101928450,01719892877586239490,01720000571298115585,1722135552494403586,01722523915868221442);
 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 (01719287834364436482, '统计报表', 0, 1, 'reportForms', NULL, NULL, 1, 0, 'M', '0', '0', 'core:send:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+VALUES (01719287834364436482, '统计报表', 0, 1, 'reportForms', NULL, NULL, 1, 0, 'M', '0', '0', null, '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 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 (01719288533101928450, '安全检查统计报表', 1719287834364436482, 1, 'core/reportForms', 'core/reportForms/safetyInspectReport', NULL, 1, 1, 'C', '0', '0', 'core:safetyInspectReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 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 (01719892877586239490, '外包履职评价统计表', 1719287834364436482, 2, 'evaluateTable', 'evaluateTable/index', NULL, 1, 1, 'C', '0', '0', 'core:safetyInspectReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 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 (01720000571298115585, '监控调阅统计报表', 1719287834364436482, 3, 'core', 'core/reportForms/monitorAccessReport', NULL, 1, 1, 'C', '0', '0', 'core:monitorAccessReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+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 (01722523915868221442, '每日营业前中后的履职报表', 1719287834364436482, 3, '/core/resumptionReport', 'core/reportForms/resumptionReport', NULL, 1, 1, 'C', '0', '0', 'core:resumptionReport:list', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+
+
 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 (1722135552494403586, '登记簿批量导出', 1719287834364436482, 10, 'code/registerbook', 'registerBook/index', null, 1, 0, 'C', '0', '0', 'core:registerBook:list', '1', 'education', null, null, now(), null, now(), null);
 
-delete from sys_role_menu where menu_id IN(01719287834364436482,01719288533101928450,01719892877586239490,01720000571298115585);
+delete from sys_role_menu where menu_id IN(01722523915868221442,01719287834364436482,01719288533101928450,01719892877586239490,01720000571298115585);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01720000571298115585);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01720000571298115585);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01720000571298115585);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (122, 01720000571298115585);
 
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01722523915868221442);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01722523915868221442);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01722523915868221442);
+INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (122, 01722523915868221442);
+
+
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (116, 01719287834364436482);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (120, 01719287834364436482);
 INSERT INTO `sys_role_menu`(`role_id`, `menu_id`) VALUES (121, 01719287834364436482);
@@ -811,7 +821,7 @@ INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_paren
 
 DELETE FROM sys_menu WHERE id IN(01720259442805620738,01717076927401005058,01717079254782545922);
 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 (01720259442805620738, '外包评价', 0, 1, 'core', NULL, NULL, 1, 0, 'M', '0', '0', 'core:send:list', '1', 'edit', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+VALUES (01720259442805620738, '外包评价', 0, 1, 'core/evaluate', NULL, NULL, 1, 0, 'M', '0', '0', 'core:send:list', '1', 'edit', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 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 (01717076927401005058, '评价计划管理', 01720259442805620738, 1, 'resumption', 'resumptionEvaluate/evaluate/index', NULL, 1, 1, 'C', '0', '0', 'core:evaluatePlan:list', '1', 'excel', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 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`)

+ 10 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteOrgService.java

@@ -43,6 +43,16 @@ public interface RemoteOrgService {
     List<SysOrg> selectSysOrgByParentId(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
     /**
+     * 根据机构路径和类型查询
+     * @param path
+     * @param type
+     * @param source
+     * @return
+     */
+    @GetMapping("/org/selectSysOrgByPathAndType")
+    List<SysOrg> selectSysOrgByPathAndType(@RequestParam("path") String path,@RequestParam("type") Integer type, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    /**
      * 查询第一级机构
      *
      * @param source

+ 6 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteOrgFallbackFactory.java

@@ -52,6 +52,12 @@ public class RemoteOrgFallbackFactory implements FallbackFactory<RemoteOrgServic
             public List<SysOrg> selectSysOrgByParentId(Long id, String source) {
                 return null;
             }
+
+            @Override
+            public List<SysOrg> selectSysOrgByPathAndType(String path, Integer type, String source) {
+                return null;
+            }
+
             @Override
             public List<SysOrg> selectSysOrgByParentIds( List<Long> parentIds,String source){
                 return  null;

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

@@ -31,11 +31,20 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 
     @Override
     public List<ResumptionDayVO> report(ResumptionDTO resumptionDTO) {
-
         if (null == resumptionDTO.getOrgId()) {
             resumptionDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
         }
-        List<SysOrg> sysOrgs = orgService.selectSysOrgByParentId(resumptionDTO.getOrgId(), SecurityConstants.INNER);
+//判断机构类型,如果机构类型大于行社,都展示行社数据
+        SysOrg sysOrg = orgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
+        List<SysOrg> sysOrgs = new ArrayList<>();
+        if (sysOrg.getType() > 3) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+        } else if (sysOrg.getType() == 3) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+        } else {
+            return null;
+        }
+        orgService.selectSysOrgByParentId(resumptionDTO.getOrgId(), SecurityConstants.INNER);
         List<ResumptionDayVO> resumptionDayVOS = new ArrayList<>();
         sysOrgs.forEach(o -> {
             ResumptionDayVO resumptionDayVO = new ResumptionDayVO();

+ 10 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysOrgController.java

@@ -145,7 +145,16 @@ public class SysOrgController extends BaseController {
         queryWrapper.eq("parent_id", id);
         return sysOrgMapper.selectList(queryWrapper);
     }
-
+    @ApiOperation(value = "通过路径和机构类型查询")
+    @InnerAuth
+    @GetMapping("/selectSysOrgByPathAndType")
+    public List<SysOrg> selectSysOrgByPathAndType(String path,Integer type) {
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.likeRight("path", path);
+        queryWrapper.eq("type",type);
+        queryWrapper.eq("deleted",0);
+        return sysOrgMapper.selectList(queryWrapper);
+    }
     /**
      * 通过父类查询子集合
      */