Browse Source

安全责任书菜单变更

luojun 1 năm trước cách đây
mục cha
commit
8283e4bdb3

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

@@ -163,11 +163,13 @@ CREATE TABLE if not exists `core_safety_book_new` (
                                         `time` datetime DEFAULT NULL COMMENT '签署时间',
                                         `party_a` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '甲方',
                                         `party_b` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '乙方',
-                                        `party_a_org` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '甲方机构',
+                                        `party_a_org` bigint DEFAULT NULL COMMENT '甲方机构',
                                         `party_b_org` bigint DEFAULT NULL COMMENT '乙方机构',
                                         `sign_level` int DEFAULT NULL COMMENT '签署层级',
+                                        `party_a_org_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '甲方机构名称',
+                                        `party_b_org_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '乙方机构名称',
                                         PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+) ENGINE=InnoDB AUTO_INCREMENT=1732661214465085443 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 -- 添加新安全责任书菜单
 DELETE FROM `sys_menu` WHERE id IN (1732224068700721153,1732225804865753089,1732225877351714817,1732225942820605954,1732226010889965570);
 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 (1732224068700721153, '新安全责任书', 1711912586825461761, 4, 'safetyBookNew', 'safetyBook/newBook/index', NULL, 1, 0, 'C', '0', '0', 'safetyBookNew', '1', 'documentation', NULL, '省联社账号', '2023-12-06 10:23:25', '', NULL, '');
@@ -291,3 +293,9 @@ DELETE FROM `sys_menu` WHERE id IN (1711913107380531202,1732224068700721153);
 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 (1711913107380531202, '旧安全责任书', 1711912586825461761, 1, 'index', 'safetyBook/index', NULL, 1, 0, 'C', '1', '0', '', '1', 'clipboard', NULL, '超级管理员', '2023-10-11 09:14:42', '省联社账号', '2023-12-07 11:01:00', '');
 
 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 (1732224068700721153, '安全责任书', 1711912586825461761, 4, 'safetyBookNew', 'safetyBook/newBook/index', NULL, 1, 0, 'C', '0', '0', 'safetyBookNew', '1', 'documentation', NULL, '省联社账号', '2023-12-06 10:23:25', '省联社账号', '2023-12-07 11:01:09', '');
+-- 修改高管角色
+DELETE FROM `sys_dict_data` WHERE `dict_type`='hsggbsdj_role';
+INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '董(理)事长', '1', 'hsggbsdj_role', NULL, 'default', 'N', '0', '省联社账号', '2023-12-05 14:56:48', '省联社账号', '2023-12-07 15:22:29', NULL);
+INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '行长(主任)', '2', 'hsggbsdj_role', NULL, 'default', 'N', '0', '省联社账号', '2023-12-05 14:56:55', '省联社账号', '2023-12-07 15:22:39', NULL);
+INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '副行长(副主任)', '3', 'hsggbsdj_role', NULL, 'default', 'N', '0', '省联社账号', '2023-12-07 15:22:48', '', NULL, NULL);
+INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '行长助理(主任助理)', '4', 'hsggbsdj_role', NULL, 'default', 'N', '0', '省联社账号', '2023-12-07 15:23:04', '', NULL, NULL);

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetybook/domain/CoreSafetyBookNew.java

