|
@@ -519,6 +519,25 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
@@ -519,6 +519,25 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
519
|
// 生成要车单
|
519
|
// 生成要车单
|
|
520
|
CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(draftRequestCarTicket, requestCarPlanId, variable);
|
520
|
CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(draftRequestCarTicket, requestCarPlanId, variable);
|
|
521
|
requestCarTicketService.create(ticketCreateVo);
|
521
|
requestCarTicketService.create(ticketCreateVo);
|
|
|
|
522
|
+ // 处理发货单
|
|
|
|
523
|
+ List<String> orderIds = shipmentsPlanDetailService.getOrderIdByShipmentOrderId(ticketCreateVo.getShipmentsOrderId());
|
|
|
|
524
|
+ List<DraftRequestCarTicket> draftRequestCarTicketList = draftRequestCarTicketService.listByOrderId(orderIds);
|
|
|
|
525
|
+ if (CollectionUtils.isNotEmpty(draftRequestCarTicketList)) {
|
|
|
|
526
|
+ boolean flag = true;
|
|
|
|
527
|
+ for (DraftRequestCarTicket draftTicket : draftRequestCarTicketList) {
|
|
|
|
528
|
+ if (businessId.equals(draftTicket.getId())) {
|
|
|
|
529
|
+ continue;
|
|
|
|
530
|
+ }
|
|
|
|
531
|
+ if (!"PASS".equals(draftTicket.getStatus())) {
|
|
|
|
532
|
+ flag = false;
|
|
|
|
533
|
+ break;
|
|
|
|
534
|
+ }
|
|
|
|
535
|
+ }
|
|
|
|
536
|
+ if (flag) {
|
|
|
|
537
|
+ // 更新订货单状态(草稿转为正常)
|
|
|
|
538
|
+ shipmentsOrderInfoService.updateStatus(ticketCreateVo.getShipmentsOrderId(), "UN_SHIPMENTS");
|
|
|
|
539
|
+ }
|
|
|
|
540
|
+ }
|
|
522
|
}
|
541
|
}
|
|
523
|
} else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
|
542
|
} else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
|
|
524
|
|| FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
|
543
|
|| FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
|
|
@@ -574,8 +593,6 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
@@ -574,8 +593,6 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
574
|
String loadingTime = minTime.format(formatter);
|
593
|
String loadingTime = minTime.format(formatter);
|
|
575
|
ticketVo.setLoadingTime(loadingTime);
|
594
|
ticketVo.setLoadingTime(loadingTime);
|
|
576
|
redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
|
595
|
redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
|
|
577
|
- // 更新订货单状态(草稿转为正常)
|
|
|
|
578
|
- shipmentsOrderInfoService.updateStatus(ticketVo.getShipmentsOrderId(), "UN_SHIPMENTS");
|
|
|
|
579
|
}
|
596
|
}
|
|
580
|
return ticketVo;
|
597
|
return ticketVo;
|
|
581
|
}
|
598
|
}
|