详情和手册,角色自动带出岗位代码提交
This commit is contained in:
parent
262e0774da
commit
c02d5cda5a
@ -24,12 +24,14 @@ import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.upfile.constant.CoeFileConstant;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.upfile.dao.UpFileDao;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.upfile.model.UpfileModel;
|
||||
@ -280,6 +282,7 @@ public class Report1Gener {
|
||||
}
|
||||
prReportComment.getCommentContent2(dataMap, repositoryModel);//获取一些公共的数据(手册首页的手册岗位名称、部门、时间等)
|
||||
JSONArray repositoryShapeTable = new JSONArray();//流程步骤Table
|
||||
JSONArray roleMappingPostTable = new JSONArray();
|
||||
|
||||
|
||||
|
||||
@ -376,12 +379,14 @@ public class Report1Gener {
|
||||
int index = 1;// 流程步骤序号
|
||||
int dangerIndex = 1;// 风险序号
|
||||
int regulateIndex = 1;// 控制序号
|
||||
int roleMappingPostIndex =1;//控制序号
|
||||
for (Map<String, Object> shape : repositoryFileElements) {
|
||||
//过滤导出的图形类型
|
||||
if ("method_approval_node,method_service_node,method_approval_node3,method_service_node4,decision".indexOf((String)shape.get("type")) == -1) {
|
||||
continue;
|
||||
}
|
||||
JSONObject _tr = new JSONObject();
|
||||
JSONObject _roleMappingPostTr = new JSONObject();
|
||||
OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值
|
||||
|
||||
|
||||
@ -496,9 +501,31 @@ public class Report1Gener {
|
||||
regulateIndex = setTableValueOfControlAndRisk(attrId, repositoryId, shape.get("id").toString(), regulateTable, regulateIndex, _tr.getString(OutputWordUtil.SHAPE_NAME), relationFileMap);
|
||||
regulateSet.clear();
|
||||
}
|
||||
|
||||
//如果当前属性是role,则查询该角色有无关联岗位信息
|
||||
if("role".equals(attrId)){
|
||||
String shapeId = shape.get("id").toString();
|
||||
//查询该角色有没有保定岗位
|
||||
//先查询该UUID的角色映射关系,
|
||||
String querySqlRole = " SELECT RELATIONSHAPEID FROM APP_ACT_COE_PAL_SHAPE_RLAT WHERE SHAPEID = ? AND ATTRID = ?";
|
||||
String relationShapeId = DBSql.getString(querySqlRole, new Object[]{shapeId, "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)){
|
||||
_roleMappingPostTr.put("shape_number",roleMappingPostIndex);
|
||||
_roleMappingPostTr.put("roleMapping_role",attrValue);
|
||||
_roleMappingPostTr.put("roleMapping_post",postInfo);
|
||||
//如果存在角色关联岗位的则加个*号
|
||||
_tr.put("shape_" + attrId, "*"+attrValue.replace("\n", WRAPSTRING));
|
||||
roleMappingPostIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositoryShapeTable.add(_tr);
|
||||
if(!_roleMappingPostTr.isEmpty()){
|
||||
roleMappingPostTable.add(_roleMappingPostTr);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@ -771,7 +798,10 @@ public class Report1Gener {
|
||||
dataMap.put("metrics_count", metrics.size());//
|
||||
|
||||
dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable);
|
||||
dataMap.put("TABLE_REPOSITORY_SHAPE_COUNT", repositoryShapeTable.size());
|
||||
dataMap.put("TABLE_REPOSITORY_SHAPE_COUNT", repositoryShapeTable.size()); //roleMappingPostTable
|
||||
|
||||
dataMap.put("roleMappingPostTable", roleMappingPostTable);
|
||||
dataMap.put("roleMappingPostTableCount", roleMappingPostTable.size());
|
||||
boolean contains = isNumberAscArray.contains("false");
|
||||
if(contains) {
|
||||
fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name")));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,8 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.*;
|
||||
import com.actionsoft.bpms.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
@ -57,13 +59,6 @@ import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppProfile;
|
||||
import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.CoeProcessLevelCorrelateCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.CoeProcessLevelNoCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryAttributeCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryRemoveCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeAttributeCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeConfigCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelCorrelateDao;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||
@ -141,11 +136,6 @@ import com.actionsoft.bpms.server.conf.server.AWSServerConf;
|
||||
import com.actionsoft.bpms.server.fs.DCContext;
|
||||
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
|
||||
import com.actionsoft.bpms.server.fs.dc.DCUtil;
|
||||
import com.actionsoft.bpms.util.Base64;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.bpms.util.UtilDate;
|
||||
import com.actionsoft.bpms.util.UtilFile;
|
||||
import com.actionsoft.bpms.util.UtilString;
|
||||
import com.actionsoft.exception.AWSException;
|
||||
import com.actionsoft.exception.BPMNDefException;
|
||||
import com.actionsoft.i18n.I18nRes;
|
||||
@ -3291,6 +3281,17 @@ public class CoeDesignerWeb extends ActionWeb {
|
||||
relationShapes.getJSONObject(shapeId1).put(model.getAttrId(), relationShapes.getJSONObject(shapeId1).getString(model.getAttrId()) + "," + model.getRelationShapeText());
|
||||
} else {
|
||||
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"});
|
||||
if(UtilString.isNotEmpty(postInfo)){
|
||||
relationShapes.getJSONObject(shapeId1).put("post", postInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else if ("awsorg".equals(attrTypeMap.get(model.getAttrId()))) {
|
||||
if (relationShapes.getJSONObject(shapeId1).containsKey(model.getAttrId())) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user