|
@@ -4972,14 +4972,16 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
.eq("comp_id", warehousingOrder.getCompId())
|
|
.eq("comp_id", warehousingOrder.getCompId())
|
|
.eq("contract_no", warehousingOrder.getContractNo())
|
|
.eq("contract_no", warehousingOrder.getContractNo())
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
- //更新收货库库点库存剩余量 (所在仓库为出货库、所属仓库为原始货源仓库、货名一致)
|
|
|
|
- ContractInventoryDistribution contractInventoryDistribution=contractInventoryDistributionService.selectOne(new EntityWrapper<ContractInventoryDistribution>()
|
|
|
|
- .eq("comp_id",warehousingOrder.getCompId()).eq("inventory_type","3").eq("locus_warehouse",warehouseInOutInfo.getWarehouseName())
|
|
|
|
- .eq("warehouse",inOutWarehouseTask1.getWarehouseName())
|
|
|
|
- .eq("goods_name",warehouseInOutInfo.getGoodsName()));
|
|
|
|
- if (contractInventoryDistribution!=null){
|
|
|
|
- contractInventoryDistribution.setInventory(contractInventoryDistribution.getInventory()-warehouseInOutInfo.getNetWeight()*sourceRelationInfo.getProportion());
|
|
|
|
- contractInventoryDistributionService.updateById(contractInventoryDistribution);
|
|
|
|
|
|
+ if(inOutWarehouseTask1!=null) {
|
|
|
|
+ //更新收货库库点库存剩余量 (所在仓库为出货库、所属仓库为原始货源仓库、货名一致)
|
|
|
|
+ ContractInventoryDistribution contractInventoryDistribution = contractInventoryDistributionService.selectOne(new EntityWrapper<ContractInventoryDistribution>()
|
|
|
|
+ .eq("comp_id", warehousingOrder.getCompId()).eq("inventory_type", "3").eq("locus_warehouse", warehouseInOutInfo.getWarehouseName())
|
|
|
|
+ .eq("warehouse", inOutWarehouseTask1.getWarehouseName())
|
|
|
|
+ .eq("goods_name", warehouseInOutInfo.getGoodsName()));
|
|
|
|
+ if (contractInventoryDistribution != null) {
|
|
|
|
+ contractInventoryDistribution.setInventory(contractInventoryDistribution.getInventory() - warehouseInOutInfo.getNetWeight() * sourceRelationInfo.getProportion());
|
|
|
|
+ contractInventoryDistributionService.updateById(contractInventoryDistribution);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|