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;

/**
 * 高斯正算对象 cmc_gauss_positive
 * 
 * @author qyx
 * @date 2026-04-21
 */
public class CmcGaussPositive 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 Integer bandwidth;

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

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

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

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

    /** 子午线收敛角γ */
    @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) 
    {
        // 大地经度保留10位小数
        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) 
    {
        // 大地纬度保留10位小数
        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 setBandwidth(Integer bandwidth) 
    {
        this.bandwidth = bandwidth;
    }

    public Integer getBandwidth() 
    {
        return bandwidth;
    }
    
    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 setGaussX(Double gaussX) 
    {
        this.gaussX = gaussX;
    }

    public Double getGaussX() 
    {
        return gaussX;
    }
    
    public void setGaussY(Double gaussY) 
    {
        this.gaussY = gaussY;
    }

    public Double getGaussY() 
    {
        return gaussY;
    }
    
    public void setMeridianConvergence(Double meridianConvergence) 
    {
        // 子午线收敛角保留7位小数
        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("bandwidth", getBandwidth())
            .append("gaussX", getGaussX())
            .append("gaussY", getGaussY())
            .append("meridianConvergence", getMeridianConvergence())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}