From af4404160a9e8d14c09f1e6acab2ba00cb7fc91b Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期日, 19 四月 2026 16:32:04 +0800
Subject: [PATCH] fix(WMS): 修复首页、3D、websocket
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs
index 8df163d..88febce 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs
@@ -17,7 +17,30 @@
{
public LocationStatusChangeRecordController(ILocationStatusChangeRecordService service) : base(service)
{
+ }
+ /// <summary>
+ /// 鏍规嵁ID鑾峰彇璐т綅鐘舵�佸彉鍔ㄨ褰�
+ /// </summary>
+ /// <param name="id">璐т綅鐘舵�佸彉鍔ㄨ褰旾D</param>
+ /// <returns>璐т綅鐘舵�佸彉鍔ㄨ褰曚俊鎭�</returns>
+ [HttpPost("GetLocationState"), AllowAnonymous]
+ public WebResponseContent GetLocationState(int id)
+ {
+ try
+ {
+ if (id <= 0)
+ return WebResponseContent.Instance.Error("ID鍙傛暟鏃犳晥");
+
+ var records = Service.Repository.QueryData(x => x.LocationId == id);
+ if (records == null || records.Count == 0)
+ return WebResponseContent.Instance.Error("鏈壘鍒板搴旂殑璐т綅鐘舵�佸彉鍔ㄨ褰�");
+
+ return WebResponseContent.Instance.OK(null, records);
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error($"鑾峰彇璐т綅鐘舵�佸彉鍔ㄨ褰曞け璐�: {ex.Message}");
+ }
}
-
}
}
--
Gitblit v1.9.3