!309 fix:流程代办,日期时区转换错误
This commit is contained in:
parent
5f8c569a70
commit
f06e508c9d
@ -64,7 +64,7 @@ public interface BpmTaskConvert {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default List<BpmTaskTodoPageItemRespVO> convertList1(List<Task> tasks,
|
default List<BpmTaskTodoPageItemRespVO> convertList1(List<Task> tasks,
|
||||||
Map<String, ProcessInstance> processInstanceMap, Map<Long, AdminUserRespDTO> userMap) {
|
Map<String, ProcessInstance> processInstanceMap, Map<Long, AdminUserRespDTO> userMap) {
|
||||||
return CollectionUtils.convertList(tasks, task -> {
|
return CollectionUtils.convertList(tasks, task -> {
|
||||||
BpmTaskTodoPageItemRespVO respVO = convert1(task);
|
BpmTaskTodoPageItemRespVO respVO = convert1(task);
|
||||||
ProcessInstance processInstance = processInstanceMap.get(task.getProcessInstanceId());
|
ProcessInstance processInstance = processInstanceMap.get(task.getProcessInstanceId());
|
||||||
@ -77,6 +77,8 @@ public interface BpmTaskConvert {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Mapping(source = "suspended", target = "suspensionState", qualifiedByName = "convertSuspendedToSuspensionState")
|
@Mapping(source = "suspended", target = "suspensionState", qualifiedByName = "convertSuspendedToSuspensionState")
|
||||||
|
@Mapping(target = "claimTime", expression = "java(bean.getClaimTime()==null?null: LocalDateTime.ofInstant(bean.getClaimTime().toInstant(),ZoneId.systemDefault()))")
|
||||||
|
@Mapping(target = "createTime", expression = "java(bean.getCreateTime()==null?null:LocalDateTime.ofInstant(bean.getCreateTime().toInstant(),ZoneId.systemDefault()))")
|
||||||
BpmTaskTodoPageItemRespVO convert1(Task bean);
|
BpmTaskTodoPageItemRespVO convert1(Task bean);
|
||||||
|
|
||||||
@Named("convertSuspendedToSuspensionState")
|
@Named("convertSuspendedToSuspensionState")
|
||||||
@ -85,8 +87,8 @@ public interface BpmTaskConvert {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default List<BpmTaskDonePageItemRespVO> convertList2(List<HistoricTaskInstance> tasks,
|
default List<BpmTaskDonePageItemRespVO> convertList2(List<HistoricTaskInstance> tasks,
|
||||||
Map<String, BpmTaskExtDO> bpmTaskExtDOMap, Map<String, HistoricProcessInstance> historicProcessInstanceMap,
|
Map<String, BpmTaskExtDO> bpmTaskExtDOMap, Map<String, HistoricProcessInstance> historicProcessInstanceMap,
|
||||||
Map<Long, AdminUserRespDTO> userMap) {
|
Map<Long, AdminUserRespDTO> userMap) {
|
||||||
return CollectionUtils.convertList(tasks, task -> {
|
return CollectionUtils.convertList(tasks, task -> {
|
||||||
BpmTaskDonePageItemRespVO respVO = convert2(task);
|
BpmTaskDonePageItemRespVO respVO = convert2(task);
|
||||||
BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId());
|
BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId());
|
||||||
@ -103,15 +105,15 @@ public interface BpmTaskConvert {
|
|||||||
BpmTaskDonePageItemRespVO convert2(HistoricTaskInstance bean);
|
BpmTaskDonePageItemRespVO convert2(HistoricTaskInstance bean);
|
||||||
|
|
||||||
@Mappings({@Mapping(source = "processInstance.id", target = "id"),
|
@Mappings({@Mapping(source = "processInstance.id", target = "id"),
|
||||||
@Mapping(source = "processInstance.name", target = "name"),
|
@Mapping(source = "processInstance.name", target = "name"),
|
||||||
@Mapping(source = "processInstance.startUserId", target = "startUserId"),
|
@Mapping(source = "processInstance.startUserId", target = "startUserId"),
|
||||||
@Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"),
|
@Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"),
|
||||||
@Mapping(source = "startUser.nickname", target = "startUserNickname")})
|
@Mapping(source = "startUser.nickname", target = "startUserNickname")})
|
||||||
BpmTaskTodoPageItemRespVO.ProcessInstance convert(ProcessInstance processInstance, AdminUserRespDTO startUser);
|
BpmTaskTodoPageItemRespVO.ProcessInstance convert(ProcessInstance processInstance, AdminUserRespDTO startUser);
|
||||||
|
|
||||||
default List<BpmTaskRespVO> convertList3(List<HistoricTaskInstance> tasks,
|
default List<BpmTaskRespVO> convertList3(List<HistoricTaskInstance> tasks,
|
||||||
Map<String, BpmTaskExtDO> bpmTaskExtDOMap, HistoricProcessInstance processInstance,
|
Map<String, BpmTaskExtDO> bpmTaskExtDOMap, HistoricProcessInstance processInstance,
|
||||||
Map<Long, AdminUserRespDTO> userMap, Map<Long, DeptRespDTO> deptMap) {
|
Map<Long, AdminUserRespDTO> userMap, Map<Long, DeptRespDTO> deptMap) {
|
||||||
return CollectionUtils.convertList(tasks, task -> {
|
return CollectionUtils.convertList(tasks, task -> {
|
||||||
BpmTaskRespVO respVO = convert3(task);
|
BpmTaskRespVO respVO = convert3(task);
|
||||||
BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId());
|
BpmTaskExtDO taskExtDO = bpmTaskExtDOMap.get(task.getId());
|
||||||
@ -141,28 +143,28 @@ public interface BpmTaskConvert {
|
|||||||
void copyTo(BpmTaskExtDO from, @MappingTarget BpmTaskDonePageItemRespVO to);
|
void copyTo(BpmTaskExtDO from, @MappingTarget BpmTaskDonePageItemRespVO to);
|
||||||
|
|
||||||
@Mappings({@Mapping(source = "processInstance.id", target = "id"),
|
@Mappings({@Mapping(source = "processInstance.id", target = "id"),
|
||||||
@Mapping(source = "processInstance.name", target = "name"),
|
@Mapping(source = "processInstance.name", target = "name"),
|
||||||
@Mapping(source = "processInstance.startUserId", target = "startUserId"),
|
@Mapping(source = "processInstance.startUserId", target = "startUserId"),
|
||||||
@Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"),
|
@Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"),
|
||||||
@Mapping(source = "startUser.nickname", target = "startUserNickname")})
|
@Mapping(source = "startUser.nickname", target = "startUserNickname")})
|
||||||
BpmTaskTodoPageItemRespVO.ProcessInstance convert(HistoricProcessInstance processInstance,
|
BpmTaskTodoPageItemRespVO.ProcessInstance convert(HistoricProcessInstance processInstance,
|
||||||
AdminUserRespDTO startUser);
|
AdminUserRespDTO startUser);
|
||||||
|
|
||||||
default BpmTaskExtDO convert2TaskExt(Task task) {
|
default BpmTaskExtDO convert2TaskExt(Task task) {
|
||||||
BpmTaskExtDO taskExtDO = new BpmTaskExtDO().setTaskId(task.getId())
|
BpmTaskExtDO taskExtDO = new BpmTaskExtDO().setTaskId(task.getId())
|
||||||
.setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setName(task.getName())
|
.setAssigneeUserId(NumberUtils.parseLong(task.getAssignee())).setName(task.getName())
|
||||||
.setProcessDefinitionId(task.getProcessDefinitionId()).setProcessInstanceId(task.getProcessInstanceId());
|
.setProcessDefinitionId(task.getProcessDefinitionId()).setProcessInstanceId(task.getProcessInstanceId());
|
||||||
taskExtDO.setCreateTime(LocalDateTimeUtil.of(task.getCreateTime()));
|
taskExtDO.setCreateTime(LocalDateTimeUtil.of(task.getCreateTime()));
|
||||||
return taskExtDO;
|
return taskExtDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser,
|
default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser,
|
||||||
Task task) {
|
Task task) {
|
||||||
BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO();
|
BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO();
|
||||||
reqDTO.setProcessInstanceId(processInstance.getProcessInstanceId())
|
reqDTO.setProcessInstanceId(processInstance.getProcessInstanceId())
|
||||||
.setProcessInstanceName(processInstance.getName()).setStartUserId(startUser.getId())
|
.setProcessInstanceName(processInstance.getName()).setStartUserId(startUser.getId())
|
||||||
.setStartUserNickname(startUser.getNickname()).setTaskId(task.getId()).setTaskName(task.getName())
|
.setStartUserNickname(startUser.getNickname()).setTaskId(task.getId()).setTaskName(task.getName())
|
||||||
.setAssigneeUserId(NumberUtils.parseLong(task.getAssignee()));
|
.setAssigneeUserId(NumberUtils.parseLong(task.getAssignee()));
|
||||||
return reqDTO;
|
return reqDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user