Commit d522ad90 by 丁伟峰

数据库中,datetime/timestamp,java这边统一使用新的LocalDateTime来处理

1 parent 6a5c493a
...@@ -2,7 +2,7 @@ package com.dituhui.pea.order.dto; ...@@ -2,7 +2,7 @@ package com.dituhui.pea.order.dto;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@lombok.Data @lombok.Data
...@@ -21,7 +21,7 @@ public class CapacityStatQueryRespDTO { ...@@ -21,7 +21,7 @@ public class CapacityStatQueryRespDTO {
private long capAdjust; private long capAdjust;
private long capTotal; private long capTotal;
private long capUsed; private long capUsed;
private Date updateTime; private LocalDateTime updateTime;
private String date; private String date;
private long engineerNum; private long engineerNum;
private String levelType; private String levelType;
......
...@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto; ...@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@lombok.Data @lombok.Data
...@@ -66,12 +66,12 @@ public class EngineersGanttRespDTO { ...@@ -66,12 +66,12 @@ public class EngineersGanttRespDTO {
* 开始时间 * 开始时间
*/ */
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime; private LocalDateTime startTime;
/** /**
* 结束时间 * 结束时间
*/ */
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime; private LocalDateTime endTime;
/** /**
* 鼠标悬停提示 * 鼠标悬停提示
*/ */
......
...@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto; ...@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import com.dituhui.pea.order.config.OrderConfig; import com.dituhui.pea.order.config.OrderConfig;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.time.LocalDateTime;
@lombok.Data @lombok.Data
public class OrderChangeListReqDTO { public class OrderChangeListReqDTO {
...@@ -18,7 +18,7 @@ public class OrderChangeListReqDTO { ...@@ -18,7 +18,7 @@ public class OrderChangeListReqDTO {
private int page = OrderConfig.DEFAULT_PAGE_INDEX; private int page = OrderConfig.DEFAULT_PAGE_INDEX;
private int size = OrderConfig.DEFAULT_PAGE_SIZE; private int size = OrderConfig.DEFAULT_PAGE_SIZE;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date date = new Date(); private LocalDateTime date = LocalDateTime.now();
/** /**
* 排序 * 排序
*/ */
......
...@@ -3,7 +3,8 @@ package com.dituhui.pea.order.entity; ...@@ -3,7 +3,8 @@ package com.dituhui.pea.order.entity;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.time.LocalDate;
import java.time.LocalDateTime;
@Data @Data
@Entity @Entity
...@@ -58,25 +59,30 @@ public class OrderAppointmentEntity { ...@@ -58,25 +59,30 @@ public class OrderAppointmentEntity {
private Integer isWorkshop; private Integer isWorkshop;
/** /**
* 预约日期
*/
private LocalDate dt;
/**
* 客户预约上门时间 * 客户预约上门时间
*/ */
private Date expectStartTime; private LocalDateTime expectStartTime;
private Date expectEndTime; private LocalDateTime expectEndTime;
/** /**
* 实际上门时间 * 实际上门时间
*/ */
private Date actualTime; private LocalDateTime actualTime;
/** /**
* 开始服务时间 * 开始服务时间
*/ */
private Date actualStartTime; private LocalDateTime actualStartTime;
/** /**
* 结束服务时间 * 结束服务时间
*/ */
private Date actualEndTime; private LocalDateTime actualEndTime;
/** /**
* pre-预排班/confirm-已确认 * pre-预排班/confirm-已确认
...@@ -96,11 +102,11 @@ public class OrderAppointmentEntity { ...@@ -96,11 +102,11 @@ public class OrderAppointmentEntity {
/** /**
* 创建时间 * 创建时间
*/ */
private Date createTime; private LocalDateTime createTime;
/** /**
* 更新时间 * 更新时间
*/ */
private Date updateTime; private LocalDateTime updateTime;
} }
...@@ -19,7 +19,8 @@ package com.dituhui.pea.order.entity; ...@@ -19,7 +19,8 @@ package com.dituhui.pea.order.entity;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.time.LocalDate;
import java.time.LocalDateTime;
@Entity @Entity
@Data @Data
...@@ -43,8 +44,9 @@ public class OrderRequestEntity { ...@@ -43,8 +44,9 @@ public class OrderRequestEntity {
private String skill; private String skill;
private String applyNote; private String applyNote;
private String faultDescribe; private String faultDescribe;
private String expectTimeBegin; private LocalDate dt;
private String expectTimeEnd; private LocalDateTime expectTimeBegin;
private LocalDateTime expectTimeEnd;
private String expectTimeDesc; private String expectTimeDesc;
private String source; private String source;
private String areaId; private String areaId;
...@@ -64,6 +66,6 @@ public class OrderRequestEntity { ...@@ -64,6 +66,6 @@ public class OrderRequestEntity {
private String orgTeamId; private String orgTeamId;
private String orgTeamName; private String orgTeamName;
private String description; private String description;
private String createTime; private LocalDateTime createTime;
private String updateTime; private LocalDateTime updateTime;
} }
...@@ -36,6 +36,8 @@ import org.apache.commons.lang3.StringUtils; ...@@ -36,6 +36,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
...@@ -100,10 +102,11 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -100,10 +102,11 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity.setSkill(req.getSkill()); entity.setSkill(req.getSkill());
entity.setFaultDescribe(req.getFaultDescribe()); entity.setFaultDescribe(req.getFaultDescribe());
entity.setExpectTimeBegin(req.getExpectBegin()); entity.setExpectTimeBegin(LocalDateTime.parse(req.getExpectBegin()));
entity.setExpectTimeEnd(req.getExpectEnd()); entity.setExpectTimeEnd(LocalDateTime.parse(req.getExpectEnd()));
entity.setExpectTimeDesc(req.getExpectDesc()); entity.setExpectTimeDesc(req.getExpectDesc());
entity.setDescription(req.getDescription()); entity.setDescription(req.getDescription());
entity.setDt(LocalDate.parse(req.getExpectBegin()));
// location // location
LocationDTO location = req.getLocation(); LocationDTO location = req.getLocation();
entity.setProvince(location.getProvince()); entity.setProvince(location.getProvince());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!