归档入库逻辑优化
This commit is contained in:
parent
e04eaf0bdc
commit
3f961cc155
@ -816,7 +816,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
String sendScopePost = publish.getString("SEND_SCOPE_POST");
|
String sendScopePost = publish.getString("SEND_SCOPE_POST");
|
||||||
String sendScopeLevel = publish.getString("SEND_SCOPE_LEVEL");
|
String sendScopeLevel = publish.getString("SEND_SCOPE_LEVEL");
|
||||||
Set<String> removeVerIds = new HashSet<>();
|
Set<String> removeVerIds = new HashSet<>();
|
||||||
Map<String, String> addVerMap = new HashMap<>();
|
Map<String, PALRepositoryModel> addVerMap = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
//将发布范围权限信息保存至范围权限表
|
//将发布范围权限信息保存至范围权限表
|
||||||
@ -828,7 +828,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addVerMap.put(model.getVersionId(), model.getName());
|
addVerMap.put(model.getVersionId(), model);
|
||||||
removeVerIds.add(model.getVersionId());
|
removeVerIds.add(model.getVersionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -840,8 +840,10 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addVerMap.put(model.getVersionId(), model.getName());
|
//沿用历史代码,增加历史版本也不删除逻辑
|
||||||
removeVerIds.add(model.getVersionId());
|
addVerMap.put(model.getVersionId(), model);
|
||||||
|
/*removeVerIds.add(model.getVersionId());
|
||||||
|
addVerMap.put(model.getId(), model);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bolistS != null) {
|
if (bolistS != null) {
|
||||||
@ -870,15 +872,17 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getBOAPI().remove(newBoName, removeId);
|
SDK.getBOAPI().remove(newBoName, removeId);
|
||||||
}
|
}
|
||||||
// 重新添加权限
|
// 重新添加权限
|
||||||
//List<BO> list = new ArrayList<>();
|
for (Map.Entry<String, PALRepositoryModel> entry: addVerMap.entrySet()) {
|
||||||
for (Map.Entry<String, String> entry : addVerMap.entrySet()) {
|
|
||||||
String verId = entry.getKey();
|
String verId = entry.getKey();
|
||||||
String name = entry.getValue();
|
PALRepositoryModel model = entry.getValue();
|
||||||
BO bo = new BO();
|
BO bo = new BO();
|
||||||
bo.set("PERMID", UUIDGener.getUUID());
|
bo.set("PERMID", UUIDGener.getUUID());
|
||||||
|
//增加两个字段 文件唯一ID,文件组ID
|
||||||
|
bo.set("FILEUUID", model.getId());
|
||||||
|
bo.set("FILEGROUPID", model.getVersionId());
|
||||||
bo.set("WSID", wsId);
|
bo.set("WSID", wsId);
|
||||||
bo.set("PALVERSIONID", verId);
|
bo.set("PALVERSIONID", verId);
|
||||||
bo.set("PALNAME", name);
|
bo.set("PALNAME", model.getName());
|
||||||
bo.set("PERMTYPE", sendScope);
|
bo.set("PERMTYPE", sendScope);
|
||||||
bo.set("ORGPERM", "1".equals(sendScope) ? SDK.getORGAPI().getCompanyByUser(applyUser).getId() : sendScopeOrg);
|
bo.set("ORGPERM", "1".equals(sendScope) ? SDK.getORGAPI().getCompanyByUser(applyUser).getId() : sendScopeOrg);
|
||||||
bo.set("POSTPERM", "1".equals(sendScope) ? "" : sendScopePost);
|
bo.set("POSTPERM", "1".equals(sendScope) ? "" : sendScopePost);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user