From 2c1deec795b70582bced762507865eed45891fa3 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 21 Mar 2023 12:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/todocenter/manage/TodoCenterManage.java | 20 ++++++-------------- .../todocenter/model/vo/ResToBeProcessedVO.java | 15 ++++++--------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index ff5fd04..44ac76b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -97,6 +97,8 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; @@ -196,10 +198,7 @@ public class TodoCenterManage { ProcessTaskVo taskVo = taskMap.get(d.getInstanceId()); res.setNodeId(taskVo.getTaskDefKey()); res.setProcessStatusName(taskVo.getStatus()); - LocalDateTime launchTime = NdDateUtils.date2LocalDateTime(d.getCreateTime()); - String timeStr = NdDateUtils.format(launchTime, DatePattern.NORM_DATETIME_MINUTE_PATTERN); - LocalDateTime processLaunchTime = LocalDateTime.parse(timeStr, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN)); - res.setProcessLaunchTime(processLaunchTime); + res.setProcessLaunchTime(d.getCreateTime()); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, todoList.size()); @@ -748,14 +747,7 @@ public class TodoCenterManage { BeanUtils.copyProperties(projectInfo, res); res.setProjectId(projectInfo.getId()); res.setProcessStatusName(d.getStatus()); - LocalDateTime launchTime = NdDateUtils.date2LocalDateTime(d.getCreateTime()); - String launchTimeStr = NdDateUtils.format(launchTime, DatePattern.NORM_DATETIME_MINUTE_PATTERN); - LocalDateTime processLaunchTime = LocalDateTime.parse(launchTimeStr, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN)); - res.setProcessLaunchTime(processLaunchTime); - LocalDateTime handleTime = NdDateUtils.date2LocalDateTime(d.getTaskEndTime()); - String handleTimeStr = NdDateUtils.format(handleTime, DatePattern.NORM_DATETIME_MINUTE_PATTERN); - LocalDateTime processHandleTime = LocalDateTime.parse(handleTimeStr, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN)); - res.setProcessHandleTime(processHandleTime); + res.setProcessLaunchTime(d.getCreateTime()); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, iDoList.size()); @@ -874,7 +866,7 @@ public class TodoCenterManage { res.setBuildOrg(project.getBuildOrgName()); res.setProjectId(project.getId()); res.setProcessStatusName(d.getStatus()); - res.setProcessLaunchTime(NdDateUtils.date2LocalDateTime(d.getStartTime())); + res.setProcessLaunchTime(d.getStartTime()); return res; }).collect(Collectors.toList()); return PageVo.of(resVos,submittedList.size()); @@ -993,7 +985,7 @@ public class TodoCenterManage { res.setProjectId(project.getId()); res.setBuildOrg(project.getBuildOrgName()); res.setProcessStatusName(d.getStatus()); - res.setProcessLaunchTime(NdDateUtils.date2LocalDateTime(d.getStartTime())); + res.setProcessLaunchTime(d.getStartTime()); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, ccMeList.size()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java index 928baa0..7d9126b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java @@ -1,17 +1,14 @@ package com.ningdatech.pmapi.todocenter.model.vo; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.wflow.workflow.bean.vo.ProcessInstanceVo; -import com.wflow.workflow.bean.vo.ProcessTaskVo; +import com.alibaba.fastjson.annotation.JSONField; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; - import java.io.Serializable; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.util.Date; /** * 待办中心-待我处理返回实体信息 @@ -57,10 +54,10 @@ public class ResToBeProcessedVO implements Serializable { private String processStatusName; @ApiModelProperty("流程发起时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime processLaunchTime; + @JSONField(format = "yyyy-MM-dd HH:mm") + private Date processLaunchTime; @ApiModelProperty("流程处理时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime processHandleTime; + @JSONField(format = "yyyy-MM-dd HH:mm") + private Date processHandleTime; }