Procházet zdrojové kódy

fix(permissions): remove Gu Luhui duplicate menus and restore icon

apple před 1 hodinou
rodič
revize
a2e9075d7f

+ 9 - 3
docs/24_星级班班主任移动报表/2026-12-04_古绿晖班级评比菜单为空修复记录.md

@@ -10,12 +10,16 @@
 
 同时,个人菜单树缺少“升旗礼检查”“宿舍内务检查”“值班”等标准班级评比子节点。
 
+完成菜单补齐后,又发现“学工”父菜单下历史遗留了与“班级评比”业务名相同的子项。正式环境重复 5 项,测试环境重复 1 项。另外“班级评比”父菜单的业务名为空,未生成业务图标。
+
 ## 3. 修复内容
 
 | 项目 | 修复方式 |
 |---|---|
 | 个人菜单 | 保留原菜单,在“班级评比”下补齐 10 个当前有效子菜单 |
 | 已停用菜单 | 不复制“风纪检查”停用节点 |
+| 菜单图标 | 为“班级评比”父菜单设置 `YWM=bjpb`,使用现有班级评比业务图标 |
+| 重复菜单 | 删除“学工”下与“班级评比”业务名相同的重复子项,保留“班级评比”中的标准入口 |
 | 服务权限 | 新建古绿晖专用的 `QZ_BJPJ_1204` 权限群组 |
 | 补充权限 | 值班、学校获奖记录、风纪仪容检查及对应查询、录入、详情、提交权限 |
 | 原有权限 | 不修改基础、星级班、宿管权限群组 |
@@ -30,16 +34,18 @@
 ```text
 C##DC.BAK_20261204_GLH_BJPJ_GRCD
 PMS_TEST.BAK_20261204_GLH_BJPJ_GRCD
+C##DC.BAK_20261204_GLH_ICON_DEDUP_GRCD
+PMS_TEST.BAK_20261204_GLH_ICON_DEDUP_GRCD
 ```
 
 ## 6. 执行结果
 
 | 环境 | 权限群组 ID | 菜单结果 | 服务授权结果 |
 |---|---:|---|---|
-| 正式 | 5001202 | 10 个有效子菜单 | 10 项全部通过 |
-| 测试 | 5001242 | 10 个有效子菜单 | 10 项全部通过 |
+| 正式 | 5001202 | 10 个有效子菜单,学工重复项 0 | 10 项全部通过 |
+| 测试 | 5001242 | 10 个有效子菜单,学工重复项 0 | 10 项全部通过 |
 
-菜单和权限数据均已提交数据库。
+“班级评比”已设置业务名 `bjpb`,对应正式环境现有图标 `icon-biz-bjpb`。菜单、图标标识和权限数据均已提交数据库。
 
 ## 7. 生效方式
 

+ 34 - 0
docs/24_星级班班主任移动报表/sql/2026-12-04_古绿晖班级评比菜单修复_正式.sql

@@ -45,6 +45,18 @@ begin
         ]';
     end if;
 
+    select count(*)
+      into v_count
+      from all_tables
+     where owner = 'C##DC'
+       and table_name = 'BAK_20261204_GLH_ICON_DEDUP_GRCD';
+    if v_count = 0 then
+        execute immediate q'[
+            create table C##DC.BAK_20261204_GLH_ICON_DEDUP_GRCD as
+            select * from C##DC.GRCD where YYRYID = 111148259
+        ]';
+    end if;
+
     insert into C##DC.GRCD (
         SJGRCDID, GRCDMBID, CAIDLBM, YYRYID, XH, MC, YWM, DXM, GNM,
         JLZTM, CJRYID, GLRYID, GLBMID, MS
@@ -77,6 +89,28 @@ begin
        and SJGRCDID = v_parent_id
        and DXM = 'fjyrjc';
 
+    update C##DC.GRCD
+       set YWM = 'bjpb'
+     where YYRYID = 111148259
+       and GRCDID = v_parent_id;
+
+    delete from C##DC.GRCD c
+     where c.YYRYID = 111148259
+       and c.SJGRCDID = (
+           select p.GRCDID
+             from C##DC.GRCD p
+            where p.YYRYID = 111148259
+              and p.MC = '学工'
+              and p.SJGRCDID is null
+       )
+       and exists (
+           select 1
+             from C##DC.GRCD b
+            where b.YYRYID = 111148259
+              and b.SJGRCDID = v_parent_id
+              and b.DXM = c.DXM
+       );
+
     select count(*)
       into v_count
       from C##DC.QZ

+ 34 - 0
docs/24_星级班班主任移动报表/sql/2026-12-04_古绿晖班级评比菜单修复_测试.sql

@@ -45,6 +45,18 @@ begin
         ]';
     end if;
 
