package com.mvc.model.external;

import com.mvc.model.TAireadModel;
import com.mvc.utils.DateUtil;

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

/**
 * 识别结果对象
 * 针对外部请求反馈的结果
 */
public class IdentResultModel {
    public IdentResultModel(TAireadModel aireadModel) {
        deviceSn = aireadModel.getDeviceSn();
        stationCode = aireadModel.getStationCode();
        identValue = aireadModel.getResultValue();
        sampleTime = DateUtil.formateDate(aireadModel.getSampleTime(), DateUtil.PATTERN_DATA_NORMAL);
        imageUrl = "";
    }

    //数据库中不存在的读数记录的情况,但又要返回
    public IdentResultModel(String stationCode) {
        this.deviceSn = "";
        this.stationCode = stationCode;
        this.sampleTime = DateUtil.formateDate(new Date(0), DateUtil.PATTERN_DATA_NORMAL);
        this.imageUrl = "";
    }

    private String deviceSn;
    private String stationCode;
    private BigDecimal identValue;
    private String sampleTime;
    private String imageUrl;//天屹智造(紫东能源),需要图片 2025-02-17 guozhao

    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 BigDecimal getIdentValue() {
        return identValue;
    }

    public void setIdentValue(BigDecimal identValue) {
        this.identValue = identValue;
    }

    public String getSampleTime() {
        return sampleTime;
    }

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

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
}
