权限申请代码优化
This commit is contained in:
parent
c02d5cda5a
commit
a6103fb312
@ -64,11 +64,25 @@ public class AddFilePermTaskEndEvent extends ExecuteListener implements ExecuteL
|
|||||||
* @param wsId
|
* @param wsId
|
||||||
*/
|
*/
|
||||||
public void updatePublishScopeProcess(ProcessExecutionContext ctx,BO sourceBo){
|
public void updatePublishScopeProcess(ProcessExecutionContext ctx,BO sourceBo){
|
||||||
String architectureScopeId = sourceBo.getString("ARCHITECTURESCOPEID");//架构范围
|
String architectureScopeName = sourceBo.getString("ARCHITECTURESCOPE");//架构范围
|
||||||
String[] files = architectureScopeId.split(",");
|
String[] scopeNames = architectureScopeName.split(",");
|
||||||
for (String fileId : files) {
|
for (String scopeName : scopeNames) {
|
||||||
BO oldBo = SDK.getBOAPI().query(FilePermConstant.BO_ACT_PUBLISH_PERM_SCOPE).addQuery("PALVERSIONID=", fileId).detail();
|
//记录是否包含空格,有空格即拆分一下
|
||||||
updateData(ctx,oldBo);
|
if(scopeName.contains(" ")){
|
||||||
|
scopeName = scopeName.split(" ")[1];
|
||||||
|
}
|
||||||
|
//先根据fileId查询当前所属的L1,L2架构
|
||||||
|
String whereOrSql = " PROCESS_ARCHITECTURE_L1=" + "'" + scopeName + "'" +
|
||||||
|
" OR" +
|
||||||
|
" PROCESS_ARCHITECTURE_L2=" + "'" + scopeName + "'" +
|
||||||
|
" OR" +
|
||||||
|
" PROCESS_ARCHITECTURE_L3=" + "'" + scopeName + "'" +
|
||||||
|
" OR" +
|
||||||
|
" PROCESS_ARCHITECTURE_L4=" + "'" + scopeName + "'";
|
||||||
|
List<BO> list = SDK.getBOAPI().query(FilePermConstant.BO_ACT_PUBLISH_PERM_SCOPE).addQuery(whereOrSql, null).list();
|
||||||
|
for (BO oldBo : list) {
|
||||||
|
updateData(ctx,oldBo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user