|
@@ -74,6 +74,7 @@ public class WaybillOrderService {
|
|
|
private final KwtWaybillOrderAddressRepository waybillOrderAddressRepository;
|
|
private final KwtWaybillOrderAddressRepository waybillOrderAddressRepository;
|
|
|
private final KwtWaybillOrderTicketRepository waybillOrderTicketRepository;
|
|
private final KwtWaybillOrderTicketRepository waybillOrderTicketRepository;
|
|
|
private final KwtWaybillOrderNodeRepository waybillOrderNodeRepository;
|
|
private final KwtWaybillOrderNodeRepository waybillOrderNodeRepository;
|
|
|
|
|
+ private final KwtWaybillOrderWeighbridgeRepository waybillOrderWeighbridgeRepository;
|
|
|
|
|
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
|
|
|
RemoteSystemService remoteSystemService;
|
|
RemoteSystemService remoteSystemService;
|
|
@@ -1734,6 +1735,42 @@ public class WaybillOrderService {
|
|
|
unloadingHandler.handler(param);
|
|
unloadingHandler.handler(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 过磅推送图片
|
|
|
|
|
+ * @param param
|
|
|
|
|
+ */
|
|
|
|
|
+ public void weighImage(WaybillOrderWeighImageParam param) {
|
|
|
|
|
+ if (StringUtils.isBlank(param.getTruckNo())){
|
|
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "车牌号不能为空!");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 定义运单可以过磅的状态集合(无论山上山下地磅)
|
|
|
|
|
+ List<Integer> FORBIDDEN_STATUSES = Arrays.asList(
|
|
|
|
|
+ CarWaybillV1Enum.PENDING_VEHICLE.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.REFUSE_TRAFFIC.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.EXIT_COMPLETED.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.EMPTY_WAIT_LEAVE.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.WAIT_LEAVE.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.UNLOADING.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.REPLENISHING.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.REPLENISH_FINISH.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.WAIT_LOADING.getCode(),
|
|
|
|
|
+ CarWaybillV1Enum.UNLOADING_POINT.getCode()
|
|
|
|
|
+ );
|
|
|
|
|
+ List<KwtWaybillOrder> wbOrderByTruckNo = waybillOrderRepository.findWbOrderByTruckNoAndStatus(param.getTruckNo(), FORBIDDEN_STATUSES);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(wbOrderByTruckNo)) {
|
|
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "[过磅推送图片]当前车辆没有可以过磅称重状态的运单");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (wbOrderByTruckNo.size() > 1) {
|
|
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "[过磅推送图片]当前车辆过磅称重状态存在多条运单");
|
|
|
|
|
+ }
|
|
|
|
|
+ KwtWaybillOrder waybillOrder = wbOrderByTruckNo.get(0);
|
|
|
|
|
+ KwtWaybillOrderNode waybillOrderNode = waybillOrderNodeRepository.queryNodesByOrderId(waybillOrder.getId(), waybillOrder.getStatus());
|
|
|
|
|
+ if (waybillOrderNode == null) {
|
|
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "[过磅推送图片]未查询运单节点数据");
|
|
|
|
|
+ }
|
|
|
|
|
+ waybillOrderNode.setWeighUrl(param.getWeighUrl());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
// /**
|