package cn.estsh.i3plus.pojo.wms.bean;

import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @Description : 抽点比例表
 * @Reference :
 * @Author : jimmy.zeng
 * @CreateDate : 2018-11-07 10:55
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_IB_CHECK_PLAN")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="抽点比例表",description = "抽点比例表")
public class WmsIbCheckPlan extends BaseBean{

    private static final long serialVersionUID = 3557978060450659460L;
    @Column(name="PART_NO")
    @ApiParam(value ="物料编码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST,  getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsPart",
            searchColumnName = "partNo,partName", listColumnName = "partNo,partName", explicitColumnName = "partNo")
    private String partNo;

    @Column(name="PART_NAME_RDD")
    @ApiParam(value ="物料名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST,  getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsPart",
            searchColumnName = "partNo,partName", listColumnName = "partNo,partName", explicitColumnName = "partName")
    private String partNameRdd;

    @Column(name="START_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value ="开始日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.DATETIME)
    private String startDate;

    @Column(name="END_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value ="结束日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.DATETIME)
    private String endDate;

    @Column(name="LOT_QTY")
    @ApiParam(value ="样本数量", example = "-1")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
    private Integer lotQty;

    @Column(name="COUNTER")
    @ApiParam(value ="已收货件数", example = "-1")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
    private Integer counter;

    @Column(name="CHECK_COUNTER")
    @ApiParam(value ="已抽点件数", example = "-1")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
    private Integer checkCounter;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value="开始日期，查询开始日期")
    public String startDateStart;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value="开始日期，查询开始日期")
    public String startDateEnd;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value="结束日期，查询结束日期")
    public String endDateStart;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value = "结束日期，查询结束日期")
    public String endDateEnd;

}
