From 6528710f86a89a0828c90bd43a29ca455e1a30b0 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 11 三月 2026 13:45:24 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |  121 ++++++++++++++++++++++++++++++++++-----
 1 files changed, 104 insertions(+), 17 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 7249ad0..c8eab5b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -89,49 +89,99 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
+                List<object> objects = new List<object>();
                 foreach (var item in taskDTOs)
                 {
                     foreach (var task in item.tasks)
                     {
+                        #region 鍒ゆ柇
                         content = TaskHelpMethods.isOkTaskInfo(task, true, true);
-                        if (!content.Status) throw new Exception(content.Message);
+                        if (!content.Status)
+                        {
+                            objects.Add(new
+                            {
+                                taskCode = task.taskCode,
+                                Message = $"浠诲姟鍙枫�恵task.taskCode}銆憑content.Message}"
+                            });
+                            continue;
+                            //throw new Exception(content.Message);
+                        }
                         if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode) != null)
-                            throw new Exception($"浠诲姟鍙枫�恵task.taskCode}銆戝凡瀛樺湪浠诲姟");
+                        {
+                            objects.Add(new
+                            {
+                                taskCode = task.taskCode,
+                                Message = $"浠诲姟鍙枫�恵task.taskCode}銆戝凡瀛樺湪浠诲姟"
+                            });
+                            continue;
+                            //throw new Exception($"浠诲姟鍙枫�恵task.taskCode}銆戝凡瀛樺湪浠诲姟");
+                        }
                         if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode) != null)
-                            throw new Exception($"鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+                        {
+                            objects.Add(new
+                            {
+                                taskCode = task.taskCode,
+                                Message = $"鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟"
+                            });
+                            continue;
+                            //throw new Exception($"鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+                        }
                         if (BaseDal.QueryFirst(x => x.SourceAddress == task.fromLocationCode) != null)
-                            throw new Exception($"璧风偣浣嶇疆銆恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+                        {
+                            objects.Add(new
+                            {
+                                taskCode = task.taskCode,
+                                Message = $"璧风偣浣嶇疆銆恵task.containerCode}銆戝凡瀛樺湪浠诲姟"
+                            });
+                            continue;
+                            //throw new Exception($"璧风偣浣嶇疆銆恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+                        }
+                        #endregion
                         switch (item.taskType)
                         {
                             case (int)TaskTypeEnum.MLInbound:
-                                CreateKLSNewInTask(task, item.taskType);
+                                content = CreateKLSNewInTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.MLOutbound:
-                                CreateKLSNewOutTask(task, item.taskType);
+                                content = CreateKLSNewOutTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.CPInbound:
-                                CreateRGVNewInTask(task, item.taskType);
+                                content = CreateRGVNewInTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.CPOutbound:
-                                CreateRGVNewOutTask(task, item.taskType);
+                                content = CreateRGVNewOutTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.CJInbound:
-                                CreateHKNewInTask(task, item.taskType);
+                                content = CreateHKNewInTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.CJOutbound:
-                                CreateHKNewOutTask(task, item.taskType);
+                                content = CreateHKNewOutTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.Carry:
-                                CarryTask(task, item.taskType);
+                                content = CarryTask(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             case (int)TaskTypeEnum.CJCarry:
-                                CJCarryTaske(task, item.taskType);
+                                content = CJCarryTaske(task, item.taskType);
+                                objects.Add(content.Data);
                                 break;
                             default:
+                                objects.Add(new
+                                {
+                                    taskCode = task.taskCode,
+                                    Message = $"鏈畾涔夌殑浠诲姟绫诲瀷"
+                                });
                                 break;
                         }
                     }
                 }
+                content.Data = objects;
             }
             catch (Exception ex)
             {
@@ -1017,14 +1067,51 @@
         /// <param name="AreaCode"></param>
         /// <returns></returns>
         /// <exception cref="NotImplementedException">鍖哄煙鍙�</exception>
-        public WebResponseContent LocationInquiry(string AreaCode)
+        public WebResponseContent LocationInquiry(WMSGetLocationInfo getLocationInfo)
         {
-            if (AreaCode == null)
+            WebResponseContent content = new WebResponseContent();
+            List<object> list = new List<object>();
+            try
             {
-                //鏌ヨ杈撻�佺嚎绌烘墭缂撳瓨淇℃伅鏃惰繑鍥炵┖浣嶆暟閲�
-            }
-            return WebResponseContent.Instance.OK();
+                if (getLocationInfo == null) throw new Exception("璇锋眰鍙傛暟涓嶈兘涓虹┖锛�");
+                if (getLocationInfo.AreaCode == null) throw new Exception("搴撳尯缂栧彿涓嶈兘涓虹┖锛�");
+                if (getLocationInfo.WarehouseId == 0) throw new Exception("浠撳簱ID涓嶈兘涓虹┖锛�");
+                if (getLocationInfo.WarehouseId == 1)
+                {
+                    List<Dt_RGVLocationInfo> rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt());
+                    foreach (var item in rGVLocationInfos)
+                    {
+                        list.Add(new
+                        {
+                            LoctionCode = item.LocationCode,
+                            LocationStatus = item.LocationStatus,
+                            EnableStatus = item.EnableStatus
+                        });
+                    }
+                    content.Data = list;
+                }
+                else if (getLocationInfo.WarehouseId == 2)
+                {
 
+                }
+                else if (getLocationInfo.WarehouseId == 3)
+                {
+
+                }
+                else if (getLocationInfo.WarehouseId == 4)
+                {
+
+                }
+                else if (getLocationInfo.WarehouseId == 5)
+                {
+
+                }
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
         }
 
 

--
Gitblit v1.9.3