Browse Source

Merge branch 'dev' into pre-production

master
汤建军 10 months ago
parent
commit
cb4fc51660
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  2. 47
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -203,4 +203,10 @@ public interface IDistributionParcelListService extends BaseService<Distribution
* @param warehouseId
*/
void maintenanceZeroPackageInfo(Long parcelListId, Long warehouseId);
/**
* 维护零担包件信息状态
* @param parcelListId
*/
void maintenanceZerpPackageInfo(Long parcelListId);
}

47
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -1126,4 +1126,51 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
/**
* @param parcelListId
*/
@Override
public void maintenanceZerpPackageInfo(Long parcelListId) {
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda()
.eq(DistributionParcelNumberEntity::getParcelListId, parcelListId)
);
if (Func.isNotEmpty(distributionParcelNumberEntity)){
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
int totalQuantity = distributionParcelNumberEntity.getQuantity();
int handledQuantity = distributionParcelNumberEntity.getHandQuantity();
int deliveryQuantity = distributionParcelNumberEntity.getDeliveryQuantity();
int outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity();
int signinQuantity = distributionParcelNumberEntity.getSigninQuantity();
if (totalQuantity > 0){
if (handledQuantity == totalQuantity){
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
}
parcelListEntity.setId(parcelListId);
if ((deliveryQuantity + outboundQuantity) == 0){
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
}else if ((deliveryQuantity + outboundQuantity) == totalQuantity){
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
}
if (outboundQuantity == 0){
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.weizhuancghe.getValue());
}else if (outboundQuantity == totalQuantity){
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageStatusConstant.yichuku.getValue());
}
if (signinQuantity == totalQuantity){
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
}
this.updateById(parcelListEntity);
}
}
}
}

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

@ -2673,8 +2673,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// parcelNumberEntity.setHandQuantity(parcelNumberEntity.getHandQuantity() + rzp.getQuantity());
parcelNumberEntity.setDeliveryQuantity(parcelNumberEntity.getDeliveryQuantity() - rzp.getQuantity());
distributionParcelNumberService.updateById(parcelNumberEntity);
distributionAsyncService.checkZeroStockArticleReservationStatus(parcelNumberEntity);
// distributionAsyncService.checkZeroStockArticleReservationStatus(parcelNumberEntity);
}
distributionParcelListService.maintenanceZerpPackageInfo(rzp.getParcelListId());
});
} else {

Loading…
Cancel
Save