@@ -88,14 +88,14 @@ public class CoreSafetyBookNew extends BaseEntity {
      * 甲方机构
      */
     @ApiModelProperty(value = "甲方机构")
-    private String partyAOrg;
+    private Long partyAOrg;
 
     /**
      * 乙方机构
      */
     @ApiModelProperty(value = "乙方机构")
     private Long partyBOrg;
-    @TableField(exist = false)
+    private String partyAOrgName;
     private String partyBOrgName;
     @TableField(exist = false)
     private String selectOrgPath;

+ 8 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetybook/service/impl/CoreSafetyBookNewServiceImpl.java

@@ -37,6 +37,7 @@ public class CoreSafetyBookNewServiceImpl extends ServiceImpl<CoreSafetyBookNewM
     private CoreSafetyBookBookFilesMapper coreSafetyBookBookFilesMapper;
     @Autowired
     private RemoteOrgService orgService;
+
     @Override
     public TableDataInfo<CoreSafetyBookNew> selectPage(CoreSafetyBookNew coreSafetyBookNew) {
         //未删除
@@ -62,13 +63,18 @@ public class CoreSafetyBookNewServiceImpl extends ServiceImpl<CoreSafetyBookNewM
 //        if (coreSafetyBookNew.getParams().get("beginTime") != null && coreSafetyBookNew.getParams().get("endTime") != null) {
 //            query.between("create_time", coreSafetyBookNew.getParams().get("beginTime"), coreSafetyBookNew.getParams().get("endTime"));
 //        }
-        SysOrg org = orgService.selectOrgById(coreSafetyBookNew.getPartyBOrg() != null ? coreSafetyBookNew.getPartyBOrg() : SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
+//        SysOrg org = orgService.selectOrgById(coreSafetyBookNew.getPartyBOrg() != null ? coreSafetyBookNew.getPartyBOrg() : SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
+        SysOrg org = orgService.selectOrgById(coreSafetyBookNew.getPartyBOrg() ,SecurityConstants.INNER);
         if (org != null) {
             coreSafetyBookNew.setSelectOrgPath(org.getPath());
         }
         //获取数据
         page = coreSafetyBookNewMapper.selectSafetyBookNewPage(page, coreSafetyBookNew);
-        page.getRecords().forEach(e -> e.setFiles(coreSafetyBookBookFilesMapper.selecVotList(e.getId())));
+        page.getRecords().forEach(e -> {
+            e.setFiles(coreSafetyBookBookFilesMapper.selecVotList(e.getId()));
+            e.setPartyAOrgName(!e.getType().equals(2L) ? e.getPartyAOrgName() : orgService.selectOrgById(e.getPartyAOrg(), SecurityConstants.INNER).getShortName());
+            e.setPartyBOrgName(!e.getType().equals(2L) ? orgService.selectOrgById(e.getPartyBOrg(), SecurityConstants.INNER).getShortName():e.getPartyBOrgName());
+        });
 
         //抓换为TableDataInfo适配前端
         return TableDataInfo.build(page);

+ 6 - 3
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppPlanMapper.xml

@@ -111,7 +111,7 @@
                 where path like concat((select path from sys_org where id=#{info.orgId}),'%'))
             </if>
         </where>
-        order by id desc
+        order by a.plan_name COLLATE utf8mb4_general_ci DESC
     </select>
     <!--    <select id="selectChildren" parameterType="com.xunmei.core.resumption.dto.plan.CoreResumptionPlanPageDto"-->
     <!--            resultMap="appPlans">-->
@@ -427,7 +427,10 @@
     </select>
     <update id="updateParentPlanCompletedState">
         UPDATE core_resumption_plan
-        SET task_has_completed = (SELECT c from  (SELECT count(0)  as c from core_resumption_plan WHERE parent_id=#{planId} and task_has_completed=1) a)
-        WHERE id=#{planId}
+        SET task_has_completed = (SELECT c
+                                  from (SELECT count(0) as c
+                                        from core_resumption_plan
+                                        WHERE parent_id = #{planId} and task_has_completed = 1) a)
+        WHERE id = #{planId}
     </update>
 </mapper>

+ 3 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/safetybook/CoreSafetyBookHsggbsdjMapper.xml

@@ -50,6 +50,7 @@
         where id = #{id}
     </select>
     <select id="selectHsggbsdjPage" resultType="com.xunmei.core.safetybook.domain.CoreSafetyBookHsggbsdj">
+        select * from (
         SELECT
         h.id,
         h.title,
@@ -87,6 +88,8 @@
         </where>
         GROUP BY
         h.id
+        ) hh
+        order by hh.create_time desc
     </select>
     <select id="selectHsggbsdjById" resultType="com.xunmei.core.safetybook.domain.CoreSafetyBookHsggbsdj">
         SELECT h.id,

+ 6 - 4
soc-modules/soc-modules-core/src/main/resources/mapper/safetybook/CoreSafetyBookMapper.xml

@@ -87,6 +87,7 @@
         <if test="info.checkSub ==false">
             and o.path = #{info.selectOrgPath}
         </if>
+        order by b.create_time desc
     </select>
     <select id="selectBookById" resultType="com.xunmei.core.safetybook.domain.CoreSafetyBook">
         select b.id,
@@ -100,11 +101,12 @@
                b.deleted,
                b.type,
                o.short_name as org_name,
-               u.name as user_name
+               u.name       as user_name
         from core_safety_book b
-                 left join sys_org o on b.org_id=o.id
-                 left join sys_user u on b.create_by=u.id
-        where b.deleted = 0 and b.id=#{id}
+                 left join sys_org o on b.org_id = o.id
+                 left join sys_user u on b.create_by = u.id
+        where b.deleted = 0
+          and b.id = #{id}
 
     </select>
 

+ 18 - 8
soc-modules/soc-modules-core/src/main/resources/mapper/safetybook/CoreSafetyBookNewMapper.xml

@@ -79,19 +79,24 @@
         b.create_by,
         b.create_time,
         b.update_by,
-        b.sign_level,
-        b.time,
         b.update_time,
         b.deleted,
+        b.sign_level,
+        b.time,
         b.type,
         b.party_b_org,
         b.party_b,
-        b.party_a_org,b.party_a,
+        b.party_a_org,
+        b.party_a,
         u.name as user_name,
-        o.short_name as partyBOrgName
+        b.party_a_org_name,
+        b.party_b_org_name
+        # o.short_name as partyBOrgName,
+        # o2.short_name as partyAOrgName
         from core_safety_book_new b
         left join sys_user u on b.create_by=u.id
         left join sys_org o on o.id=b.party_b_org
+        # left join sys_org o2 on o2.id = b.party_a_org
         where b.deleted = 0
         <if test="info.year != null">
             and b.year=#{info.year}
@@ -102,12 +107,13 @@
         <if test="info.type != null">
             and b.type=#{info.type}
         </if>
-        <if test="info.checkSub ==true">
+        <if test="info.checkSub ==true and info.selectOrgPath !=null and info.selectOrgPath !=''">
             and o.path like concat(#{info.selectOrgPath},'%')
         </if>
-        <if test="info.checkSub ==false">
+        <if test="info.checkSub ==false and info.selectOrgPath !=null and info.selectOrgPath !=''">
             and o.path = #{info.selectOrgPath}
         </if>
+        order by b.create_time desc
     </select>
     <select id="selectSafetyBookById" resultType="com.xunmei.core.safetybook.domain.CoreSafetyBookNew">
         select b.id,
@@ -124,11 +130,15 @@
                b.party_b,
                b.party_a_org,
                b.party_a,
-               u.name       as user_name,
-               o.short_name as partyBOrgName
+               u.name as user_name,
+               b.party_a_org_name,
+               b.party_b_org_name
+#                o.short_name as partyBOrgName,
+#                o2.short_name as partyAOrgName
         from core_safety_book_new b
                  left join sys_user u on b.create_by = u.id
                  left join sys_org o on o.id = b.party_b_org
+#                  left join sys_org o2 on o2.id = b.party_a_org
         where b.deleted = 0
           and b.id = #{id}