From a6a33f6916afbf1fc629baecb772939cda2ee981 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期四, 13 三月 2025 17:58:12 +0800
Subject: [PATCH] 代码提交

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/CachePointService.cs |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/CachePointService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/CachePointService.cs"
index d700413..e40f0fc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/CachePointService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/CachePointService.cs"
@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection.Metadata;
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Core;
@@ -45,6 +46,13 @@
             return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
         }
 
+        public Dt_CachePoint? EmptyCachePoint(string toaddress)
+        {
+            List<Dt_CachePoint> cachePoints = BaseDal.QueryData(x => x.PointName.Contains(toaddress) && x.EnableStatus == 0 && x.PointStatus == LocationStatusEnum.Free.ObjToInt()).ToList();
+            var point = cachePoints.FirstOrDefault();
+            return point;
+        }
+
         public Dt_CachePoint? GetIbStockCachePoint(int areaId)
         {
             List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free);
@@ -64,5 +72,48 @@
 
             return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
         }
+
+        public WebResponseContent GetEndPoints()
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<Dt_CachePoint> cachePoints = BaseDal.QueryData(x => x.PointName.Contains("鍖�"));
+                List<object> list = new List<object>();
+                for (int i = 0; i < cachePoints.Count; i++)
+                {
+                    object option = new { value = cachePoints[i].PointName, text = cachePoints[i].PointName };
+                    list.Add(option);
+                }
+                content = WebResponseContent.Instance.OK(data: list);
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error(ex.Message);
+            }
+            return content;
+        }
+
+        //鏌ヨ缂撳瓨鏋剁姸鎬�
+        public WebResponseContent GetHCJStaue(string stationcode)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<Dt_CachePoint> cachePoints = BaseDal.QueryData(x => x.PointName.Contains("鍖�"));
+                List<object> list = new List<object>();
+                for (int i = 0; i < cachePoints.Count; i++)
+                {
+                    object option = new { value = cachePoints[i].PointName, text = cachePoints[i].PointName };
+                    list.Add(option);
+                }
+                content = WebResponseContent.Instance.OK(data: list);
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error(ex.Message);
+            }
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3