Newer
Older
PgInterface / src / main / java / com / casic / PgInterface / devData / dto / PgCh4Dto.java
xiaowei on 28 Nov 2017 1 KB 新增设备监测对象表
package com.casic.PgInterface.devData.dto;

import com.casic.PgInterface.devData.domain.PgCh4;

import java.io.Serializable;
import java.text.SimpleDateFormat;

/**
 * Created by yxw on 2017/11/28.
 */
public class PgCh4Dto implements Serializable {

    private String id;
    private String ch4;
    private String logTime;
    private String upTime;
    private String devCode;
    private String devName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCh4() {
        return ch4;
    }

    public void setCh4(String ch4) {
        this.ch4 = ch4;
    }

    public String getLogTime() {
        return logTime;
    }

    public void setLogTime(String logTime) {
        this.logTime = logTime;
    }

    public String getUpTime() {
        return upTime;
    }

    public void setUpTime(String upTime) {
        this.upTime = upTime;
    }

    public String getDevCode() {
        return devCode;
    }

    public void setDevCode(String devCode) {
        this.devCode = devCode;
    }

    public String getDevName() {
        return devName;
    }

    public void setDevName(String devName) {
        this.devName = devName;
    }

    public PgCh4Dto(PgCh4 pgCh4)
    {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        this.setId(String.valueOf(pgCh4.getId()));
        this.setCh4(pgCh4.getCh4());
        this.setLogTime(sdf.format(pgCh4.getLogTime()));
        this.setUpTime(sdf.format(pgCh4.getUpTime()));
        this.setDevCode(pgCh4.getPgDeviceId().getDevCode());
        this.setDevName(pgCh4.getPgDeviceId().getDevName());

    }
}