Browse Source

1.订单状态计算

single_db
zhenghaoyu 1 year ago
parent
commit
d0e5a2ac7c
  1. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -50,8 +50,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -1297,12 +1295,20 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
Integer handleNum = 0;
Integer outNum = 0;
Integer signNum = 0;
Integer reservationNum = 0;
Long firstEntryTime = 0L;
Long lastEntryTime = 0L;
String reservationStatus = "10";
for (DistributionParcelListEntity parcelListEntity : list) {
incomingNum = incomingNum + 1;
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
String orderPackageReservationStatus = parcelListEntity.getOrderPackageReservationStatus();
if("20".equals(orderPackageReservationStatus)){
reservationNum = reservationNum + 1;
}
if(!"60".equals(orderPackageStatus) && !"70".equals(orderPackageStatus)){
handleNum = handleNum + 1;
}else if ("60".equals(orderPackageStatus)){
@ -1341,6 +1347,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setOrderReceiveStatus("10");
stockArticleEntity.setCompleteSet(1);
stockArticleEntity.setOrderStatus("0");
stockArticleEntity.setReservationStatus("10");
}else if (0 < incomingNum && incomingNum < totalNumber){
stockArticleEntity.setOrderReceiveStatus("20");
stockArticleEntity.setCompleteSet(1);
@ -1356,6 +1363,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setOrderStatus("70");
}
if(reservationNum == 0){
stockArticleEntity.setReservationStatus("10");
}else{
stockArticleEntity.setReservationStatus("20");
}
}else{
stockArticleEntity.setOrderReceiveStatus("30");
stockArticleEntity.setCompleteSet(2);
@ -1375,6 +1387,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
}
if(reservationNum == 0){
stockArticleEntity.setReservationStatus("10");
}else if(reservationNum > 0 && reservationNum < totalNumber){
stockArticleEntity.setReservationStatus("20");
}else{
stockArticleEntity.setReservationStatus("30");
}
}
stockArticleEntity.setIncomingNum(incomingNum);

Loading…
Cancel
Save