Browse Source

修复线上属性没有注入的问题

single_db
pref_mail@163.com 1 year ago
parent
commit
b6df20eaad
  1. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

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

@ -175,8 +175,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Autowired
private IWarehouseWaybillClient warehouseWaybillClient;
@Autowired
private IBasicdataWarehouseClient warehouseClient;
@Autowired
private IDisStockListDetailService disStockListDetailService;
@ -214,6 +213,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
private IBasicdataClientClient basicdataClientClient;
@Override
public IPage<DistributionReservationVO> selectDistrbutionReservationPage(IPage<DistributionReservationVO> page, DistributionReservationVO distrbutionReservation) {
return page.setRecords(baseMapper.selectDistrbutionReservationPage(page, distrbutionReservation));
@ -400,9 +401,20 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return R.status(false);
}
if (Func.isEmpty(distributionReservationDTO.getWarehouseId())){
log.error("WarehouseId参数错误+{" + distributionReservationDTO.getWarehouseId() + "}");
return R.status(false);
// 获取商场的仓库
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
distributionReservationDTO.setWarehouseId(myCurrentWarehouse.getId());
distributionReservationDTO.setWarehouseName(myCurrentWarehouse.getName());
if (Func.isEmpty(distributionReservationDTO.getWarehouseId())) {
log.error("WarehouseId参数错误+{" + distributionReservationDTO.getWarehouseId() + "}");
return R.status(false);
}
}
//
// if (Func.isEmpty(distributionReservationDTO.getWarehouseName())){
// log.error("WarehouseName参数错误+{" + distributionReservationDTO.getWarehouseName() + "}");
// return R.status(false);
@ -962,7 +974,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.error("参数异常:+{" + stockUpInfo + "}");
return R.fail("服务器正忙!!!");
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
log.error("myCurrentWarehouse参数异常:+{" + myCurrentWarehouse + "}");
return R.fail("请先选择作业仓库!!!");
@ -1047,13 +1059,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return null;
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
List<DistributionReservationVO> reservationVOList = null;
if (Func.isNotEmpty(myCurrentWarehouse)) {
List<Long> longs = Func.toLongList(ids);
List<DistributionReservationEntity> reservationEntityList = this.listByIds(longs);
reservationVOList = DistributionReservationWrapper.build().listVO(reservationEntityList);
BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(reservationVOList.get(0).getWarehouseId());
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(reservationVOList.get(0).getWarehouseId());
if (Func.isNotEmpty(entityWarehouseId)) {
reservationVOList.stream().forEach(r -> {
r.setJingdu(entityWarehouseId.getLongitude());
@ -1089,7 +1101,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.error("参数异常allocationDTO:+{" + allocationDTO + "}");
return R.fail("服务器正忙!!!");
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail("无仓库信息!!!");
}
@ -1422,7 +1434,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.error("参数异常+{" + distributionReservationDTO + "}");
return R.status(false);
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
log.error("myCurrentWarehouse参数异常:+{" + myCurrentWarehouse + "}");
return R.fail("请先选择作业仓库!!!");
@ -1942,7 +1954,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.error("参数异常allocationDTO+{" + allocationDTO + "}");
return R.fail("服务器正忙!!!");
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail("无仓库信息!!!");
}
@ -2562,7 +2574,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(parcelListEntity)) {
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
distributionParcelListService.updateById(parcelListEntity);
distributionAsyncService.checkStockArticleReservationStatus(parcelListEntity);
// distributionAsyncService.checkStockArticleReservationStatus(parcelListEntity);
} else {
log.error("#################错误包件ID:{}", rp.getParceListId());
}
@ -2590,6 +2602,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
log.error("######################预约订单isZero字段维护错误,reservation_stockarticle的ID为:{}", rs.getId());
}
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(rs.getStockArticleId());
distributionStockArticleService.maintenanceOrderInfo(stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
});
}
@ -2940,7 +2955,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
log.error("参数错误+{" + distributionReservationDTO + "}");
return R.status(false);
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail("无仓库信息!!!");
}
@ -3384,7 +3399,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isEmpty(packageDTO.get("reservationId"))){
return null;
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return R.fail(403,"未授权!!!");
}

Loading…
Cancel
Save