From 5bfb959c47017825c8cf7dc8570c55b04dab694c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 六月 2021 16:42:11 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into wxr6

---
 HDL_ON/Entity/Function/Scene.cs |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 3970bc1..ded2b0c 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -84,6 +84,11 @@
         /// </summary>
         public bool collect = false;
 
+        /// <summary>
+        /// 鍒涘缓璇ュ満鏅殑鐢ㄦ埛ID
+        /// </summary>
+        public string userId = "";
+
         ///// <summary>
         ///// 鍦烘櫙鑳屾櫙
         ///// </summary>
@@ -138,13 +143,14 @@
                 sTimeSpan = arry[0].ToString("X2") + arry[1].ToString("X2") + arry[2].ToString("X2") + arry[3].ToString("X2");
 
 
-                if (sTimeSpan.Length > 8)
+                if (sTimeSpan.Length >= 8)
                 {
                     sTimeSpan = sTimeSpan.Substring(0, 8);
                 }
                 else
                 {
-                    sTimeSpan = "00000000";
+                    sTimeSpan = Guid.NewGuid().ToString().Substring(0, 8);
+                    //sTimeSpan = "00000000";
                 }
 
                 sceneId = sOidBeginsWith + sTimeSpan;
@@ -340,7 +346,10 @@
         /// </summary>
         public string GetDelayText()
         {
-            string text = "";
+            var delayInt = 0;
+            int.TryParse(delay,out delayInt);
+            string text = (delayInt / 60)+Language.StringByID(StringId.m)+(delayInt % 60)+Language.StringByID(StringId.s);
+            return text;
             switch (delay)
             {
                 case "0":

--
Gitblit v1.8.0