package com.casic.missiles.dto.equipment;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.casic.missiles.annotation.DictCodeField;
import com.casic.missiles.constants.MeterDictCode;
import com.casic.missiles.model.equipment.EquipmentApplyFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

@ApiModel
@Data
@ColumnWidth(30)
@HeadRowHeight(15)
@ContentRowHeight(20)
@ContentStyle(borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
@ExcelIgnoreUnannotated
public class StateManageResponse implements Serializable {

    private static final long serialVersionUID = 8705579720027710541L;
    /**
     * 主键
     */
    @TableId("id")
    @ApiModelProperty(value = "主键", dataType = "Long")
    private Long id;

    /**
     * 申请编号
     */
    @ExcelProperty(value = "申请编号",order = 0)
    @ApiModelProperty(value = "申请编号", dataType = "String")
    private String applyNo;

    /**
     * 申请名称
     */
    @TableField("apply_name")
    @ApiModelProperty(value = "申请名称", dataType = "String")
    private String applyName;

    /**
     * 申请类型-字典code
     */
    @NotBlank(message = "申请类型不能为空")
    @ApiModelProperty(value = "申请类型-字典code", dataType = "String")
    @DictCodeField(message = "申请类型不合法", cacheName = MeterDictCode.EQUIPMENT_APPLY_TYPE)
    private String applyType;

    /**
     * 审批状态-字典code
     */
    @DictCodeField(message = "审批状态不合法", cacheName = MeterDictCode.APPROVAL_STATUS)
    @ApiModelProperty(value = "审批状态-字典code", dataType = "String")
    private String approvalStatus;

    /**
     * 审批状态名称
     */
    @ApiModelProperty(value = "审批状态名称", dataType = "String")
    private String approvalStatusName;

    /**
     * 申请类型名称
     */
    @ApiModelProperty(value = "申请类型名称", dataType = "String")
    @ExcelProperty(value = "申请类型",order = 1)
    private String applyTypeName;

    /**
     * 设备id
     */
    @ApiModelProperty(value = "设备id", dataType = "String")
    private String equipmentId;

    /**
     * 设备申请关联id
     */
    @ApiModelProperty(value = "设备申请关联id", dataType = "Long")
    private Long applyEquipmentId;

    /**
     * 设备编号
     */
    @ApiModelProperty(value = "(状态管理)设备编号", dataType = "String")
    @ExcelProperty(value = "设备编号",order = 2)
    private String equipmentNo;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称", dataType = "String")
    @ExcelProperty(value = "设备名称",order = 3)
    private String equipmentName;

    /**
     * 型号
     */
    @ApiModelProperty(value = "型号", dataType = "String")
    @ExcelProperty(value = "型号",order = 4)
    private String modelNo;

    /**
     * 管理状态-字典code
     */
    @ApiModelProperty(value = "管理状态", dataType = "String")
    @DictCodeField(message = "管理状态不合法", cacheName = MeterDictCode.MANAGER_STATE)
    private String managerState;
    /**
     * 管理状态名称
     */
    @ApiModelProperty(value = "管理状态名称", dataType = "String")
    @ExcelProperty(value = "设备状态",order = 5)
    private String managerStateName;

    /**
     * 申请单位
     */
    @ApiModelProperty(value = "申请单位", dataType = "String")
    private String applyUnit;

    /**
     * 申请单位名称
     */
    @ApiModelProperty(value = "申请单位名称", dataType = "String")
    @ExcelProperty(value = "申请单位",order = 6)
    private String applyUnitName;

    /**
     * 申请人
     */
    @ApiModelProperty(value = "申请人", dataType = "String")
    private String applyPerson;

    /**
     * 申请人名称
     */
    @ApiModelProperty(value = "申请人名称", dataType = "String")
    @ExcelProperty(value = "申请人",order = 7)
    private String applyPersonName;

    /**
     * 申请时间
     */
    @ApiModelProperty(value = "申请时间", dataType = "String")
    @ExcelProperty(value = "申请时间",order = 8)
    private String time;

    /**
     * 设备规格
     */
    @ExcelProperty("设备规格")
    @ApiModelProperty(value = "设备规格", dataType = "String")
    private String equipmentSpecifications;

    /**
     * 出厂编号
     */
    @ApiModelProperty(value = "出厂编号", dataType = "String")
    private String manufacturingNo;


    /**
     * 生产厂家
     */
    @ApiModelProperty(value = "生产厂家", dataType = "String")
    private String manufacturer;

    /**
     * 财务净值
     */
    @ApiModelProperty(value = "财务净值", dataType = "Double")
    private Double financialValue;

    /**
     * 资产原值
     */
    @ApiModelProperty(value = "资产原值", dataType = "Double")
    private Double assetOriginValue;


    /**
     * 流程实例ID
     */
    @ApiModelProperty(value = "流程实例ID", dataType = "String")
    private String processId;

    /**
     * 处理结果（设备领用、借用处理结果）
     */
    @ApiModelProperty(value = "处理结果（设备领用、借用处理结果）", dataType = "String")
    private String processResult;

    /**
     * 版本号
     */
    @ApiModelProperty(value = "版本号", dataType = "String")
    private String version;

    /**
     * 备注
     */
    @ApiModelProperty(value = "申请理由", dataType = "String")
    private String remark;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记", dataType = "Integer")
    private Integer isDel;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", dataType = "String")
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", dataType = "String")
    private String createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", dataType = "String")
    private String updateTime;

    /**
     * 附件
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "附件列表", dataType = "List")
    private List<EquipmentApplyFile> fileList;

    /**
     * 任务id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "任务id（同意、驳回等操作使用）", dataType = "String")
    private String taskId;

    /**
     * 可选决策项
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "可选决策项（1同意驳回拒绝 2同意驳回 3同意拒绝，用于待审批列表同意/驳回/拒绝按钮展示）", dataType = "Integer")
    private Integer decisionItem;

}
