package com.ruoyi.hywz.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.hywz.utils.IdGen;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;


/**
 * <p>
 * 【印花税】预警表
 * </p>
 *
 * @author mybatisplus-generator
 * @date 2024-07-17 16:58:32
 */
@Data
public class AdsMatHyxtStampTaxWarningD implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    @TableField(exist = false)
    @ExcelIgnore
    private Integer no;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**
     * 数据来源【0合同信息表 1发票信息表】
     */
    @ApiModelProperty(value = "数据来源【0合同信息表 1发票信息表】")
    private Integer sourceType;

    /**
     * 数据来源ID
     */
    @ApiModelProperty(value = "数据来源ID")
    private String sourceId;

    /**
     * 稽核公式
     */
    @ApiModelProperty(value = "稽核公式")
    private String checkGist;

    /**
     * 稽核类型
     */
    @ApiModelProperty(value = "稽核类型")
    private String checkType;

    /**
     * 潜在风险预警（内容描述）
     */
    @ApiModelProperty(value = "潜在风险预警（内容描述）")
    private String content;

    /**
     * 状态【0未处理 1已处理】
     */
    @ApiModelProperty(value = "状态【0未处理 1已处理】")
    private Integer status;

    /**
     * 风险等级【强控 弱控】
     */
    @ApiModelProperty(value = "风险等级【强控 弱控】")
    private String warningLevel;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 预警情况
     */
    private String warningType;

    @ApiModelProperty(value = "所属单位")
    private String orgNo;
    @ApiModelProperty(value = "所属单位")
    private String orgName;

    @ApiModelProperty(value = "数据来源【0合同信息表 1发票信息表】")
    @TableField(exist = false)
    private String sourceTypeDesc;

    @ApiModelProperty(value = "状态【0未处理 1已处理】")
    @TableField(exist = false)
    private String statusDesc;

    /**
     * 创建用户id
     */
    @ApiModelProperty(value = "创建用户id")
    private String createUserId;

    /**
     * 创建用户账号
     */
    @ApiModelProperty(value = "创建用户账号")
    private String createUser;

    /**
     * 创建用户昵称
     */
    @ApiModelProperty(value = "创建用户昵称")
    private String createUserName;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 是否删除【0未删除 1已删除】
     */
    @ApiModelProperty(value = "是否删除【0未删除 1已删除】")
    private Integer isDeleted;

    public static AdsMatHyxtStampTaxWarningD build(Integer sourceType, String sourceId, String checkGist, String content, String warningType, String orgNo, String orgName) {
        AdsMatHyxtStampTaxWarningD warningD = new AdsMatHyxtStampTaxWarningD();
        warningD.setId(IdGen.get32UUID());
        warningD.setSourceType(sourceType);
        warningD.setSourceId(sourceId);
        warningD.setCheckGist(checkGist);
        warningD.setCheckType("控制性稽核");
        warningD.setWarningLevel("强控");
        warningD.setContent(content);
        warningD.setWarningType(warningType);
        warningD.setOrgNo(orgNo);
        warningD.setOrgName(orgName);
        warningD.setStatus(0);
        warningD.setCreateTime(new Date());
        warningD.setIsDeleted(0);
        return warningD;
    }

    public static AdsMatHyxtStampTaxWarningD build2(Integer sourceType, String sourceId, String checkGist, String content, String warningType, String orgNo, String orgName) {
        AdsMatHyxtStampTaxWarningD warningD = new AdsMatHyxtStampTaxWarningD();
        warningD.setId(IdGen.get32UUID());
        warningD.setSourceType(sourceType);
        warningD.setSourceId(sourceId);
        warningD.setCheckGist(checkGist);
        warningD.setCheckType("控制性稽核");
        warningD.setWarningLevel("弱控");
        warningD.setContent(content);
        warningD.setWarningType(warningType);
        warningD.setOrgNo(orgNo);
        warningD.setOrgName(orgName);
        warningD.setStatus(0);
        warningD.setCreateTime(new Date());
        warningD.setIsDeleted(0);
        return warningD;
    }

}
