| | |
| | | |
| | | @Override |
| | | public SalesLedgerProduct selectSalesLedgerProductById(Long id) { |
| | | return salesLedgerProductMapper.selectById(id); |
| | | SalesLedgerProduct row = salesLedgerProductMapper.selectById(id); |
| | | if (row != null) { |
| | | row.fillRemainingQuantity(); |
| | | } |
| | | return row; |
| | | } |
| | | |
| | | @Override |
| | |
| | | item.setReturnQuality(returnQuality); |
| | | BigDecimal quantity = item.getQuantity() == null ? BigDecimal.ZERO : item.getQuantity(); |
| | | item.setAvailableQuality(quantity.subtract(returnQuality)); |
| | | item.fillRemainingQuantity(); |
| | | ProductModel productModel = finalProductModelMap.get(item.getProductModelId()); |
| | | if (productModel != null) { |
| | | item.setThickness(productModel.getThickness()); |
| | |
| | | |
| | | int result; |
| | | Long salesLedgerId = salesLedgerProduct.getSalesLedgerId(); |
| | | salesLedgerProduct.fillRemainingQuantity(); |
| | | if (salesLedgerProduct.getId() == null) { |
| | | salesLedgerProduct.setRegisterDate(LocalDateTime.now()); |
| | | result = salesLedgerProductMapper.insert(salesLedgerProduct); |
| | |
| | | } else { |
| | | item.setStatusName("未完成付款"); |
| | | } |
| | | item.fillRemainingQuantity(); |
| | | }); |
| | | return salesLedgerProductDtoIPage; |
| | | } |
| | |
| | | } else { |
| | | item.setStatusName("未完成付款"); |
| | | } |
| | | item.fillRemainingQuantity(); |
| | | }); |
| | | return salesLedgerProductDtoIPage; |
| | | } |