package com.mosty.base.model.entity.jcgl;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mosty.base.model.BaseEntity;
import com.mosty.common.base.entity.log.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

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

@Data
@ApiModel(value = "装备类别")
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("tb_jcgl_jyqx")
public class TbJcglJyqx extends BaseEntity implements Serializable, Cloneable {

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "器械名称")
    @Excel(name = "器械名称",sort = 3,headerColor= IndexedColors.RED1 )
    private String qxMc;

    @ApiModelProperty(value = "器械编号")
    @Excel(name = "器械编号",sort = 4,headerColor= IndexedColors.RED1 )
    private String qxbh;

    @ApiModelProperty(value = "设备分类")
    @Excel(name = "设备分类",sort = 5,headerColor= IndexedColors.RED1,dictType = "D_BZ_JYQXFL")
    private String scode;

    @ApiModelProperty(value = "设备类型名称")
    private String sname;

    @ApiModelProperty(value = "数量")
    @Excel(name = "数量",sort = 6,headerColor= IndexedColors.RED1 ,cellType = Excel.ColumnType.NUMERIC)
    private long sl;

    @ApiModelProperty(value = "计量单位;如：支、台等")
    private String jsdw;

    @ApiModelProperty(value = "批次号")
    @Excel(name = "批次号",sort = 7,headerColor= IndexedColors.RED1)
    private String qxPch;

    @ApiModelProperty(value = "到期日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期日期", width = 30, dateFormat = "yyyy-MM-dd",headerColor= IndexedColors.RED1 )
    private Date dqsj;

    @ApiModelProperty(value = "生产厂商")
    @Excel(name = "生产厂商", width = 30 )
    private String sccs;

    @ApiModelProperty(value = "采购日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "采购日期", width = 30, dateFormat = "yyyy-MM-dd",headerColor= IndexedColors.RED1 )
    private Date cgrq;

    @ApiModelProperty(value = "装备图片地址")
    private String qxTp;

    @ApiModelProperty(value = "型号")
    @Excel(name = "型号")
    private String xh;

    @ApiModelProperty(value = "装备图片")
    @TableField(exist = false)
    private MultipartFile zbTpFile;

    @ApiModelProperty(value = "装备状态D_ZDY_SBZT(1 正常 2 临期 3 到期)")
    private String zbzt;

    @ApiModelProperty(value = "所属部门id")
    private String ssbmid;

    @ApiModelProperty(value = "所属部门")
    @Excel(name = "所属部门",sort = 2 )
    private String ssbm;

    @ApiModelProperty(value = "所属部门代码")
    @Excel(name = "所属部门代码",sort = 1,headerColor= IndexedColors.RED1 )
    private String ssbmdm;

    @ApiModelProperty(value = "所属县公安局")
    private String ssxgaj;

    @ApiModelProperty(value = "所属县公安局id")
    private String ssxgajid;

    @ApiModelProperty(value = "所属县公安局代码")
    private String ssxgajdm;

    @ApiModelProperty(value = "所属市公安局id")
    private String sssgajid;

    @ApiModelProperty(value = "所属市公安局")
    private String sssgaj;

    @ApiModelProperty(value = "所属市公安局代码")
    private String sssgajdm;

    @ApiModelProperty(value = "当前页")
    @NotBlank(message = "参数不能为空")
    @TableField(exist = false)
    private Integer pageNo;

    @ApiModelProperty(value = "每页条数")
    @NotBlank(message = "参数不能为空")
    @TableField(exist = false)
    private Integer pageSize;

    @ApiModelProperty(value = "下发id 下发装备的id")
    private String xfid;

    @ApiModelProperty(value = "是否报损 0报损 1未报损")
    private String sfbs;

    @ApiModelProperty(value = "关联警用器械列表")
    @TableField(exist = false)
    private List<TbJcglJyqx> jyqxList;

    @ApiModelProperty(value = "下发数")
    private long xfs;

    @ApiModelProperty(value = "报损数")
    private long bss;

    @ApiModelProperty(value = "图片id")
    private String tpid;
}
