package cn.iocoder.yudao.module.order.vo.orderWarehouseCheck;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class CheckItemSumVO {

    @ApiModelProperty("到仓箱数")
    private int cartons = 0; // 到仓总箱数
    @ApiModelProperty("到仓数量")
    private int quantity = 0; // 到仓总数量
    @ApiModelProperty("到仓体积")
    private BigDecimal volume = BigDecimal.ZERO; // 到仓总体积
    @ApiModelProperty("到仓重量")
    private BigDecimal weight = BigDecimal.ZERO; // 到仓总重量


    public void add(Integer checkNum, Integer checkQuantity, BigDecimal checkVolume, BigDecimal checkWeight) {
        this.cartons += checkNum;
        this.quantity += checkQuantity;
        this.volume = this.volume.add(checkVolume);
        this.weight = this.weight.add(checkWeight);
    }
}
