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 AlarmRecordPageQry extends PageQuery {
    @ApiModelProperty(value = "主键", name = "eqId")
    private Long eqId;

    @ApiModelProperty(value = "告警编号", name = "eqAlarmNo")
    private String eqAlarmNo;

    @ApiModelProperty(value = "FindS告警id", name = "eqFindsAlarmId")
    private Long eqFindsAlarmId;

    @ApiModelProperty(value = "告警类型编码", name = "eqAlarmCode")
    private String eqAlarmCode;

    @ApiModelProperty(value = "告警名称", name = "likeAlarmName")
    private String likeAlarmName;

    @ApiModelProperty(value = "告警等级", name = "eqLevel")
    private Integer eqLevel;

    @ApiModelProperty(value = "告警说明", name = "likeDescription")
    private String likeDescription;

    @ApiModelProperty(value = "处置状态 INIT未处置 CLOSE已处置", name = "eqDisposeStatus")
    private String eqDisposeStatus;

    @ApiModelProperty(value = "处理结果说明", name = "likeDisposeDescription")
    private String likeDisposeDescription;

    @ApiModelProperty(value = "持续时长 秒", name = "eqDuration")
    private Long eqDuration;

    @ApiModelProperty(value = "告警开始时间", name = "geStartTime")
    private LocalDateTime geStartTime;

    @ApiModelProperty(value = "告警开始时间", name = "leStartTime")
    private LocalDateTime leStartTime;

    @ApiModelProperty(value = "告警结束时间", name = "geEndTime")
    private LocalDateTime geEndTime;

    @ApiModelProperty(value = "告警结束时间", name = "leEndTime")
    private LocalDateTime leEndTime;

    @ApiModelProperty(value = "经度", name = "eqLon")
    private BigDecimal eqLon;

    @ApiModelProperty(value = "纬度", name = "eqLat")
    private BigDecimal eqLat;

    @ApiModelProperty(value = "高度", name = "eqAlt")
    private BigDecimal eqAlt;

    @ApiModelProperty(value = "速度", name = "eqSpeed")
    private BigDecimal eqSpeed;

    @ApiModelProperty(value = "方向", name = "eqDirection")
    private BigDecimal eqDirection;

    @ApiModelProperty(value = "历元时间", name = "geGt")
    private LocalDateTime geGt;

    @ApiModelProperty(value = "历元时间", name = "leGt")
    private LocalDateTime leGt;

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

    @ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
    private String likeCorpinfoName;

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

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

    @ApiModelProperty(value = "首个告警人员身份证号，关联资质库人员视图", name = "eqFirstIdCardNo")
    private String eqFirstIdCardNo;

    @ApiModelProperty(value = "首个告警人员工号快照", name = "eqFirstStaffNoSnapshot")
    private String eqFirstStaffNoSnapshot;

    @ApiModelProperty(value = "首个告警人员姓名快照", name = "eqFirstStaffNameSnapshot")
    private String eqFirstStaffNameSnapshot;

    @ApiModelProperty(value = "首次告警人员姓名快照", name = "likeFirstStaffNameSnapshot")
    private String likeFirstStaffNameSnapshot;

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

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

    @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;
    }
}
