Browse Source

预约取消bug修复

training
kilo 1 year ago
parent
commit
3f82ef02f4
  1. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

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

@ -1780,7 +1780,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(s.getServiceNumber())){
serviceNumber.add(s.getServiceNumber());
}
DistributionReservationStockarticleEntity reservationStockarticleEntity = new DistributionReservationStockarticleEntity();
AtomicInteger reservationOrderNum = new AtomicInteger();
if (s.getIsZero().equals(IsOrNoConstant.no.getValue())){
@ -2184,6 +2183,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, rs.getStockArticleId())
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()));
reservationZeroPackageEntityList.forEach(rzp->{
rzp.setZeroPackageStatus(ReservationPackageStatusConstant.quxiao.getValue());
distributionReservationZeroPackageService.updateById(rzp);
DistributionParcelNumberEntity parcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda()
.eq(DistributionParcelNumberEntity::getParcelListId, rzp.getParcelListId()));
if (Func.isNotEmpty(parcelNumberEntity)){
@ -2221,7 +2222,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationPackageMapper.deleteReservationPackage(reservationEntity.getId());
distributionReservationZeroPackageMapper.deleteByReservationId(reservationEntity.getId());
distributionReservationMapper.deleteByReservationId(reservationEntity.getId());
}else {
} else {
//该预约计划存在备货任务
//查询备货任务
DistributionStockupEntity stockupEntity = distributionStockupMapper.selectById(distributionStockupInfoEntities.get(0).getStockupId());
@ -2239,6 +2240,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
//这里直接进行物理删除即可,但是在删除前需要将数据状态进行维护
//处理预约的包件信息
}else {
reservationEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue());
this.updateById(reservationEntity);
}
}else {
log.error("###################预约备货任务数据异常,备货任务ID:{}",distributionStockupInfoEntities.get(0).getStockupId());

Loading…
Cancel
Save