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 a1213087
authored
Nov 09, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
2 parents
4e612c11
bb1a8006
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/ConstraintNameEnum.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/DispatchConstraintProvider.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/pojo/Customer.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/ConstraintNameEnum.java
View file @
a121308
...
@@ -26,7 +26,7 @@ public enum ConstraintNameEnum {
...
@@ -26,7 +26,7 @@ public enum ConstraintNameEnum {
*/
*/
technicianCapacityMatch
,
technicianCapacityMatch
,
/**
/**
* 已分配匹配
* 已分配
和已排除技术员
匹配
*/
*/
dispatchedMatch
,
dispatchedMatch
,
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/constraint/DispatchConstraintProvider.java
View file @
a121308
...
@@ -93,10 +93,14 @@ public class DispatchConstraintProvider implements ConstraintProvider {
...
@@ -93,10 +93,14 @@ public class DispatchConstraintProvider implements ConstraintProvider {
}
}
protected
Constraint
dispatchedMatch
(
ConstraintFactory
factory
)
{
protected
Constraint
dispatchedMatch
(
ConstraintFactory
factory
)
{
return
factory
.
forEach
(
Customer
.
class
)
return
factory
.
forEach
(
Customer
.
class
).
filter
(
customer
->
.
filter
(
customer
->
customer
.
getDispatchedTechnicianCode
()
!=
null
// 已分配
&&
((
customer
.
getTechnician
()
==
null
)
||
(!
StringUtils
(
customer
.
getDispatchedTechnicianCode
()
!=
null
&&
((
customer
.
getTechnician
()
==
null
)
.
equals
(
customer
.
getDispatchedTechnicianCode
(),
customer
.
getTechnician
().
getCode
()))))
||
(!
StringUtils
.
equals
(
customer
.
getDispatchedTechnicianCode
(),
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/pojo/Customer.java
View file @
a121308
...
@@ -21,8 +21,12 @@ public class Customer {
...
@@ -21,8 +21,12 @@ public class Customer {
private
long
id
;
private
long
id
;
private
String
code
;
private
String
code
;
// 已分配
// 已分配
private
String
dispatchedTechnicianCode
;
private
String
dispatchedTechnicianCode
;
// 已排除
private
String
exclusiveTechnicianCode
;
// orderid(code)+dt 确定唯一一条工单
// orderid(code)+dt 确定唯一一条工单
private
String
dt
;
private
String
dt
;
@JsonIgnore
@JsonIgnore
...
...
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