package com.sw.mes.yb.agv.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.core.entity.FbCheckOutData;
import com.sw.mes.core.utils.BeanUtil;
import com.sw.mes.core.utils.JsonUtils;
import com.sw.mes.yb.production.entity.LongCrystal;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Agv任务派发Dto
 * @Author 李儒
 * @Description：具体传入参数参考AGV配置对应关键字内容
 * @Date: Create in
 * @Modified By:
 */
@Data
@ApiModel(value = "AgvCallDto")
public class AgvCallDto {
	
	@ApiModelProperty(value = "第三方任务编码(不用传递,根据规则自动生成)")
	private String taskCode;
	
	@ApiModelProperty(value = "请求编码")
	private String reqCode;
	
	@ApiModelProperty(value = "优先级")
    private String priority;

	@ApiModelProperty(value = "关键字（用于查找avg配置信息）")
	@NotBlank(message = "请输入关键字(对应AGV配置中的关键字)")
	private String keyword;

	@ApiModelProperty(value = "起始位置编码")
	private String startCode;
	@ApiModelProperty(value = "开始工作位")
	private String startPoint;

	@ApiModelProperty(value = "结束位置编号")
	private String endCode;
	@ApiModelProperty(value = "结束工作位")
	private String targetPoint;

	@ApiModelProperty(value = "任务类型")
	private String agvTaskType;

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

	@ApiModelProperty(value = "载具类型")
	private String frockType;

	@ApiModelProperty(value = "单晶编号")
	private String crystalNo;
	@ApiModelProperty(value = "配方ID")
	private String recipeId;
	@ApiModelProperty(value = "重量ID")
	private String weightId;

	@ApiModelProperty(value = "晶棒详情信息")
	private String crystalDetailInfo;

	@ApiModelProperty(value = "调用人员")
	private String dispatchUser;
	@ApiModelProperty(value = "对应记录ID(非必填)")
	private Long recordId;
	
	@ApiModelProperty(value = "延迟时间(s)")
	private Integer bufferTime;
	
	@ApiModelProperty(value = "回调接口地址(格式: http://ip:port/url),可不传，读取配置信息" )
    private String callbackMsg;

	@ApiModelProperty(value = "长晶棒产出时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date time;

	@ApiModelProperty(value = "规格")
	private String specs;

	@ApiModelProperty(value = "长度")
	private BigDecimal length;
}