/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.depotTruckWeighPlug.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.depotTruckBook.entity.DepotTruckBook;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 车辆称重补单表添加参数
 *
 * @author xiang
 * @date  2023/11/27 08:54
 **/
@Getter
@Setter
public class DepotTruckWeighPlugAddParam {

    /** 项目编码 */
    @ApiModelProperty(value = "项目编码", position = 2)
    private String depotId;

    /** 预约ID */
    @ApiModelProperty(value = "预约ID", position = 3)
    private String truckBookId;

    /** 出入库 */
    @ApiModelProperty(value = "出入库", position = 4)
    private String depotBizType;

    /** 粮食种类 */
    @ApiModelProperty(value = "粮食种类", position = 5)
    private String grainGroup;

    /** 粮食类型 */
    @ApiModelProperty(value = "粮食类型", position = 6)
    private String grainType;

    /** 车牌号码 */
    @ApiModelProperty(value = "车牌号码", position = 7)
    private String licensePlate;

    /** 后车牌 */
    @ApiModelProperty(value = "后车牌", position = 7)
    private String licensePlateBack;

    /** 司机姓名 */
    @ApiModelProperty(value = "司机姓名", position = 8)
    private String driverName;

    /** 司机手机号 */
    @ApiModelProperty(value = "司机手机号", position = 9)
    private String driverMobile;

    /** 车牌颜色 */
    @ApiModelProperty(value = "车牌颜色", position = 10)
    private String plateColor;

    /** 过毛时间 */
    @ApiModelProperty(value = "过毛时间", position = 11)
    private Date grossTime;

    /** 过皮时间 */
    @ApiModelProperty(value = "过皮时间", position = 12)
    private Date tareTime;

    /** 毛重(公斤) */
    @ApiModelProperty(value = "毛重(公斤)", position = 13)
    private BigDecimal grossWeight;

    /** 皮重(公斤) */
    @ApiModelProperty(value = "皮重(公斤)", position = 14)
    private BigDecimal tareWeight;

    /** 净重(公斤) */
    @ApiModelProperty(value = "净重(公斤)", position = 15)
    private BigDecimal netWeight;

    /** 单价(元/吨) */
    @ApiModelProperty(value = "单价(元/吨)", position = 16)
    private BigDecimal unitPrice;

    /** 总价(元) */
    @ApiModelProperty(value = "总价(元)", position = 17)
    private BigDecimal totalPrice;

    /** 库位 */
    @ApiModelProperty(value = "库位", position = 18)
    private String shedName;

    /** 水份 */
    @ApiModelProperty(value = "水份", position = 19)
    private String samplingShuiFen;

    /** 容重 */
    @ApiModelProperty(value = "容重", position = 20)
    private String samplingRongZhong;

    /** 不完善率 */
    @ApiModelProperty(value = "不完善率", position = 21)
    private String samplingQueShao;

    /** 霉变 */
    @ApiModelProperty(value = "霉变", position = 22)
    private String samplingMeiBian;

    /** 杂质 */
    @ApiModelProperty(value = "杂质", position = 23)
    private String samplingZaZhi;

    public DepotTruckWeighPlugAddParam() {
    }

    public DepotTruckWeighPlugAddParam asBook(DepotTruckBook book) {
        this.depotId = book.getDepotId();
        this.depotBizType = book.getDepotBizType();
        this.grainGroup = book.getGrainGroup();
        this.grainType = book.getGrainType();
        this.licensePlate = book.getLicensePlate();
        this.licensePlateBack = book.getLicensePlateBack();
        this.driverName = book.getDriverName();
        this.driverMobile = book.getDriverMobile();
        return this;
    }
}
