From 37051424de7c4a97132fbb06e45df594790aabf9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 16 十二月 2025 18:40:38 +0800
Subject: [PATCH] 优化功能

---
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs"
index 6e4f8d5..9e305c3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs"
@@ -68,6 +68,34 @@
         {
             return Service.LocationDisableStatus(keys); ;
         }
-
+        [HttpPost,HttpGet , Route("GetLocationStatus")]
+        public WebResponseContent GetLocationStatus(int row)
+        {
+            List<int> layers = _repository.QueryData(x => x.Row == row).Select(x => x.Layer).Distinct().ToList();
+            List<object> listObj=new List<object>();
+            foreach (var item in layers)
+            {
+                
+                object locationObj = _repository.QueryData(x => x.Row == row && x.Layer== item).OrderBy(x => x.Columns).Select(x => new
+                {
+                    barCode = x.PalletCode,
+                    layer=x.Layer.ToString().PadLeft(2, '0'),
+                    row=x.Row.ToString().PadLeft(2, '0'),
+                    column = x.Columns.ToString().PadLeft(2, '0'),
+                    locationCode = x.LocationCode,
+                    location_lock=x.LocationStatus
+                }).ToList();
+                object obj = new { layer=item, locationObj };
+                listObj.Add(obj);
+            }
+            
+            return WebResponseContent.Instance.OK("鎴愬姛", listObj);
+        }
+        [HttpPost, HttpGet, Route("GetRow")]
+        public WebResponseContent GetRow()
+        {
+            List<int> listRow=_repository.QueryData().Select(x=>x.Row).Distinct().ToList();
+            return WebResponseContent.Instance.OK("鎴愬姛",listRow);
+        }
     }
 }

--
Gitblit v1.9.3