修复角色图切换问题

This commit is contained in:
zhal 2023-08-29 13:49:47 +08:00
parent 442a207c52
commit 4ded7bdf94
2 changed files with 11 additions and 11 deletions

View File

@ -4672,27 +4672,27 @@ public class CoeDesignerWeb extends ActionWeb {
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(id);
if (oldModelList.size() > 0) {
DesignerShapeRelationModel oldModel = oldModelList.get(0);
int answer = 0;
for (DesignerShapeRelationModel oneModel : oldModelList) {
//如果关联角色图则同步复制角色图关联关系
String methodIds = "";
if (oldModel.getAttrId().equals("role")) {
int answer = 0;
if (oneModel.getAttrId().equals("role")) {
PALRepository repository = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
PALRepositoryModel lastPlModel = repository.getInstance(oldModel.getRelationFileId());
PALRepositoryModel lastPlModel = repository.getInstance(oneModel.getRelationFileId());
answer = repository.updateStateOfVersionUuid(lastPlModel.getVersionId());// 更新所有的为0
answer = repository.updateUseStateOfVersionUuid(lastPlModel.getId());// 更新当前版本为使用状态
CoeProcessLevelNoCache.getInstance().reloadInBackground(lastPlModel.getWsId());
if (answer > 0) {
ro.put("id", id);
return ro.toString();
} else {
return ResponseObject.newErrResponse("使用版本更新失败").toString();
}
break;
}
}
if (answer > 0) {
ro.put("id", id);
return ro.toString();
} else {
return ResponseObject.newErrResponse("使用版本更新失败").toString();
}
}