From 1caea0fdc7ed1788d854a2aba8853984b4494e01 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 24 六月 2025 09:56:28 +0800
Subject: [PATCH] 代码提交

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs |   52 ++++++++++++++++++++++++++--------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs"
index a17c9fd..ffa3dba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs"
@@ -27,23 +27,23 @@
                 try
                 {
                     string stationcode = saveModel.MainData["stationcode"].ToString();
-                    string PalletCode = saveModel.MainData["PalletCode"].ToString();
+                    //string PalletCode = saveModel.MainData["PalletCode"].ToString();
                     //string toaddress = saveModel.MainData["toaddress"].ToString();
-                    if (stationcode == "" || PalletCode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘��
+                    if (stationcode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘��
                     {
                         return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}");
                     }
-                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("KTRHCK") && x.Materialtype == PalletCode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
+                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("绌烘墭搴撳叆") && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                     if (endCachePoint == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍑哄簱浣嶅彲鐢ㄧ紦瀛樻灦"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍏ュ簱浣嶅彲鐢ㄧ紦瀛樻灦"}");
                     }
-                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode);
+                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                     if (point == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栧凡绂佺敤"}");
                     }
-                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
+                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                     if (points == null)
                     {
                         return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾缂撳瓨鐐瑰凡琚攣瀹�"}");
@@ -66,7 +66,7 @@
                         TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                         TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
                         Depth = 1,
-                        Materialtype = PalletCode,
+                        Materialtype = "",
                         TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                         Creater = App.User.UserId > 0 ? App.User.UserName : "System",
                     };
@@ -97,26 +97,26 @@
                 try
                 {
                     string stationcode = saveModel.MainData["stationcode"].ToString();
-                    string PalletCode = saveModel.MainData["PalletCode"].ToString();
-                    //string toaddress = saveModel.MainData["toaddress"].ToString();
-                    if (stationcode == "" || PalletCode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘��
+                    //string PalletCode = saveModel.MainData["PalletCode"].ToString();
+                    string toaddress = saveModel.MainData["toaddress"].ToString();
+                    if (stationcode == "" || toaddress == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘��
                     {
                         return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}");
                     }
-                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("KTRHCK") && x.Materialtype == PalletCode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
+                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                     if (endCachePoint == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍏ュ簱浣嶅彲鐢ㄧ紦瀛樻灦"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮粓鐐规鍖哄煙绌烘墭搴撲綅鍙敤缂撳瓨鏋�"}");
                     }
-                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode);
+                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                     if (point == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栧凡绂佺敤"}");
                     }
-                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
+                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.InStock.ObjToInt());
                     if (points == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾缂撳瓨鐐瑰凡琚攣瀹�"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾缂撳瓨鐐圭姸鎬佷笉鏄湁璐х姸鎬�"}");
                     }
                     Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode);
                     if (taskcode != null)
@@ -136,7 +136,7 @@
                         TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                         TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
                         Depth = 1,
-                        Materialtype = PalletCode,
+                        Materialtype = "",
                         TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                         Creater = App.User.UserId > 0 ? App.User.UserName : "System",
                     };
@@ -172,15 +172,15 @@
                     {
                         return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}");
                     }
-                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.Materialtype == PalletCode && x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
+                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                     if (endCachePoint == null)
                     {
                         return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮粓鐐瑰尯鍩熷彲鐢ㄧ紦瀛樻灦"}");
                     }
-                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode);
+                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());// && x.Materialtype == PalletCode
                     if (point == null)
                     {
-                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}");
+                        return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栧凡绂佺敤"}");
                     }
                     Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                     if (points == null)
@@ -233,22 +233,22 @@
             try
             {
                 string stationcode = saveModel.MainData["stationcode"].ToString();
-                string PalletCode = saveModel.MainData["PalletCode"].ToString();
-                if (stationcode == "" || PalletCode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘��
+                //string PalletCode = saveModel.MainData["PalletCode"].ToString();
+                if (stationcode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘�倈| PalletCode == ""
                 {
                     return content = WebResponseContent.Instance.Error($"鏀惰揣寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}");
                 }
-                Dt_CachePoint cachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode && (x.PointStatus == LocationStatusEnum.Lock.ObjToInt() || x.PointStatus == LocationStatusEnum.InStock.ObjToInt()));
+                Dt_CachePoint cachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && (x.PointStatus == LocationStatusEnum.Lock.ObjToInt() || x.PointStatus == LocationStatusEnum.InStock.ObjToInt()));//&& x.Materialtype == PalletCode
                 if (cachePoint == null)
                 {
                     return content = WebResponseContent.Instance.Error($"鏀惰揣寮傚父,閿欒淇℃伅:{"缂撳瓨浣嶄笉鏄攣瀹氱姸鎬�"}");
                 }
-                Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode);
+                Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);// && x.Materialtype == PalletCode
                 if (point == null)
                 {
                     return content = WebResponseContent.Instance.Error($"鏀惰揣寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}");
                 }
-                Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode);
+                Dt_Task taskcode = BaseDal.QueryFirst(x => (x.SourceAddress == stationcode || x.TargetAddress == stationcode));
                 if (taskcode != null)
                 {
                     return content = WebResponseContent.Instance.Error($"鏀惰揣寮傚父,閿欒淇℃伅:璇ョ珯鐐瑰凡瀛樺湪浠诲姟");

--
Gitblit v1.9.3