From 69cd9f59a0fabf12f8c9147fcba7f69817a870b3 Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期一, 06 十一月 2023 23:40:59 +0800
Subject: [PATCH] 更新仓内抓拍2

---
 igds-security/src/main/java/com/ld/igds/models/SecSnapDepot.java |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/igds-security/src/main/java/com/ld/igds/models/SecSnapDepot.java b/igds-security/src/main/java/com/ld/igds/models/SecSnapDepot.java
index c15c721..5e528d0 100644
--- a/igds-security/src/main/java/com/ld/igds/models/SecSnapDepot.java
+++ b/igds-security/src/main/java/com/ld/igds/models/SecSnapDepot.java
@@ -38,17 +38,17 @@
     @Column(name = "CAMERA_ID_", length = 50)
     @PropertyDef(label = "鍏宠仈鎽勫儚澶�")
     private String cameraId;
-    
+
     @Column(name = "RESULT_", length = 30)
     @PropertyDef(label = "鎶撴媿缁撴灉")
-    private String result="SUCCESS";
+    private String result = "SUCCESS";
 
     @JSONField(format = "yyyy-MM-dd HH:mm:ss")
-    @Column(name = "UPDATE_TIME_", length = 1)
+    @Column(name = "UPDATE_TIME_")
     @PropertyDef(label = "鎶撴媿鏃堕棿")
     private Date updateTime;
 
-    @Column(name = "FILE_SUFFIX_", length = 6)
+    @Column(name = "FILE_SUFFIX_", length = 4)
     @PropertyDef(label = "鍥惧儚鏂囦欢鍚庣紑鍚�")
     private String fileSuffix = "jpg";
 
@@ -60,4 +60,27 @@
     @PropertyDef(label = "棰勭疆浣嶇紪鍙�")
     private String preset;
 
+    public SecSnapDepot() {
+    }
+
+    public SecSnapDepot(String id, String companyId, String deptId, String depotId, String cameraId, String result, Date updateTime, String fileSuffix, String fileName, String preset) {
+        this.id = id;
+        this.companyId = companyId;
+        this.deptId = deptId;
+        this.depotId = depotId;
+        this.cameraId = cameraId;
+        this.result = result;
+        this.updateTime = updateTime;
+        this.fileSuffix = fileSuffix;
+        this.fileName = fileName;
+        this.preset = preset;
+    }
+
+    public SecSnapDepot(String tag) {
+        if ("TEST".equals(tag)) {
+            this.id = "TEST";
+            this.fileName = "./static/images/img-fail.jpg";
+            this.updateTime = new Date();
+        }
+    }
 }

--
Gitblit v1.9.3