From 48e865c8ed5902ae34f133a29dfade36d3f018d3 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 24 十月 2024 13:46:24 +0800
Subject: [PATCH] 修改WMS货位信息表,任务表,添加WCS接口

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
index cf58bf1..4e08292 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -111,5 +112,25 @@
         {
             return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1));
         }
+
+        public WebResponseContent GetPosition(string position)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.LocationCode == position);
+                if (locationInfo == null) throw new Exception("鏈壘鍒拌揣浣嶄俊鎭�");
+                //鍒嗛厤绌挎杞︾Щ搴撳湴鍧�
+                var locationInfos = BaseDal.QueryData(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && x.LocationCode != locationInfo.LocationCode);//闇�鏍规嵁鍏ュ簱閫昏緫鏀瑰姩
+                var location = locationInfos.OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
+                //if (location != null) content.OK(message: location.LocationCode, data: location);
+                if (location != null) content.OK(location.LocationCode);
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3