|
|
@@ -0,0 +1,99 @@
|
|
|
+set define off
|
|
|
+set echo on
|
|
|
+set serveroutput on
|
|
|
+whenever sqlerror exit sql.sqlcode rollback
|
|
|
+
|
|
|
+alter session set container=ORCLPDB;
|
|
|
+alter session set current_schema=C##DC;
|
|
|
+
|
|
|
+declare
|
|
|
+ v_count number;
|
|
|
+ v_parent_id number;
|
|
|
+ v_child_id number;
|
|
|
+begin
|
|
|
+ select count(*) into v_count from BAK_20261130_FJYRJC_PROD_GRCD_1011;
|
|
|
+ if v_count<>3 then
|
|
|
+ raise_application_error(-20001,'菜单备份不完整,停止安装');
|
|
|
+ end if;
|
|
|
+
|
|
|
+ select count(*) into v_count
|
|
|
+ from RY
|
|
|
+ where RYID=111157142 and RYH='cssg1' and GWID=1015504 and JLZTM=51;
|
|
|
+ if v_count<>1 then
|
|
|
+ raise_application_error(-20002,'cssg1 人员、账号或宿管岗位关系不正确');
|
|
|
+ end if;
|
|
|
+
|
|
|
+ select count(*) into v_count
|
|
|
+ from GRCD
|
|
|
+ where GRCDID=1025885 and GRCDMBID=1011 and MC='班级评比' and JLZTM=1;
|
|
|
+ if v_count<>1 then
|
|
|
+ raise_application_error(-20003,'班级评比根菜单不存在');
|
|
|
+ end if;
|
|
|
+
|
|
|
+ select count(*) into v_count
|
|
|
+ from GRCD
|
|
|
+ where GRCDID=1026056 and GRCDMBID=1011 and DXM='fjyrjc';
|
|
|
+ if v_count<>1 then
|
|
|
+ raise_application_error(-20004,'风纪仪容检查菜单不存在');
|
|
|
+ end if;
|
|
|
+
|
|
|
+ update GRCD set MC='风纪仪容检查',GNM='search'
|
|
|
+ where GRCDID=1026056;
|
|
|
+
|
|
|
+ update GRCD set GNM='__disabled__'
|
|
|
+ where GRCDID=1026096;
|
|
|
+
|
|
|
+ select min(GRCDID) into v_parent_id
|
|
|
+ from GRCD
|
|
|
+ where GRCDMBID=101223 and SJGRCDID is null
|
|
|
+ and MC='班级评比' and JLZTM in (1,51);
|
|
|
+
|
|
|
+ if v_parent_id is null then
|
|
|
+ insert into GRCD(
|
|
|
+ SJGRCDID,GRCDMBID,CAIDLBM,XH,MC,DXM,GNM,JLZTM,MS
|
|
|
+ )
|
|
|
+ select null,101223,CAIDLBM,
|
|
|
+ (select nvl(max(XH),0)+1 from GRCD
|
|
|
+ where GRCDMBID=101223 and SJGRCDID is null),
|
|
|
+ MC,null,null,1,MS
|
|
|
+ from GRCD where GRCDID=1025885
|
|
|
+ returning GRCDID into v_parent_id;
|
|
|
+
|
|
|
+ insert into BAK_20261130_FJYRJC_PROD_CREATED(GRCDID,CREATED_AT)
|
|
|
+ values(v_parent_id,systimestamp);
|
|
|
+ end if;
|
|
|
+
|
|
|
+ select min(GRCDID) into v_child_id
|
|
|
+ from GRCD
|
|
|
+ where GRCDMBID=101223 and SJGRCDID=v_parent_id and DXM='fjyrjc';
|
|
|
+
|
|
|
+ if v_child_id is null then
|
|
|
+ insert into GRCD(
|
|
|
+ SJGRCDID,GRCDMBID,CAIDLBM,XH,MC,DXM,GNM,JLZTM,MS
|
|
|
+ )
|
|
|
+ select v_parent_id,101223,CAIDLBM,0,
|
|
|
+ '风纪仪容检查','fjyrjc','search',1,'风纪仪容检查'
|
|
|
+ from GRCD where GRCDID=1026056
|
|
|
+ returning GRCDID into v_child_id;
|
|
|
+
|
|
|
+ insert into BAK_20261130_FJYRJC_PROD_CREATED(GRCDID,CREATED_AT)
|
|
|
+ values(v_child_id,systimestamp);
|
|
|
+ else
|
|
|
+ update GRCD set MC='风纪仪容检查',GNM='search',JLZTM=1
|
|
|
+ where GRCDID=v_child_id;
|
|
|
+ end if;
|
|
|
+
|
|
|
+ update GRJJ
|
|
|
+ set MC='风纪仪容检查',BJM='mp_objList',TBM='icon-obj-xxwjjl',
|
|
|
+ DXM='fjyrjc',FWM='fjyrjc_cx',GNM='search',JLZTM=51,FWSBLBM=51
|
|
|
+ where GRJJID=106274 and YYRYID=111157142;
|
|
|
+ if sql%rowcount<>1 then
|
|
|
+ raise_application_error(-20005,'cssg1 风纪快捷入口更新失败');
|
|
|
+ end if;
|
|
|
+
|
|
|
+ commit;
|
|
|
+ dbms_output.put_line('FJYRJC_STUDENT_LEVEL_PROD_OK parent='||v_parent_id||' child='||v_child_id);
|
|
|
+end;
|
|
|
+/
|
|
|
+
|
|
|
+exit
|