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 15e151c0
authored
Nov 23, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:RESCHEDULED工单也可自动派单
1 parent
aea74809
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/utils/DispatchSolutionUtils.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/utils/DispatchSolutionUtils.java
View file @
15e151c
...
...
@@ -12,6 +12,7 @@ import java.util.stream.Collectors;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.optaplanner.constraint.streams.drools.DroolsConstraintStreamScoreDirector
;
...
...
@@ -36,6 +37,7 @@ import com.dituhui.pea.dispatch.pojo.Customer;
import
com.dituhui.pea.dispatch.pojo.DispatchSolution
;
import
com.dituhui.pea.dispatch.pojo.Technician
;
@Slf4j
public
class
DispatchSolutionUtils
{
/**
...
...
@@ -385,6 +387,11 @@ public class DispatchSolutionUtils {
// 违反硬约束对象,根据具体约束返回不同类型对象
if
(
indictedObject
instanceof
Customer
)
{
Customer
customer
=
(
Customer
)
indictedObject
;
log
.
warn
(
">>> 工单({})违背 customerTimeWindowsMatch 硬约束: engineerCode: {}, arriveTime: {},departureTime: {}"
,
customer
.
getCode
(),
null
!=
customer
.
getTechnician
()
?
customer
.
getTechnician
().
getCode
()
:
null
,
customer
.
getArrivalTime
(),
customer
.
getDepartureTime
());
// 更新shadow变量
updateShadowVariable
(
customer
);
// 移除技术员
...
...
@@ -403,6 +410,11 @@ public class DispatchSolutionUtils {
for
(
Customer
customer
:
customerList
)
{
if
(!
customer
.
isInTechnicianTimeWindows
()
&&
!
StrUtil
.
equals
(
"CONFIRM"
,
customer
.
getStatus
()))
{
log
.
warn
(
">>> 工单({})违背 customerTimeWindowsMatch 硬约束: engineerCode: {}, arriveTime: {},departureTime: {}"
,
customer
.
getCode
(),
null
!=
customer
.
getTechnician
()
?
customer
.
getTechnician
().
getCode
()
:
null
,
customer
.
getArrivalTime
(),
customer
.
getDepartureTime
());
// 更新shadow变量
updateShadowVariable
(
customer
);
// 移除技术员
...
...
@@ -418,6 +430,11 @@ public class DispatchSolutionUtils {
// 违反硬约束对象,根据具体约束返回不同类型对象
if
(
indictedObject
instanceof
Customer
)
{
Customer
customer
=
(
Customer
)
indictedObject
;
log
.
warn
(
">>> 工单({})违背 customerTimeWindowsMatch 硬约束: engineerCode: {}, arriveTime: {},departureTime: {}"
,
customer
.
getCode
(),
null
!=
customer
.
getTechnician
()
?
customer
.
getTechnician
().
getCode
()
:
null
,
customer
.
getArrivalTime
(),
customer
.
getDepartureTime
());
// 更新shadow变量
updateShadowVariable
(
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