package org.gyk.modules.lssj.cxcsssjbjchuzhijilu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.time.LocalDateTime;

/**
 * @Description: 实时数据报警处置记录
 * @Author: jeecg-boot
 * @Date:   2023-10-17
 * @Version: V1.0
 */
@Data
@TableName("cxc_sssj_bj_chuzhijilu")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="cxc_sssj_bj_chuzhijilu对象", description="实时数据报警处置记录")
public class CxcSssjBjChuzhijilu implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**站场*/
	@Excel(name = "站场", width = 15)
    @ApiModelProperty(value = "站场")
    private java.lang.String zhanchang;
	/**机组号*/
	@Excel(name = "机组号", width = 15)
    @ApiModelProperty(value = "机组号")
    private java.lang.String jizuhao;
	/**报警名称*/
	@Excel(name = "报警名称", width = 15)
    @ApiModelProperty(value = "报警名称")
    private java.lang.String bjName;
	/**报警时间*/
	@Excel(name = "报警时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "报警时间")
    private LocalDateTime bjTime;
	/**报警信息*/
	@Excel(name = "报警信息", width = 15)
    @ApiModelProperty(value = "报警信息")
    private java.lang.String bjMs;
	/**原因分析*/
	@Excel(name = "原因分析", width = 15)
    private transient java.lang.String fenxiString;

    private byte[] fenxi;

    public byte[] getFenxi(){
        if(fenxiString==null){
            return null;
        }
        try {
            return fenxiString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getFenxiString(){
        if(fenxi==null || fenxi.length==0){
            return "";
        }
        try {
            return new String(fenxi,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
	/**处置措施*/
	@Excel(name = "处置措施", width = 15)
    private transient java.lang.String chuzhicuoshiString;

    private byte[] chuzhicuoshi;

    public byte[] getChuzhicuoshi(){
        if(chuzhicuoshiString==null){
            return null;
        }
        try {
            return chuzhicuoshiString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getChuzhicuoshiString(){
        if(chuzhicuoshi==null || chuzhicuoshi.length==0){
            return "";
        }
        try {
            return new String(chuzhicuoshi,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
}
