Newer
Older
PgInterface / src / main / java / com / casic / PgInterface / devTable / dto / PgTextureDto.java
xiaowei on 21 Nov 2017 2 KB 去掉管廊表中的code字段
package com.casic.PgInterface.devTable.dto;

import com.casic.PgInterface.devTable.domain.PgTexture;

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

/**
 * Created by yxw on 2017/10/30.
 */
public class PgTextureDto implements Serializable {

    private String id;
    private String textureCode;//管廊构件唯一编号
    private String textureName;//名称
    private String textureMaterial;//材质
    private String layerNum;//所在层数
    private String ownerUnit;//权属单位
    private String buildDate;//建设年代
    private String active;//状态位
    private String pipeGallery;//仓位
    private String partition;//分区

    public String getId() {
        return id;
    }

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

    public String getTextureCode() {
        return textureCode;
    }

    public void setTextureCode(String textureCode) {
        this.textureCode = textureCode;
    }

    public String getTextureName() {
        return textureName;
    }

    public void setTextureName(String textureName) {
        this.textureName = textureName;
    }

    public String getTextureMaterial() {
        return textureMaterial;
    }

    public void setTextureMaterial(String textureMaterial) {
        this.textureMaterial = textureMaterial;
    }

    public String getLayerNum() {
        return layerNum;
    }

    public void setLayerNum(String layerNum) {
        this.layerNum = layerNum;
    }

    public String getOwnerUnit() {
        return ownerUnit;
    }

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

    public String getBuildDate() {
        return buildDate;
    }

    public void setBuildDate(String buildDate) {
        this.buildDate = buildDate;
    }

    public String getActive() {
        return active;
    }

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

    public String getPipeGallery() {
        return pipeGallery;
    }

    public void setPipeGallery(String pipeGallery) {
        this.pipeGallery = pipeGallery;
    }

    public String getPartition() {
        return partition;
    }

    public void setPartition(String partition) {
        this.partition = partition;
    }

    public PgTextureDto(PgTexture pgTexture)
    {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");

        this.setId(String.valueOf(pgTexture.getId()));
        this.setTextureCode(pgTexture.getTextureCode());
        this.setTextureName(pgTexture.getTextureName());
        this.setTextureMaterial(pgTexture.getTextureMaterial());
        this.setLayerNum(pgTexture.getLayerNum());
        this.setOwnerUnit(pgTexture.getOwnerUnit());
        this.setBuildDate(sdf.format(pgTexture.getBuildDate()));
        this.setActive(String.valueOf(pgTexture.getActive()));
        this.setPipeGallery(pgTexture.getPgPartitionId().getPipeGalleryId().getPgName());
        this.setPartition(pgTexture.getPgPartitionId().getParName());
    }

}