package com.zksy.WaterSupply.export;

import com.zksy.WaterSupply.WaterPipeInfo.domain.WaterPipeInfo;
import com.zksy.common.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class WaterPipeExportDTO {
    @Excel(name = "管网编号") private String pipeCode;
    @Excel(name = "管网名称") private String pipeName;
    @Excel(name = "材质") private String pipeMaterial;
    @Excel(name = "管径(mm)") private Integer pipeDiameter;
    @Excel(name = "长度(m)") private BigDecimal pipeLength;
    @Excel(name = "状态") private String status;
    @Excel(name = "起点经度") private BigDecimal startLongitude;
    @Excel(name = "起点纬度") private BigDecimal startLatitude;
    @Excel(name = "终点经度") private BigDecimal endLongitude;
    @Excel(name = "终点纬度") private BigDecimal endLatitude;
    public static WaterPipeExportDTO from(WaterPipeInfo value) { WaterPipeExportDTO dto = new WaterPipeExportDTO(); dto.pipeCode=value.getPipeCode(); dto.pipeName=value.getPipeName(); dto.pipeMaterial=value.getPipeMaterial(); dto.pipeDiameter=value.getPipeDiameter(); dto.pipeLength=value.getPipeLength(); dto.status=value.getStatus(); dto.startLongitude=value.getStartLongitude(); dto.startLatitude=value.getStartLatitude(); dto.endLongitude=value.getEndLongitude(); dto.endLatitude=value.getEndLatitude(); return dto; }
}
