Newer
Older
newfiber-data-adapter / src / main / java / org / springnewfiber / dataadapter / xf / entity / WrInwamntRData.java
package org.springnewfiber.dataadapter.xf.entity;

import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 供水厂入口数据-水源地
 */
@Data
public class WrInwamntRData extends BaseXfInterfaceEntity {
//    create table wr_inwamnt_r
//            (
//                    wanm varchar(30) comment '供水厂名称',
//    tm   timestamp  comment '监测时间',
//    in_accw  numeric(12,1) comment '取水水量 m³',
//    in_frq   numeric(9,3) comment '取水瞬时流量 m³/h',
//    in_turb  numeric(5,2) comment '取水浊度  NTU'
//            ) comment='水厂进水监测数据';
    @JsonProperty(value ="cq1")
    @ApiModelProperty(value = "取水水量 m³")
    private BigDecimal inAccw;
    @JsonProperty(value ="q")
    @ApiModelProperty(value = "取水瞬时流量 m³/h")
    private BigDecimal inFrq;
    @JsonProperty(value ="turb")
    @ApiModelProperty(value = "取水浊度  NTU")
    private BigDecimal inTurb;
    public static WrInwamntRData dtoToDto(WrInwamntRDataDto data) {
        WrInwamntRData dto = new WrInwamntRData();
        BeanUtil.copyProperties(data, dto);
//        dto.setTm(DateUtil.parse(data.getTm(), "yyyy/MM/dd HH:mm:ss"));
        dto.setStnm(data.getWanm());
        dto.setStcd(data.getWacode());
        return dto;
    }
}