From bde09c027eee16a7b05b82e71dea4d3405d6d52d Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期四, 22 一月 2026 17:05:09 +0800
Subject: [PATCH] 前端页面优化,日志记录,日志展示
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 63 +++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
index 2b89e47..2398b4d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
@@ -305,5 +305,68 @@
public DateTime DateTime { get; set; }
}
+
+
+
+ public WebResponseContent GetArea()
+ {
+ // WarehouseId鍒嗙粍锛岀劧鍚庢槸RoadwayNo
+ var result = BaseDal.QueryData()
+ .GroupBy(x => x.WarehouseId)
+ .Select(g => new {
+ WarehouseId = g.Key,
+ RoadwayNo = g.Select(x => x.RoadwayNo).Distinct().ToList()
+ })
+ .ToList();
+ return WebResponseContent.Instance.OK("鎴愬姛", result);
+ }
+
+ public WebResponseContent GetLocationStatus(int WarehouseId, string RoadwayNo)
+ {
+ // 鏍煎紡{灞�,{杩欎竴灞傜殑鍒楁暟鎹畗}
+ var locations = BaseDal.QueryData(x => x.WarehouseId == WarehouseId && x.RoadwayNo == RoadwayNo)
+ .Select(x => new
+ {
+ x.RoadwayNo,
+ x.WarehouseId,
+ x.Row,
+ x.Column,
+ x.Layer,
+ x.Depth,
+ x.LocationType,
+ x.LocationStatus,
+ x.EnableStatus
+ })
+ .ToList();
+
+ // 濡傛灉娌℃湁鎵惧埌鏁版嵁锛岃繑鍥炵┖鍒楄〃鑰屼笉鏄痭ull
+ if (locations == null || !locations.Any())
+ {
+ return WebResponseContent.Instance.OK("鏈壘鍒板搴斿贩閬撶殑璐т綅鏁版嵁", new List<object>());
+ }
+
+ // 淇敼涓哄眰涓嬮潰鏀炬墍鏈夊垪鐨勪俊鎭�
+ var result = locations
+ .GroupBy(x => x.Layer) // 鎸夊眰鍒嗙粍
+ .Select(layerGroup => new
+ {
+ layer = layerGroup.Key,
+ columns = layerGroup.GroupBy(x => x.Column) // 姣忓眰涓寜鍒楀垎缁�
+ .Select(columnGroup => new
+ {
+ column = columnGroup.Key,
+ depths = columnGroup.Select(d => new
+ {
+ row = d.Row,
+ depth = d.Depth,
+ locationType = d.LocationType,
+ locationStatus = d.LocationStatus,
+ enableStatus = d.EnableStatus
+ }).ToList()
+ }).ToList()
+ }).ToList();
+
+ return WebResponseContent.Instance.OK("鎴愬姛", result);
+ }
}
}
--
Gitblit v1.9.3