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 47540644
authored
Jul 14, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
1 parent
f43c4c68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
View file @
4754064
package
com
.
dituhui
.
pea
.
order
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.dituhui.pea.common.BusinessException
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.TimeUtils
;
import
com.dituhui.pea.order.dao.*
;
...
...
@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -92,11 +94,17 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
@Transactional
@Override
public
Result
<?>
getOrderAppointmentList
(
String
orderId
)
{
public
Result
<?>
getOrderAppointmentList
(
String
orderId
)
throws
BusinessException
{
// 获取预约单里列表
OrderAppointmentListResp
res
=
new
OrderAppointmentListResp
();
OrderRequest
order
=
orderRequestMPDao
.
getByOrderId
(
orderId
);
if
(
order
==
null
){
throw
new
BusinessException
(
"订单不存在"
);
}
LocalDate
curDate
=
order
.
getDt
();
// 查询预约单列表
List
<
OrderAppointment
>
appoints
=
orderAppointmentMPDao
.
selectByOrderId
(
orderId
);
if
(
appoints
.
isEmpty
())
{
...
...
@@ -140,8 +148,8 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
// 获取title
String
title
=
engineerName
;
if
(!
lastSubOrderId
.
equals
(
subOrderId
))
{
title
=
String
.
format
(
"%s_%s"
,
engineerName
,
TimeUtils
.
timestamp2DateTime
(
o
.
getExpectStartTime
(),
TimeUtils
.
DATE_NO_GAP_FORMAT
));
if
(!
lastSubOrderId
.
equals
(
subOrderId
)
||
o
.
getDt
().
isBefore
(
curDate
)
)
{
title
=
String
.
format
(
"%s_%s"
,
engineerName
,
TimeUtils
.
IsoLocalDate2String
(
o
.
getDt
()
));
}
OrderAppointmentListResp
.
OrderAppointment
item
=
new
OrderAppointmentListResp
.
OrderAppointment
();
...
...
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