1、insert into auser (companycode,userid,usercode,username,userlevel,password,orgid,deleteflag,updatecount,createuser,createdate,updateuser,updatetime,expired)
values('5BL9','5BL95BL9B1','5BL9B1','5BL9B1','1','698d51a19d8a121ce581499d7b701668','5BL9B1',0,0,'ncicadmin',sysdate,'ncicadmin',sysdate,0)
2、
--insert into aorg values('5BL9','nciclcc',null,1,2,null,null,'ncicadmin',sysdate,'ncicadmin',sysdate);
insert into aorg values('5BL9B1','5BL9','生管部门',2,3,3,null,'ncicadmin',sysdate,'ncicadmin',sysdate);
3、insert into aorgrole values('5BL9B1','0009')
insert into aorgrole values('5BL9B1','0003')
create or replace procedure inituser is
cursor tmp_cursor is select companycode,usercode from tmp;
v_companycode tmp.companycode%type;
v_usercode tmp.usercode%type;
begin
open tmp_cursor;
loop
fetch tmp_cursor into v_companycode,v_usercode;
exit when tmp_cursor%notfound;
insert into auser(companycode,userid,usercode,username,userlevel,password,orgid,deleteflag,updatecount,createuser,createdate,updateuser,updatetime,expired) values (v_companycode,v_companycode||v_usercode,v_usercode,v_usercode,'1','698d51a19d8a121ce581499d7b701668',v_usercode,0,0,'ncicadmin',sysdate,'ncicadmin',sysdate,0);
end loop;
close tmp_cursor;
commit;
end inituser;
create or replace procedure initaorg is
cursor tmp_cursor is select companycode,usercode from tmp;
v_companycode tmp.companycode%type;
v_usercode tmp.usercode%type;
begin
open tmp_cursor;
loop
fetch tmp_cursor into v_companycode,v_usercode;
exit when tmp_cursor%notfound;
insert into aorg values(v_usercode,v_companycode,'生管部门',2,3,3,null,'ncicadmin',sysdate,'ncicadmin',sysdate);
end loop;
close tmp_cursor;
commit;
end initaorg;
create or replace procedure initaorgrole is
cursor tmp_cursor is select companycode,usercode from tmp;
v_companycode tmp.companycode%type;
v_usercode tmp.usercode%type;begin
open tmp_cursor;
loop
fetch tmp_cursor into v_companycode,v_usercode;
exit when tmp_cursor%notfound;
insert into aorgrole values(v_usercode,'0003');
insert into aorgrole values(v_usercode,'0009');
end loop;
close tmp_cursor;
commit;
end initaorgrole;