Commit 95364fc2 authored by chenzhao's avatar chenzhao

修改待办route_path

parent b0ba3857
...@@ -676,8 +676,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -676,8 +676,6 @@ public class CommonServiceImpl implements ICommonService {
if (collect == null || collect.size() == 0) { if (collect == null || collect.size() == 0) {
return null; return null;
} }
collect.get(0).setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); collect.get(0).setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
collect.get(0).setFlowStatusLabel(params.get("flowStatusLabel").toString()); collect.get(0).setFlowStatusLabel(params.get("flowStatusLabel").toString());
collect.get(0).setTaskStatus(Integer.valueOf(params.get("taskStatus").toString())); collect.get(0).setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
...@@ -691,12 +689,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -691,12 +689,6 @@ public class CommonServiceImpl implements ICommonService {
// String tarUrl = url.replaceFirst("&executeUserIds=", ""); // String tarUrl = url.replaceFirst("&executeUserIds=", "");
// tarUrl+"&executeUserIds=" // tarUrl+"&executeUserIds="
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]); // model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
//当流程完成时将所有待办状态统一修改为已完成 //当流程完成时将所有待办状态统一修改为已完成
if (collect.get(0).getFlowStatusLabel().equals(FlowStatusEnum.TO_BE_FINISHED.getName())){ if (collect.get(0).getFlowStatusLabel().equals(FlowStatusEnum.TO_BE_FINISHED.getName())){
...@@ -710,7 +702,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -710,7 +702,7 @@ public class CommonServiceImpl implements ICommonService {
} }
List<Map> urlList = JsonUtils.getResourceList(urlInfo); List<Map> urlList = JsonUtils.getResourceList(urlInfo);
for (Map map : urlList) { for (Map map : urlList) {
if (map.get("type").equals(jsonObject.getString("taskType")) && map.get("pageType").equals("look")) { if (map.get("type").equals(collect.get(0).getTaskType()) && map.get("pageType").equals("look")) {
urlParams = map.get("url").toString().replace("{roleIds}", jsonObject.getString("nextExecuteUser")) + urlParams + "&nextExecuteUserIds=" + jsonObject.getString("executeUserIds"); urlParams = map.get("url").toString().replace("{roleIds}", jsonObject.getString("nextExecuteUser")) + urlParams + "&nextExecuteUserIds=" + jsonObject.getString("executeUserIds");
break; break;
} }
...@@ -721,7 +713,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -721,7 +713,6 @@ public class CommonServiceImpl implements ICommonService {
taskV2Model.setTaskStatus(FlowStatusEnum.TO_BE_FINISHED.getCode()); taskV2Model.setTaskStatus(FlowStatusEnum.TO_BE_FINISHED.getCode());
taskV2Model.setFlowStatusLabel((FlowStatusEnum.TO_BE_FINISHED.getName())); taskV2Model.setFlowStatusLabel((FlowStatusEnum.TO_BE_FINISHED.getName()));
taskV2Model.setFlowStatus(FlowStatusEnum.TO_BE_FINISHED.getCode()); taskV2Model.setFlowStatus(FlowStatusEnum.TO_BE_FINISHED.getCode());
} }
Systemctl.taskV2Client.batchUpdate(collect); Systemctl.taskV2Client.batchUpdate(collect);
}else { }else {
...@@ -729,10 +720,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -729,10 +720,6 @@ public class CommonServiceImpl implements ICommonService {
Systemctl.taskV2Client.update(collect.get(0), collect.get(0).getSequenceNbr()); Systemctl.taskV2Client.update(collect.get(0), collect.get(0).getSequenceNbr());
} }
//修改model并返回 用于组装新待办 //修改model并返回 用于组装新待办
collect.get(0).setEndUserId(null); collect.get(0).setEndUserId(null);
collect.get(0).setTaskStatus(null); collect.get(0).setTaskStatus(null);
...@@ -761,7 +748,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -761,7 +748,6 @@ public class CommonServiceImpl implements ICommonService {
// .findFirst() // .findFirst()
// .orElse(null); // .orElse(null);
List<TaskV2Model> collect = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())).collect(Collectors.toList()); List<TaskV2Model> collect = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())).collect(Collectors.toList());
if (null ==collect || collect.size() == 0) { if (null ==collect || collect.size() == 0) {
TaskV2Model model = new TaskV2Model(); TaskV2Model model = new TaskV2Model();
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
...@@ -770,8 +756,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -770,8 +756,6 @@ public class CommonServiceImpl implements ICommonService {
model.setTaskStatusLabel(params.get("taskStatusLabel").toString()); model.setTaskStatusLabel(params.get("taskStatusLabel").toString());
return model; return model;
} }
collect.get(0).setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); collect.get(0).setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
collect.get(0).setFlowStatusLabel(params.get("flowStatusLabel").toString()); collect.get(0).setFlowStatusLabel(params.get("flowStatusLabel").toString());
collect.get(0).setTaskStatus(Integer.valueOf(params.get("taskStatus").toString())); collect.get(0).setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
...@@ -787,8 +771,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -787,8 +771,6 @@ public class CommonServiceImpl implements ICommonService {
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]); // model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
//当流程完成时将所有待办状态统一修改为已完成 //当流程完成时将所有待办状态统一修改为已完成
if (collect.get(0).getFlowStatusLabel().equals(FlowStatusEnum.TO_BE_FINISHED.getName())){ if (collect.get(0).getFlowStatusLabel().equals(FlowStatusEnum.TO_BE_FINISHED.getName())){
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(params.get("model"))); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(params.get("model")));
String urlParams = ""; String urlParams = "";
try { try {
...@@ -798,7 +780,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -798,7 +780,7 @@ public class CommonServiceImpl implements ICommonService {
} }
List<Map> urlList = JsonUtils.getResourceList(urlInfo); List<Map> urlList = JsonUtils.getResourceList(urlInfo);
for (Map map : urlList) { for (Map map : urlList) {
if (map.get("type").equals(jsonObject.getString("taskType")) && map.get("pageType").equals("look")) { if (map.get("type").equals(collect.get(0).getTaskType()) && map.get("pageType").equals("look")) {
urlParams = map.get("url").toString().replace("{roleIds}", jsonObject.getString("nextExecuteUser")) + urlParams + "&nextExecuteUserIds=" + jsonObject.getString("executeUserIds"); urlParams = map.get("url").toString().replace("{roleIds}", jsonObject.getString("nextExecuteUser")) + urlParams + "&nextExecuteUserIds=" + jsonObject.getString("executeUserIds");
break; break;
} }
...@@ -809,12 +791,10 @@ public class CommonServiceImpl implements ICommonService { ...@@ -809,12 +791,10 @@ public class CommonServiceImpl implements ICommonService {
taskV2Model.setTaskStatus(FlowStatusEnum.TO_BE_FINISHED.getCode()); taskV2Model.setTaskStatus(FlowStatusEnum.TO_BE_FINISHED.getCode());
taskV2Model.setFlowStatusLabel((FlowStatusEnum.TO_BE_FINISHED.getName())); taskV2Model.setFlowStatusLabel((FlowStatusEnum.TO_BE_FINISHED.getName()));
taskV2Model.setFlowStatus(FlowStatusEnum.TO_BE_FINISHED.getCode()); taskV2Model.setFlowStatus(FlowStatusEnum.TO_BE_FINISHED.getCode());
} }
Systemctl.taskV2Client.batchUpdate(collect); Systemctl.taskV2Client.batchUpdate(collect);
}else { }else {
collect.get(0).setRoutePath(collect.get(0).getRoutePath().replace("roleIds=","roleIds=55555&fq=")); collect.get(0).setRoutePath(collect.get(0).getRoutePath().replace("roleIds=","roleIds=55555&fq="));
Systemctl.taskV2Client.update(collect.get(0), collect.get(0).getSequenceNbr()); Systemctl.taskV2Client.update(collect.get(0), collect.get(0).getSequenceNbr());
} }
collect.get(0).setEndUserId(null); collect.get(0).setEndUserId(null);
......
...@@ -93,13 +93,13 @@ ...@@ -93,13 +93,13 @@
"type": "109", "type": "109",
"pageType": "look", "pageType": "look",
"name": "单位变更登记", "name": "单位变更登记",
"url": "" "url": "/mixuap?appId=1742358052905971713&id=1739250036920840194&roleIds={roleIds}&userId={userId}&pageType=look"
}, },
{ {
"type": "109", "type": "109",
"pageType": "edit", "pageType": "edit",
"name": "单位变更登记", "name": "单位变更登记",
"url": "" "url": "/mixuap?appId=1742358052905971713&id=1739250036920840194&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
"type": "110", "type": "110",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment