| | |
| | | java.math.BigDecimal returnQuantity = item.getReturnQuantity() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getReturnQuantity(); |
| | | java.math.BigDecimal quantity = item.getQuantity() == null |
| | | item.setReturnQuantity(returnQuantity); |
| | | java.math.BigDecimal availableQuality = item.getQuantity() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getQuantity(); |
| | | item.setReturnQuantity(returnQuantity); |
| | | item.setAvailableQuality(quantity.subtract(returnQuantity)); |
| | | if (item.getType() != null && item.getType() == 2) { |
| | | availableQuality = item.getApprovedStockInNum() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getApprovedStockInNum(); |
| | | } |
| | | item.setAvailableQuality(availableQuality.subtract(returnQuantity)); |
| | | }); |
| | | } |
| | | return AjaxResult.success(list); |