package com.inspect.task.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.inspect.base.core.annotation.Excel;
import com.inspect.base.core.web.domain.BaseEntity;
import com.inspect.taskinfo.domain.PatrolTaskInfo;
import com.inspect.taskstatus.domain.PatrolTaskStatus;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

import lombok.*;

@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class PatrolTask extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long taskId;
    @Excel(
            name = "变电站名称"
    )
    private String stationName;
    @Excel(
            name = "变电站编码"
    )
    private String stationCode;
    @Excel(
            name = "巡视类型"
    )
    private String type;
    @Excel(
            name = "任务编码"
    )
    private String taskCode;
    @Excel(
            name = "任务名称"
    )
    private String taskName;
    @Excel(
            name = "优先级"
    )
    private String priority;
    @Excel(
            name = "设备层级"
    )
    private String deviceLevel;
    @Excel(
            name = "设备列表"
    )
    private String deviceList;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "定期开始时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date fixedStartTime;
    @Excel(
            name = "周期",
            readConverterExp = "月"
    )
    private String cycleMonth;
    @Excel(
            name = "周期",
            readConverterExp = "周"
    )
    private String cycleWeek;
    @Excel(
            name = "周期",
            readConverterExp = "执行时间"
    )
    private String cycleExecuteTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "周期开始时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date cycleStartTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "周期结束时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date cycleEndTime;
    @Excel(
            name = "间隔",
            readConverterExp = "数量"
    )
    private int intervalNumber;
    @Excel(
            name = "间隔",
            readConverterExp = "类型"
    )
    private String intervalType;
    @Excel(
            name = "间隔",
            readConverterExp = "执行时间"
    )
    private String intervalExecuteTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "间隔开始时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date intervalStartTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "间隔结束时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date intervalEndTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "不可用开始时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date invalidStartTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Excel(
            name = "不可用结束时间",
            width = 30.0D,
            dateFormat = "yyyy-MM-dd HH:mm:ss"
    )
    private Date invalidEndTime;
    @Excel(
            name = "是否可用"
    )

    @JsonProperty("isenable")
    private String isEnable;

    @Excel(
            name = "联动状态【1 未执行，2 已执行】"
    )
    private String linkageState;
    private String devType;
    @Excel(
            name = "编制人"
    )
    private String drafter;
    @Excel(
            name = "执行状态"
    )
    private String executionStatus;
    @Excel(
            name = " 状态"
    )
    private String fileStatus;
    private String isUp;
    private String taskCycle;
    private String devNo;
    private String storage;
    private String taskProgress;
    private String taskState;
    private String executionMode;
    private String beginTime;
    private String endTime;
    private String areaId;
    private String areaName;
    private String areaIdS;
    private List<PatrolTaskInfo> eqpointList;
    private List<VideoPos> videoPosList;
    private List<PatrolTaskStatus> patrolTaskStatusList;
    private List<PrevPoint> prevPoints;
    private List<String> patrolPointIds;
    private String specifiedAlg;
    // 任务总点位数量
    private int totalPoints;

    private String deviceType;

    private String pointType;
}
