package com.yuchen.saas.park.api.vo.elevator;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import java.util.Date;

/**
 * @Author: baichaojie
 * @CreateTime: 2024/07/22 11:12
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@HeadRowHeight(25)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ColumnWidth(12)
@ContentRowHeight(15)
@HeadFontStyle(fontHeightInPoints = 9)
@ExcelIgnoreUnannotated
public class ElevatorAlarmRecordExportExcelVo {

    @ExcelProperty("ID")
    private Long id;

    @ExcelProperty("告警名称")
    private String alarmName;

    @ExcelProperty("告警时间")
    private Date alarmTime;

    @ExcelProperty("告警级别")
    private String alarmLevelName;

    private Integer alarmStatus;

    @ExcelProperty("状态")
    private String statusName;
    public String getStatusName() {
        if (this.alarmStatus == 1) {
            return "待处理";
        } else if (this.alarmStatus == 2) {
            return "已关闭";
        } else if (this.alarmStatus == 3) {
            return "已派工";
        } else {
            return "";
        }
    }

    /**
     * 告警位置
     */
    @ExcelProperty("告警位置")
    private String spatialPosition;

    /**
     * 告警内容
     */
    @ExcelProperty("告警内容")
    private String alarmContent;

    /**
     * 设备地址
     */
    @ExcelProperty("设备地址")
    private String location;

    /**
     * 告警照片/视频
     */
    @ExcelProperty("告警照片/视频")
    private String path;

    /**
     * 管理区名称
     */
    @ExcelProperty("管理区")
    private String manageAreaNames;

    /**
     * 关闭时间
     */
    @ExcelProperty("关闭时间")
    private Date closeTime;

    /**
     * 关闭人员名称
     */
    @ExcelProperty("关闭人员")
    private String closeUserName;

    /**
     * 设备名称
     */
    @ExcelProperty("设备名称")
    private String deviceName;

    /**
     * 楼栋
     */
    @ExcelProperty("楼栋")
    private String buildingName;

    /**
     * 楼层
     */
    @ExcelProperty("楼层")
    private String floor;

    /**
     * 项目
     */
    @ExcelProperty("项目")
    private String parkName;


}
