调播入库修改

This commit is contained in:
liux 2026-02-05 18:14:36 +08:00
parent 9df15a19ad
commit 8bd89b72be
1 changed files with 8 additions and 6 deletions

View File

@ -269,12 +269,14 @@ public class GoodsTransferServiceImpl implements IGoodsTransferService {
imsIntoInventoryDetailAdd.setInventoryId(outInventoryDetail.getInventoryId()); imsIntoInventoryDetailAdd.setInventoryId(outInventoryDetail.getInventoryId());
BigDecimal fetchNum = outInventoryDetail.getFetchNum(); BigDecimal fetchNum = outInventoryDetail.getFetchNum();
Long totalPrice = outInventoryDetail.getTotalPrice(); Long totalPrice = outInventoryDetail.getTotalPrice();
if(totalPrice !=null && totalPrice > 0) { BigDecimal price = QuantityCalculator.calculateUnitPrice(totalPrice,fetchNum);
BigDecimal price = QuantityCalculator.calculateUnitPrice(totalPrice,fetchNum); imsIntoInventoryDetailAdd.setUnitPrice(price.longValue());
imsIntoInventoryDetailAdd.setUnitPrice(price.longValue()); // if(totalPrice !=null && totalPrice > 0) {
} else { // BigDecimal price = QuantityCalculator.calculateUnitPrice(totalPrice,fetchNum);
throw new ServiceException("调拨出库单明细总价不能为空或小于0"); // imsIntoInventoryDetailAdd.setUnitPrice(price.longValue());
} // } else {
// throw new ServiceException("调拨出库单明细总价不能为空或小于0");
// }
imsIntoInventoryDetailAdd.setMaterialId(outInventoryDetail.getMaterialId()); imsIntoInventoryDetailAdd.setMaterialId(outInventoryDetail.getMaterialId());
imsIntoInventoryDetailAdd.setSupplierId(outInventoryDetail.getSupplierId()); imsIntoInventoryDetailAdd.setSupplierId(outInventoryDetail.getSupplierId());
imsIntoInventoryDetailAdd.setPurNum(outInventoryDetail.getFetchNum()); imsIntoInventoryDetailAdd.setPurNum(outInventoryDetail.getFetchNum());