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 687772a1
authored
Jul 05, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
3ffb881d
8b5bd969
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
43 deletions
project-order/src/main/java/com/dituhui/pea/order/config/JacksonConfig.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/dto/OrderChangeListRespDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/config/JacksonConfig.java
deleted
100644 → 0
View file @
3ffb881
package
com
.
dituhui
.
pea
.
order
.
config
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.time.format.DateTimeFormatter
;
@Configuration
public
class
JacksonConfig
{
@Bean
public
ObjectMapper
objectMapper
()
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
// 日期和时间格式化
JavaTimeModule
javaTimeModule
=
new
JavaTimeModule
();
javaTimeModule
.
addSerializer
(
LocalDateTime
.
class
,
new
LocalDateTimeSerializer
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
javaTimeModule
.
addSerializer
(
LocalDate
.
class
,
new
LocalDateSerializer
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
javaTimeModule
.
addSerializer
(
LocalTime
.
class
,
new
LocalTimeSerializer
(
DateTimeFormatter
.
ofPattern
(
"HH:mm:ss"
)));
javaTimeModule
.
addDeserializer
(
LocalDateTime
.
class
,
new
LocalDateTimeDeserializer
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
javaTimeModule
.
addDeserializer
(
LocalDate
.
class
,
new
LocalDateDeserializer
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
javaTimeModule
.
addDeserializer
(
LocalTime
.
class
,
new
LocalTimeDeserializer
(
DateTimeFormatter
.
ofPattern
(
"HH:mm:ss"
)));
objectMapper
.
registerModule
(
javaTimeModule
);
return
objectMapper
;
}
}
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttRespDTO.java
View file @
687772a
package
com
.
dituhui
.
pea
.
order
.
dto
;
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -65,12 +70,16 @@ public class EngineersGanttRespDTO {
...
@@ -65,12 +70,16 @@ public class EngineersGanttRespDTO {
/**
/**
* 开始时间
* 开始时间
*/
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
startTime
;
private
LocalDateTime
startTime
;
/**
/**
* 结束时间
* 结束时间
*/
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
endTime
;
private
LocalDateTime
endTime
;
/**
/**
* 鼠标悬停提示
* 鼠标悬停提示
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListReqDTO.java
View file @
687772a
package
com
.
dituhui
.
pea
.
order
.
dto
;
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.dituhui.pea.order.config.OrderConfig
;
import
com.dituhui.pea.order.config.OrderConfig
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
...
@@ -18,7 +23,10 @@ public class OrderChangeListReqDTO {
...
@@ -18,7 +23,10 @@ public class OrderChangeListReqDTO {
private
String
levelValue
;
private
String
levelValue
;
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"
)
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDate
date
=
LocalDate
.
now
();
private
LocalDate
date
=
LocalDate
.
now
();
/**
/**
* 排序
* 排序
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListRespDTO.java
View file @
687772a
package
com
.
dituhui
.
pea
.
order
.
dto
;
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
@lombok
.
Data
@lombok
.
Data
...
@@ -39,6 +45,9 @@ public class OrderChangeListRespDTO {
...
@@ -39,6 +45,9 @@ public class OrderChangeListRespDTO {
/**
/**
* 更新时间
* 更新时间
*/
*/
private
String
updateTime
;
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updateTime
;
}
}
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
View file @
687772a
...
@@ -59,7 +59,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
...
@@ -59,7 +59,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
.
setOperator
(
e
.
getOperator
())
.
setOperator
(
e
.
getOperator
())
.
setDescription
(
e
.
getContent
())
.
setDescription
(
e
.
getContent
())
.
setMemo
(
e
.
getMemo
())
.
setMemo
(
e
.
getMemo
())
.
setUpdateTime
(
e
.
getUpdateTime
()
.
toString
()
);
.
setUpdateTime
(
e
.
getUpdateTime
());
contents
.
add
(
content
);
contents
.
add
(
content
);
}
}
OrderChangeListRespDTO
respDTO
=
new
OrderChangeListRespDTO
();
OrderChangeListRespDTO
respDTO
=
new
OrderChangeListRespDTO
();
...
...
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