Browse Source

滞留增加订单预约装车状态维护

training
汤建军 1 year ago
parent
commit
a365c38268
  1. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  2. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  3. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  4. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java

@ -206,10 +206,10 @@ public interface IDistributionAsyncService {
void checkOrderLoadingStatus(Long packageId); void checkOrderLoadingStatus(Long packageId);
/** /**
* 维护包件订单预约状态 * 维护订单预约装车状态
* @param parcelListEntity * @param parcelListEntity
*/ */
void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity); void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity);
/** /**
* 修改零担备货状态 * 修改零担备货状态

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -886,22 +886,33 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
} }
@Override @Override
public void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity) { public void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity) {
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda() List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId())); .eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId()));
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
boolean flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue())); boolean reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue()));
if (flag) { if (reservationStatusFlag) {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue()); stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
} else { } else {
flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue())); reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue()));
if (flag) { if (reservationStatusFlag) {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue()); stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue());
} else { } else {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue()); stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue());
} }
} }
boolean loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
if (loadingStatusFlag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.chuku.getValue());
} else {
loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
if (loadingStatusFlag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue());
} else {
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenchuku.getValue());
}
}
distributionStockArticleService.updateById(stockArticleEntity); distributionStockArticleService.updateById(stockArticleEntity);
} }
@ -1169,6 +1180,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
} }
} }
} }
//维护预约的预约数量 //维护预约的预约数量
maintenanceReservationPackageNum(reservationId); maintenanceReservationPackageNum(reservationId);
maintenanceDeliveryPackageNum(deliveryId); maintenanceDeliveryPackageNum(deliveryId);

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -5355,6 +5355,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanService.updateById(loadscanEntity); distributionLoadscanService.updateById(loadscanEntity);
// 对应签收信息的装车数量要进行扣减 // 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub()); int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
distributionAsyncService.checkReservationStatusAndLoadingStatusByPackage(parcelListEntity);
} }
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护 //进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId); distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId);

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -174,7 +174,8 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
warehouseRetentionRecordEntity.setRetentionCarId(warehouseRetentionRecordDTO.getLoadingId()); warehouseRetentionRecordEntity.setRetentionCarId(warehouseRetentionRecordDTO.getLoadingId());
warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId()); warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId());
warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName()); warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName());
warehouseRetentionRecordEntity.setRetentionType(RetentionTypeConstant.peisongzhiliu.getValue()); warehouseRetentionRecordEntity.setAssembleCarPersonId(warehouseRetentionRecordDTO.getAssembleCarPersonId());
warehouseRetentionRecordEntity.setAssembleCarPersonName(warehouseRetentionRecordDTO.getAssembleCarPersonName());
warehouseRetentionRecordEntity.setRetentionCreateUserId(user.getUserId()); warehouseRetentionRecordEntity.setRetentionCreateUserId(user.getUserId());
warehouseRetentionRecordEntity.setRetentionCreateUserName(user.getUserName()); warehouseRetentionRecordEntity.setRetentionCreateUserName(user.getUserName());
this.save(warehouseRetentionRecordEntity); this.save(warehouseRetentionRecordEntity);
@ -196,7 +197,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
r.setRetentionScanTime(new Date()); r.setRetentionScanTime(new Date());
r.setRetentionScanUserId(user.getUserId()); r.setRetentionScanUserId(user.getUserId());
r.setRetentionScanUsername(user.getNickName()); r.setRetentionScanUsername(user.getNickName());
r.setRetentionQuantity(r.getRetentionQuantity()); r.setRetentionQuantity(r.getRetentionQuantity());
retentionTotal.getAndAdd(r.getRetentionQuantity()); retentionTotal.getAndAdd(r.getRetentionQuantity());
r.setDeliveryId(warehouseRetentionRecordDTO.getDeliveryId()); r.setDeliveryId(warehouseRetentionRecordDTO.getDeliveryId());
@ -234,7 +234,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
@Override @Override
public List<WarehouseRetentionRecordExcel> exportWarehouseRetentionRecord(Map<String, Object> paramMap) { public List<WarehouseRetentionRecordExcel> exportWarehouseRetentionRecord(Map<String, Object> paramMap) {
// 获取当前登录的仓库信息 // 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) { if (ObjectUtils.isNull(myCurrentWarehouse)) {

Loading…
Cancel
Save