Compare commits

..

No commits in common. 'e5b95431475b83961d48f48cba29e3f6d6cb6e9a' and '37793146b8e43cf0c9db96cf3f3e03102a69414c' have entirely different histories.

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

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

@ -28,7 +28,6 @@ import org.springblade.common.constant.order.OrderSplitAllTaskStateConstant;
import org.springblade.common.constant.order.OrderSplitStateConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageSplitStateConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
@ -229,14 +228,12 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
int finishNumber = existsList.size() - cancelIds.size();
addNumber -= finishNumber;
if (!cancelIds.isEmpty()){
distributionSplitOrderDetailService.update(Wrappers.<DistributionSplitOrderDetailEntity>lambdaUpdate()
.in(DistributionSplitOrderDetailEntity::getId, cancelIds)
.set(DistributionSplitOrderDetailEntity::getState, OrderPackageSplitStateConstant.finish.getValue())
.set(DistributionSplitOrderDetailEntity::getSplitOrderTaskId, task.getId())
.set(DistributionSplitOrderDetailEntity::getSplitOrderAllTaskId, task.getSplitOrderAllTaskId())
);
}
distributionSplitOrderDetailService.update(Wrappers.<DistributionSplitOrderDetailEntity>lambdaUpdate()
.in(DistributionSplitOrderDetailEntity::getId, cancelIds)
.set(DistributionSplitOrderDetailEntity::getState, OrderPackageSplitStateConstant.finish.getValue())
.set(DistributionSplitOrderDetailEntity::getSplitOrderTaskId, task.getId())
.set(DistributionSplitOrderDetailEntity::getSplitOrderAllTaskId, task.getSplitOrderAllTaskId())
);
}
ArrayList<DistributionSplitOrderDetailEntity> details = new ArrayList<>();
@ -624,8 +621,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
DistributionStockArticleEntity originalOrder = distributionStockArticleService.getById(task.getStockArticleId());
originalOrder.setTotalNumber(originalOrder.getTotalNumber() - packageList.size());
originalOrder.setHandQuantity(Math.max(originalOrder.getHandQuantity() - packageList.size(), 0));
originalOrder.setIncomingNum(Math.max(originalOrder.getIncomingNum() - packageList.size(), 0));
originalOrder.setHandQuantity(originalOrder.getHandQuantity() - packageList.size());
distributionStockArticleService.updateById(originalOrder);
DistributionStockArticleEntity newOrder = distributionStockArticleService.getById(task.getNewStockArticleId());
@ -636,7 +632,6 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
}
newOrder.setTotalNumber(packageList.size());
newOrder.setHandQuantity(packageList.size());
newOrder.setIncomingNum(packageList.size());
if (newOrder.getId() != null) {
distributionStockArticleService.updateById(newOrder);
}else{
@ -918,7 +913,6 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
if (!details.isEmpty()){
List<DistributionParcelListEntity> list = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>lambdaQuery()
.in(DistributionParcelListEntity::getOrderPackageCode, details.stream().map(DistributionSplitOrderDetailEntity::getOrderPackageCode).collect(Collectors.toList()))
.eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue())
);
res = list.stream().map(distributionParcelListEntity -> {

Loading…
Cancel
Save