package com.sw.mes.agv.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.agv.entity.MobileChargeItem;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "复投灌料DTO")
public class MobileRechargeDto {

    private Long id;

    @ApiModelProperty(value = "物料包编码")
    private String rechargeCode;

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

    @ApiModelProperty(value = "灌料开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Temporal(TemporalType.TIMESTAMP)
    private Date preRechargeTime;

    @ApiModelProperty(value = "灌料结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Temporal(TemporalType.TIMESTAMP)
    private Date rechargeFinishTime;

    @ApiModelProperty(value = "灌料人员")
    private String preRechargeUser;

    @ApiModelProperty(value = "灌料人员ID")
    private Long userId;

    @ApiModelProperty(value = "物料搭配方案")
    private String techName;

    @ApiModelProperty(value = "物料搭配方案ID")
    private Long techId;

    @ApiModelProperty(value = "灌料重量")
    private Double prepareCount;

    @ApiModelProperty(value = "当前重量")
    private Double currentCount;

    @ApiModelProperty(value = "右桶编号")
    private String rightSlingCode;

    @ApiModelProperty(value = "左桶重量")
    private Double leftNum;

    @ApiModelProperty(value = "右桶重量")
    private Double rightNum;

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

    private List<MobileChargeItem> list = new ArrayList<>();

    @ApiModelProperty(value = "炉台名称")
    private String deviceNo;

    @ApiModelProperty(value = "炉次号")
    private String lotNo;

    @ApiModelProperty(value = "配料人员")
    private String mixedUser;

    @ApiModelProperty(value = "合金编号")
    private String alloyCode;

    @ApiModelProperty(value = "合金类型")
    private String alloyType;

    @ApiModelProperty(value = "合金重量")
    private Double alloyWeight;

    @ApiModelProperty(value = "合金规格")
    private String alloyNorms;

    @ApiModelProperty(value = "合金配料时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Temporal(TemporalType.TIMESTAMP)
    private Date alloyTime;

    @ApiModelProperty(value = "班次")
    private String classNo;

    @ApiModelProperty(value = "班组")
    private String className;

    @ApiModelProperty(value = "图片地址,分割")
    private String imgsUrl;

    @ApiModelProperty(value = "退料原因")
    private String backoffReason;

    @ApiModelProperty(value = "退料重量")
    private BigDecimal backoffWeight;


    public MobileRechargeDto() {
    }

    public MobileRechargeDto(Long id) {
        this.id = id;
    }

}
