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 211f6cb2
authored
Nov 07, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:改约,取消优化一家多单逻辑
1 parent
a59c3f65
Hide 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/OrderInfoServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
211f6cb
...
@@ -161,6 +161,11 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -161,6 +161,11 @@ public class OrderInfoServiceImpl implements OrderInfoService {
if
(
StringUtils
.
isBlank
(
request
.
getDescription
()))
{
if
(
StringUtils
.
isBlank
(
request
.
getDescription
()))
{
orderInfo
.
setDescription
(
request
.
getDescription
());
orderInfo
.
setDescription
(
request
.
getDescription
());
}
}
//处理一家多单逻辑
Result
<
String
>
deleteMultipleOrders
=
this
.
deleteMultipleOrders
(
orderInfo
.
getMultipleOrders
(),
orderInfo
.
getAddressId
());
if
(!
deleteMultipleOrders
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getCode
()))
{
throw
new
BusinessException
(
"改约日期失败"
);
}
orderInfoDao
.
save
(
orderInfo
);
orderInfoDao
.
save
(
orderInfo
);
//记录流程
//记录流程
commonService
.
addOrderEvent
(
request
.
getOrderId
(),
""
,
"BEAN"
,
"BEAN"
,
OrderStatusEnum
.
CANCELED
.
getDescription
(),
request
.
getStage
(),
""
,
LocalDateTimeUtil
.
of
(
request
.
getHappen
()));
commonService
.
addOrderEvent
(
request
.
getOrderId
(),
""
,
"BEAN"
,
"BEAN"
,
OrderStatusEnum
.
CANCELED
.
getDescription
(),
request
.
getStage
(),
""
,
LocalDateTimeUtil
.
of
(
request
.
getHappen
()));
...
@@ -210,6 +215,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -210,6 +215,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
}
}
LocalDateTime
expectEnd
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectEnd
());
LocalDateTime
expectEnd
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectEnd
());
OrderInfoEntity
order
=
orderInfoDao
.
getByOrderId
(
req
.
getOrderId
());
OrderInfoEntity
order
=
orderInfoDao
.
getByOrderId
(
req
.
getOrderId
());
LocalDate
orderDt
=
order
.
getDt
();
order
.
setDt
(
expectBegin
.
toLocalDate
());
order
.
setDt
(
expectBegin
.
toLocalDate
());
order
.
setExpectTimeBegin
(
expectBegin
);
order
.
setExpectTimeBegin
(
expectBegin
);
order
.
setExpectTimeEnd
(
expectEnd
);
order
.
setExpectTimeEnd
(
expectEnd
);
...
@@ -234,7 +240,6 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -234,7 +240,6 @@ public class OrderInfoServiceImpl implements OrderInfoService {
// ii.网点:优先改约指派给当前网点
// ii.网点:优先改约指派给当前网点
// (不给当前工程师)
// (不给当前工程师)
if
(!
isToday
&&
isBelong
)
{
if
(!
isToday
&&
isBelong
)
{
order
=
handleMultipleOrders
(
order
);
}
else
if
(
isToday
&&
isBelong
)
{
}
else
if
(
isToday
&&
isBelong
)
{
// b.已派人-改约到当天
// b.已派人-改约到当天
// i.自有:优先改约指派给当前工程师
// i.自有:优先改约指派给当前工程师
...
@@ -318,8 +323,6 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -318,8 +323,6 @@ public class OrderInfoServiceImpl implements OrderInfoService {
order
.
setIsSpecialTime
(
CommonUtil
.
isSpecial
(
order
.
getExpectTimeBegin
().
toLocalTime
(),
order
.
setIsSpecialTime
(
CommonUtil
.
isSpecial
(
order
.
getExpectTimeBegin
().
toLocalTime
(),
order
.
getExpectTimeEnd
().
toLocalTime
(),
teamInfo
.
getWorkOn
(),
teamInfo
.
getWorkOff
()));
order
.
getExpectTimeEnd
().
toLocalTime
(),
teamInfo
.
getWorkOn
(),
teamInfo
.
getWorkOff
()));
}
}
//处理一家多单
order
=
handleMultipleOrders
(
order
);
}
else
if
(
isToday
&&
!
isBelong
)
{
}
else
if
(
isToday
&&
!
isBelong
)
{
// b.未派人-改约到当天
// b.未派人-改约到当天
// i.人工指派
// i.人工指派
...
@@ -331,6 +334,11 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -331,6 +334,11 @@ public class OrderInfoServiceImpl implements OrderInfoService {
sendMsg
(
branchEntity
.
getBranchId
(),
order
.
getOrderId
(),
req
.
getExpectBegin
());
sendMsg
(
branchEntity
.
getBranchId
(),
order
.
getOrderId
(),
req
.
getExpectBegin
());
}
}
//处理一家多单
// order = handleMultipleOrders(order);
if
(!
orderDt
.
isEqual
(
expectBegin
.
toLocalDate
())){
order
=
handleMultipleOrders
(
order
);
}
order
.
setOrgClusterId
(
clusterId
);
order
.
setOrgClusterId
(
clusterId
);
order
.
setOrgBranchId
(
branchId
);
order
.
setOrgBranchId
(
branchId
);
orderInfoDao
.
save
(
order
);
orderInfoDao
.
save
(
order
);
...
...
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