<p>====== 后台批量修改电子病历权限 ======</p><p><br/></p><p> ===== 批量添加某工号,加上所有科室 =====<br/></p><p><br/></p><pre class="brush:sql;toolbar:false">
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</pre><p><br/></p><p>===== 批量把某工号的权限赋值给其他工号 =====</p><p><br/></p><p>示例里,把黄振宇(694)权限,全部复制给陈巧儿(288)</p><p>delete JHAUTHUSERVSROLE where userid='288';</p><p><br/></p><p>insert into JHAUTHUSERVSROLE(USERID, ROLEID,SYNCHROFLAG, DEFAULTROLEFLAG, HOSPITALNO) select 288, ROLEID,SYNCHROFLAG, DEFAULTROLEFLAG, HOSPITALNO from JHAUTHUSERVSROLE where userid='694'</p><p><br/></p>