用友批量修改权限
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
批量修改权限
问题现象
客户需要给全部帐套固定的权限如果给全部权限的话还不行
如果从前台增加的话那么一个一个点太慢了
解决思路
前台点太慢是不是可以从某个表直接插入,尝试以后决定从后台增加
解决办法
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent)
select 001,2012 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 002,2013 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 002,2014 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 003,2012 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 003,2013 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 003,2014 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 101,2006 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 101,2007 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser, csub_id, cAuthType, cRepellent, cRepellentModule, cNotRepellent) select 101,2008 ,cUser_Id,cAuth_Id,iIsUser,csub_id,cAuthType, cRepellent, cRepellentModule, cNotRepellent from ua_holdauth where cuser_id='all'and cacc_id=001 and iyear=2011
insert into ua_holdauth(cAcc_Id, iYear, cUser_Id, cAuth_Id, iIsUser,