+    select count(*)
+      into v_count
+      from all_tables
+     where owner = 'PMS_TEST'
+       and table_name = 'BAK_20261204_GLH_ICON_DEDUP_GRCD';
+    if v_count = 0 then
+        execute immediate q'[
+            create table PMS_TEST.BAK_20261204_GLH_ICON_DEDUP_GRCD as
+            select * from PMS_TEST.GRCD where YYRYID = 111148259
+        ]';
+    end if;
+
     insert into PMS_TEST.GRCD (
         SJGRCDID, GRCDMBID, CAIDLBM, YYRYID, XH, MC, YWM, DXM, GNM,
         JLZTM, CJRYID, GLRYID, GLBMID, MS
@@ -77,6 +89,28 @@ begin
        and SJGRCDID = v_parent_id
        and DXM = 'fjyrjc';
 
+    update PMS_TEST.GRCD
+       set YWM = 'bjpb'
+     where YYRYID = 111148259
+       and GRCDID = v_parent_id;
+
+    delete from PMS_TEST.GRCD c
+     where c.YYRYID = 111148259
+       and c.SJGRCDID = (
+           select p.GRCDID
+             from PMS_TEST.GRCD p
+            where p.YYRYID = 111148259
+              and p.MC = '学工'
+              and p.SJGRCDID is null
+       )
+       and exists (
+           select 1
+             from PMS_TEST.GRCD b
+            where b.YYRYID = 111148259
+              and b.SJGRCDID = v_parent_id
+              and b.DXM = c.DXM
+       );
+
     select count(*)
       into v_count
       from PMS_TEST.QZ

+ 62 - 0
docs/24_星级班班主任移动报表/sql/2026-12-04_古绿晖班级评比菜单修复_验证.sql

@@ -10,6 +10,37 @@ select c.GRCDID,c.SJGRCDID,c.XH,c.MC,c.DXM,c.GNM,c.JLZTM
         or c.SJGRCDID=(select p.GRCDID from C##DC.GRCD p where p.YYRYID=111148259 and p.MC='班级评比' and p.SJGRCDID is null))
  order by nvl(c.SJGRCDID,0),c.XH,c.GRCDID;
 
+prompt ==== 正式环境班级评比图标 ====
+select GRCDID,MC,YWM
+  from C##DC.GRCD
+ where YYRYID=111148259
+   and MC='班级评比'
+   and SJGRCDID is null;
+
+prompt ==== 正式环境学工与班级评比重复项,重复数应为 0 ====
+select p.GRCDID,p.MC,p.YWM,
+       (select count(*)
+          from C##DC.GRCD c
+         where c.YYRYID=111148259
+           and c.SJGRCDID=p.GRCDID
+           and c.DXM in (
+               select b.DXM
+                 from C##DC.GRCD b
+                where b.YYRYID=111148259
+                  and b.SJGRCDID=(
+                      select p2.GRCDID
+                        from C##DC.GRCD p2
+                       where p2.YYRYID=111148259
+                         and p2.MC='班级评比'
+                         and p2.SJGRCDID is null
+                  )
+           )
+       ) DUPLICATE_WITH_BJPJ
+  from C##DC.GRCD p
+ where p.YYRYID=111148259
+   and p.MC='学工'
+   and p.SJGRCDID is null;
+
 prompt ==== 正式环境古绿晖补充权限群组 ====
 select q.QZID,q.QZH,q.MC,q.JLZTM,c.RYID,c.RYH,c.JLZTM MEMBER_STATUS
   from C##DC.QZ q
@@ -25,6 +56,37 @@ select c.GRCDID,c.SJGRCDID,c.XH,c.MC,c.DXM,c.GNM,c.JLZTM
         or c.SJGRCDID=(select p.GRCDID from PMS_TEST.GRCD p where p.YYRYID=111148259 and p.MC='班级评比' and p.SJGRCDID is null))
  order by nvl(c.SJGRCDID,0),c.XH,c.GRCDID;
 
+prompt ==== 测试环境班级评比图标 ====
+select GRCDID,MC,YWM
+  from PMS_TEST.GRCD
+ where YYRYID=111148259
+   and MC='班级评比'
+   and SJGRCDID is null;
+
+prompt ==== 测试环境学工与班级评比重复项,重复数应为 0 ====
+select p.GRCDID,p.MC,p.YWM,
+       (select count(*)
+          from PMS_TEST.GRCD c
+         where c.YYRYID=111148259
+           and c.SJGRCDID=p.GRCDID
+           and c.DXM in (
+               select b.DXM
+                 from PMS_TEST.GRCD b
+                where b.YYRYID=111148259
+                  and b.SJGRCDID=(
+                      select p2.GRCDID
+                        from PMS_TEST.GRCD p2
+                       where p2.YYRYID=111148259
+                         and p2.MC='班级评比'
+                         and p2.SJGRCDID is null
+                  )
+           )
+       ) DUPLICATE_WITH_BJPJ
+  from PMS_TEST.GRCD p
+ where p.YYRYID=111148259
+   and p.MC='学工'
+   and p.SJGRCDID is null;
+
 prompt ==== 测试环境古绿晖补充权限群组 ====
 select q.QZID,q.QZH,q.MC,q.JLZTM,c.RYID,c.RYH,c.JLZTM MEMBER_STATUS
   from PMS_TEST.QZ q