package org.jeecg.module.custom.ocr.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jeecg.module.custom.ocr.base.jsonDomain.DateSerializer;
import org.jeecg.module.custom.ocr.common.dto.BaseDto;
import org.jeecg.module.custom.ocr.jsonDomain.DateNotimeSerializer;
import org.jeecg.module.custom.ocr.utils.requestFormat.SearchQuery;

import java.util.List;

/**
 * 图片信息表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "图片信息表", description = "图片信息表")
@TableName(value = "ocr_task")
public class OcrPictureBak implements BaseDto, java.io.Serializable {

    private static final long serialVersionUID = -10378331243377607L;
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "ID")
    private Long id;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_by")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time")
    @JsonSerialize(using = DateSerializer.class)
    private Long createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(value = "update_by")
    private String updateBy;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time")
    @JsonSerialize(using = DateSerializer.class)
    private Long updateTime;

    @ApiModelProperty(value = "分类表主键--通过“图片分类”字段做匹配，如果没有自动添加")
    @TableField(value = "classificationid")
    private String classificationid;

    @ApiModelProperty(value = "图片类型--通过“AI图片分类接口获得”")
    @TableField(value = "pictureclassid")
    private String pictureclassid;

    @ApiModelProperty(value = "图片类型相似度，图片类型--通过“AI图片分类接口获得”")
    @TableField(value = "pictureclassscores")
    private String pictureclassscores;

    @ApiModelProperty(value = "图片真假0:假，1：真")
    @TableField(value = "iztrueorfalse")
    private Integer iztrueorfalse;

    @ApiModelProperty(value = "选判真假原因id,从字典表中获得，其他时，当前字段为零")
    @TableField(value = "judgeid")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long judgeid;

    @ApiModelProperty(value = "图片为假的其他原因，长度不超过50个汉字")
    @TableField(value = "judgedesc")
    private String judgedesc;

    @ApiModelProperty(value = "公司ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "tenant_id")
    private Long tenantId;

    @ApiModelProperty(value = "公司状态")
    @TableField(value = "tenantstatus")
    private String tenantstatus;

    @ApiModelProperty(value = "公司代码，第三方系统")
    @TableField(value = "plantCode")
    private String plantcode;

    @ApiModelProperty(value = "公司名称")
    @TableField(value = "tenantname")
    private String tenantname;

    @ApiModelProperty(value = "业务主体ID--图片主键")
    @TableField(value = "pictureid")
    private String pictureid;

    @ApiModelProperty(value = "业务主体名称--图片成名")
    @TableField(value = "picturename")
    private String picturename;

    @ApiModelProperty(value = "图片名称")
    @TableField(value = "imgName")
    private String imgname;

    @ApiModelProperty(value = "图片地址")
    @TableField(value = "imgUrl")
    private String imgurl;

    @ApiModelProperty(value = "业务主体状态")
    @TableField(value = "picturestatus")
    private String picturestatus;

    @ApiModelProperty(value = "源项目id")
    @TableField(value = "projectId")
    private String projectid;

    @ApiModelProperty(value = "项目名称")
    @TableField(value = "projectIdName")
    private String projectidname;

    @ApiModelProperty(value = "项目状态")
    @TableField(value = "projectstatus")
    private String projectstatus;

    @ApiModelProperty(value = "源计划id")
    @TableField(value = "planId")
    private String planid;

    @ApiModelProperty(value = "计划名称")
    @TableField(value = "planName")
    private String planname;

    @ApiModelProperty(value = "计划状态")
    @TableField(value = "planstatus")
    private String planstatus;

    @ApiModelProperty(value = "所属子计划ID")
    @TableField(value = "planchildid")
    private String planchildid;

    @ApiModelProperty(value = "所属子计划名称")
    @TableField(value = "planchildname")
    private String planchildname;

    @ApiModelProperty(value = "所属子计划状态")
    @TableField(value = "planchildstatus")
    private String planchildstatus;

    @ApiModelProperty(value = "上传时间")
    @JsonSerialize(using = DateNotimeSerializer.class)
    @TableField(value = "upTime")
    private Long uptime;

    @ApiModelProperty(value = "生成时间")
    @JsonSerialize(using = DateNotimeSerializer.class)
    @TableField(value = "genTime")
    private Long gentime;

    @ApiModelProperty(value = "色彩空间")
    @TableField(value = "space")
    private String space;

    @ApiModelProperty(value = "来源")
    @TableField(value = "source")
    private String source;

    @ApiModelProperty(value = "上报者头像--接口传送")
    @TableField(value = "upHead")
    private String uphead;

    @ApiModelProperty(value = "上报人主键")
    @TableField(value = "upuserid")
    private String upuserid;

    @ApiModelProperty(value = "上报者名称--接口传送")
    @TableField(value = "upName")
    private String upname;

    @ApiModelProperty(value = "发布地区,拜访城市,城市名称，例如：北京市、天津市、石家庄市")
    @TableField(value = "releaseArea")
    private String releasearea;

    @ApiModelProperty(value = "拜访省份")
    @TableField(value = "releaseProvince")
    private String releaseprovince;

    @ApiModelProperty(value = "任务id")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty(value = "任务名称，源系统")
    @TableField(value = "taskName")
    private String taskname;

    @ApiModelProperty(value = "是否已经生成任务,0：否，1：是")
    @TableField(value = "taskstatus")
    private String taskstatus;

    @ApiModelProperty(value = "是否已经审批，0：未生成，1：审批中，2：已审批")
    @TableField(value = "work_status")
    private String workStatus;

    @ApiModelProperty(value = "现项目ID")
    @TableField(value = "categoryid")
    private Long categoryid;

    @ApiModelProperty(value = "任务-工单主键")
    @TableField(value = "taskchildpictureid")
    private String taskchildpictureid;

    @ApiModelProperty(value = "提报人")
    @TableField(value = "field1")
    private String field1;

    @ApiModelProperty(value = "拜访客户类型")
    @TableField(value = "field2")
    private String field2;

    @ApiModelProperty(value = "拜访客户名称,终端名称，例如中日友好医院")
    @TableField(value = "field3")
    private String field3;

    @ApiModelProperty(value = "任务来源")
    @TableField(value = "field4")
    private String field4;

    @ApiModelProperty(value = "厂商")
    @TableField(value = "field5")
    private String field5;

    @ApiModelProperty(value = "拜访客户级别")
    @TableField(value = "field6")
    private String field6;

    @ApiModelProperty(value = "科室名称")
    @TableField(value = "field7")
    private String field7;

    @ApiModelProperty(value = "拜访小结")
    @TableField(value = "field8")
    private String field8;

    @ApiModelProperty(value = "产品名称")
    @TableField(value = "field9")
    private String field9;

    @ApiModelProperty(value = "地区，定位信息，例如北京市朝阳区文苑路10号")
    @TableField(value = "field10")
    private String field10;

    @ApiModelProperty(value = "拜访日期")
    @TableField(value = "field11")
    private String field11;

    @ApiModelProperty(value = "定位距离")
    @TableField(value = "field12")
    private String field12;

    @ApiModelProperty(value = "病历号")
    @TableField(value = "field13")
    private String field13;

    @ApiModelProperty(value = "是否重复")
    @TableField(value = "field14")
    private String field14;

    @ApiModelProperty(value = "任务类型")
    @TableField(value = "field15")
    private String field15;

    @ApiModelProperty(value = "任务状态")
    @TableField(value = "field16")
    private String field16;

    @ApiModelProperty(value = "拜访项目类别")
    @TableField(value = "field17")
    private String field17;

    @ApiModelProperty(value = "备用字段")
    @TableField(value = "field18")
    private String field18;

    @ApiModelProperty(value = "本地图片地址")
    @TableField(value = "local_pictrue_url")
    private String localpictrueurl;

    @ApiModelProperty(value = "是否已下载到本地")
    @TableField(value = "is_download")
    private Integer isdownload;

    @ApiModelProperty(value = "图片hash值")
    @TableField(value = "img_hash")
    private String imgHash;

    @ApiModelProperty(value = "相似度数值")
    @TableField(value = "similarity_score")
    private Integer similarityscore;

    @ApiModelProperty(value = "下载到本地，失败次数")
    @TableField(value = "download_error_count")
    private Integer downloadErrorCount;

    @ApiModelProperty(value = "图片查重的比对图片集合")
    @TableField(exist = false)
    private List<OcrPictureBak> listCom;

    @ApiModelProperty(value = "非历史图片主键集合")
    @TableField(exist = false)
    private List<String> picturecompareList;

    @ApiModelProperty(value = "图片对应的工单对象")
    @TableField(exist = false)
    private OcrTaskchildPicture ocrTaskchildPicture;

    @ApiModelProperty(value = "当前图片与参考图比对结果")
    //当前图片与参考图比对结果
    @TableField(exist = false)
    private String result;

    @ApiModelProperty(value = "缩略图服务器绝对路径")
    @TableField(value = "local_thumbnail_url")
    private String localThumbnailUrl;

    @ApiModelProperty(value = "缩略图请求地址")
    @TableField(value = "server_thumbnail_url")
    private String serverThumbnailUrl;

    @ApiModelProperty(value = "提报日期时间戳")
    @TableField(value = "submit_date_timestamp")
    private Long submitDateTimestamp;

    @ApiModelProperty(value = "是否重复，0.不重复 1.重复 (历史比对中阈值存在100的会显示此值)")
    @TableField(value = "is_repeat")
    private Integer isRepeat;

    @ApiModelProperty(value = "任务状态")
    @TableField(exist = false)
    private Integer states;

    @ApiModelProperty(value = "可疑文件夹 0:不在，1：在")
    @TableField(value = "suspiciousfile")
    private Integer suspiciousfile;

    @ApiModelProperty(value = "定位")
    @TableField(value = "location")
    private String location;

    @ApiModelProperty(value = "备注")
    @TableField(value = "comment")
    private String comment;

    @ApiModelProperty(value = "拍照时间")
    @TableField(value = "photo_date_timestamp")
    @JsonSerialize(using = DateSerializer.class)
    private Long photoDateTimestamp;

    @ApiModelProperty(value = "完全相似分组id")
    @TableField(value = "complete_similar_group_id")
    private Long completeSimilarGroupId;

    @ApiModelProperty(value = "是否为历史图")
    @TableField(value = "history")
    private Boolean history;

    @ApiModelProperty(value = "节点状态")
    @TableField(exist = false)
    private Integer historyStates;

    @ApiModelProperty(value = "节点状态")
    @TableField(exist = false)
    private String taskId;

    @ApiModelProperty(value = "是否是历史重复，一键查重图片墙，检索结果阈值100无相同图片时使用")
    @TableField(exist = false)
    private Integer isRepeatHis;

    @ApiModelProperty(value = "图片信息-宽")
    @TableField(exist = false)
    private String wide;

    @ApiModelProperty(value = "图片信息-高")
    @TableField(exist = false)
    private String high;

    //保存当前登录用户的数据权限范围的搜索条件
    @TableField(exist = false)
    @JsonIgnore
    private SearchQuery searchQueryrolesShowleave;

    @TableField(exist = false)
    private OcrPictureInfo pictureInfo;

    @Override
    public String getQueryFiled(String filedname) {
        return "";
    }
}
