Browse Source

1.修改代码报错

single_db
pref_mail@163.com 1 year ago
parent
commit
b0d474c737
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  3. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationStockarticleService.java

@ -63,5 +63,5 @@ public interface IDistributionReservationStockarticleService extends BaseService
* 维护预约订单状态
* @param reservationId
*/
void maintenanceReservationStockArticle(Long reservationId);
void maintenanceReservationStockArticle(Long reservationId,Long warehouseId);
}

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

@ -1561,7 +1561,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
//维护预约订单状态
distributionReservationStockarticleService.maintenanceReservationStockArticle(reservationId);
distributionReservationStockarticleService.maintenanceReservationStockArticle(reservationId,warehouseId);
}
//存在库存品信息

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -40,6 +40,7 @@ import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
@ -122,7 +123,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getPackageId, p.getId()).eq(DistributionLoadscanEntity::getOrderPackageCode, p.getOrderPackageCode()));
if (Func.isNotEmpty(loadscanEntity)) {
try {
p.setLoadingTime(sdf.parse(loadscanEntity.getScanTime()));
p.setLoadingTime(loadscanEntity.getScanTime());
switch (loadscanEntity.getScanState().toString()) {
case "1":
p.setScanStatus(LoadingStatusConstant.quxiao.getName());
@ -146,8 +147,9 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(loadscanEntity.getDriverName())) {
p.setDriverName(loadscanEntity.getDriverName());
}
} catch (ParseException e) {
throw new RuntimeException(e);
} catch (Exception e) {
log.error(">>> 系统异常",e);
throw new CustomerException("系统异常,请联系管理员");
}
}
});

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

@ -4099,7 +4099,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub());
}
if (Func.isNotEmpty(loadscanEntity.getScanTime())) {
distributionParcelListVO.setLoadingTime(sf.parse(loadscanEntity.getScanTime()));
distributionParcelListVO.setLoadingTime(loadscanEntity.getScanTime());
}
if (Func.isNotEmpty(loadscanEntity.getSigningUser())) {
distributionParcelListVO.setSigningUser(loadscanEntity.getSigningUser());

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

@ -86,7 +86,7 @@ public class DistributionReservationStockarticleServiceImpl extends BaseServiceI
}
@Override
public void maintenanceReservationStockArticle(Long reservationId) {
public void maintenanceReservationStockArticle(Long reservationId,Long warehouseId) {
List<DistributionReservationStockarticleEntity> reservationStockarticleEntities = this.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, reservationId)
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())
@ -95,7 +95,7 @@ public class DistributionReservationStockarticleServiceImpl extends BaseServiceI
List<DistributionReservationStockarticleEntity> reservationOrderList = reservationStockarticleEntities.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).collect(Collectors.toList());
if (Func.isNotEmpty(reservationOrderList)){
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationOrderList) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, reservationStockarticleEntity.getStockArticleId());
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, reservationStockarticleEntity.getStockArticleId(),warehouseId);
if (Func.isNotEmpty(distributionParcelListEntities)){
int sum = distributionParcelListEntities.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
if (sum == 0){

Loading…
Cancel
Save