岗位说明书-非发布状态的不显示
This commit is contained in:
parent
ebf4a754de
commit
bd3dbafcc6
@ -18,6 +18,8 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.Design
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
||||
import com.actionsoft.bpms.server.RequestParams;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -31,7 +33,9 @@ import com.actionsoft.bpms.util.UtilString;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import com.actionsoft.sdk.local.api.internal.PlatformAPIImpl;
|
||||
import com.awspaas.user.apps.yili.reportform.util.RepositoryAttribute;
|
||||
import com.awspaas.user.apps.yili.reportform.util.TaskUtil;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.xlsx4j.sml.Row;
|
||||
|
||||
import static com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil.getLastPublishTaskIdByModelId;
|
||||
import static java.util.stream.Collectors.collectingAndThen;
|
||||
@ -249,13 +253,14 @@ public class Report1Gener {
|
||||
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,ITSYSVAL,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName()+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName()+ "%'");
|
||||
|
||||
for (RowMap rowMap:
|
||||
nodeRowMaps) {
|
||||
Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(rowMap.getString("PLID"));
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(rowMap.getString("PLID"));
|
||||
if (palRepositoryModel.isPublish()) {
|
||||
RowMap plid = DBSql.getMap("select * from app_act_coe_pal_repository where ID = '" + rowMap.getString("PLID") + "'");
|
||||
if (palRepositoryModel.isPublish()&&plid.getString("ISSTOP").equals("0")) {
|
||||
JSONObject _tr = new JSONObject();
|
||||
_tr.put(OutputWordUtil.SERIAL_NUMBER, index); // 序号
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME, rowMap.getString("PLNAME")); // 流程名称
|
||||
@ -314,8 +319,6 @@ public class Report1Gener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (_table.size() == 0) {
|
||||
JSONObject _tr = new JSONObject();
|
||||
//_table = getEmptyTable("process.bpmn2");
|
||||
@ -324,6 +327,7 @@ public class Report1Gener {
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME, ""); // 流程名称
|
||||
_tr.put(OutputWordUtil.SERIAL_NUMBER, "");
|
||||
_tr.put(OutputWordUtil.SHAPE_DESC, ""); // 工作详细描述
|
||||
_tr.put(OutputWordUtil.SHAPE_ITSYSTEM, ""); // 系统名称
|
||||
_tr.put("shape_role", ""); // 工作详细描述
|
||||
_tr.put(OutputWordUtil.SHAPE_KPI, "");
|
||||
_tr.put(OutputWordUtil.SHAPE_INSTITUTION, "");
|
||||
@ -359,18 +363,23 @@ public class Report1Gener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 这个是获取岗位中的活动数
|
||||
* @param uc
|
||||
* @return
|
||||
*/
|
||||
public JSONObject personalView_right(UserContext uc) {
|
||||
System.out.println("uc>>>>>>>>"+uc.getUID());
|
||||
JSONObject ro = new JSONObject(new LinkedHashMap<>());
|
||||
public ResponseObject personalView(UserContext uc, RequestParams params) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
String positionKeys = null;
|
||||
String positionVals = null;
|
||||
ArrayList<String> positionIDs = new ArrayList<>();
|
||||
Integer i = -1;
|
||||
String uid = uc.getUID();
|
||||
while (true) {
|
||||
i++;
|
||||
positionKeys = "position" + "[" + i + "]";
|
||||
positionVals = params.get(positionKeys);
|
||||
if (null != positionVals && !positionVals.equals("")) {
|
||||
positionIDs.add(positionVals);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
String uid = params.get("uid");
|
||||
String sid = uc.getSessionId();
|
||||
// 定义用户/岗位流程list,用户/岗位流程map
|
||||
ArrayList<Map> UoPProcessMaps = new ArrayList<>();
|
||||
@ -406,6 +415,7 @@ public class Report1Gener {
|
||||
// AND FILESTATE='1' ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX)
|
||||
// ASC
|
||||
|
||||
if (null != positionIDs && !positionIDs.isEmpty()) {
|
||||
UoPProcessMaps = new ArrayList<Map>();
|
||||
nodeMaps = new ArrayList<Map>();
|
||||
linksMaps = new LinkedList<Map>();
|
||||
@ -417,21 +427,22 @@ public class Report1Gener {
|
||||
UoPProcessMaps.add(UoPProcessMap);
|
||||
long start = System.currentTimeMillis();
|
||||
ArrayList<String> positionNameList = new ArrayList<>();
|
||||
for (String positionID : positionIDs) {
|
||||
RowMap POSITIONMap = DBSql.getMap("SELECT POSITION_NAME FROM ORGUSER WHERE POSITION_NO= '"+positionID+"'");
|
||||
if (null != POSITIONMap && !POSITIONMap.isEmpty()) {
|
||||
String positionName = POSITIONMap.getString("POSITION_NAME");
|
||||
// if (nodeRowMap.getString("ROLE").equals(positionID) ||
|
||||
// nodeRowMap.getString("POST").equals(positionID)) {
|
||||
String positionName = UserContext.fromUID(uid).getUserModel().getPositionName();
|
||||
String departName = UserContext.fromUID(uid).getDepartmentModel().getName();
|
||||
DepartmentModel departId = uc.getDepartmentModel();
|
||||
String subDepartments = getSubDepartments(new ArrayList<>(), departId);
|
||||
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME,ITSYSVAL FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName + "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%' ");
|
||||
List<RowMap> DepartnodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME,ITSYSVAL FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ departName + "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%' ");
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName + "%' ");
|
||||
System.out.println("=========nodeRowMaps========>"+nodeRowMaps);
|
||||
System.out.println("=========DepartnodeRowMaps========>"+DepartnodeRowMaps);
|
||||
for (RowMap nodeRowMap : nodeRowMaps) {
|
||||
String plId = nodeRowMap.getString("PLID");
|
||||
|
||||
RowMap fileRowMap = DBSql.getMap(
|
||||
"SELECT FILESTATE,FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,RELEVANTFILE,SUPPORTFILE,PROCESSKPI FROM BO_EU_PAL_FILE1 WHERE FILEID = '"
|
||||
+ plId + "'");
|
||||
@ -440,7 +451,7 @@ public class Report1Gener {
|
||||
continue;
|
||||
}
|
||||
nodeMap = new HashMap<String, Object>();
|
||||
taskId = getLastPublishTaskIdByModelId(plId);
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(plId);
|
||||
/*
|
||||
* model = PALRepositoryCache.getCache().get(plId); if (null != model) { if
|
||||
* (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册 } }
|
||||
@ -449,7 +460,6 @@ public class Report1Gener {
|
||||
+ "uuid=" + plId + "&" + "sid=" + sid + "&" + "taskId="
|
||||
+ taskId;
|
||||
nodeMap.put("NODENAME", nodeRowMap.getString("NODENAME"));
|
||||
nodeMap.put("PLID", plId);
|
||||
nodeMap.put("PLNAME", nodeRowMap.getString("PLNAME"));
|
||||
nodeMap.put("NODETYPE", nodeRowMap.getString("NODETYPE"));
|
||||
nodeMap.put("path", path);
|
||||
@ -457,7 +467,6 @@ public class Report1Gener {
|
||||
nodeMap.put("ACTIVITYDESC", nodeRowMap.getString("ACTIVITYDESC"));
|
||||
nodeMap.put("ROLENAME", nodeRowMap.getString("ROLE"));
|
||||
nodeMap.put("POSTNAME", nodeRowMap.getString("POST"));
|
||||
nodeMap.put("ITSYSVAL", nodeRowMap.getString("ITSYSVAL"));
|
||||
nodeMaps.add(nodeMap);
|
||||
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
@ -482,62 +491,11 @@ public class Report1Gener {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (RowMap nodeRowMap : DepartnodeRowMaps) {
|
||||
String plId = nodeRowMap.getString("PLID");
|
||||
RowMap fileRowMap = DBSql.getMap(
|
||||
"SELECT FILESTATE,FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,RELEVANTFILE,SUPPORTFILE,PROCESSKPI FROM BO_EU_PAL_FILE1 WHERE FILEID = '"
|
||||
+ plId + "'");
|
||||
if (fileRowMap != null) {
|
||||
if ("0".equals(fileRowMap.getString("FILESTATE"))) {
|
||||
continue;
|
||||
}
|
||||
nodeMap = new HashMap<String, Object>();
|
||||
taskId = getLastPublishTaskIdByModelId(plId);
|
||||
/*
|
||||
* model = PALRepositoryCache.getCache().get(plId); if (null != model) { if
|
||||
* (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册 } }
|
||||
*/
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + plId + "&" + "sid=" + sid + "&" + "taskId="
|
||||
+ taskId;
|
||||
nodeMap.put("PLID", plId);
|
||||
nodeMap.put("NODENAME", nodeRowMap.getString("NODENAME"));
|
||||
nodeMap.put("PLNAME", nodeRowMap.getString("PLNAME"));
|
||||
nodeMap.put("NODETYPE", nodeRowMap.getString("NODETYPE"));
|
||||
nodeMap.put("path", path);
|
||||
nodeMap.put("ACTIVITYNUMBER", nodeRowMap.getString("ACTIVITYNUMBER"));
|
||||
nodeMap.put("ACTIVITYDESC", nodeRowMap.getString("ACTIVITYDESC"));
|
||||
nodeMap.put("ROLENAME", nodeRowMap.getString("ROLE"));
|
||||
nodeMap.put("POSTNAME", nodeRowMap.getString("POST"));
|
||||
nodeMap.put("ITSYSVAL", nodeRowMap.getString("ITSYSVAL"));
|
||||
nodeMaps.add(nodeMap);
|
||||
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "process";
|
||||
/*
|
||||
* model = PALRepositoryCache.getCache().get(fileRowMap.getString("FILEID")); if
|
||||
* (null != model) { if (model.isPublish() || model.isStop()) {//
|
||||
* 停用或已发布状态查询最新流程手册 taskId = getLastPublishTaskIdByModelId(model.getId()); } }
|
||||
*/
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + fileRowMap.getString("FILEID") + "&" + "sid=" + sid + "&" + "taskId="
|
||||
+ taskId;
|
||||
UoPProcessMap.put("id", fileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", fileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("RELEVANTFILE", fileRowMap.getString("RELEVANTFILE"));
|
||||
UoPProcessMap.put("SUPPORTFILE", fileRowMap.getString("SUPPORTFILE"));
|
||||
UoPProcessMap.put("PROCESSKPI", fileRowMap.getString("PROCESSKPI"));
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", rootuuId);
|
||||
UoPProcessMaps.add(UoPProcessMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
System.err.println("个人视图(有权限的流程)查询用时=========>" + (end - start) / 1000 + "秒");
|
||||
System.err.println("个人视图(岗位流程)查询用时=========>" + (end - start) / 1000 + "秒");
|
||||
UoPProcessMaps = UoPProcessMaps.stream()
|
||||
.collect(collectingAndThen(
|
||||
toCollection(() -> new TreeSet<>(Comparator.comparing(o -> String.valueOf(o.get("id"))))),
|
||||
@ -549,6 +507,7 @@ public class Report1Gener {
|
||||
ro.put("nodes", UoPProcessMaps);
|
||||
linksMaps = new LinkedList<Map>();
|
||||
ro.put("links", linksMaps);
|
||||
ro.info("您所查询的岗位暂无需执行的流程");
|
||||
|
||||
} else {
|
||||
for (Map uoPProcessMap : UoPProcessMaps) {
|
||||
@ -580,7 +539,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -598,7 +557,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (model != null) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -617,7 +576,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -651,7 +610,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -669,7 +628,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -688,7 +647,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
@ -717,7 +676,7 @@ public class Report1Gener {
|
||||
model = PALRepositoryCache.getCache().get(PROCESSKPIID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open"
|
||||
@ -804,6 +763,7 @@ public class Report1Gener {
|
||||
ro.put("nodes", UoPProcessMaps);
|
||||
linksMaps = new LinkedList<Map>();
|
||||
ro.put("links", linksMaps);
|
||||
ro.info("您所查询的岗位暂无需执行的流程");
|
||||
|
||||
}
|
||||
}
|
||||
@ -833,6 +793,387 @@ public class Report1Gener {
|
||||
ro.put("typeB", nodeBMaps);
|
||||
|
||||
// 岗位流程/我的流程
|
||||
} else {
|
||||
int count = 0;
|
||||
UoPProcessMaps = new ArrayList<Map>();
|
||||
nodeMaps = new ArrayList<Map>();
|
||||
linksMaps = new LinkedList<Map>();
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
String rootuuId = SDK.getRuleAPI().executeAtScript("@uuid()");
|
||||
UoPProcessMap.put("id", rootuuId);
|
||||
UoPProcessMap.put("text", "我的流程");
|
||||
UoPProcessMap.put("fileType", "UoPProcess");
|
||||
UoPProcessMaps.add(UoPProcessMap);
|
||||
long start = System.currentTimeMillis();
|
||||
String POSITION_NAME = UserContext.fromUID(uid).getUserModel().getPositionName();
|
||||
if (UtilString.isNotEmpty(POSITION_NAME)) {
|
||||
DepartmentModel departId = uc.getDepartmentModel();
|
||||
String subDepartments = getSubDepartments(new ArrayList<>(), departId);
|
||||
|
||||
|
||||
|
||||
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ POSITION_NAME + "%' ");
|
||||
for (RowMap nodeRowMap : nodeRowMaps) {
|
||||
String PLID = nodeRowMap.getString("PLID");
|
||||
RowMap fileRowMap = DBSql.getMap(
|
||||
"SELECT FILESTATE,FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,RELEVANTFILE,SUPPORTFILE,PROCESSKPI FROM BO_EU_PAL_FILE1 WHERE FILEID = '"
|
||||
+ PLID + "'");
|
||||
count++;
|
||||
if (fileRowMap != null) {
|
||||
if ("0".equals(fileRowMap.getString("FILESTATE"))) {
|
||||
continue;
|
||||
}
|
||||
// if (nodeRowMap.getString("ROLE").equals(positionID) ||
|
||||
// nodeRowMap.getString("POST").equals(positionID)) {
|
||||
nodeMap = new HashMap<String, Object>();
|
||||
model = PALRepositoryCache.getCache().get(nodeRowMap.getString("PLID"));
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + nodeRowMap.getString("PLID") + "&" + "sid=" + sid + "&" + "taskId="
|
||||
+ taskId;
|
||||
nodeMap.put("NODENAME", nodeRowMap.getString("NODENAME"));
|
||||
nodeMap.put("PLNAME", nodeRowMap.getString("PLNAME"));
|
||||
nodeMap.put("NODETYPE", nodeRowMap.getString("NODETYPE"));
|
||||
nodeMap.put("path", path);
|
||||
nodeMap.put("ACTIVITYNUMBER", nodeRowMap.getString("ACTIVITYNUMBER"));
|
||||
nodeMap.put("ACTIVITYDESC", nodeRowMap.getString("ACTIVITYDESC"));
|
||||
nodeMap.put("ROLENAME", nodeRowMap.getString("ROLE"));
|
||||
nodeMap.put("POSTNAME", nodeRowMap.getString("POST"));
|
||||
nodeMaps.add(nodeMap);
|
||||
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "process";
|
||||
model = PALRepositoryCache.getCache().get(PLID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + PLID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", PLID);
|
||||
UoPProcessMap.put("text", fileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("RELEVANTFILE", fileRowMap.getString("RELEVANTFILE"));
|
||||
UoPProcessMap.put("SUPPORTFILE", fileRowMap.getString("SUPPORTFILE"));
|
||||
UoPProcessMap.put("PROCESSKPI", fileRowMap.getString("PROCESSKPI"));
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", rootuuId);
|
||||
UoPProcessMaps.add(UoPProcessMap);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
ro.info("当前用户未设置岗位");
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
System.err.println("个人视图(我的流程)查询用时=========>" + (end - start) / 1000 + "秒");
|
||||
UoPProcessMaps = UoPProcessMaps.stream()
|
||||
.collect(collectingAndThen(
|
||||
toCollection(() -> new TreeSet<>(Comparator.comparing(o -> String.valueOf(o.get("id"))))),
|
||||
ArrayList::new));
|
||||
tempMaps = new ArrayList<Map>();
|
||||
|
||||
if (nodeMaps.size() == 0) {
|
||||
ro.put("rootId", "");
|
||||
UoPProcessMaps = new ArrayList<Map>();
|
||||
ro.put("nodes", UoPProcessMaps);
|
||||
linksMaps = new LinkedList<Map>();
|
||||
ro.put("links", linksMaps);
|
||||
ro.info("您的岗位暂无需执行的流程");
|
||||
} else {
|
||||
for (Map uoPProcessMap : UoPProcessMaps) {
|
||||
reRegulationMaps = new ArrayList<>();
|
||||
reFormMaps = new ArrayList<>();
|
||||
reIO_L4Maps = new ArrayList<>();
|
||||
reYSMaps = new ArrayList<>();
|
||||
String FILEID = String.valueOf(uoPProcessMap.get("id"));
|
||||
fileType = String.valueOf(uoPProcessMap.get("fileType"));
|
||||
if (fileType.equals("process")) {
|
||||
String RELEVANTFILE = String.valueOf(uoPProcessMap.get("RELEVANTFILE"));
|
||||
String SUPPORTFILE = String.valueOf(uoPProcessMap.get("SUPPORTFILE"));
|
||||
String PROCESSKPI = String.valueOf(uoPProcessMap.get("PROCESSKPI"));
|
||||
if (null != RELEVANTFILE && !RELEVANTFILE.equals("")) {
|
||||
String[] reFileIDs = RELEVANTFILE.split(" ");
|
||||
for (String reFileID : reFileIDs) {
|
||||
sqlParams = new Object[] { reFileID };
|
||||
RowMap refileRowMap = DBSql.getMap(
|
||||
"SELECT FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,POLICYTYPE FROM BO_EU_PAL_FILE1 WHERE FILEID=?",
|
||||
sqlParams);
|
||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||
|| null == refileRowMap.getString("POLICYTYPE")
|
||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reRegulationFile";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reRegulation");
|
||||
reRegulationMaps.add(UoPProcessMap);
|
||||
} else if (refileRowMap.getString("PLMETHODID").equals("data.form")) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reFormFile";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reForm");
|
||||
reFormMaps.add(UoPProcessMap);
|
||||
} else if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||
&& refileRowMap.getString("POLICYTYPE").equals("I/O_L4")) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reI/O_L4File";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reI/O_L4");
|
||||
reIO_L4Maps.add(UoPProcessMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null != SUPPORTFILE && !SUPPORTFILE.equals("")) {
|
||||
String[] reFileIDs = SUPPORTFILE.split(" ");
|
||||
for (String reFileID : reFileIDs) {
|
||||
sqlParams = new Object[] { reFileID };
|
||||
RowMap refileRowMap = DBSql.getMap(
|
||||
"SELECT FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,POLICYTYPE FROM BO_EU_PAL_FILE1 WHERE FILEID=?",
|
||||
sqlParams);
|
||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||
|| null == refileRowMap.getString("POLICYTYPE")
|
||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reRegulationFile";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reRegulation");
|
||||
reRegulationMaps.add(UoPProcessMap);
|
||||
} else if (refileRowMap.getString("PLMETHODID").equals("data.form")) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reFormFile";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reForm");
|
||||
reFormMaps.add(UoPProcessMap);
|
||||
} else if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||
&& refileRowMap.getString("POLICYTYPE").equals("I/O_L4")) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "reI/O_L4File";
|
||||
model = PALRepositoryCache.getCache().get(reFileID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?"
|
||||
+ "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&"
|
||||
+ "uuid=" + reFileID + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reI/O_L4");
|
||||
reIO_L4Maps.add(UoPProcessMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null != PROCESSKPI && !PROCESSKPI.equals("")) {
|
||||
String[] PROCESSKPIIDS = PROCESSKPI.split(" ");
|
||||
for (String PROCESSKPIID : PROCESSKPIIDS) {
|
||||
sqlParams = new Object[] { PROCESSKPIID };
|
||||
RowMap refileRowMap = DBSql.getMap(
|
||||
"SELECT FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,POLICYTYPE FROM BO_EU_PAL_FILE1 WHERE FILEID=?",
|
||||
sqlParams);
|
||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
fileType = "processKPIFile";
|
||||
model = PALRepositoryCache.getCache().get(PROCESSKPIID);
|
||||
if (null != model) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open"
|
||||
+ "&" + "uuid=" + PROCESSKPIID + "&" + "sid=" + sid + "&" + "taskId="
|
||||
+ taskId;
|
||||
UoPProcessMap.put("id", FILEID + refileRowMap.getString("FILEID"));
|
||||
UoPProcessMap.put("text", refileRowMap.getString("PLNAME"));
|
||||
UoPProcessMap.put("path", path);
|
||||
UoPProcessMap.put("fileType", fileType);
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reProcessKPI");
|
||||
reYSMaps.add(UoPProcessMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null != reRegulationMaps && !reRegulationMaps.isEmpty()) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
UoPProcessMap.put("id", FILEID + "reRegulation");
|
||||
UoPProcessMap.put("text", "相关制度");
|
||||
UoPProcessMap.put("fileType", "reRegulation");
|
||||
UoPProcessMap.put("PARENTID", FILEID);
|
||||
reRegulationMaps.add(UoPProcessMap);
|
||||
}
|
||||
if (null != reFormMaps && !reFormMaps.isEmpty()) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
UoPProcessMap.put("id", FILEID + "reForm");
|
||||
UoPProcessMap.put("text", "相关表单");
|
||||
UoPProcessMap.put("fileType", "reForm");
|
||||
UoPProcessMap.put("PARENTID", FILEID);
|
||||
reFormMaps.add(UoPProcessMap);
|
||||
}
|
||||
if (null != reIO_L4Maps && !reIO_L4Maps.isEmpty()) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
UoPProcessMap.put("id", FILEID + "reI/O_L4");
|
||||
UoPProcessMap.put("text", "相关操作指导");
|
||||
UoPProcessMap.put("fileType", "reI/O_L4");
|
||||
UoPProcessMap.put("PARENTID", FILEID);
|
||||
reIO_L4Maps.add(UoPProcessMap);
|
||||
}
|
||||
if (null != reYSMaps && !reYSMaps.isEmpty()) {
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
UoPProcessMap.put("id", FILEID + "reYS");
|
||||
UoPProcessMap.put("text", "相关要素");
|
||||
UoPProcessMap.put("fileType", "reYS");
|
||||
UoPProcessMap.put("PARENTID", FILEID);
|
||||
reYSMaps.add(UoPProcessMap);
|
||||
UoPProcessMap = new HashMap<String, Object>();
|
||||
UoPProcessMap.put("id", FILEID + "reProcessKPI");
|
||||
UoPProcessMap.put("text", "绩效");
|
||||
UoPProcessMap.put("fileType", "reProcessKPI");
|
||||
UoPProcessMap.put("PARENTID", FILEID + "reYS");
|
||||
reYSMaps.add(UoPProcessMap);
|
||||
}
|
||||
tempMaps.addAll(reRegulationMaps);
|
||||
tempMaps.addAll(reFormMaps);
|
||||
tempMaps.addAll(reIO_L4Maps);
|
||||
tempMaps.addAll(reYSMaps);
|
||||
}
|
||||
}
|
||||
// 所有数据
|
||||
UoPProcessMaps.addAll(tempMaps);
|
||||
if (UoPProcessMaps.size() > 1) {
|
||||
for (Map uoPProcessMap : UoPProcessMaps) {
|
||||
if (String.valueOf(uoPProcessMap.get("fileType")).equals("UoPProcess")) {
|
||||
ro.put("rootId", String.valueOf(uoPProcessMap.get("id")));
|
||||
}
|
||||
}
|
||||
ro.put("nodes", UoPProcessMaps);
|
||||
for (Map uoPProcessMap : UoPProcessMaps) {
|
||||
String id = String.valueOf(uoPProcessMap.get("id"));
|
||||
for (Map pProcessMap : UoPProcessMaps) {
|
||||
String PARENTID = String.valueOf(pProcessMap.get("PARENTID"));
|
||||
if (id.equals(PARENTID)) {
|
||||
String childID = String.valueOf(pProcessMap.get("id"));
|
||||
linksMap = new LinkedHashMap<String, Object>();
|
||||
linksMap.put("from", id);
|
||||
linksMap.put("to", childID);
|
||||
linksMaps.add(linksMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
ro.put("links", linksMaps);
|
||||
} else {
|
||||
ro.put("rootId", "");
|
||||
UoPProcessMaps = new ArrayList<Map>();
|
||||
ro.put("nodes", UoPProcessMaps);
|
||||
linksMaps = new LinkedList<Map>();
|
||||
ro.put("links", linksMaps);
|
||||
ro.info("您的岗位暂无需执行的流程");
|
||||
}
|
||||
}
|
||||
nodeAMaps = new ArrayList<>();
|
||||
nodeBMaps = new ArrayList<>();
|
||||
if (null != nodeMaps && !nodeMaps.isEmpty()) {
|
||||
for (Map nodeReturnMap : nodeMaps) {
|
||||
nodeTempMap = new HashMap<String, Object>();
|
||||
String NODETYPE = String.valueOf(nodeReturnMap.get("NODETYPE"));
|
||||
if (NODETYPE.equals("method_approval_node") || NODETYPE.equals("method_service_node")) {
|
||||
nodeTempMap.putAll(nodeReturnMap);
|
||||
nodeAMaps.add(nodeTempMap);
|
||||
} else if (NODETYPE.equals("method_approval_node3") || NODETYPE.equals("method_service_node4")) {
|
||||
nodeTempMap.putAll(nodeReturnMap);
|
||||
nodeBMaps.add(nodeTempMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
totalNum = nodeMaps.size();
|
||||
aNum = nodeAMaps.size();
|
||||
bNum = nodeBMaps.size();
|
||||
ro.put("totalNodeNum", totalNum);
|
||||
ro.put("totalNode", nodeMaps);
|
||||
ro.put("typeANum", aNum);
|
||||
ro.put("typeA", nodeAMaps);
|
||||
ro.put("typeBNum", bNum);
|
||||
ro.put("typeB", nodeBMaps);
|
||||
|
||||
}
|
||||
return ro;
|
||||
}
|
||||
|
||||
@ -974,4 +1315,27 @@ public class Report1Gener {
|
||||
}
|
||||
/**********************关联AWS组织的excel处理***************************/
|
||||
|
||||
|
||||
public String getSubDepartments( ArrayList<String> arr,
|
||||
DepartmentModel departmentById) {
|
||||
String departName = "";
|
||||
if (!departmentById.isClosed()) {
|
||||
List<DepartmentModel> subDepartments = SDK.getORGAPI().getSubDepartments(departmentById.getId());
|
||||
for (DepartmentModel departmentModel : subDepartments) {
|
||||
if (!departmentModel.isClosed()) {
|
||||
String name = departmentModel.getName();
|
||||
String id = departmentModel.getId();
|
||||
departName+=name+",";
|
||||
// 递归获取子部门下的子部门
|
||||
if (SDK.getORGAPI().isExistSubDepartment(id)) {
|
||||
getSubDepartments( arr, SDK.getORGAPI().getDepartmentById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return departName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -205,12 +205,13 @@ public class Report2Gener {
|
||||
List<String> lists = new LinkedList<>();
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,ITSYSVAL,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName()+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName()+ "%'");
|
||||
for (RowMap rowMap:
|
||||
nodeRowMaps) {
|
||||
String plid = rowMap.getString("PLID");
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plid);
|
||||
if (!lists.contains(plid)&&!palRepositoryModel.isStop()){
|
||||
RowMap plid_s= DBSql.getMap("select * from app_act_coe_pal_repository where ID = '" + rowMap.getString("PLID") + "'");
|
||||
if (!lists.contains(plid)&&palRepositoryModel.isPublish()&&plid_s.getString("ISSTOP").equals("0")){
|
||||
lists.add(plid);
|
||||
}
|
||||
}
|
||||
@ -219,6 +220,22 @@ public class Report2Gener {
|
||||
orReportComment.getCommentContent(dataMap, shapesMap, shapeId,userId); //获取一些公共的数据(手册首页的手册岗位名称、部门、公司、时间、岗位职责等)
|
||||
System.out.println("size>>>>>>>>"+lists.size());
|
||||
JSONArray positionTable = new JSONArray(); //列表数据
|
||||
if (lists.size()==0){
|
||||
|
||||
JSONArray repositoryTable = new JSONArray(); //相关流程
|
||||
JSONArray repositoryShapeTable = new JSONArray(); //流程步骤
|
||||
JSONArray institutionTable = new JSONArray(); //相关制度
|
||||
JSONArray formTable = new JSONArray(); //相关表单
|
||||
JSONArray itsystemTable = new JSONArray(); //相关IT系统
|
||||
JSONArray KPITable = new JSONArray(); //相关绩效考核
|
||||
|
||||
|
||||
|
||||
//这个代码是为了解决 岗位参与执行的流程存储
|
||||
JSONObject _tr = new JSONObject(new LinkedHashMap<>());
|
||||
_tr.put("nums", 1);
|
||||
|
||||
}
|
||||
for (int q =0;q< lists.size();q++){
|
||||
|
||||
|
||||
@ -251,7 +268,7 @@ public class Report2Gener {
|
||||
|
||||
List<RowMap> nodeRowMaps_shape = DBSql.getMaps(
|
||||
"SELECT * FROM (SELECT NODEID,NODENAME,ITSYSVAL,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName() + "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%') WHERE PLID = '" + lists.get(q) + "'");
|
||||
+ UserContext.fromUID(userId).getUserModel().getPositionName() + "%') WHERE PLID = '" + lists.get(q) + "'");
|
||||
int m = 1;
|
||||
for (RowMap rowMap :
|
||||
nodeRowMaps_shape) {
|
||||
@ -576,7 +593,6 @@ public class Report2Gener {
|
||||
if (relationFileId.equals("")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
List<DesignerShapeRelationModel> relationModelList = dao.getModelListByRelationShapeId(relationFileId, "00000000-0000-0000-0000-000000000000"); // 关联信息
|
||||
if (relationModelList != null && relationModelList.size() > 0) {
|
||||
PALRepositoryModel relationModel = (PALRepositoryModel) CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(relationFileId);
|
||||
|
||||
@ -11,7 +11,9 @@ import java.util.Set;
|
||||
|
||||
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.designer.util.ShapeUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
@ -63,19 +65,29 @@ public class OrReportComment {
|
||||
String positionName = userContext.getUserModel().getPositionName();
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
+ positionName+ "%' ");
|
||||
List<RowMap> nodeRowMap_process = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
+ positionName+ "%'");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (RowMap rowMap:
|
||||
nodeRowMap_process) {
|
||||
String plid = rowMap.getString("PLID");
|
||||
if (!list.contains(plid)){
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(rowMap.getString("PLID"));
|
||||
if (!list.contains(plid)&&palRepositoryModel.isPublish()&&!palRepositoryModel.isStop()){
|
||||
list.add(plid);
|
||||
}
|
||||
}
|
||||
dataMap.put("activity_nums", nodeRowMaps.size());// 参数的活动数
|
||||
List<RowMap> list1 = new ArrayList<>();
|
||||
for (RowMap rowMap:
|
||||
nodeRowMaps) {
|
||||
String plid = rowMap.getString("PLID");
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(rowMap.getString("PLID"));
|
||||
if (palRepositoryModel.isPublish()){
|
||||
list1.add(rowMap);
|
||||
}
|
||||
}
|
||||
dataMap.put("activity_nums", list1.size());// 参数的活动数
|
||||
dataMap.put("process_nums", list.size());// 参与的流程数
|
||||
dataMap.put(OutputWordUtil.COMPANY, "公司"); //所属公司
|
||||
//创建日期
|
||||
|
||||
Loading…
Reference in New Issue
Block a user