Commit 9faeb170 by Ren Ping

fix:RESCHEDULED工单也可自动派单

1 parent 8209c528
......@@ -44,7 +44,7 @@ public interface DispatchOrderRepository extends CrudRepository<DispatchOrder, L
+ " CONCAT(a.brand, '-', a.type, '-', a.skill) skills , a.take_time , a.appointment_status status\n"
+ " FROM order_info a \n" + " WHERE a.org_team_id=?3 AND a.dt = ?4 AND bean_status='OPEN'\n"
+ " AND (appointment_method like 'AUTO%' or appointment_method='MANUAL') AND a.appointment_status IN ('INIT', 'PRE')\n"
+ " AND order_status ='NORMAL' AND service_status='INIT'\n"
+ " AND order_status in ('NORMAL','RESCHEDULED') AND service_status='INIT'\n"
+ " ORDER BY a.expect_time_begin ASC \n",
nativeQuery = true)
List<Map<String,Object>> getNewDispatchOrder(String groupId, String batchNo, String teamId, String batchDay);
......@@ -58,7 +58,7 @@ public interface DispatchOrderRepository extends CrudRepository<DispatchOrder, L
" from order_info a \n" +
" where a.org_team_id=?3 and a.dt = ?4 and bean_status='OPEN'\n" +
" and (appointment_method like 'AUTO%' or appointment_method='MANUAL') and a.appointment_status in ('CONFIRM')\n" +
" and order_status ='NORMAL' and service_status='INIT'\n" +
" and order_status in ('NORMAL','RESCHEDULED') and service_status='INIT'\n" +
" order by a.expect_time_begin asc ",
nativeQuery = true)
List<Map<String,Object>> getNewDispatchConfirmOrder(String groupId, String batchNo, String teamId, String batchDay);
......
......@@ -106,10 +106,11 @@ public class ExtractServiceImpl implements ExtractService {
OrderInfo orderInfo = orderOpt.get();
if (!("OPEN".equals(orderInfo.getBeanStatus()) &&
Set.of("AUTO_NOW", "AUTO_BATCH").contains(orderInfo.getAppointmentMethod()) &&
Set.of("INIT", "PRE").contains(orderInfo.getAppointmentStatus()) &&
"NORMAL".equals(orderInfo.getOrderStatus()) && "INIT".equals(orderInfo.getServiceStatus()))) {
if (!("OPEN".equals(orderInfo.getBeanStatus())
&& Set.of("AUTO_NOW", "AUTO_BATCH", "MANUAL").contains(orderInfo.getAppointmentMethod())
&& Set.of("INIT", "PRE", "CONFIRM").contains(orderInfo.getAppointmentStatus())
&& Set.of("NORMAL", "RESCHEDULED").contains(orderInfo.getOrderStatus())
&& "INIT".equals(orderInfo.getServiceStatus()))) {
log.warn("算法结果更新到工单, step1.1-loop, 工单状态异常, groupId:{}, batchNo:{}, orderId:{}, bean-status:{}, appointment-status:{}, order-status:{}, service-status:{}",
groupId, batchNo, orderId, orderInfo.getBeanStatus(), orderInfo.getAppointmentStatus(), orderInfo.getOrderStatus(), orderInfo.getServiceStatus());
......@@ -236,7 +237,7 @@ public class ExtractServiceImpl implements ExtractService {
if (!("OPEN".equals(orderInfo.getBeanStatus())
&& Set.of("AUTO_NOW", "AUTO_BATCH", "MANUAL").contains(orderInfo.getAppointmentMethod())
&& Set.of("INIT", "PRE", "CONFIRM").contains(orderInfo.getAppointmentStatus())
&& "NORMAL".equals(orderInfo.getOrderStatus())
&& Set.of("NORMAL", "RESCHEDULED").contains(orderInfo.getOrderStatus())
&& "INIT".equals(orderInfo.getServiceStatus()))) {
log.warn("算法结果更新到工单, step1.1-loop, 工单状态异常, teamId:{}, batchNo:{}, orderId:{}, bean-status:{}, appointment-status:{}, order-status:{}, service-status:{}",
......
......@@ -3,7 +3,7 @@ server:
dispatch:
cron:
expr: 0 58 8-23 * * ?
expr: 0 22 8-23 * * ?
next-day-limit: 2
scheduler:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!