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 6dc6ddac
authored
Nov 30, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:时间返回优化
1 parent
3ec3f5eb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
project-order/src/main/java/com/dituhui/pea/order/common/TimeUtils.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderServiceDetailResp.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
project-order/src/main/java/com/dituhui/pea/order/common/TimeUtils.java
View file @
6dc6dda
package
com
.
dituhui
.
pea
.
order
.
common
;
package
com
.
dituhui
.
pea
.
order
.
common
;
import
cn.hutool.core.util.ObjectUtil
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -49,6 +51,9 @@ public class TimeUtils {
...
@@ -49,6 +51,9 @@ public class TimeUtils {
}
}
public
static
final
String
IsoLocalDateTime2String
(
LocalDateTime
localDateTime
)
{
public
static
final
String
IsoLocalDateTime2String
(
LocalDateTime
localDateTime
)
{
if
(
ObjectUtil
.
isNull
(
localDateTime
))
{
return
null
;
}
return
localDateTime
.
format
(
DateTimeFormatter
.
ofPattern
(
DATE_TIME_FORMAT
));
return
localDateTime
.
format
(
DateTimeFormatter
.
ofPattern
(
DATE_TIME_FORMAT
));
}
}
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderServiceDetailResp.java
View file @
6dc6dda
...
@@ -113,22 +113,22 @@ public class OrderServiceDetailResp {
...
@@ -113,22 +113,22 @@ public class OrderServiceDetailResp {
/**
/**
* 计划开始时间
* 计划开始时间
*/
*/
private
LocalDateTime
planStartTime
;
private
String
planStartTime
;
/**
/**
* 计划结束时间
* 计划结束时间
*/
*/
private
LocalDateTime
planEndTime
;
private
String
planEndTime
;
/**
/**
* 开始服务时间
* 开始服务时间
*/
*/
private
LocalDateTime
actualStartTime
;
private
String
actualStartTime
;
/**
/**
* 结束服务时间
* 结束服务时间
*/
*/
private
LocalDateTime
actualEndTime
;
private
String
actualEndTime
;
//
//
// @Data
// @Data
// @JsonInclude(JsonInclude.Include.NON_NULL)
// @JsonInclude(JsonInclude.Include.NON_NULL)
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
View file @
6dc6dda
...
@@ -117,10 +117,10 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
...
@@ -117,10 +117,10 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
res
.
setBeanTags
(
order
.
getBeanTags
());
res
.
setBeanTags
(
order
.
getBeanTags
());
res
.
setTranscend
(
order
.
getTranscend
());
res
.
setTranscend
(
order
.
getTranscend
());
res
.
setEngineerCodeSub
(
order
.
getEngineerCodeSub
());
res
.
setEngineerCodeSub
(
order
.
getEngineerCodeSub
());
res
.
setPlanStartTime
(
order
.
getPlanStartTime
(
));
res
.
setPlanStartTime
(
TimeUtils
.
IsoLocalDateTime2String
(
order
.
getPlanStartTime
()
));
res
.
setPlanEndTime
(
order
.
getPlanEndTime
(
));
res
.
setPlanEndTime
(
TimeUtils
.
IsoLocalDateTime2String
(
order
.
getPlanEndTime
()
));
res
.
setActualStartTime
(
order
.
getActualStartTime
(
));
res
.
setActualStartTime
(
TimeUtils
.
IsoLocalDateTime2String
(
order
.
getActualStartTime
()
));
res
.
setActualEndTime
(
order
.
getActualEndTime
(
));
res
.
setActualEndTime
(
TimeUtils
.
IsoLocalDateTime2String
(
order
.
getActualEndTime
()
));
return
Result
.
success
(
res
);
return
Result
.
success
(
res
);
}
}
...
...
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