package com.ruoyi.web.calculate.domain;

import java.math.BigDecimal;
import java.math.RoundingMode;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * UTM正算对象 cmc_utm_positive
 * 
 * @author qyx
 * @date 2026-04-21
 */
public class CmcUTMPositive extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 待求点号 */
    @Excel(name = "待求点")
    private String pointNumber;

    /** 坐标系 */
    @Excel(name = "坐标系")
    private String coordinateSystem;

    /** 大地经度 */
    @Excel(name = "大地经度" , cellType = ColumnType.NUMERIC,numberFormat = "0.000000000")
    private Double longitude;

    /** 经度位置 */
    @Excel(name = "经度位置")
    private String longitudePosition;

    /** 大地纬度 */
    @Excel(name = "大地纬度", cellType = ColumnType.NUMERIC, numberFormat = "0.000000000")
    private Double latitude;

    /** 纬度位置 */
    @Excel(name = "纬度位置")
    private String latitudePosition;

    /** 带号 */
    @Excel(name = "带号", cellType = ColumnType.NUMERIC)
    private Double band;

    /** 投影面高程 */
    @Excel(name = "投影面高程", cellType = ColumnType.NUMERIC)
    private double projectionHeight;

    /** 角度格式：degree(度) / dms(度分秒) */
    private String angleFormat;

    /** UTM坐标x */
    @Excel(name = "UTM坐标x", cellType = ColumnType.NUMERIC, numberFormat = "0.0000")
    private Double utmX;

    /** UTM坐标y */
    @Excel(name = "UTM坐标y", cellType = ColumnType.NUMERIC, numberFormat = "0.0000")
    private Double utmY;

    /** 子午线收敛角γ */
    @Excel(name = "子午线收敛角γ", cellType = ColumnType.NUMERIC, numberFormat = "0.0000000")
    private Double meridianConvergence;

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

    public Long getId() 
    {
        return id;
    }
    public void setPointNumber(String pointNumber) 
    {
        this.pointNumber = pointNumber;
    }

    public String getPointNumber() 
    {
        return pointNumber;
    }
    public void setCoordinateSystem(String coordinateSystem) 
    {
        this.coordinateSystem = coordinateSystem;
    }

    public String getCoordinateSystem() 
    {
        return coordinateSystem;
    }
     public void setLongitude(Double longitude) 
    {
        if (longitude != null) {
            BigDecimal bd = new BigDecimal(longitude);
            this.longitude = bd.setScale(10, RoundingMode.HALF_UP).doubleValue();
        } else {
            this.longitude = null;
        }
    }

    public Double getLongitude() 
    {
        return longitude;
    }
    
    public void setLongitudePosition(String longitudePosition) 
    {
        this.longitudePosition = longitudePosition;
    }

    public String getLongitudePosition() 
    {
        return longitudePosition;
    }
    
    public void setLatitude(Double latitude) 
    {
        if (latitude != null) {
            BigDecimal bd = new BigDecimal(latitude);
            this.latitude = bd.setScale(10, RoundingMode.HALF_UP).doubleValue();
        } else {
            this.latitude = null;
        }
    }

    public Double getLatitude() 
    {
        return latitude;
    }
    
    public void setLatitudePosition(String latitudePosition) 
    {
        this.latitudePosition = latitudePosition;
    }

    public String getLatitudePosition() 
    {
        return latitudePosition;
    }
    
    public void setBand(Double band) 
    {
        this.band = band;
    }

    public Double getBand() 
    {
        return band;
    }
    
    public void setProjectionHeight(double projectionHeight) 
    {
        this.projectionHeight = projectionHeight;
    }

    public double getProjectionHeight() 
    {
        return projectionHeight;
    }
    
    public void setAngleFormat(String angleFormat) 
    {
        this.angleFormat = angleFormat;
    }

    public String getAngleFormat() 
    {
        return angleFormat;
    }
    
    public void setUtmX(Double utmX) 
    {
        this.utmX = utmX;
    }

    public Double getUtmX() 
    {
        return utmX;
    }
    
    public void setUtmY(Double utmY) 
    {
        this.utmY = utmY;
    }

    public Double getUtmY() 
    {
        return utmY;
    }
    
    public void setMeridianConvergence(Double meridianConvergence) 
    {
        if (meridianConvergence != null) {
            BigDecimal bd = new BigDecimal(meridianConvergence);
            this.meridianConvergence = bd.setScale(7, RoundingMode.HALF_UP).doubleValue();
        } else {
            this.meridianConvergence = null;
        }
    }

    public Double getMeridianConvergence() 
    {
        return meridianConvergence;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pointNumber", getPointNumber())
            .append("coordinateSystem", getCoordinateSystem())
            .append("longitude", getLongitude())
            .append("longitudePosition", getLongitudePosition())
            .append("latitude", getLatitude())
            .append("latitudePosition", getLatitudePosition())
            .append("band", getBand())
            .append("utmX", getUtmX())
            .append("utmY", getUtmY())
            .append("meridianConvergence", getMeridianConvergence())
            .append("projectionHeight", getProjectionHeight())
            .append("angleFormat", getAngleFormat())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
