Browse Source

计划取消维护客户数量

single_db
汤建军 1 year ago
parent
commit
997a86f155
  1. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

38
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3604,44 +3604,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
}
}
break;
case 2:
//取消库存品包件
if (Func.isEmpty(distributionCancelReservationPackageDTO.getInventoryPackageIds())){
log.error(method+"InventoryPackageIds参数缺失");
return R.fail("请联系管理员....");
}
String[] invenPackageIds = distributionCancelReservationPackageDTO.getInventoryPackageIds().split(",");
List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(distributionCancelReservationPackageDTO.getReservationId());
if (Func.isNotEmpty(disStockListDetailEntities)){
for (String invenPackageId : invenPackageIds) {
List<DisStockListDetailEntity> inventory = disStockListDetailEntities.stream().filter(inven -> inven.getId().equals(Long.parseLong(invenPackageId))).collect(Collectors.toList());
if (Func.isNotEmpty(inventory) &&inventory.size() == 1){
DisStockListDetailEntity disStockListDetailEntity = inventory.get(0);
if (disStockListDetailEntity.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue())
||disStockListDetailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())){
log.info(method+"检测当前取消包件存在装车或者签收操作:inventoryPackageId{}",disStockListDetailEntity.getId());
throw new RuntimeException("包件存在装车、签收,无法进行取消");
}
//库存品配送包件的取消操作
disStockListDetailEntity.setStockPackageStatus(InventoryPackageStatusConstant.quxiao.getValue());
disStockListDetailService.updateById(disStockListDetailEntity);
//维护对应预约的配送库存品品类数据
distributionReservationStocklistService.maintenanceReservationStockList(distributionCancelReservationPackageDTO.getReservationId());
//进行冻结数量的扣减
distributionStockListMapper.decreaseStockListQuantityOccupied(disStockListDetailEntity.getStockListId(),disStockListDetailEntity.getNum());
}else {
log.error(method+"库存品包件信息异常");;
throw new RuntimeException("库存品包件信息异常");
}
}
}else {
log.error(method+"预约单没有库存品包件");
return R.fail("此预约任务无库存品包件....");
}
break;
default:
//维护预约单状态
this.maintenanceReservationInfo(distributionCancelReservationPackageDTO.getReservationId());
//维护预约单数量

Loading…
Cancel
Save