权限申请代码优化
This commit is contained in:
parent
c02d5cda5a
commit
a6103fb312
@ -64,13 +64,27 @@ public class AddFilePermTaskEndEvent extends ExecuteListener implements ExecuteL
|
||||
* @param wsId
|
||||
*/
|
||||
public void updatePublishScopeProcess(ProcessExecutionContext ctx,BO sourceBo){
|
||||
String architectureScopeId = sourceBo.getString("ARCHITECTURESCOPEID");//架构范围
|
||||
String[] files = architectureScopeId.split(",");
|
||||
for (String fileId : files) {
|
||||
BO oldBo = SDK.getBOAPI().query(FilePermConstant.BO_ACT_PUBLISH_PERM_SCOPE).addQuery("PALVERSIONID=", fileId).detail();
|
||||
String architectureScopeName = sourceBo.getString("ARCHITECTURESCOPE");//架构范围
|
||||
String[] scopeNames = architectureScopeName.split(",");
|
||||
for (String scopeName : scopeNames) {
|
||||
//记录是否包含空格,有空格即拆分一下
|
||||
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