|
@@ -545,6 +545,25 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
@@ -545,6 +545,25 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
545
|
// 生成要车单
|
545
|
// 生成要车单
|
|
546
|
CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(draftRequestCarTicket, requestCarPlanId, variable);
|
546
|
CreateRequestCarTicketVo ticketCreateVo = packRequestCarTicket(draftRequestCarTicket, requestCarPlanId, variable);
|
|
547
|
requestCarTicketService.create(ticketCreateVo);
|
547
|
requestCarTicketService.create(ticketCreateVo);
|
|
|
|
548
|
+ // 处理发货单
|
|
|
|
549
|
+ List<String> orderIds = shipmentsPlanDetailService.getOrderIdByShipmentOrderId(ticketCreateVo.getShipmentsOrderId());
|
|
|
|
550
|
+ List<DraftRequestCarTicket> draftRequestCarTicketList = draftRequestCarTicketService.listByOrderId(orderIds);
|
|
|
|
551
|
+ if (CollectionUtils.isNotEmpty(draftRequestCarTicketList)) {
|
|
|
|
552
|
+ boolean flag = true;
|
|
|
|
553
|
+ for (DraftRequestCarTicket draftTicket : draftRequestCarTicketList) {
|
|
|
|
554
|
+ if (businessId.equals(draftTicket.getId())) {
|
|
|
|
555
|
+ continue;
|
|
|
|
556
|
+ }
|
|
|
|
557
|
+ if (!"PASS".equals(draftTicket.getStatus())) {
|
|
|
|
558
|
+ flag = false;
|
|
|
|
559
|
+ break;
|
|
|
|
560
|
+ }
|
|
|
|
561
|
+ }
|
|
|
|
562
|
+ if (flag) {
|
|
|
|
563
|
+ // 更新订货单状态(草稿转为正常)
|
|
|
|
564
|
+ shipmentsOrderInfoService.updateStatus(ticketCreateVo.getShipmentsOrderId(), "UN_SHIPMENTS");
|
|
|
|
565
|
+ }
|
|
|
|
566
|
+ }
|
|
548
|
}
|
567
|
}
|
|
549
|
} else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
|
568
|
} else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
|
|
550
|
|| FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
|
569
|
|| FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
|
|
@@ -575,12 +594,12 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
@@ -575,12 +594,12 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
575
|
ticketVo.setOrderNo(draftRequestCarTicket.getOrderNo());
|
594
|
ticketVo.setOrderNo(draftRequestCarTicket.getOrderNo());
|
|
576
|
ticketVo.setOrderingUnit(draftRequestCarTicket.getOrderingUnit());
|
595
|
ticketVo.setOrderingUnit(draftRequestCarTicket.getOrderingUnit());
|
|
577
|
ticketVo.setQuantity(draftRequestCarTicket.getQuantity());
|
596
|
ticketVo.setQuantity(draftRequestCarTicket.getQuantity());
|
|
578
|
- ticketVo.setDestination(String.valueOf(variable.get("destination")));
|
|
|
|
579
|
- ticketVo.setConsignee(String.valueOf(variable.get("consignee")));
|
|
|
|
580
|
- ticketVo.setPhone(String.valueOf(variable.get("phone")));
|
|
|
|
581
|
- ticketVo.setReturnPlanArrangement(String.valueOf(variable.get("returnPlanArrangement")));
|
|
|
|
582
|
- ticketVo.setOther(String.valueOf(variable.get("other")));
|
|
|
|
583
|
- ticketVo.setSpecialLoadingRequirement(String.valueOf(variable.get("specialLoadingRequirement")));
|
597
|
+ ticketVo.setDestination((String) variable.get("destination"));
|
|
|
|
598
|
+ ticketVo.setConsignee((String) variable.get("consignee"));
|
|
|
|
599
|
+ ticketVo.setPhone((String) variable.get("phone"));
|
|
|
|
600
|
+ ticketVo.setReturnPlanArrangement((String) variable.get("returnPlanArrangement"));
|
|
|
|
601
|
+ ticketVo.setOther((String) variable.get("other"));
|
|
|
|
602
|
+ ticketVo.setSpecialLoadingRequirement((String) variable.get("specialLoadingRequirement"));
|
|
584
|
//外办审核人(草稿要车单审核人)
|
603
|
//外办审核人(草稿要车单审核人)
|
|
585
|
ticketVo.setExternalAuditor(SecurityUtil.getCurrentUser().getId());
|
604
|
ticketVo.setExternalAuditor(SecurityUtil.getCurrentUser().getId());
|
|
586
|
//经营办审核人(发货计划提交人)
|
605
|
//经营办审核人(发货计划提交人)
|
|
@@ -600,8 +619,6 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
@@ -600,8 +619,6 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
|
600
|
String loadingTime = minTime.format(formatter);
|
619
|
String loadingTime = minTime.format(formatter);
|
|
601
|
ticketVo.setLoadingTime(loadingTime);
|
620
|
ticketVo.setLoadingTime(loadingTime);
|
|
602
|
redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
|
621
|
redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
|
|
603
|
- // 更新订货单状态(草稿转为正常)
|
|
|
|
604
|
- shipmentsOrderInfoService.updateStatus(ticketVo.getShipmentsOrderId(), "UN_SHIPMENTS");
|
|
|
|
605
|
}
|
622
|
}
|
|
606
|
return ticketVo;
|
623
|
return ticketVo;
|
|
607
|
}
|
624
|
}
|