package com.yunyan.business.pojo.admin.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yunyan.common.core.domain.BaseEntityVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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


/**
 * 报告数据对象 tb_final_data
 *
 * @author yunyan
 * @date 2023-07-27
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "tb_final_data")
public class FinalDataListDto extends BaseEntityVo
{
    private static final long serialVersionUID = 1L;

    /** 类型: 1-决算, 2-预算, 默认1 */
    @NotNull(message = "类型必传")
    @ApiModelProperty(value = "类型: 1-决算, 2-预算, 默认1")
    private Integer type;

    @ApiModelProperty(value = "单位名")
    private String deptName;

    @ApiModelProperty(value = "单位编码")
    private String deptCode;

    /** 用户ID */
    /*@ApiModelProperty(value = "用户ID")
    private Long userId;*/

    /** 部门id/单位 */
    @ApiModelProperty(value = "部门id/单位")
    private Long deptId;

    /** 年份(如2023) */
    @NotBlank(message = "年份必传")
    @ApiModelProperty(value = "年份(如2023)")
    private String year;

    /** 是否公开, 1-是，0-非 */
    @ApiModelProperty(value = "是否公开, 1-是，0-非")
    private Integer publicStatus;

    /** 公开时间(录入网址的时间) */
    /*@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "公开时间(录入网址的时间)")
    private Date publicTime;*/

    /** 单位公开一致性: 1-是，0-非 */
    @ApiModelProperty(value = "单位公开一致性: 1-是，0-非")
    private Integer publicConsistent;

    @ApiModelProperty(value = "状态: 0-默认, 1-本年数据采集, 2-去年数据采集, 4-填报中, 6-申请审核中, 8-单位内审通过(一审) , 9-单位内审驳回(一审) , 10-财政审核通过(二审) , 11- 财政审核驳回(二审), 14-已生成报告, 16-已填公开网址")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "范围选择 开始  创建时间/填报时间")
    private Date createTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "范围选择 结束 创建时间/填报时间")
    private Date createTimeEnd;

    @ApiModelProperty(value = "单位级别: 按字典")
    private Integer deptLevel;

    @ApiModelProperty(value = "限制查询的条数", hidden = true)
    private Integer limitRowNum;

    /** 区划名称 */
    @NotBlank(message = "区域必传")
    @TableField(select = false)
    @ApiModelProperty(value = "区划名称")
    private String area;

    @ApiModelProperty(value = "excel中的编制单位")
    private String excelDeptName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间 开始")
    private Date auditTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间 结束")
    private Date auditTimeEnd;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间 开始")
    private Date updateTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间 结束")
    private Date updateTimeEnd;

}
