Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d522ad90
authored
Jul 04, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库中,datetime/timestamp,java这边统一使用新的LocalDateTime来处理
1 parent
6a5c493a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
22 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/CapacityStatQueryRespDTO.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttRespDTO.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListReqDTO.java
project-order/src/main/java/com/dituhui/pea/order/entity/OrderAppointmentEntity.java
project-order/src/main/java/com/dituhui/pea/order/entity/OrderRequestEntity.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/CapacityStatQueryRespDTO.java
View file @
d522ad9
...
...
@@ -2,7 +2,7 @@ package com.dituhui.pea.order.dto;
import
lombok.experimental.Accessors
;
import
java.
util.Dat
e
;
import
java.
time.LocalDateTim
e
;
import
java.util.List
;
@lombok
.
Data
...
...
@@ -21,7 +21,7 @@ public class CapacityStatQueryRespDTO {
private
long
capAdjust
;
private
long
capTotal
;
private
long
capUsed
;
private
Dat
e
updateTime
;
private
LocalDateTim
e
updateTime
;
private
String
date
;
private
long
engineerNum
;
private
String
levelType
;
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttRespDTO.java
View file @
d522ad9
...
...
@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.experimental.Accessors
;
import
java.
util.Dat
e
;
import
java.
time.LocalDateTim
e
;
import
java.util.List
;
@lombok
.
Data
...
...
@@ -66,12 +66,12 @@ public class EngineersGanttRespDTO {
* 开始时间
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private
Dat
e
startTime
;
private
LocalDateTim
e
startTime
;
/**
* 结束时间
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private
Dat
e
endTime
;
private
LocalDateTim
e
endTime
;
/**
* 鼠标悬停提示
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListReqDTO.java
View file @
d522ad9
...
...
@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import
com.dituhui.pea.order.config.OrderConfig
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.
util.Dat
e
;
import
java.
time.LocalDateTim
e
;
@lombok
.
Data
public
class
OrderChangeListReqDTO
{
...
...
@@ -18,7 +18,7 @@ public class OrderChangeListReqDTO {
private
int
page
=
OrderConfig
.
DEFAULT_PAGE_INDEX
;
private
int
size
=
OrderConfig
.
DEFAULT_PAGE_SIZE
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
date
=
new
Date
();
private
LocalDateTime
date
=
LocalDateTime
.
now
();
/**
* 排序
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/entity/OrderAppointmentEntity.java
View file @
d522ad9
...
...
@@ -3,7 +3,8 @@ package com.dituhui.pea.order.entity;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
@Data
@Entity
...
...
@@ -58,25 +59,30 @@ public class OrderAppointmentEntity {
private
Integer
isWorkshop
;
/**
* 预约日期
*/
private
LocalDate
dt
;
/**
* 客户预约上门时间
*/
private
Dat
e
expectStartTime
;
private
LocalDateTim
e
expectStartTime
;
private
Dat
e
expectEndTime
;
private
LocalDateTim
e
expectEndTime
;
/**
* 实际上门时间
*/
private
Dat
e
actualTime
;
private
LocalDateTim
e
actualTime
;
/**
* 开始服务时间
*/
private
Dat
e
actualStartTime
;
private
LocalDateTim
e
actualStartTime
;
/**
* 结束服务时间
*/
private
Dat
e
actualEndTime
;
private
LocalDateTim
e
actualEndTime
;
/**
* pre-预排班/confirm-已确认
...
...
@@ -96,11 +102,11 @@ public class OrderAppointmentEntity {
/**
* 创建时间
*/
private
Dat
e
createTime
;
private
LocalDateTim
e
createTime
;
/**
* 更新时间
*/
private
Dat
e
updateTime
;
private
LocalDateTim
e
updateTime
;
}
project-order/src/main/java/com/dituhui/pea/order/entity/OrderRequestEntity.java
View file @
d522ad9
...
...
@@ -19,7 +19,8 @@ package com.dituhui.pea.order.entity;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
@Entity
@Data
...
...
@@ -43,8 +44,9 @@ public class OrderRequestEntity {
private
String
skill
;
private
String
applyNote
;
private
String
faultDescribe
;
private
String
expectTimeBegin
;
private
String
expectTimeEnd
;
private
LocalDate
dt
;
private
LocalDateTime
expectTimeBegin
;
private
LocalDateTime
expectTimeEnd
;
private
String
expectTimeDesc
;
private
String
source
;
private
String
areaId
;
...
...
@@ -64,6 +66,6 @@ public class OrderRequestEntity {
private
String
orgTeamId
;
private
String
orgTeamName
;
private
String
description
;
private
String
createTime
;
private
String
updateTime
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
d522ad9
...
...
@@ -36,6 +36,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
...
...
@@ -100,10 +102,11 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity
.
setSkill
(
req
.
getSkill
());
entity
.
setFaultDescribe
(
req
.
getFaultDescribe
());
entity
.
setExpectTimeBegin
(
req
.
getExpectBegin
(
));
entity
.
setExpectTimeEnd
(
req
.
getExpectEnd
(
));
entity
.
setExpectTimeBegin
(
LocalDateTime
.
parse
(
req
.
getExpectBegin
()
));
entity
.
setExpectTimeEnd
(
LocalDateTime
.
parse
(
req
.
getExpectEnd
()
));
entity
.
setExpectTimeDesc
(
req
.
getExpectDesc
());
entity
.
setDescription
(
req
.
getDescription
());
entity
.
setDt
(
LocalDate
.
parse
(
req
.
getExpectBegin
()));
// location
LocationDTO
location
=
req
.
getLocation
();
entity
.
setProvince
(
location
.
getProvince
());
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment