diff --git a/src/main/java/neatlogic/framework/process/constvalue/ProcessTaskStepUserStatus.java b/src/main/java/neatlogic/framework/process/constvalue/ProcessTaskStepUserStatus.java index 80ea17d2368dc599591424305547351a4a9861b0..3d0c3fe2f3f01802ffec50f0e3bdd319143231bf 100755 --- a/src/main/java/neatlogic/framework/process/constvalue/ProcessTaskStepUserStatus.java +++ b/src/main/java/neatlogic/framework/process/constvalue/ProcessTaskStepUserStatus.java @@ -3,7 +3,9 @@ package neatlogic.framework.process.constvalue; public enum ProcessTaskStepUserStatus { DOING("doing", "处理中"), DONE("done", "处理完毕"), - TRANSFERRED("transferred", "已转交"); + TRANSFERRED("transferred", "已转交"), + SOMEONE_TRANSFERRED("someonetransferred", "被转交") + ; private String status; private String text; diff --git a/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java b/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java index 01d2fe5faca47c418de034d3fc7322a8c482dc25..fb60dfacc20f1fc022acb75e6dc59251ec7a61c2 100644 --- a/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java +++ b/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java @@ -1772,7 +1772,11 @@ public abstract class ProcessStepHandlerBase implements IProcessStepHandler { for (ProcessTaskStepUserVo oldUser : oldUserList) { /* 更新处理人状态 **/ oldUser.setUserType(ProcessTaskStepUserType.HISTORY_MAJOR.getValue()); - oldUser.setStatus(ProcessTaskStepUserStatus.TRANSFERRED.getValue()); + if (Objects.equals(oldUser.getUserUuid(), UserContext.get().getUserUuid(true))) { + oldUser.setStatus(ProcessTaskStepUserStatus.TRANSFERRED.getValue()); + } else { + oldUser.setStatus(ProcessTaskStepUserStatus.SOMEONE_TRANSFERRED.getValue()); + } oldUser.setEndTime(new Date()); processTaskCrossoverMapper.insertIgnoreProcessTaskStepUser(oldUser); if (workerUserUuidList.contains(oldUser.getUserUuid())) { @@ -1828,6 +1832,14 @@ public abstract class ProcessStepHandlerBase implements IProcessStepHandler { processTaskStepVo.setStatus(ProcessTaskStepStatus.RUNNING.getValue()); } } + JSONArray oldWorkerList = new JSONArray(); + List processTaskStepWorkerList = processTaskCrossoverMapper.getProcessTaskStepWorkerByProcessTaskIdAndProcessTaskStepId(currentProcessTaskStepVo.getProcessTaskId(), currentProcessTaskStepVo.getId()); + for (ProcessTaskStepWorkerVo workerVo : processTaskStepWorkerList) { + if (Objects.equals(workerVo.getUserType(), ProcessUserType.MAJOR.getValue())) { + oldWorkerList.add(workerVo.getType() + "#" + workerVo.getUuid()); + } + } + currentProcessTaskStepVo.getParamObj().put(ProcessTaskAuditDetailType.WORKERLIST.getOldDataParamName(), oldWorkerList); /* 清空work表,重新写入新数据 **/ processTaskCrossoverMapper.deleteProcessTaskStepWorker(processTaskStepWorkerVo); for (ProcessTaskStepWorkerVo workerVo : workerList) {