From 4db56b86d54f4f8d5a01ecb7365a30673f5d8fd4 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期四, 12 九月 2024 14:00:39 +0800
Subject: [PATCH] Merge branch 'master' into csc

---
 Admin.NET/WCS.Application/Hub/PlcHub.cs |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Admin.NET/WCS.Application/Hub/PlcHub.cs b/Admin.NET/WCS.Application/Hub/PlcHub.cs
index 2cf316f..ecf48ab 100644
--- a/Admin.NET/WCS.Application/Hub/PlcHub.cs
+++ b/Admin.NET/WCS.Application/Hub/PlcHub.cs
@@ -63,7 +63,13 @@
             PLCTaskAction.boRefresh = context.BoRefresh.Value;
             await _sysConfigService.UpdateConfigValue("sys_Refresh", context.BoRefresh.Value);
         }
-        await _plcHubContext.Clients.All.UpdateService(new PLCServiceModel() { BoRunningState = PLCTaskAction.boRunningState, BoRefresh = PLCTaskAction.boRefresh, BoOffline = PLCTaskAction.boOffline });
+        //婕旂ず妯″紡
+        if (context.BoDemo.HasValue)
+        {
+            PLCTaskAction.boDemo = context.BoDemo.Value;
+            await _sysConfigService.UpdateConfigValue("sys_demo", context.BoDemo.Value);
+        }
+        await _plcHubContext.Clients.All.UpdateService(new PLCServiceModel() { BoRunningState = PLCTaskAction.boRunningState, BoRefresh = PLCTaskAction.boRefresh, BoOffline = PLCTaskAction.boOffline, BoDemo = PLCTaskAction.boDemo});
     }
 }
 public class PLCServiceModel
@@ -75,4 +81,6 @@
 
 
     public bool? BoRefresh { get; set; }
+
+    public bool? BoDemo { get; set; }
 }
\ No newline at end of file

--
Gitblit v1.8.0