package com.zy.asrs.domain.vo; import com.core.common.Cools; import lombok.Data; import java.text.SimpleDateFormat; import java.util.Date; @Data public class NotifyReportVo { private String sourceType; private String redisKey; private Long logId; private Long id; private String notifyType; private Integer device; private String taskNo; private String superTaskNo; private String msgType; private String msgDesc; private String data; private String requestPayload; private Integer failTimes; private Integer retryTimes; private Integer retryTime; private Long lastRetryTime; private Date createTime; private Integer result; private String response; public String getNotifyType$() { if (Cools.isEmpty(this.notifyType)) { return ""; } if ("Crn".equals(this.notifyType)) { return "堆垛机"; } if ("Devp".equals(this.notifyType)) { return "输送线"; } if ("DualCrn".equals(this.notifyType)) { return "双伸位堆垛机"; } if ("Rgv".equals(this.notifyType)) { return "RGV"; } if ("task".equals(this.notifyType)) { return "任务"; } return this.notifyType; } public String getRetryProgress$() { if (this.retryTimes == null && this.failTimes == null) { return ""; } return (this.retryTimes == null ? 0 : this.retryTimes) + "/" + (this.failTimes == null ? 0 : this.failTimes); } public String getQueueStatus$() { if (!"queue".equals(this.sourceType)) { return ""; } if (this.retryTimes == null || this.retryTimes == 0) { return "待发送"; } return "重试中"; } public String getResult$() { if (this.result == null) { return ""; } return this.result == 1 ? "成功" : "失败"; } public String getLastRetryTime$() { if (this.lastRetryTime == null || this.lastRetryTime <= 0L) { return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(this.lastRetryTime)); } public String getCreateTime$() { if (this.createTime == null) { return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } }