From 3b0516a2959e25576e4f3fda697a3b025d06c8c9 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 24 六月 2025 14:09:07 +0800
Subject: [PATCH] 每日录像可用指标添加日志,修改大屏为查看当前月平均

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/entity/Notify.java |   75 +++++++++++++++++++++++++++++++++----
 1 files changed, 67 insertions(+), 8 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/Notify.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/Notify.java
index 978f139..ff0d246 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/Notify.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/Notify.java
@@ -3,9 +3,15 @@
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.ycl.platform.base.AbsEntity;
+import enumeration.general.NotifyTargetTypeEnum;
+import enumeration.general.NotifyTypeEnum;
+import enumeration.general.UrgentLevelEnum;
+import enumeration.general.YesOrNoEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
 /**
@@ -18,33 +24,86 @@
 @Accessors(chain = true)
 @TableName("t_notify")
 @ApiModel(value = "Notify瀵硅薄", description = "閫氱煡")
+@AllArgsConstructor
+@NoArgsConstructor
 public class Notify extends AbsEntity {
 
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("閫氱煡绫诲瀷")
     @TableField("notify_type")
-    private String notifyType;
+    private NotifyTypeEnum notifyType;
 
     @ApiModelProperty("閫氱煡鍐呭")
     @TableField("content")
     private String content;
 
     @ApiModelProperty("閫氱煡璋�")
-    @TableField("notify_who")
-    private Integer notifyWho;
+    @TableField("notify_user")
+    private Integer notifyUser;
 
     @ApiModelProperty("宸茶")
     @TableField("readed")
-    private String readed;
+    private YesOrNoEnum readed;
 
     @ApiModelProperty("绱ф��")
     @TableField("urgent")
-    private String urgent;
+    private UrgentLevelEnum urgent;
 
-    @ApiModelProperty("宸ュ崟ID")
-    @TableField("work_order_id")
-    private Integer workOrderId;
+    @ApiModelProperty("宸ュ崟鍙�")
+    @TableField("work_order_no")
+    private String workOrderNo;
 
+    @ApiModelProperty("閫氱煡鐩爣绫诲瀷")
+    @TableField("notify_target_type")
+    private NotifyTargetTypeEnum notifyTargetType;
+
+    @ApiModelProperty("閫氱煡杩愮淮鍗曚綅")
+    @TableField("notify_unit")
+    private Integer notifyUnit;
+
+    /**
+     * 閫氱煡鐢ㄦ埛
+     *
+     * @param notifyType
+     * @param content
+     * @param notifyUser
+     * @param urgent
+     * @param workOrderNo
+     * @return
+     */
+    public static Notify genEntityByPeople(NotifyTypeEnum notifyType, String content, Integer notifyUser, UrgentLevelEnum urgent, String workOrderNo) {
+        Notify notify = new Notify();
+        notify.setNotifyType(notifyType);
+        notify.setContent(content);
+        notify.setNotifyUser(notifyUser);
+        notify.setUrgent(urgent);
+        notify.setWorkOrderNo(workOrderNo);
+        notify.setNotifyTargetType(NotifyTargetTypeEnum.USER);
+        notify.setReaded(YesOrNoEnum.NO);
+        return notify;
+    }
+
+    /**
+     * 閫氱煡鍗曚綅
+     *
+     * @param notifyType
+     * @param content
+     * @param notifyUnit
+     * @param urgent
+     * @param workOrderNo
+     * @return
+     */
+    public static Notify genEntityByUnit(NotifyTypeEnum notifyType, String content, Integer notifyUnit, UrgentLevelEnum urgent, String workOrderNo) {
+        Notify notify = new Notify();
+        notify.setNotifyType(notifyType);
+        notify.setContent(content);
+        notify.setUrgent(urgent);
+        notify.setNotifyUnit(notifyUnit);
+        notify.setWorkOrderNo(workOrderNo);
+        notify.setNotifyTargetType(NotifyTargetTypeEnum.UNIT);
+        notify.setReaded(YesOrNoEnum.NO);
+        return notify;
+    }
 
 }

--
Gitblit v1.8.0