Commit 18e85cdb by 张晓

fix dispatch bugs

1 parent ad69e05e
...@@ -108,7 +108,7 @@ public class BatchServiceImpl implements BatchService { ...@@ -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" + " 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' " + " where a.org_group_id=? and a.status='OPEN' " +
" and a.dt = ? " + " and a.dt = ? " +
" and a.appointment_status ='NOT_ASSIGNED' and appointment_method like 'AUTO%' \n" + " and a.appointment_status ='NOT_ASSIGNED' and a.appointment_method like 'AUTO%' \n" +
" order by a.expect_time_begin asc "; " order by a.expect_time_begin asc ";
int orderCount = jdbcTemplate.update(sqlOrder, batchNo, groupId, batchDay); int orderCount = jdbcTemplate.update(sqlOrder, batchNo, groupId, batchDay);
...@@ -121,7 +121,7 @@ public class BatchServiceImpl implements BatchService { ...@@ -121,7 +121,7 @@ public class BatchServiceImpl implements BatchService {
" left join order_appointment o on (a.order_id =o.order_id)\n" + " left join order_appointment o on (a.order_id =o.order_id)\n" +
" where a.org_group_id=? and a.status='OPEN' \n" + " where a.org_group_id=? and a.status='OPEN' \n" +
" and a.dt = ? " + " 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" + " and o.pre_status in ('PRE') \n" +
" order by a.expect_time_begin asc "; " order by a.expect_time_begin asc ";
int orderCountPre = jdbcTemplate.update(sqlOrderPre, batchNo, groupId, batchDay); int orderCountPre = jdbcTemplate.update(sqlOrderPre, batchNo, groupId, batchDay);
......
...@@ -42,7 +42,7 @@ class SolveServiceTest { ...@@ -42,7 +42,7 @@ class SolveServiceTest {
ExtractService extractService; ExtractService extractService;
String groupId = "gsuzhou"; String groupId = "gsuzhou";
String day = "2023-03-20"; String day = "2023-07-25";
private SolverManager<DispatchSolution, UUID> solverManager; private SolverManager<DispatchSolution, UUID> solverManager;
private SolverFactory<DispatchSolution> solverFactory; private SolverFactory<DispatchSolution> solverFactory;
...@@ -53,7 +53,7 @@ class SolveServiceTest { ...@@ -53,7 +53,7 @@ class SolveServiceTest {
SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class); SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class);
solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效 solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效
solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class); solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class);
solverConfig.withTerminationSpentLimit(Duration.ofSeconds(10)); solverConfig.withTerminationSpentLimit(Duration.ofSeconds(20));
solverFactory = SolverFactory.create(solverConfig); solverFactory = SolverFactory.create(solverConfig);
solver = solverFactory.buildSolver(); solver = solverFactory.buildSolver();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!