|
|
|
@ -55,6 +55,7 @@ import org.springblade.common.constant.signing.SignforStatusConstant;
|
|
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockupTypeConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.serviceConstant.ServiceConstant; |
|
|
|
|
import org.springblade.common.utils.AddressUtil; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
@ -2953,7 +2954,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
.notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()})); |
|
|
|
|
if (Func.isEmpty(distributionParcelListEntities)) { |
|
|
|
|
log.error("#########################无可用包件,订单ID为‘;:{}", s.getId()); |
|
|
|
|
throw new RuntimeException(s.getOrderCode() + "无可用包件!!!"); |
|
|
|
|
throw new CustomerException(s.getOrderCode() + "无可用包件!!!"); |
|
|
|
|
} |
|
|
|
|
List<Long> packageIds = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); |
|
|
|
|
packageLockIds.addAll(packageIds); |
|
|
|
@ -3044,7 +3045,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
boolean inputFlag = parcelNumberVOS.stream().allMatch(zero -> zero.getReservationNum() <= 0); |
|
|
|
|
if (inputFlag) { |
|
|
|
|
//判断零担品类录入是否都为0
|
|
|
|
|
throw new RuntimeException(s.getOrderCode() + "此零担订单数量录入错误!!!"); |
|
|
|
|
throw new CustomerException(s.getOrderCode() + "此零担订单数量录入错误!!!"); |
|
|
|
|
} |
|
|
|
|
//存在零担订单的包件信息
|
|
|
|
|
parcelNumberVOS.forEach(p -> { |
|
|
|
@ -3077,7 +3078,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
if (!list.isEmpty()) { |
|
|
|
|
int sum = list.stream().mapToInt(DistributionParcelNumberVO::getHandQuantity).sum(); |
|
|
|
|
if (sum == 0) { |
|
|
|
|
throw new RuntimeException(s.getOrderCode() + "此零担订单无在库数量!!!"); |
|
|
|
|
throw new CustomerException(s.getOrderCode() + "此零担订单无在库数量!!!"); |
|
|
|
|
} |
|
|
|
|
list.forEach(l -> { |
|
|
|
|
if (l.getHandQuantity() > 0) { |
|
|
|
@ -3124,7 +3125,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
if (b) { |
|
|
|
|
log.error("###############预约新增订单同时操作"); |
|
|
|
|
//当前操作包件存在于缓存中,此次操作无效
|
|
|
|
|
throw new RuntimeException(s.getOrderCode() + "正在操作,请刷新后尝试"); |
|
|
|
|
throw new CustomerException(s.getOrderCode() + "正在操作,请刷新后尝试"); |
|
|
|
|
} else { |
|
|
|
|
packageLockIds.addAll(a); |
|
|
|
|
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + s.getOrderCode(), packageLockIds, 60L); |
|
|
|
@ -3145,7 +3146,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
|
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListService.getById(i.getId()); |
|
|
|
|
int keyongshuliang = stockListEntity.getQuantityStock() - stockListEntity.getQuantityOccupied(); |
|
|
|
|
if (i.getReservationNum() > keyongshuliang) { |
|
|
|
|
throw new RuntimeException("库存品库内数量不足!!!"); |
|
|
|
|
throw new CustomerException("库存品库内数量不足!!!"); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotBlank(i.getServiceNumber())) { |
|
|
|
|
serviceNumber.add(i.getServiceNumber()); |
|
|
|
|