Browse Source

预约计划维护订单配送数量

single_db
汤建军 1 year ago
parent
commit
30d3b1297d
  1. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  2. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

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

@ -2775,9 +2775,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
s.setAvailableQuantity(0);
distributionStockArticleService.updateById(s);
// s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// s.setAvailableQuantity(0);
// distributionStockArticleService.updateById(s);
} else {
packageListInfo.forEach(p -> {
orderPackageNum.getAndAdd(p.getQuantity());
@ -2791,9 +2791,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(p);
//这里根据包件进行订单状态的改变
distributionAsyncService.checkStockArticleReservationStatus(p);
// distributionAsyncService.checkStockArticleReservationStatus(p);
});
}
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId());
} else if (s.getIsZero().equals(IsOrNoConstant.yes.getValue())) {
List<DistributionParcelNumberVO> parcelNumberVOS = s.getParcelNumberVOS();
reservationStockarticleEntity.setIsZero(s.getIsZero());
@ -2878,7 +2880,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionReservationMapper.updateById(reservationEntity);
deliveryWarehouseName.add(reservationEntity.getWarehouseName());
deliveryPackageTotal.getAndAdd(reservationEntity.getReservationNum());
//TODO 这里新增的客户还需要进行和配送任务、备货任务之间的绑定关系
//建立这个预约和配送任务之间的关系
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
distributionSignforEntity.setDeliveryId(deliveryListEntityId);
@ -2957,7 +2958,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(p);
//这里根据包件进行订单状态的改变
distributionAsyncService.checkStockArticleReservationStatus(p);
// distributionAsyncService.checkStockArticleReservationStatus(p);
});
} else {
//查询该订单下的所有包件信息并插入该计划中
@ -2986,10 +2987,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
s.setAvailableQuantity(0);
distributionStockArticleService.updateById(s);
// s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// s.setAvailableQuantity(0);
// distributionStockArticleService.updateById(s);
}
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId());
} else {
//该客户下增加零担订单
List<DistributionParcelNumberVO> parcelNumberVOS = s.getParcelNumberVOS();

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

@ -1578,7 +1578,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
mallId.add(stockArticleEntity.getMallId());
storeName.add(stockArticleEntity.getStoreName());
receivingUnit.add(distributionStockArticleDTO.getConsigneeUnit());
Integer integer = distributionStockArticleMapper.augmentDeliveryQuantity(reservationStockarticleEntity.getStockArticleId(), reservationStockarticleEntity.getReservationNum());
// Integer integer = distributionStockArticleMapper.augmentDeliveryQuantity(reservationStockarticleEntity.getStockArticleId(), reservationStockarticleEntity.getReservationNum());
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(distributionStockArticleDTO.getOrderCode(),myCurrentWarehouse.getId());
} else {
//查询出这个订单原来在这个预约中的勾选情况
DistributionStockArticleDTO distributionStockArticleDTO = v.get(0);
@ -1627,8 +1629,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationStockarticleEntity.setReservationNum(packageNum.get());
distributionReservationStockarticleService.updateById(reservationStockarticleEntity);
packTotal.getAndAdd(reservationStockarticleEntity.getReservationNum());
distributionAsyncService.changeOrderReservationStatus(distributionStockArticleDTO);
// distributionAsyncService.changeOrderReservationStatus(distributionStockArticleDTO);
oldStockArticle.remove(k);
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(distributionStockArticleDTO.getOrderCode(),myCurrentWarehouse.getId());
} else {
//没有包件 保持原装
packTotal.getAndAdd(reservationStockarticleEntity.getReservationNum());
@ -1761,7 +1765,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//需要修改订单的状态
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(i);
DistributionStockArticleDTO stockArticleDTO = Func.copy(stockArticleEntity, DistributionStockArticleDTO.class);
distributionAsyncService.changeOrderReservationStatus(stockArticleDTO);
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(stockArticleDTO.getOrderCode(),myCurrentWarehouse.getId());
// distributionAsyncService.changeOrderReservationStatus(stockArticleDTO);
//这里需要根据包件状态进行订单状态的修改
//这里异步查看该订单下的包件信息是否都处于预约状态,如果不是那么为订单预约装填,部分那么订单为部分预约,没有那么订单处于待预约状态
@ -2117,7 +2123,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(p);
//这里根据包件进行订单状态的改变
distributionAsyncService.checkStockArticleReservationStatus(p);
// distributionAsyncService.checkStockArticleReservationStatus(p);
});
} else {
//没有进行包件选择 默认添加可配送的所有包件
@ -2154,10 +2160,12 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
s.setAvailableQuantity(0);
distributionStockArticleService.updateById(s);
// s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// s.setAvailableQuantity(0);
// distributionStockArticleService.updateById(s);
}
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId());
} else {
//-----------------------------------------------------------2023-10-11--- 零担商配处理-----------------------------------------------------------------------
List<DistributionParcelNumberVO> parcelNumberVOS = s.getParcelNumberVOS();
@ -3124,7 +3132,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationStockarticleService.save(distributionReservationStockarticleEntity);
packageTotal.getAndAdd(distributionReservationStockarticleEntity.getReservationNum());
//维护对应订单的配送件数
Integer i = distributionStockArticleMapper.augmentDeliveryQuantity(distributionReservationStockarticleEntity.getStockArticleId(),distributionReservationStockarticleEntity.getReservationNum());
// Integer i = distributionStockArticleMapper.augmentDeliveryQuantity(distributionReservationStockarticleEntity.getStockArticleId(),distributionReservationStockarticleEntity.getReservationNum());
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId());
} else if (s.getIsZero().equals("1")) {
//零担订单处理
DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = new DistributionReservationStockarticleEntity();

Loading…
Cancel
Save