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.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;
import com.gci.boot.common.validated.UpdateValidated;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

@Data
public class RepairInfoListVO {

    @ApiModelProperty("主键id")
    @ExcelIgnore
    private String id;

    //1待提交 - 2待派单 - 3待报价 - 4待审核报价 - 5待审批报价 - 6维修中 - 7待确认结果 - 8已归档 -9作废
    @ApiModelProperty("流程状态")
    @Dict(dicCode = "repair_status")
    @ExcelProperty(value = "流程状态",index = 7,converter = DictConverter.class)
    @ColumnWidth(value = 20)
    private Integer flowStatus;
    //1运营维保部 - 2维修厂 - 3领导审批 - 4结束
    @ApiModelProperty("流程节点")
    @Dict(dicCode = "repair_node")
    @ExcelProperty(value = "流程节点",index = 8,converter = DictConverter.class)
    @ColumnWidth(value = 20)
    private Integer flowNode;

    @ApiModelProperty("工单号")
    @ColumnWidth(value = 20)
    @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("报修人")
    @ColumnWidth(value = 20)
    @ExcelProperty(value = "报修人",index = 3)
    private String repairPeople;

    @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 repairTime;

    @ApiModelProperty("维修厂")
    @Dict(dicCode = "id",dictTable = "tb_repair_shop_archives",dicText = "name")
    @ExcelProperty(value = "维修厂",index = 4,converter = DictConverter.class)
    @ColumnWidth(value = 30)
    private String repairShop;

    @ApiModelProperty("维修报价金额(元)")
    @ColumnWidth(value = 20)
    @ExcelProperty(value = "维修报价金额(元)",index = 5)
    private Double repairCost;

    //查看按钮（派单。。。。）
    @ExcelIgnore
    private String checkButton;

    // 1-有作废按钮 2-没有
    @ExcelIgnore
    private Integer deleteButton;

    // 用户类型 1-司机，2-维修厂，3-司机&维修厂，4-维保管理员，5-维保领导，6-维保管理员&维保领导
    @ExcelIgnore
    private String userType;

    //1-数据录入，，2-走流程的
    @ExcelIgnore
    private String addType;

    //司机
    @ExcelIgnore
    private String driverParam;
    //维修厂
    @ExcelIgnore
    private String repairParam;

    //维修厂id集合参数，无需展示
    @ExcelIgnore
    private List<String> listRepairShop;

    //项目列表集合参数，无需展示
    @ExcelIgnore
    private List<String> listProject;

    //状态集合参数，无需展示
    @ExcelIgnore
    private List<Integer> flowStatusList;
}
