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 282117f6
authored
Jul 11, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
2 parents
22352b7a
9ed7205b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 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 @
282117f
...
@@ -43,6 +43,10 @@ public class TimeUtils {
...
@@ -43,6 +43,10 @@ public class TimeUtils {
return
LocalDate
.
parse
(
s
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
LocalDate
.
parse
(
s
,
DateTimeFormatter
.
ofPattern
(
pattern
));
}
}
public
static
final
String
IsoLocalDate2String
(
LocalDate
localDate
)
{
return
localDate
.
format
(
DateTimeFormatter
.
ofPattern
(
DATE_GAP_FORMAT
));
}
public
static
final
LocalDate
addDays
(
LocalDate
date
,
long
days
)
{
public
static
final
LocalDate
addDays
(
LocalDate
date
,
long
days
)
{
return
date
.
plusDays
(
days
);
return
date
.
plusDays
(
days
);
}
}
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderServiceDetailResp.java
View file @
282117f
package
com
.
dituhui
.
pea
.
order
.
dto
;
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
...
@@ -13,5 +15,17 @@ public class OrderServiceDetailResp {
...
@@ -13,5 +15,17 @@ public class OrderServiceDetailResp {
private
String
risk
;
private
String
risk
;
private
String
riskDesc
;
private
String
riskDesc
;
private
String
location
;
private
String
location
;
private
OrderDetail
reschedulingParams
;
private
List
<
KV
>
items
;
private
List
<
KV
>
items
;
@Data
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
static
class
OrderDetail
{
private
String
location
;
private
String
address
;
private
String
brand
;
private
String
date
;
private
String
type
;
private
String
skill
;
}
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
View file @
282117f
...
@@ -51,6 +51,15 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
...
@@ -51,6 +51,15 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
List
<
KV
>
items
=
this
.
packOrderDetail
(
order
);
List
<
KV
>
items
=
this
.
packOrderDetail
(
order
);
// 设置订单详情信息
OrderServiceDetailResp
.
OrderDetail
detail
=
new
OrderServiceDetailResp
.
OrderDetail
();
detail
.
setAddress
(
String
.
format
(
"%s%s%s"
,
order
.
getCity
(),
order
.
getCounty
(),
order
.
getAddress
()));
detail
.
setLocation
(
String
.
format
(
"%s,%s"
,
order
.
getX
(),
order
.
getY
()));
detail
.
setDate
(
TimeUtils
.
IsoLocalDate2String
(
order
.
getDt
()));
detail
.
setBrand
(
order
.
getBrand
());
detail
.
setType
(
order
.
getType
());
detail
.
setSkill
(
order
.
getSkill
());
OrderServiceDetailResp
res
=
new
OrderServiceDetailResp
();
OrderServiceDetailResp
res
=
new
OrderServiceDetailResp
();
res
.
setOrderId
(
orderId
);
res
.
setOrderId
(
orderId
);
res
.
setRisk
(
""
);
res
.
setRisk
(
""
);
...
@@ -59,6 +68,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
...
@@ -59,6 +68,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
res
.
setStatus
(
order
.
getStatus
());
res
.
setStatus
(
order
.
getStatus
());
res
.
setAppointmentStatus
(
order
.
getAppointmentStatus
());
res
.
setAppointmentStatus
(
order
.
getAppointmentStatus
());
res
.
setLocation
(
String
.
format
(
"%s,%s"
,
order
.
getX
(),
order
.
getY
()));
res
.
setLocation
(
String
.
format
(
"%s,%s"
,
order
.
getX
(),
order
.
getY
()));
res
.
setReschedulingParams
(
detail
);
res
.
setItems
(
items
);
res
.
setItems
(
items
);
return
Result
.
success
(
res
);
return
Result
.
success
(
res
);
...
@@ -92,7 +102,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
...
@@ -92,7 +102,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
if
(
appoints
.
isEmpty
())
{
if
(
appoints
.
isEmpty
())
{
// 没有指派单列表,返回
// 没有指派单列表,返回
res
.
setOrderId
(
orderId
);
res
.
setOrderId
(
orderId
);
res
.
setOrders
(
List
.
of
());
res
.
setOrders
(
new
ArrayList
<>
());
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