From 75f34e9ba2e8b249c96333f3d7936c8968e12ec7 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 二月 2026 14:44:12 +0800
Subject: [PATCH] 集成WMS调用与入库任务处理
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 67 +++++++++++++++++++++++++++++++++
1 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
index 16c743a..a2eedf1 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -153,5 +153,72 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鏌ヨ)
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo)
+ {
+ try
+ {
+ var locations = await BaseDal.QueryDataAsync(x => x.EnableStatus == EnableStatusEnum.Normal.GetHashCode() && x.RoadwayNo == RoadwayNo && x.LocationStatus == LocationStatusEnum.Free.GetHashCode());
+
+ if (locations == null || locations.Count == 0)
+ {
+ return null;
+ }
+
+ return locations.OrderBy(x => x.Layer).ThenBy(x => x.Depth).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鏌ヨ)
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo,string locationCode)
+ {
+ try
+ {
+ var locations = await BaseDal.QueryFirstAsync(x => x.RoadwayNo == RoadwayNo && x.LocationCode == locationCode);
+
+ if (locations == null)
+ {
+ return null;
+ }
+
+ return locations;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ /// <summary>
+ /// 鏇存柊璐т綅淇℃伅
+ /// </summary>
+ /// <param name="locationInfo"></param>
+ /// <returns></returns>
+ public async Task<bool> UpdateLocationInfoAsync(Dt_LocationInfo locationInfo)
+ {
+ try
+ {
+ return await BaseDal.UpdateDataAsync(locationInfo);
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ }
}
}
--
Gitblit v1.9.3