package com.mvc.recognition.freeai;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mvc.model.TAireadModel;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 设备采样信息(图片信息、采样时间、设备SN、设备的配置信息
 */
public class FaSampleInfo {
    public static int IMG_TYPE_JPEG = 1;
    public static int IMG_TYPE_BMP888 = 2;
    public static int IMG_TYPE_BMP565 = 3;

    private String deviceSn;        //设备SN
    private String stationCode;     //站代码--目前暂不用

    @DateTimeFormat(pattern = "yyyyMMddHHmmss")
    @JsonFormat(pattern = "yyyyMMddHHmmss",timezone = "GMT+8")
    private Date sampleTime;            //设备的采样时间(不能为空)
    //http上传的文件(本地测试时不使用)
    //private MultipartFile imgFile;
    //图像文件的类型(1:JPEG 2:BMP),目前置支持jpg类型

    private int imgType;      //1:JPG;2:BMP888,3:BMP565;(目前仅支持JPG)
    private int imgWidth;     //图像宽度,目前仅支持320
    private int imgHeight;    //图像高度,目前仅支持240
    private int imgDataSize;    //图像数据的字节大小(一般不超过50K)

    private BigDecimal reviewValue;//审核值(立方) .add 2024-09-20 guozhao
    private Date reviewSampleTime;//审核对应的采样时间 .add 2024-09-20 guozhao

    public FaSampleInfo(TAireadModel aireadModel){
        this.deviceSn = aireadModel.getDeviceSn();
        this.stationCode = aireadModel.getStationCode();
        this.sampleTime = aireadModel.getSampleTime();
        this.imgType = IMG_TYPE_JPEG;
        this.imgWidth = 320;
        this.imgHeight = 240;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public Date getSampleTime() {
        return sampleTime;
    }

    public void setSampleTime(Date sampleTime) {
        this.sampleTime = sampleTime;
    }

    public int getImgType() {
        return imgType;
    }

    public void setImgType(int imgType) {
        this.imgType = imgType;
    }

    public int getImgWidth() {
        return imgWidth;
    }

    public void setImgWidth(int imgWidth) {
        this.imgWidth = imgWidth;
    }

    public int getImgHeight() {
        return imgHeight;
    }

    public void setImgHeight(int imgHeight) {
        this.imgHeight = imgHeight;
    }

    public int getImgDataSize() {
        return imgDataSize;
    }

    public void setImgDataSize(int imgDataSize) {
        this.imgDataSize = imgDataSize;
    }

    public BigDecimal getReviewValue() {
        return reviewValue;
    }

    public void setReviewValue(BigDecimal reviewValue) {
        this.reviewValue = reviewValue;
    }

    public Date getReviewSampleTime() {
        return reviewSampleTime;
    }

    public void setReviewSampleTime(Date reviewSampleTime) {
        this.reviewSampleTime = reviewSampleTime;
    }
}
