Browse Source

取消订制品增加是否装车拦截

master
汤建军 9 months ago
parent
commit
e0196bc015
  1. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

10
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<Distribu
log.info(method+"检测当前取消包件存在装车或者签收操作:packageId{}",distributionCancelReservationPackageDTO.getPackageIds());
throw new RuntimeException("包件存在装车、签收,无法进行取消");
}
//查询是否存在装车或者签收数据
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>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());

Loading…
Cancel
Save