package cn.estsh.i3plus.ext.mes.pojo.model;

import cn.estsh.i3plus.pojo.mes.model.MesButtonFlagModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.math.BigInteger;

/**
 * @author yumingxing
 * @version 1.0
 * @date 2021/1/15 15:32
 **/
@Data
@ApiModel("生成工单分页显示页面")
public class WorkOrderPageVo implements Serializable {


    @ApiParam("区域代码")
    private String areaCode;

    @ApiParam("工单状态代码")
    private Integer workOrderStatus;

    @ApiParam("工单状态")
    private String workOrderStatusName;

    @ApiParam("工单号")
    private String orderNo;

    @ApiParam("物料号")
    private String partNo;

    @ApiParam("物料名称")
    private String partNameRdd;

    @ApiParam("生产线代码")
    private String workCenterCode;

    @ApiParam("生产线名称")
    public String workCenterName;

    @ApiParam("计划数量")
    private Double qty;

    @ApiParam("返工计划数量")
    private Double planQty;

    @ApiParam("完成数量")
    private Double completeQty;

    @ApiParam("返修数量")
    private Double repairQty;

    @ApiParam("报废数量")
    private Double scarpQty;

    @ApiParam("工单类型代码-正常/试制/返工")
    private Integer workOrderType;

    @ApiParam("工单类型")
    private String workOrderTypeName;

    @ApiParam("计划开始时间")
    private String startTime;

    @ApiParam("计划结束时间")
    private String endTime;

    @ApiParam("实际开始时间")
    private String realStartTime;

    @ApiParam("实际结束时间")
    private String realEndTime;

    @ApiParam("备注")
    private String memo;

    @ApiParam("工单来源")
    private String workOrderSource;

    @ApiParam("工单来源")
    private String workOrderSourceName;

    @ApiParam("创建人")
    private String createUser;

    @ApiParam("创建时间")
    private String createDatetime;

    @ApiParam("编辑人")
    private String modifyUser;

    @ApiParam("编辑时间")
    private String modifyDatetime;

    @ApiParam("排产日期")
    private String scheduleDate;

    @ApiParam("按钮")
    private MesButtonFlagModel mesButtonFlagModel;

    @ApiParam
    private Long id;

    @ApiParam("生产排序")
    private Double seq;

    @ApiParam("Erp库存地")
    private String erpWarehouse;

    @ApiParam("生产排序(日期)")
    private Double seq1;

    @ApiParam(value = "报表产量统计标志")
    public String outPutFlag;

    @ApiParam(value = "报表产量统计标志")
    public String outPutFlagName;

    @ApiParam(value = "可绑定解绑条码数量")
    public Integer unbindSnCount;

    @ApiParam(value = "是否有解绑数量")
    public Integer isExistUnbindSn;

    @ApiParam(value = "是否有解绑数量")
    public String isExistUnbindSnName;

    @ApiParam(value = "是否为本体")
    public Integer isNoumenon;

    public WorkOrderPageVo(Long id, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String orderNo, Double seq, String seq1, String startTime, String endTime, String workCenterCode, String workOrderSource, Integer workOrderStatus, Integer workOrderType, Double qty, Double planQty, Double completeQty, Double repairQty, String partNo, String partNameRdd, String areaCode, String erpWarehouse, String memo, String outPutFlag, String scheduleDate, Long unbindSnCount) {
        this.areaCode = areaCode;
        this.workOrderStatus = workOrderStatus;
        this.orderNo = orderNo;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workCenterCode = workCenterCode;
        this.qty = qty;
        this.planQty = planQty;
        this.completeQty = completeQty;
        this.repairQty = repairQty;
        this.workOrderType = workOrderType;
        this.startTime = startTime;
        this.endTime = endTime;
        this.memo = memo;
        this.workOrderSource = workOrderSource;
        this.createUser = createUser;
        this.createDatetime = createDatetime;
        this.modifyUser = modifyUser;
        this.modifyDatetime = modifyDatetime;
        this.scheduleDate = scheduleDate;
        this.id = id;
        this.seq = seq;
        this.erpWarehouse = erpWarehouse;
        this.seq1 = StringUtils.isEmpty(seq1) ? 0.0 : Double.parseDouble(seq1);
        this.outPutFlag = outPutFlag;
        this.unbindSnCount = unbindSnCount.intValue();
    }

    public WorkOrderPageVo(String areaCode, Integer workOrderStatus, String workOrderStatusName, String orderNo, String partNo, String partNameRdd, String workCenterCode, String workCenterName, Double qty, Double planQty, Double completeQty, Double repairQty, Double scarpQty, Integer workOrderType, String workOrderTypeName, String startTime, String endTime, String realStartTime, String realEndTime, String memo, String workOrderSource, String workOrderSourceName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String scheduleDate, MesButtonFlagModel mesButtonFlagModel, Long id, Double seq, String erpWarehouse, Double seq1, String outPutFlag, String outPutFlagName, Integer unbindSnCount, Integer isExistUnbindSn, String isExistUnbindSnName) {
        this.areaCode = areaCode;
        this.workOrderStatus = workOrderStatus;
        this.workOrderStatusName = workOrderStatusName;
        this.orderNo = orderNo;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workCenterCode = workCenterCode;
        this.workCenterName = workCenterName;
        this.qty = qty;
        this.planQty = planQty;
        this.completeQty = completeQty;
        this.repairQty = repairQty;
        this.scarpQty = scarpQty;
        this.workOrderType = workOrderType;
        this.workOrderTypeName = workOrderTypeName;
        this.startTime = startTime;
        this.endTime = endTime;
        this.realStartTime = realStartTime;
        this.realEndTime = realEndTime;
        this.memo = memo;
        this.workOrderSource = workOrderSource;
        this.workOrderSourceName = workOrderSourceName;
        this.createUser = createUser;
        this.createDatetime = createDatetime;
        this.modifyUser = modifyUser;
        this.modifyDatetime = modifyDatetime;
        this.scheduleDate = scheduleDate;
        this.mesButtonFlagModel = mesButtonFlagModel;
        this.id = id;
        this.seq = seq;
        this.erpWarehouse = erpWarehouse;
        this.seq1 = seq1;
        this.outPutFlag = outPutFlag;
        this.outPutFlagName = outPutFlagName;
        this.unbindSnCount = unbindSnCount;
        this.isExistUnbindSn = isExistUnbindSn;
        this.isExistUnbindSnName = isExistUnbindSnName;
    }

    public WorkOrderPageVo() {
    }
}
