package com.sw.mes.yb.production.dto.AgainTaskDetail;

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

import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;

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

/**
 * @Author 李儒：
 * @Date: Create in
 * @Modified By:
 */
@Data
@ApiModel(value = "复投任务明细Dto")
public class AgainTaskDetailDto {

	/** 新建 **/
	public static final Integer rawStatus_0 = 0;
	/** 生产 **/
	public static final Integer rawStatus_1 = 1;
	/** 已取消 **/
	public static final Integer rawStatus_2 = 2;
	/** 自动完工 **/
	public static final Integer rawStatus_3 = 3;
	/** 人工完工 **/
	public static final Integer rawStatus_4 = 4;
	/** 退料 **/
	public static final Integer rawStatus_5 = 5;
	/** 等待 **/
	public static final Integer rawStatus_6 = 6;
	/** 满料入库送走 **/
	public static final Integer rawStatus_7 = 7;

	private Long id;
	@ApiModelProperty(value = "炉台类型【0:默认；0-量产;1-在建;2-研发;】", required = true)
	Integer furnaceType;
	@ApiModelProperty(value = "预计复投时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	Date againTime;
	@ApiModelProperty(value = "叫料时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	Date rawCreate;

	@ApiModelProperty(value = "下次复投是否完结【0：不是; 1 是;】")
	private Integer isNextEnd;


	@ApiModelProperty(value = "载具顺序号")
	Integer carrierSort;
	@ApiModelProperty(value = "当前桶数(载具上桶顺序号,号分割)")
	String pailNum;
	@ApiModelProperty(value = "状态【0：默认；0-新建;1-生产;2-已取消;3-自动完工;4-人工完工;5-退料;6-等待】", required = true)
	Integer rawStatus;
	@ApiModelProperty(value = "复投任务id")
	Long againTaskId;
	@ApiModelProperty(value = "前次任务id")
	Long preDetailId;
	@ApiModelProperty(value = "车上桶数")
	Integer num;
	@ApiModelProperty(value = "复投总桶数")
	Integer againPailNum;
	@ApiModelProperty(value = "复投总重量(装载总重量)")
	BigDecimal againWeigth;

	@ApiModelProperty(value = "锅内剩余")
	BigDecimal potLeftWeight;

	@ApiModelProperty(value = "上次加完")
	BigDecimal lastTimeWeight;

	@ApiModelProperty(value = "本次加完")
	BigDecimal thisTimeWeight;


	@ApiModelProperty(value = "设备号")
	String equipmentCode;
	@ApiModelProperty(value = "炉次号")
	String lotNo;
	@ApiModelProperty(value = "所属系列")
	String series;
	@ApiModelProperty(value = "所属模块")
	String area;
	@ApiModelProperty(value = "SAP订单号")
	String sapNo;
	@ApiModelProperty(value = "料号")
	String productCode;
	@ApiModelProperty(value = "产品等级")
	String productGrade;
	@ApiModelProperty(value = "规格")
	String specs;
	@ApiModelProperty(value = "掺杂剂")
	String dopant;
	@ApiModelProperty(value = "产品类别")
	String productType;
	@ApiModelProperty(value = "叫料类型【0:默认;1-初始复投;2-取段复投;】")
	Integer rawType;
	@ApiModelProperty(value = "已灌料桶数")
	Integer alreadyPailNum;
	@ApiModelProperty(value = "延时任务开始时间", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	Date delayedStartTime;
	
	@ApiModelProperty(value = "配方方案ID(production_circle_recipe.id)")
	Long recipeId;
	@ApiModelProperty(value = "重量方案ID(production_circle_weigth.id)")
	Long weigthId;
	
	@ApiModelProperty(value = "操作人")
    private String userName;
    @ApiModelProperty(value = "操作时间", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;
    @ApiModelProperty(value = "操作原因")
    private String operationCause;
    
    
    @ApiModelProperty(value = "更换配方人员")
	private String changeRecipeUserName;
	@ApiModelProperty(value = "更换配方时间", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date changeRecipeTime;
    
    @ApiModelProperty(value = "入库操作人")
    private String instoreUserName;
    @ApiModelProperty(value = "入库操作时间", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date instoreOperatorTime;
    @ApiModelProperty(value = "入库备注")
    private String instoreRemark;
    @ApiModelProperty(value = "入库编号")
    private String instorePosCode;
    @ApiModelProperty(value = "单桶重量集合(,逗号分隔)")
    private String taskWeigths;
    
    @ApiModelProperty(value = "开始灌料时间", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message = "请输入开始时间")
	Date startTime;
	@ApiModelProperty(value = "结束灌料时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	Date endTime;

	@ApiModelProperty(value = "复投实际重量")
	private BigDecimal againRealWeight;

	@ApiModelProperty(value = "复投次数")
	private Integer againNum;

	@ApiModelProperty(value = "复投次数")
	private Integer isDone = 0;

	@ApiModelProperty(value = "备注")
	private String remark;

	@ApiModelProperty(value = "试投类型")
	private String trialType;

	@ApiModelProperty(value = "页面录入是否完结加料（0：否，1：是）")
	private Integer isFillEnd = 0;

	@ApiModelProperty(value = "载具编号")
	private String carrierNo;

	@ApiModelProperty(value = "确认投料(0:未确认, 1:已确认)")
	private Integer confirm;
	@ApiModelProperty(value = "确认投料时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date confirmTime;

	@ApiModelProperty(value = "左桶编号")
	String leftCode;
	@ApiModelProperty(value = "左桶灌料重量")
	BigDecimal leftWeight;
	@ApiModelProperty(value = "左桶退料(0:否, 1:是)")
	private Integer leftBack;
	@ApiModelProperty(value = "右桶编号")
	String rightCode;
	@ApiModelProperty(value = "右桶灌料重量")
	BigDecimal rightWeight;
	@ApiModelProperty(value = "左桶退料(0:否, 1:是)")
	private Integer rightBack;
	
}