Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 8 months ago
parent
commit
ab3fad1f8f
  1. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  2. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

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

@ -1977,8 +1977,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
// 这里在和原始对象进行比较 // 这里在和原始对象进行比较
check2ObjSome(t, stockArticleEntity); check2ObjSome(t, stockArticleEntity);
if (!cn.hutool.core.util.ObjectUtil.isAllEmpty(t.getGenre(), t.getReservationStatus(),
t.getHandQuantity(), t.getDeliveryQuantity(), t.getOrderStatus(), t.getSigninQuantity())) {
baseMapper.updateDistributionStockArticleEntityById(t); baseMapper.updateDistributionStockArticleEntityById(t);
}
// 根据跳进进行更新 // 根据跳进进行更新
} }

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

@ -269,18 +269,32 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
if (Func.isEmpty(one)){ if (Func.isEmpty(one)){
log.info("#############拆包查询父级库存品物不存在##############id:{},MarketId:{},WarehouseId:{}",distributionStockListDTO.getId(),distributionStockListDTO.getMarketId(),myCurrentWarehouse.getId()); log.info("#############拆包查询父级库存品物不存在##############id:{},MarketId:{},WarehouseId:{}",distributionStockListDTO.getId(),distributionStockListDTO.getMarketId(),myCurrentWarehouse.getId());
return false; return false;
}
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(one.getMaterialId());
if(Func.isEmpty(materialEntity)){
log.info("#############拆包查询库存品物品不存在id:{}",distributionStockListDTO.getId());
return false;
} }
if ((one.getQuantityStock() - one.getQuantityOccupied()) < distributionStockListDTO.getUnpackingQuantity()){ if ((one.getQuantityStock() - one.getQuantityOccupied()) < distributionStockListDTO.getUnpackingQuantity()){
log.info("#############拆包查询父级库存品当前可用数量不足以支持拆包数量id:{},当前可用数量:{},拆包数量:{}",distributionStockListDTO.getId(),(one.getQuantityStock() - one.getQuantityOccupied()) ,distributionStockListDTO.getUnpackingQuantity()); log.info("#############拆包查询父级库存品当前可用数量不足以支持拆包数量id:{},当前可用数量:{},拆包数量:{}",distributionStockListDTO.getId(),(one.getQuantityStock() - one.getQuantityOccupied()) ,distributionStockListDTO.getUnpackingQuantity());
return false; return false;
} }
if (Func.isNotEmpty(one2)) { if (Func.isNotEmpty(one2)) {
//查询是否存在有拆包产物 //查询是否存在有拆包产物
//存在则是进行数量的累加 //存在则是进行数量的累加
//有修改 //有修改
DistributionStockListEntity d = one2; DistributionStockListEntity d = one2;
d.setId(one2.getId()); d.setId(one2.getId());
int i = one2.getQuantityStock() + (distributionStockListDTO.getUnpackingQuantity()* Integer.parseInt(distributionStockListDTO.getPackageNum())) ; int i = one2.getQuantityStock() + (distributionStockListDTO.getUnpackingQuantity()* Integer.parseInt(materialEntity.getPackageNum())) ;
log.info(one2.getIncomingBatch()+"拆包剩余在库数量:{}",i); log.info(one2.getIncomingBatch()+"拆包剩余在库数量:{}",i);
d.setQuantityStock(i); d.setQuantityStock(i);
d.setWarehouseId(myCurrentWarehouse.getId()); d.setWarehouseId(myCurrentWarehouse.getId());
@ -340,7 +354,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListEntity.setPid(one.getId()); distributionStockListEntity.setPid(one.getId());
distributionStockListEntity.setCargoNumber(basicMaterialEntity.getProductCode()); distributionStockListEntity.setCargoNumber(basicMaterialEntity.getProductCode());
distributionStockListEntity.setSku(distributionStockListDTO.getSku()); distributionStockListEntity.setSku(distributionStockListDTO.getSku());
distributionStockListEntity.setQuantityStock((distributionStockListDTO.getUnpackingQuantity() * Integer.parseInt(distributionStockListDTO.getPackageNum()))); distributionStockListEntity.setQuantityStock((distributionStockListDTO.getUnpackingQuantity() * Integer.parseInt(materialEntity.getPackageNum())));
distributionStockListEntity.setUnpackingQuantity(0); distributionStockListEntity.setUnpackingQuantity(0);
distributionStockListEntity.setOutboundQuantity(0); distributionStockListEntity.setOutboundQuantity(0);
distributionStockListEntity.setMaterialId(aLong); distributionStockListEntity.setMaterialId(aLong);
@ -363,7 +377,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListInfo.setGroundingTime(new Date()); distributionStockListInfo.setGroundingTime(new Date());
distributionStockListInfo.setPid(distributionStockListDTO.getId()); distributionStockListInfo.setPid(distributionStockListDTO.getId());
distributionStockListInfo.setSourceType("2"); distributionStockListInfo.setSourceType("2");
distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(distributionStockListDTO.getPackageNum()))); distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(materialEntity.getPackageNum())));
distributionStockListInfoService.save(distributionStockListInfo); distributionStockListInfoService.save(distributionStockListInfo);
} else { } else {
log.error("#################查询库存品失败"); log.error("#################查询库存品失败");

Loading…
Cancel
Save