diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index c6da172e8..02c49302f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -51,6 +51,7 @@ import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; import org.springblade.common.constant.delivery.DeliveryStatusConstant; +import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.orderpackage.*; import org.springblade.common.constant.reservation.*; @@ -3778,6 +3779,15 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.query().lambda() + .eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) + ); + if (!loadscanEntityList.isEmpty()){ + log.info(method+"检测当前取消包件存在装车或者签收操作:packageId{}",distributionCancelReservationPackageDTO.getPackageIds()); + throw new RuntimeException("包件存在装车、签收,无法进行取消"); + } //修改包件状态 parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());