| | |
| | | */ |
| | | @Excel(name = "数量") |
| | | private BigDecimal quantity; |
| | | |
| | | /** |
| | | * 已入库数量 |
| | | */ |
| | | private BigDecimal stockedQuantity; |
| | | |
| | | @Excel(name = "最低库存数量") |
| | | private BigDecimal minStock; |
| | | |
| | | /** |
| | | * 剩余待入库数量(订单数量 − 合格已入库数量,多入时记为 0) |
| | | */ |
| | | @Excel(name = "剩余数量") |
| | | @ApiModelProperty("剩余待入库数量(订单数量-合格已入库)") |
| | | private BigDecimal remainingQuantity; |
| | | |
| | | /** |
| | | * 税率 |
| | | */ |
| | |
| | | private String floorCode; |
| | | |
| | | /** |
| | | * 产品入库状态 0-未入库,1-已入库 |
| | | * 产品入库状态:0-未入库,1-部分入库,2-已入库 |
| | | */ |
| | | @ApiModelProperty("产品入库状态") |
| | | @ApiModelProperty("产品入库状态:0-未入库,1-部分入库,2-已入库") |
| | | private Integer productStockStatus; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | // 可用数量 quantity - returnQuality |
| | | @TableField(exist = false) |
| | | private BigDecimal availableQuality; |
| | | |
| | | |
| | | public void fillRemainingQuantity() { |
| | | BigDecimal q = this.quantity == null ? BigDecimal.ZERO : this.quantity; |
| | | BigDecimal stocked = this.stockedQuantity == null ? BigDecimal.ZERO : this.stockedQuantity; |
| | | BigDecimal rem = q.subtract(stocked); |
| | | this.remainingQuantity = rem.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : rem; |
| | | } |
| | | } |