增加判断当前登录是否为事业部,是展示一级部门,否则展示二级部门或者当前所在部门,增加个人视图过滤代码判断
This commit is contained in:
parent
bb3445f5a9
commit
e1fd412254
@ -42,9 +42,19 @@ public class DataViewController {
|
|||||||
public String personalView(UserContext uc, RequestParams params) {
|
public String personalView(UserContext uc, RequestParams params) {
|
||||||
return new DataViewService(uc).personalView(uc, params);
|
return new DataViewService(uc).personalView(uc, params);
|
||||||
}
|
}
|
||||||
|
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.IfSyB",
|
||||||
|
desc = "判断事业部")
|
||||||
|
public String personSyb(UserContext uc) {
|
||||||
|
return new DataViewService(uc).personalSyb(uc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_personalView_right",
|
||||||
|
desc = "个人视图_本岗位有权限的流程图")
|
||||||
|
public String personalView_right(UserContext uc, RequestParams params) {
|
||||||
|
return new DataViewService(uc).personalView_right(uc, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_queryTermsDept",
|
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_queryTermsDept",
|
||||||
desc = "筛选条件:当前用户部门、部门")
|
desc = "筛选条件:当前用户部门、部门")
|
||||||
public String queryTermsDept(UserContext uc, RequestParams params) {
|
public String queryTermsDept(UserContext uc, RequestParams params) {
|
||||||
|
|||||||
@ -145,6 +145,29 @@ public class DataViewService extends ActionWeb {
|
|||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String personalSyb(UserContext uc){
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
String pathNameOfCache = uc.getDepartmentModel().getPathNameOfCache();
|
||||||
|
if (pathNameOfCache.contains("事业部")){
|
||||||
|
String pathIdOfCache = uc.getDepartmentModel().getPathIdOfCache();
|
||||||
|
String[] split = pathIdOfCache.split("/");
|
||||||
|
ro.put("departId",split[0]);
|
||||||
|
ro.put("pathId",pathIdOfCache);
|
||||||
|
}else {
|
||||||
|
String pathIdOfCache = uc.getDepartmentModel().getPathIdOfCache();
|
||||||
|
String[] split = pathIdOfCache.split("/");
|
||||||
|
System.out.println("split>>>>>>"+split.toString());
|
||||||
|
if (split.length>=2){
|
||||||
|
ro.put("departId",split[1]);
|
||||||
|
ro.put("pathId",pathIdOfCache);
|
||||||
|
}else {
|
||||||
|
ro.put("departId",split[0]);
|
||||||
|
ro.put("pathId",pathIdOfCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @methodName:
|
* @methodName:
|
||||||
* @param:
|
* @param:
|
||||||
@ -317,8 +340,8 @@ public class DataViewService extends ActionWeb {
|
|||||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
|| null == refileRowMap.getString("POLICYTYPE")
|
|| null == refileRowMap.getString("POLICYTYPE")
|
||||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
UoPProcessMap = new HashMap<String, Object>();
|
UoPProcessMap = new HashMap<String, Object>();
|
||||||
fileType = "reRegulationFile";
|
fileType = "reRegulationFile";
|
||||||
@ -388,8 +411,8 @@ public class DataViewService extends ActionWeb {
|
|||||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
|| null == refileRowMap.getString("POLICYTYPE")
|
|| null == refileRowMap.getString("POLICYTYPE")
|
||||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
UoPProcessMap = new HashMap<String, Object>();
|
UoPProcessMap = new HashMap<String, Object>();
|
||||||
fileType = "reRegulationFile";
|
fileType = "reRegulationFile";
|
||||||
@ -594,7 +617,7 @@ public class DataViewService extends ActionWeb {
|
|||||||
String POSITION_NAME = UserContext.fromUID(uid).getUserModel().getPositionName();
|
String POSITION_NAME = UserContext.fromUID(uid).getUserModel().getPositionName();
|
||||||
if (UtilString.isNotEmpty(POSITION_NAME)) {
|
if (UtilString.isNotEmpty(POSITION_NAME)) {
|
||||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE5 WHERE POST LIKE '%"
|
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||||
+ POSITION_NAME + "%'");
|
+ POSITION_NAME + "%'");
|
||||||
for (RowMap nodeRowMap : nodeRowMaps) {
|
for (RowMap nodeRowMap : nodeRowMaps) {
|
||||||
String PLID = nodeRowMap.getString("PLID");
|
String PLID = nodeRowMap.getString("PLID");
|
||||||
@ -692,8 +715,8 @@ public class DataViewService extends ActionWeb {
|
|||||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
|| null == refileRowMap.getString("POLICYTYPE")
|
|| null == refileRowMap.getString("POLICYTYPE")
|
||||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
UoPProcessMap = new HashMap<String, Object>();
|
UoPProcessMap = new HashMap<String, Object>();
|
||||||
fileType = "reRegulationFile";
|
fileType = "reRegulationFile";
|
||||||
@ -763,8 +786,8 @@ public class DataViewService extends ActionWeb {
|
|||||||
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
if (null != refileRowMap && !refileRowMap.isEmpty()) {
|
||||||
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
if (refileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||||
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
&& (refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
|| null == refileRowMap.getString("POLICYTYPE")
|
|| null == refileRowMap.getString("POLICYTYPE")
|
||||||
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
|| refileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||||
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
// && refileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
UoPProcessMap = new HashMap<String, Object>();
|
UoPProcessMap = new HashMap<String, Object>();
|
||||||
fileType = "reRegulationFile";
|
fileType = "reRegulationFile";
|
||||||
@ -957,6 +980,483 @@ public class DataViewService extends ActionWeb {
|
|||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @methodName:
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
|
* @description:个人视图_本岗位有权限的流程
|
||||||
|
* @auther: wangcy
|
||||||
|
* @date: 2023/6/36 14:12
|
||||||
|
*/
|
||||||
|
public String personalView_right(UserContext uc, RequestParams params) {
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
String positionKeys = null;
|
||||||
|
String positionVals = null;
|
||||||
|
Integer i = -1;
|
||||||
|
String uid = params.get("uid");
|
||||||
|
String sid = _uc.getSessionId();
|
||||||
|
// 定义用户/岗位流程list,用户/岗位流程map
|
||||||
|
ArrayList<Map> UoPProcessMaps = new ArrayList<>();
|
||||||
|
HashMap<String, Object> UoPProcessMap = new HashMap<>();
|
||||||
|
ArrayList<Map> nodeMaps = new ArrayList<>();
|
||||||
|
ArrayList<Map> nodeAMaps = new ArrayList<>();
|
||||||
|
ArrayList<Map> nodeBMaps = new ArrayList<>();
|
||||||
|
HashMap<String, Object> nodeMap = new HashMap<>();
|
||||||
|
Map nodeTempMap = new HashMap<>();
|
||||||
|
ArrayList<Map> reRegulationMaps = new ArrayList<>();
|
||||||
|
ArrayList<Map> reFormMaps = new ArrayList<>();
|
||||||
|
ArrayList<Map> reIO_L4Maps = new ArrayList<>();
|
||||||
|
ArrayList<Map> reYSMaps = new ArrayList<>();
|
||||||
|
ArrayList<Map> tempMaps = new ArrayList<>();
|
||||||
|
LinkedList<Map> linksMaps = new LinkedList<>();
|
||||||
|
HashMap<String, Object> linksMap = new HashMap<>();
|
||||||
|
String path = "";
|
||||||
|
PALRepositoryModel model = null;
|
||||||
|
String taskId = "";
|
||||||
|
String fileType = "";
|
||||||
|
Integer totalNum = 0;
|
||||||
|
Integer aNum = 0;
|
||||||
|
Integer bNum = 0;
|
||||||
|
Object[] sqlParams = new Object[] {};
|
||||||
|
// List<RowMap> fileRowMaps = DBSql.getMaps("SELECT
|
||||||
|
// FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,RELEVANTFILE,SUPPORTFILE,PROCESSKPI
|
||||||
|
// FROM BO_EU_PAL_FILE1 WHERE PLMETHODID='process.epc' AND FILESTATE='1' ORDER
|
||||||
|
// BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX) ASC");
|
||||||
|
// List<RowMap> fileRowMaps1 = DBSql.getMaps("SELECT
|
||||||
|
// FILEID,PLNAME,PLMETHODID,PLLEVEL,PLORDERINDEX,RELEVANTFILE,SUPPORTFILE,PROCESSKPI
|
||||||
|
// FROM BO_EU_PAL_FILE1 WHERE PLMETHODID='process.epc' AND FILESTATE='1' ORDER
|
||||||
|
// BY PLLEVEL ASC, PLORDERINDEX ASC");
|
||||||
|
// AND FILESTATE='1' ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX)
|
||||||
|
// ASC
|
||||||
|
|
||||||
|
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();
|
||||||
|
ArrayList<String> positionNameList = new ArrayList<>();
|
||||||
|
// 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();
|
||||||
|
|
||||||
|
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 '%内蒙古伊利实业集团股份有限公司%' ");
|
||||||
|
List<RowMap> DepartnodeRowMaps = DBSql.getMaps(
|
||||||
|
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||||
|
+ departName + "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%' ");
|
||||||
|
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 + "'");
|
||||||
|
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("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(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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("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(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 + "秒");
|
||||||
|
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 = 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 (model != null) {
|
||||||
|
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||||
|
taskId = 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 = 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 = 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 = 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 = 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 = 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 = nodeReturnMap;
|
||||||
|
nodeAMaps.add(nodeTempMap);
|
||||||
|
} else if (NODETYPE.equals("method_approval_node3") || NODETYPE.equals("method_service_node4")) {
|
||||||
|
nodeTempMap = 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.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @methodName:
|
* @methodName:
|
||||||
* @param:
|
* @param:
|
||||||
@ -1239,7 +1739,7 @@ public class DataViewService extends ActionWeb {
|
|||||||
// reFileRowMap);
|
// reFileRowMap);
|
||||||
}
|
}
|
||||||
fileRowMaps = fileHandleRowMaps;
|
fileRowMaps = fileHandleRowMaps;
|
||||||
System.err.println("=======fileRowMaps========="+fileRowMaps);
|
System.err.println("=======fileRowMaps========="+fileRowMaps);
|
||||||
// 遍历选择的结果
|
// 遍历选择的结果
|
||||||
List<Map> fileMaps = new ArrayList<>();
|
List<Map> fileMaps = new ArrayList<>();
|
||||||
List<RowMap> frameRowMaps = new ArrayList<>();
|
List<RowMap> frameRowMaps = new ArrayList<>();
|
||||||
@ -1300,8 +1800,8 @@ public class DataViewService extends ActionWeb {
|
|||||||
processFileNum += 1;
|
processFileNum += 1;
|
||||||
} else if (fileRowMap.getString("PLMETHODID").equals("control.policy")
|
} else if (fileRowMap.getString("PLMETHODID").equals("control.policy")
|
||||||
&& (fileRowMap.getString("POLICYTYPE").equals("regulation")
|
&& (fileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
|| null == fileRowMap.getString("POLICYTYPE")
|
|| null == fileRowMap.getString("POLICYTYPE")
|
||||||
|| fileRowMap.getString("POLICYTYPE").equals(""))) {
|
|| fileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||||
// && fileRowMap.getString("POLICYTYPE").equals("regulation")
|
// && fileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||||
fileMap.put("fileType", "policyFile");
|
fileMap.put("fileType", "policyFile");
|
||||||
policyFileNum += 1;
|
policyFileNum += 1;
|
||||||
@ -1415,7 +1915,7 @@ public class DataViewService extends ActionWeb {
|
|||||||
|
|
||||||
// 查询所有文件
|
// 查询所有文件
|
||||||
public void getind(String dempId, String fileType, List<RowMap> fileRowMaps, ArrayList<RowMap> fileHandleRowMaps,
|
public void getind(String dempId, String fileType, List<RowMap> fileRowMaps, ArrayList<RowMap> fileHandleRowMaps,
|
||||||
Map<String, Object> reFileMap, RowMap reFileRowMap) {
|
Map<String, Object> reFileMap, RowMap reFileRowMap) {
|
||||||
fileHandleRowMaps = new ArrayList<>();
|
fileHandleRowMaps = new ArrayList<>();
|
||||||
if (null != fileRowMaps && !fileRowMaps.isEmpty()) {
|
if (null != fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||||
for (RowMap fileRowMap : fileRowMaps) {
|
for (RowMap fileRowMap : fileRowMaps) {
|
||||||
@ -1506,7 +2006,7 @@ public class DataViewService extends ActionWeb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getArrt(String name, PALRepositoryModel model, String dempId, Integer PLLEVEL, RowMap reFileRowMap,
|
public void getArrt(String name, PALRepositoryModel model, String dempId, Integer PLLEVEL, RowMap reFileRowMap,
|
||||||
ArrayList<RowMap> fileHandleRowMaps) {
|
ArrayList<RowMap> fileHandleRowMaps) {
|
||||||
// 支持相关文件
|
// 支持相关文件
|
||||||
List<DesignerShapeRelationModel> support_filesList = DesignerShapeRelationCache.getListByAttrId(model.getId(),
|
List<DesignerShapeRelationModel> support_filesList = DesignerShapeRelationCache.getListByAttrId(model.getId(),
|
||||||
"", name);
|
"", name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user