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 18e85cdb
authored
Jul 24, 2023
by
张晓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dispatch bugs
1 parent
ad69e05e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/BatchServiceImpl.java
project-dispatch/src/test/java/com/dituhui/pea/dispatch/SolveServiceTest.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/BatchServiceImpl.java
View file @
18e85cd
...
...
@@ -108,7 +108,7 @@ public class BatchServiceImpl implements BatchService {
" from order_request a left join skill_info b on (a.brand=b.brand and a.type=b.type and a.skill=b.skill )\n"
+
" where a.org_group_id=? and a.status='OPEN' "
+
" and a.dt = ? "
+
" and a.appointment_status ='NOT_ASSIGNED' and appointment_method like 'AUTO%' \n"
+
" and a.appointment_status ='NOT_ASSIGNED' and a
.a
ppointment_method like 'AUTO%' \n"
+
" order by a.expect_time_begin asc "
;
int
orderCount
=
jdbcTemplate
.
update
(
sqlOrder
,
batchNo
,
groupId
,
batchDay
);
...
...
@@ -121,7 +121,7 @@ public class BatchServiceImpl implements BatchService {
" left join order_appointment o on (a.order_id =o.order_id)\n"
+
" where a.org_group_id=? and a.status='OPEN' \n"
+
" and a.dt = ? "
+
" and a.appointment_status = 'ASSIGNED' and appointment_method like 'AUTO%' \n"
+
" and a.appointment_status = 'ASSIGNED' and
o.
appointment_method like 'AUTO%' \n"
+
" and o.pre_status in ('PRE') \n"
+
" order by a.expect_time_begin asc "
;
int
orderCountPre
=
jdbcTemplate
.
update
(
sqlOrderPre
,
batchNo
,
groupId
,
batchDay
);
...
...
project-dispatch/src/test/java/com/dituhui/pea/dispatch/SolveServiceTest.java
View file @
18e85cd
...
...
@@ -42,7 +42,7 @@ class SolveServiceTest {
ExtractService
extractService
;
String
groupId
=
"gsuzhou"
;
String
day
=
"2023-0
3-20
"
;
String
day
=
"2023-0
7-25
"
;
private
SolverManager
<
DispatchSolution
,
UUID
>
solverManager
;
private
SolverFactory
<
DispatchSolution
>
solverFactory
;
...
...
@@ -53,7 +53,7 @@ class SolveServiceTest {
SolverConfig
solverConfig
=
new
SolverConfig
().
withSolutionClass
(
DispatchSolution
.
class
);
solverConfig
.
withEntityClassList
(
Arrays
.
asList
(
Technician
.
class
,
Customer
.
class
));
// 这里不能漏掉,否则约束不生效
solverConfig
.
withConstraintProviderClass
(
DispatchConstraintProvider
.
class
);
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
1
0
));
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
2
0
));
solverFactory
=
SolverFactory
.
create
(
solverConfig
);
solver
=
solverFactory
.
buildSolver
();
...
...
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