package com.gci.boot.modules.vehicles.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class UpkeepInfoListVO {

    @ApiModelProperty("主键id")
    @ExcelIgnore
    private String id;
    //2         3         4        6        7          8        9
    //待委派     待报价    待审核     保养中    待确认      结束     作废
    @ApiModelProperty("流程状态")
    @Dict(dicCode = "upkeep_status")
    @ExcelProperty(value = "流程状态",index = 12,converter = DictConverter.class)
    @ColumnWidth(value = 15)
    private Integer flowStatus;
    //1运营维保部 - 2维修厂 /- 3领导审批/ - 4结束
    @ApiModelProperty("流程节点")
    @Dict(dicCode = "repair_node")
    @ExcelIgnore
//    @ExcelProperty(value = "流程节点",index = 13,converter = DictConverter.class)
//    @ColumnWidth(value = 20)
    private Integer flowNode;

    @ApiModelProperty("工单号")
    @ColumnWidth(value = 30)
    @ExcelProperty(value = "工单号",index = 0)
    private String orderNo;

    @ApiModelProperty("所属项目")
    @Dict(dicCode = "id",dictTable = "tb_projects",dicText = "project_name")
    @ExcelProperty(value = "所属项目",index = 2,converter = DictConverter.class)
    @ColumnWidth(value = 30)
    private String projectId;

    @ApiModelProperty("车牌号")
    @ColumnWidth(value = 20)
    @ExcelProperty(value = "车牌号",index = 1)
    private String plateNumber;

    @ApiModelProperty("车辆种类")
    @Dict(dicCode = "vehicle_type")
    @ExcelProperty(value = "车辆种类",index = 3,converter = DictConverter.class)
    @ColumnWidth(value = 20)
    private String vehicleType;

    @ApiModelProperty("上次保养时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "上次保养时间",index = 4)
    @ColumnWidth(value = 20)
    private Date lastTime;

    @ApiModelProperty("上次保养里程")
    @ExcelProperty(value = "上次保养里程(KM)",index = 5)
    @ColumnWidth(value = 20)
    private Integer lastMileage;

    @ApiModelProperty("预计保养时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "预计保养时间",index = 6)
    @ColumnWidth(value = 20)
    private Date predictTime;

    @ApiModelProperty("预计保养里程")
    @ExcelProperty(value = "预计保养里程(KM)",index = 7)
    @ColumnWidth(value = 20)
    private Integer predictMileage;

    @ApiModelProperty("保养单位")
    @Dict(dicCode = "id",dictTable = "tb_repair_shop_archives",dicText = "name")
    @ExcelProperty(value = "保养单位",index = 8,converter = DictConverter.class)
    @ColumnWidth(value = 30)
    private String repairShop;

    @ApiModelProperty("报价金额")
    @ExcelProperty(value = "报价金额(元)",index = 9)
    @ColumnWidth(value = 20)
    private Double totaCost;

    /**实际保养开始*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "实际保养开始")
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "实际保养开始",index = 10)
    @ColumnWidth(value = 30)
    private Date startTime;

    /**实际保养结束*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "实际保养结束")
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "实际保养结束",index = 11)
    @ColumnWidth(value = 30)
    private Date endTime;

    /**实际保养里程*/
    @ApiModelProperty("实际保养里程")
    @ExcelProperty(value = "实际保养里程",index = 13)
    private Integer realMileage;


    //查看按钮（派单。。。。）
    @ExcelIgnore
    private String checkButton;
    // 1-有作废按钮 2-没有
    @ExcelIgnore
    private Integer deleteButton;
    // 用户类型 1-司机，2-维修厂，3-司机&维修厂，4-维保管理员，5-维保领导，6-维保管理员&维保领导
    @ExcelIgnore
    private String userType;
    //维修厂
    @ExcelIgnore
    private String repairParam;
    //修车厂id集合入参（支持多个）
    @ExcelIgnore
    private List<String> listRepairShop;
    //项目列表集合参数，无需展示
    @ExcelIgnore
    private List<String> listProject;
    //状态集合参数，无需展示
    @ExcelIgnore
    private List<Integer> flowStatusList;
}
