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 e509492e
authored
Nov 15, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复指定排除工程师逻辑
1 parent
d64e0934
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/DispatchConstraintProvider.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/SolveServiceImpl.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/DispatchConstraintProvider.java
View file @
e509492
...
@@ -95,11 +95,13 @@ public class DispatchConstraintProvider implements ConstraintProvider {
...
@@ -95,11 +95,13 @@ public class DispatchConstraintProvider implements ConstraintProvider {
protected
Constraint
dispatchedMatch
(
ConstraintFactory
factory
)
{
protected
Constraint
dispatchedMatch
(
ConstraintFactory
factory
)
{
return
factory
.
forEach
(
Customer
.
class
).
filter
(
customer
->
return
factory
.
forEach
(
Customer
.
class
).
filter
(
customer
->
// 已分配
// 已分配但是分给了别人
(
customer
.
getDispatchedTechnicianCode
()
!=
null
(
customer
.
getDispatchedTechnicianCode
()
!=
null
&&
customer
.
getTechnician
()
!=
null
&&
(
customer
.
getTechnician
()
==
null
||
!
StringUtils
.
equals
(
customer
.
getDispatchedTechnicianCode
(),
customer
.
getTechnician
().
getCode
())))
&&
!
StringUtils
.
equals
(
customer
.
getDispatchedTechnicianCode
(),
customer
.
getTechnician
().
getCode
()))
||
||
(
customer
.
getExclusiveTechnicianCode
()
!=
null
// 已排除但是分给了这个人
&&
(
customer
.
getTechnician
()
==
null
||
StrUtil
.
contains
(
","
+
customer
.
getExclusiveTechnicianCode
()
+
","
,
","
+
customer
.
getTechnician
().
getCode
()
+
","
))))
(
customer
.
getExclusiveTechnicianCode
()
!=
null
&&
customer
.
getTechnician
()
!=
null
&&
StringUtils
.
equals
(
customer
.
getExclusiveTechnicianCode
(),
customer
.
getTechnician
().
getCode
())))
.
penalizeLong
(
HardSoftLongScore
.
ONE_HARD
,
customer
->
50
)
.
penalizeLong
(
HardSoftLongScore
.
ONE_HARD
,
customer
->
50
)
.
asConstraint
(
ConstraintNameEnum
.
dispatchedMatch
.
name
());
.
asConstraint
(
ConstraintNameEnum
.
dispatchedMatch
.
name
());
}
}
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/SolveServiceImpl.java
View file @
e509492
...
@@ -272,6 +272,11 @@ public class SolveServiceImpl implements SolveService {
...
@@ -272,6 +272,11 @@ public class SolveServiceImpl implements SolveService {
orderInfo
.
getAppointEngineerCodes
().
trim
()
:
null
);
orderInfo
.
getAppointEngineerCodes
().
trim
()
:
null
);
}
}
log
.
info
(
"订单指定排除工程师, teamId:{}, batchNo:{}, orderId:{}, dispatchedTechnicianCode:{}, exclusiveTechnicianCode:{}"
,
teamId
,
batchNo
,
order
.
getOrderId
(),
customer
.
getDispatchedTechnicianCode
(),
customer
.
getExclusiveTechnicianCode
());
customerList
.
add
(
customer
);
customerList
.
add
(
customer
);
});
});
...
...
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