|
|
@@ -71,7 +71,8 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
|
|
|
if (orderTicket == null) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_TICKET_NOT_FOUND, "当前物流运单装卸货信息不存在,无法记录皮重!");
|
|
|
}
|
|
|
- if (checkIsFirst(waybillOrder)) {
|
|
|
+ checkIsFirst(waybillOrder);
|
|
|
+ if (waybillOrder.getIsExistWeighbridges()) {
|
|
|
//第一次过磅
|
|
|
firstWeighbridge(param, waybillOrder, orderTicket);
|
|
|
} else {
|
|
|
@@ -86,10 +87,14 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
|
|
|
* @param waybillOrder
|
|
|
* @return
|
|
|
*/
|
|
|
- private Boolean checkIsFirst(KwtWaybillOrder waybillOrder) {
|
|
|
+ private void checkIsFirst(KwtWaybillOrder waybillOrder) {
|
|
|
List<KwtWaybillOrderWeighbridge> weighbridges = waybillOrderWeighbridgeRepository
|
|
|
.queryWaybillOrderWeighbridgeByWOrderId(waybillOrder.getId(), WeighbridgeTypeEnum.LOADING.getCode());
|
|
|
- return CollectionUtils.isEmpty(weighbridges);
|
|
|
+ if (CollectionUtils.isEmpty(weighbridges)) {
|
|
|
+ waybillOrder.setIsExistWeighbridges(Boolean.TRUE);
|
|
|
+ } else {
|
|
|
+ waybillOrder.setIsExistWeighbridges(Boolean.FALSE);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -557,7 +562,7 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
|
|
|
protected void getStatus(KwtWaybillOrder waybillOrder) {
|
|
|
Integer status;
|
|
|
// 校验是否第一次过磅
|
|
|
- if (checkIsFirst(waybillOrder)) {
|
|
|
+ if (waybillOrder.getIsExistWeighbridges()) {
|
|
|
status = CarWaybillV1Enum.REFUSE_TRAFFIC.getCode();
|
|
|
updateOrderStatus(waybillOrder, status);
|
|
|
return;
|
|
|
@@ -676,7 +681,7 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
protected void calculateAutoDispatchScore(WaybillOrderCmeIntoWeighParam param, KwtWaybillOrder waybillOrder) {
|
|
|
- if (checkIsFirst(waybillOrder)) {
|
|
|
+ if (waybillOrder.getIsExistWeighbridges()) {
|
|
|
//校验连续按时到场次数
|
|
|
checkContinuousArriveTimes(waybillOrder);
|
|
|
}
|