package com.huashe.park.domain.entity;

import java.util.Date;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.huashe.common.annotation.Excel;
import com.huashe.common.domain.BaseEntity;

import cn.idev.excel.annotation.ExcelProperty;

/**
 * 施工桩点信息对象 cons_pile_hole_info
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
public class ConsPileHoleInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    private String byteId;

    /** 桩点编号 */
    @Excel(name = "桩点编号")
    @JSONField(name = "name")
    private String holeNum;

    /**
     * //类型： CFG桩-200， 旋挖钻-203， 振动沉管碎石桩-210 ， 潜孔钻-211， 静压桩-202， 光伏桩-201， 插板桩-206， 灰土挤密桩-20
     */
    private Integer type = 200;

    private String holeKey;

    /** dx */
    @Excel(name = "dx")
    @JSONField(name = "x")
    @ExcelProperty(index = 0)
    private Double deltaX;

    /** dy */
    @Excel(name = "dy")
    @JSONField(name = "y")
    @ExcelProperty(index = 1)
    private Double deltaY;

    @JSONField(name = "z")
    @ExcelProperty(index = 2)
    private Double deltaZ = 0D;

    /** 经度 */
    @Excel(name = "经度")
    private Double lng;

    /** 纬度 */
    @Excel(name = "纬度")
    private Double lat;

    /** 施工状态 */
    @Excel(name = "施工状态")
    @ExcelProperty(index = 3)
    private String consStatus;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 设计深度 */
    @Excel(name = "设计深度")
    @JSONField(name = "len")
    private Long desDept;

    /** 桩径 */
    @Excel(name = "桩径")
    private Long diameter = 0L;

    private Long consUnitId;

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

    public Long getId() {
        return id;
    }

    public void setByteId(String byteId) {
        this.byteId = byteId;
    }

    public String getByteId() {
        return byteId;
    }

    public void setHoleNum(String holeNum) {
        this.holeNum = holeNum;
    }

    public String getHoleNum() {
        return holeNum;
    }

    public String getHoleKey() {
        if (ObjectUtils.isEmpty(deltaX) || ObjectUtils.isEmpty(deltaY)) {
            return null;
        }
        return deltaY.toString() + deltaX.toString();
    }

    public void setHoleKey(String holeKey) {
        this.holeKey = holeKey;
    }

    public Double getDeltaX() {
        return deltaX;
    }

    public void setDeltaX(Double deltaX) {
        this.deltaX = deltaX;
    }

    public Double getDeltaY() {
        return deltaY;
    }

    public void setDeltaY(Double deltaY) {
        this.deltaY = deltaY;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public void setConsStatus(String consStatus) {
        this.consStatus = consStatus;
    }

    public String getConsStatus() {
        return consStatus;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setDesDept(Long desDept) {
        this.desDept = desDept;
    }

    public Long getDesDept() {
        return desDept;
    }

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

    public Long getDiameter() {
        return diameter;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Double getDeltaZ() {
        return deltaZ;
    }

    public void setDeltaZ(Double deltaZ) {
        this.deltaZ = deltaZ;
    }

    public Long getConsUnitId() {
        return consUnitId;
    }

    public void setConsUnitId(Long consUnitId) {
        this.consUnitId = consUnitId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
            .append("holeNum", getHoleNum()).append("deltaX", getDeltaX()).append("deltaY", getDeltaY())
            .append("lng", getLng()).append("lat", getLat()).append("consStatus", getConsStatus())
            .append("startTime", getStartTime()).append("endTime", getEndTime()).append("desDept", getDesDept())
            .append("diameter", getDiameter()).append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime()).append("createBy", getCreateBy()).append("updateBy", getUpdateBy())
            .toString();
    }
}
