package com.zksy.dispatch.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 统一事件详情/列表展示VO
 * 在主表字段基础上，扩展最近环节信息（转接/报送/跟踪），便于各业务页面直接展示
 */
@Data
@ApiModel(value = "统一事件展示VO", description = "统一事件详情/列表展示VO")
public class DisEventVO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "事件编号")
    private String eventNo;

    @ApiModelProperty(value = "事件名称")
    private String eventName;

    @ApiModelProperty(value = "事件类型：排水/供水/燃气/其他")
    private String eventType;

    @ApiModelProperty(value = "事件类别：管道泄漏/塌陷/积水/设备故障")
    private String category;

    @ApiModelProperty(value = "事件等级：一般/较大/重大/特别重大")
    private String level;

    @ApiModelProperty(value = "发生地点")
    private String location;

    @ApiModelProperty(value = "发生区域：城南/城北/太常")
    private String region;

    @ApiModelProperty(value = "事件描述")
    private String description;

    @ApiModelProperty(value = "事件来源：巡查上报/呼叫中心/视频监控/上级下达")
    private String source;

    @ApiModelProperty(value = "来源渠道")
    private String channel;

    @ApiModelProperty(value = "接报人")
    private String reporter;

    @ApiModelProperty(value = "接报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime reportTime;

    @ApiModelProperty(value = "发生时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime happenTime;

    @ApiModelProperty(value = "初判时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime judgeTime;

    @ApiModelProperty(value = "核实人")
    private String verifier;

    @ApiModelProperty(value = "核实时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime verifyTime;

    @ApiModelProperty(value = "核实意见")
    private String verifyOpinion;

    @ApiModelProperty(value = "责任单位（转接部门/责任部门）")
    private String department;

    @ApiModelProperty(value = "处置负责人")
    private String handler;

    @ApiModelProperty(value = "应用预案ID")
    private Long planId;

    @ApiModelProperty(value = "应用预案名称")
    private String planName;

    @ApiModelProperty(value = "直接经济损失(万元)")
    private BigDecimal lossAmount;

    @ApiModelProperty(value = "事件状态")
    private String status;

    @ApiModelProperty(value = "关闭原因")
    private String closeReason;

    @ApiModelProperty(value = "关闭说明")
    private String closeRemark;

    @ApiModelProperty(value = "关闭时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime closeTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最近转接部门")
    private String transferDept;

    @ApiModelProperty(value = "最近报送层级")
    private String reportTargets;

    @ApiModelProperty(value = "最近转接时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime transferTime;

    @ApiModelProperty(value = "关联转接记录ID（最近一条）")
    private Long transferId;

    @ApiModelProperty(value = "最近回访时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime lastVisitTime;

    @ApiModelProperty(value = "下次回访时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime nextVisitTime;

    @ApiModelProperty(value = "关联跟踪记录ID（最近一条）")
    private Long trackId;

    @ApiModelProperty(value = "环节明细（详情用）：verifyList/transferList/trackList/urgeList")
    private Map<String, List<Map<String, Object>>> process;
}
