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

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

import java.math.BigDecimal;

@Data
/**
 * 供水厂出水口监测数据
 */
public class WrOutwamntRData extends BaseXfInterfaceEntity{
//    create table wr_outwamnt_r
//            (
//                    wanm varchar(30) comment '供水厂名称',
//    tm   datetime  comment '监测时间',
//    out_accw  numeric(12,1) comment '供水水量 m³',
//    out_frq   numeric(9,3)  comment '供水瞬时流量 m³/h',
//    out_turb  numeric(5,2) comment '供水浊度 NTU',
//    out_pre   numeric(7,3) comment '供水压力 Mpa',
//    out_chl   numeric(7,2) comment '供水余氯 mg/L'
//            ) comment='水厂出水监测数据';

    @JsonProperty(value ="cq1")
    @ApiModelProperty(value = "供水水量 m³")
    private BigDecimal outAccw;
    @JsonProperty(value ="q")
    @ApiModelProperty(value = "供水瞬时流量 m³/h")
    private BigDecimal outFrq;
    @JsonProperty(value ="turb")
    @ApiModelProperty(value = "供水浊度 NTU")
    private BigDecimal outTurb;
    @JsonProperty(value ="yl")
    @ApiModelProperty(value = "供水压力 Mpa")
    private BigDecimal outPre;
    @JsonProperty(value ="cl")
    @ApiModelProperty(value = "供水余氯 mg/L")
    private BigDecimal outChl;

    public static WrOutwamntRData dtoToDto(WrOutwamntRDataDto data) {
        WrOutwamntRData dto = new WrOutwamntRData();
        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;
    }

}