====== 后台批量修改电子病历权限 ======
===== 批量添加某工号,加上所有科室 =====
delete USERDEPT where USERID='694' insert into USERDEPT select distinct '694',t.deptadmissionto,0,0,600012,0,0,null,null FROM patvisit t where t.dischargedatetime is null and deptadmissionto is not null
===== 批量把某工号的权限赋值给其他工号 =====
示例里,把黄振宇(694)权限,全部复制给陈巧儿(288)
delete JHAUTHUSERVSROLE where userid='288';
insert into JHAUTHUSERVSROLE(USERID, ROLEID,SYNCHROFLAG, DEFAULTROLEFLAG, HOSPITALNO) select 288, ROLEID,SYNCHROFLAG, DEFAULTROLEFLAG, HOSPITALNO from JHAUTHUSERVSROLE where userid='694'