Commit 30e8f181 authored by zhangsen's avatar zhangsen

编辑代办 复原为修改之前

parent 2e7dd4d4
...@@ -667,7 +667,9 @@ public class CommonServiceImpl implements ICommonService { ...@@ -667,7 +667,9 @@ public class CommonServiceImpl implements ICommonService {
TaskV2Model model = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())) // 按时间降序排序 TaskV2Model model = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())) // 按时间降序排序
.findFirst() .findFirst()
.orElse(null); .orElse(null);
if (model != null) { if (model == null) {
return null;
}
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
model.setFlowStatusLabel(params.get("flowStatusLabel").toString()); model.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString())); model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
...@@ -676,13 +678,6 @@ public class CommonServiceImpl implements ICommonService { ...@@ -676,13 +678,6 @@ public class CommonServiceImpl implements ICommonService {
model.setEndDate(new Date()); model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look")); model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
Systemctl.taskV2Client.update(model, model.getSequenceNbr()); Systemctl.taskV2Client.update(model, model.getSequenceNbr());
} else {
model = new TaskV2Model();
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
model.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
model.setTaskStatusLabel(params.get("taskStatusLabel").toString());
}
//修改model并返回 用于组装新待办 //修改model并返回 用于组装新待办
model.setEndUserId(null); model.setEndUserId(null);
model.setTaskStatus(null); model.setTaskStatus(null);
...@@ -703,7 +698,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -703,7 +698,7 @@ public class CommonServiceImpl implements ICommonService {
* flowCode 任务id * flowCode 任务id
**/ **/
public TaskV2Model updateTaskModelOld(Map<String, Object> params) { public TaskV2Model updateTaskModelNew(Map<String, Object> params) {
String exeUserId = RequestContext.getExeUserId(); String exeUserId = RequestContext.getExeUserId();
List<TaskV2Model> result = Systemctl.taskV2Client.selectListByRelationId(params.get("relationId").toString()).getResult(); List<TaskV2Model> result = Systemctl.taskV2Client.selectListByRelationId(params.get("relationId").toString()).getResult();
...@@ -713,9 +708,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -713,9 +708,7 @@ public class CommonServiceImpl implements ICommonService {
TaskV2Model model = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())) // 按时间降序排序 TaskV2Model model = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())) // 按时间降序排序
.findFirst() .findFirst()
.orElse(null); .orElse(null);
if (model == null) { if (model != null) {
return null;
}
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
model.setFlowStatusLabel(params.get("flowStatusLabel").toString()); model.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString())); model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
...@@ -724,6 +717,13 @@ public class CommonServiceImpl implements ICommonService { ...@@ -724,6 +717,13 @@ public class CommonServiceImpl implements ICommonService {
model.setEndDate(new Date()); model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look")); model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
Systemctl.taskV2Client.update(model, model.getSequenceNbr()); Systemctl.taskV2Client.update(model, model.getSequenceNbr());
} else {
model = new TaskV2Model();
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString()));
model.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
model.setTaskStatusLabel(params.get("taskStatusLabel").toString());
}
//修改model并返回 用于组装新待办 //修改model并返回 用于组装新待办
model.setEndUserId(null); model.setEndUserId(null);
model.setTaskStatus(null); model.setTaskStatus(null);
......
...@@ -487,7 +487,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -487,7 +487,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
params.put("taskStatusLabel", flowStatusEnum.getName()); params.put("taskStatusLabel", flowStatusEnum.getName());
params.put("flowStatus",this.getTaskStatusByName(jgChangeRegistrationName.getAuditStatus())); params.put("flowStatus",this.getTaskStatusByName(jgChangeRegistrationName.getAuditStatus()));
params.put("flowStatusLabel",jgChangeRegistrationName.getAuditStatus()); params.put("flowStatusLabel",jgChangeRegistrationName.getAuditStatus());
return commonService.updateTaskModel(params); return commonService.updateTaskModelNew(params);
} }
......
...@@ -319,7 +319,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -319,7 +319,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
map.put("relationId", notice.getInstanceId()); map.put("relationId", notice.getInstanceId());
map.put("flowStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode()); map.put("flowStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode());
map.put("flowStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName()); map.put("flowStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName());
TaskV2Model taskV2Model = commonService.updateTaskModelOld(map); TaskV2Model taskV2Model = commonService.updateTaskModel(map);
if (ObjectUtils.isEmpty(taskV2Model)) { if (ObjectUtils.isEmpty(taskV2Model)) {
// 如果为保存并提交,则创建代办 // 如果为保存并提交,则创建代办
buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto)); buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto));
......
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