优化角色对应岗位逻辑

This commit is contained in:
yujh 2024-11-01 17:29:37 +08:00
parent bfd6504439
commit acc8f8d4f7

View File

@ -3283,9 +3283,12 @@ public class CoeDesignerWeb extends ActionWeb {
relationShapes.getJSONObject(shapeId1).put(model.getAttrId(), model.getRelationShapeText());
//增加角色自动获取岗位逻辑
if(model.getAttrId().equals("role")){
//查询该角色有没有保定岗位
String querySql = " SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT WHERE FILEID = ? AND SHAPEID = ? AND ATTRID = ?";
String postInfo = DBSql.getString(querySql, new Object[]{model.getRelationFileId(), model.getRelationShapeId(), "post"});
//先查询该UUID的角色映射关系
String querySqlRole = " SELECT RELATIONSHAPEID FROM APP_ACT_COE_PAL_SHAPE_RLAT WHERE SHAPEID = ? AND ATTRID = ?";
String relationShapeId = DBSql.getString(querySqlRole, new Object[]{model.getRelationShapeId(), "role"});
String querySql = " SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT WHERE SHAPEID = ? AND ATTRID = ?";
String postInfo = DBSql.getString(querySql, new Object[]{relationShapeId, "post"});
//查询该角色有没有绑定岗位
if(UtilString.isNotEmpty(postInfo)){
relationShapes.getJSONObject(shapeId1).put("post", postInfo);
}