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 75f99c75
authored
Nov 17, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:工单插单计算
1 parent
1181ddaf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
project-interface/src/main/java/com/dituhui/pea/enums/StatusCodeEnum.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-interface/src/main/java/com/dituhui/pea/enums/StatusCodeEnum.java
View file @
75f99c7
...
...
@@ -147,6 +147,8 @@ public enum StatusCodeEnum {
ORDER_FINISHED
(
"030"
,
"订单已结束,请勿操作"
,
false
),
FENDAN_IS_TRANSCEND_AND_SPECIAL
(
"031"
,
"分单超派和特殊时间"
,
false
),
ENGINEER_IS_LEAVE_TIME
(
"032"
,
"工单(%s)指派失败!%s的工作日历在该时间段已有日程安排"
,
false
),
;
/**
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
75f99c7
...
...
@@ -357,7 +357,7 @@ public class DispatchServiceImpl implements DispatchService {
Result
<
OrderInfoEntity
>
entityResult
=
orderInfoService
.
insterEngineerOrders
(
engineerOrders
,
entity
,
skill
,
byTeamId
,
engineer
);
if
(!
entityResult
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getCode
()))
{
// return Result.failed("当前工程师无法预约合适时间");
errorList
.
add
(
entity
.
getOrderId
());
errorList
.
add
(
"单号:"
+
entity
.
getOrderId
());
continue
;
}
entity
=
entityResult
.
getResult
();
...
...
@@ -378,11 +378,9 @@ public class DispatchServiceImpl implements DispatchService {
successList
.
add
(
entity
.
getOrderId
());
}
List
<
String
>
resultList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
resultList
.
add
(
String
.
format
(
"%s订单指派(改派)成功"
,
String
.
join
(
","
,
successList
)));
}
if
(
CollectionUtils
.
isNotEmpty
(
errorList
))
{
resultList
.
add
(
String
.
format
(
"%s订单指派(改派)失败,当前工程师无法预约合适时间"
,
String
.
join
(
","
,
errorList
)));
String
msg
=
errorList
.
size
()
>
3
?
String
.
join
(
","
,
errorList
.
subList
(
0
,
3
))
+
"..."
:
String
.
join
(
","
,
errorList
);
resultList
.
add
(
String
.
format
(
StatusCodeEnum
.
ENGINEER_IS_LEAVE_TIME
.
getDesc
(),
msg
,
engineer
.
getName
()));
}
return
Result
.
success
(
CollectionUtils
.
isNotEmpty
(
resultList
)
?
String
.
join
(
","
,
resultList
)
:
null
);
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
75f99c7
This diff is collapsed.
Click to expand it.
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