Commit 9d000767 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 7074b8d3 30e8f181
...@@ -661,28 +661,23 @@ public class CommonServiceImpl implements ICommonService { ...@@ -661,28 +661,23 @@ public class CommonServiceImpl implements ICommonService {
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();
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序 // TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// .findFirst() // .findFirst()
// .orElse(null); // .orElse(null);
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) {
model.setFlowStatus(Integer.valueOf(params.get("flowStatus").toString())); return null;
model.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
model.setTaskStatusLabel(params.get("taskStatusLabel").toString());
model.setEndUserId(exeUserId);
model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
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.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.setEndUserId(exeUserId);
model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
Systemctl.taskV2Client.update(model, model.getSequenceNbr());
//修改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,17 +708,22 @@ public class CommonServiceImpl implements ICommonService { ...@@ -713,17 +708,22 @@ 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.setFlowStatusLabel(params.get("flowStatusLabel").toString());
model.setTaskStatus(Integer.valueOf(params.get("taskStatus").toString()));
model.setTaskStatusLabel(params.get("taskStatusLabel").toString());
model.setEndUserId(exeUserId);
model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
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.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.setEndUserId(exeUserId);
model.setEndDate(new Date());
model.setRoutePath(model.getRoutePath().replace("roleIds", "role").replace("edit", "look"));
Systemctl.taskV2Client.update(model, model.getSequenceNbr());
//修改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