package com.zcloud.personnel.positioning.dto;

import com.alibaba.cola.dto.PageQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

/**
 * web-client
 *
 * @Author fangjiakai
 * @Date 2026-07-07
 */
@Data
public class FencePageQry extends PageQuery {
    @ApiModelProperty(value = "主键", name = "eqId")
    private Long eqId;

    @ApiModelProperty(value = "围栏编码", name = "eqFenceCode")
    private String eqFenceCode;

    @ApiModelProperty(value = "围栏名称", name = "likeFenceName")
    private String likeFenceName;

    @ApiModelProperty(value = "围栏范围 COMPANY_AREA公司区域 ELECTRONIC电子围栏 WORK_AREA作业区 SILENCE静默区", name = "eqFenceScope")
    private String eqFenceScope;

    @ApiModelProperty(value = "FindS围栏业务类型", name = "likeFenceBizName")
    private String likeFenceBizName;

    @ApiModelProperty(value = "企业id/公司id（公司及子公司数据隔离）", name = "eqCorpinfoId")
    private String eqCorpinfoId;

    @ApiModelProperty(value = "企业名称/公司名称（精确查询）", name = "eqCorpinfoName")
    private String eqCorpinfoName;

    @ApiModelProperty(value = "企业名称/公司名称（模糊查询）", name = "likeCorpinfoName")
    private String likeCorpinfoName;

    @ApiModelProperty(value = "所属公司编码", name = "eqOrgCode")
    private String eqOrgCode;

    @ApiModelProperty(value = "所属公司名称", name = "likeOrgName")
    private String likeOrgName;

    @ApiModelProperty(value = "关联区域id", name = "eqAreaId")
    private Long eqAreaId;

    @ApiModelProperty(value = "关联区域名称", name = "likeAreaName")
    private String likeAreaName;

    @ApiModelProperty(value = "坐标系", name = "eqCoor")
    private String eqCoor;

    @ApiModelProperty(value = "空间类型 INDOOR室内 OUTDOOR室外", name = "eqSpaceType")
    private String eqSpaceType;

    @ApiModelProperty(value = "建筑id", name = "eqBuildingId")
    private Long eqBuildingId;

    @ApiModelProperty(value = "楼层", name = "eqFloor")
    private Integer eqFloor;

    @ApiModelProperty(value = "中心点经度", name = "eqCenterLon")
    private BigDecimal eqCenterLon;

    @ApiModelProperty(value = "中心点纬度", name = "eqCenterLat")
    private BigDecimal eqCenterLat;

    @ApiModelProperty(value = "是否静默区", name = "eqSilence")
    private Integer eqSilence;

    @ApiModelProperty(value = "生效开始时间", name = "geEffectStart")
    private LocalDateTime geEffectStart;

    @ApiModelProperty(value = "生效开始时间", name = "leEffectStart")
    private LocalDateTime leEffectStart;

    @ApiModelProperty(value = "生效结束时间", name = "geEffectEnd")
    private LocalDateTime geEffectEnd;

    @ApiModelProperty(value = "生效结束时间", name = "leEffectEnd")
    private LocalDateTime leEffectEnd;

    @ApiModelProperty(value = "状态 ENABLED启用 DISABLED停用", name = "eqStatus")
    private String eqStatus;

    @ApiModelProperty(value = "FindS围栏id", name = "eqFindsFenceId")
    private Long eqFindsFenceId;

    @ApiModelProperty(value = "FindS围栏编码", name = "eqFindsFenceCode")
    private String eqFindsFenceCode;

    @ApiModelProperty(value = "同步状态 SUCCESS/FAIL/WAIT", name = "eqSyncStatus")
    private String eqSyncStatus;

    @ApiModelProperty(value = "最后同步时间", name = "geLastSyncTime")
    private LocalDateTime geLastSyncTime;

    @ApiModelProperty(value = "最后同步时间", name = "leLastSyncTime")
    private LocalDateTime leLastSyncTime;

    @ApiModelProperty(value = "删除标识 TRUE/FALSE", name = "eqDeleteEnum")
    private String eqDeleteEnum;

    @ApiModelProperty(value = "备注", name = "eqRemarks")
    private String eqRemarks;

    @ApiModelProperty(value = "创建人姓名", name = "likeCreateName")
    private String likeCreateName;

    @ApiModelProperty(value = "更新人姓名", name = "likeUpdateName")
    private String likeUpdateName;

    @ApiModelProperty(value = "租户id", name = "eqTenantId")
    private Long eqTenantId;

    @ApiModelProperty(value = "单位id", name = "eqOrgId")
    private Long eqOrgId;

    @ApiModelProperty(value = "环境", name = "eqEnv")
    private String eqEnv;

    @ApiModelProperty(value = "版本", name = "eqVersion")
    private Integer eqVersion;

    @ApiModelProperty(value = "创建时间", name = "geCreateTime")
    private LocalDateTime geCreateTime;

    @ApiModelProperty(value = "创建时间", name = "leCreateTime")
    private LocalDateTime leCreateTime;

    @ApiModelProperty(value = "修改时间", name = "geUpdateTime")
    private LocalDateTime geUpdateTime;

    @ApiModelProperty(value = "修改时间", name = "leUpdateTime")
    private LocalDateTime leUpdateTime;

    @ApiModelProperty(value = "创建人id", name = "eqCreateId")
    private Long eqCreateId;

    @ApiModelProperty(value = "更新人id", name = "eqUpdateId")
    private Long eqUpdateId;

    public Map<String, Object> toHashMap() {
        Map<String, Object> map = new HashMap<>();
        Class<?> clazz = this.getClass();
        while (clazz != null) {
            Field[] fields = clazz.getDeclaredFields();
            for (Field field : fields) {
                try {
                    field.setAccessible(true);
                    map.put(field.getName(), field.get(this));
                } catch (IllegalAccessException e) {
                    throw new IllegalStateException(e);
                }
            }
            clazz = clazz.getSuperclass();
        }
        return map;
    }
}
