package com.casic.PgInterface.devTable.dto;

import com.casic.PgInterface.devTable.domain.PgPipeLine;
import com.casic.PgInterface.devTable.manager.PgPartitionManager;
import com.casic.PgInterface.devTable.manager.PipeGalleryManager;

import java.text.SimpleDateFormat;

/**
 * Created by yxw on 2017/10/30.
 */
public class PgPipeLineDto{

    private String id;
    private String lineCode;//管线唯一编号
    private String lineType;//管线类型
    private String ownerUnit;//权属单位
    private String diameter;//管径
    private String pipeLength;//管线长度
    private String active;//状态位

    public String getId() {
        return id;
    }

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

    public String getLineCode() {
        return lineCode;
    }

    public void setLineCode(String lineCode) {
        this.lineCode = lineCode;
    }

    public String getLineType() {
        return lineType;
    }

    public void setLineType(String lineType) {
        this.lineType = lineType;
    }

    public String getOwnerUnit() {
        return ownerUnit;
    }

    public void setOwnerUnit(String ownerUnit) {
        this.ownerUnit = ownerUnit;
    }

    public String getDiameter() {
        return diameter;
    }

    public void setDiameter(String diameter) {
        this.diameter = diameter;
    }

    public String getPipeLength() {
        return pipeLength;
    }

    public void setPipeLength(String pipeLength) {
        this.pipeLength = pipeLength;
    }

    public String getActive() {
        return active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    public PgPipeLineDto(PgPipeLine pgPipeLine) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        this.setId(String.valueOf(pgPipeLine.getId()));
        this.setLineCode(pgPipeLine.getLineCode());
        this.setLineType(pgPipeLine.getLineType());
        this.setOwnerUnit(pgPipeLine.getOwnerUnit());
        this.setDiameter(pgPipeLine.getDiameter());
        this.setPipeLength(String.valueOf(pgPipeLine.getLength()));
        this.setActive(String.valueOf(pgPipeLine.getActive()));

    }
}