From 885bd60ed54a0642c48c57a3d685cba24e4c763b Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期日, 08 十二月 2024 11:33:07 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 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 9267f80..43decfc 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"
@@ -46,9 +46,9 @@
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.Models;
 using WIDESEAWCS_QuartzJob.Service;
+using static Microsoft.IO.RecyclableMemoryStreamManager;
 
 namespace WIDESEAWCS_TaskInfoService
 {
@@ -88,6 +88,7 @@
         public string urlQueryinventory = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlQueryinventory"];
         public string urlEmptyOutbound = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlEmptyOutbound"];
         public string urlRawmaterialout = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlRawmaterialout"];
+        public string urlPalletQueryinventory = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlPalletQueryinventory"];
         /// <summary>
         /// 鎺ユ敹WMS浠诲姟淇℃伅
         /// </summary>
@@ -108,6 +109,7 @@
                     Dt_Task task = _mapper.Map<Dt_Task>(item);
                     task.TaskState = (int)TaskOutStatusEnum.OutNew;
                     task.Roadway = task.Roadway == "1" ? task.Roadway = "SC01" : task.Roadway = "SC02";
+                    task.CreateDate = DateTime.Now;
                     tasks.Add(task);
                 }
                 BaseDal.AddData(tasks);
@@ -244,6 +246,10 @@
                         BaseDal.AddData(task);
                         return content = WebResponseContent.Instance.OK();
                     }
+                    else
+                    {
+                        WriteLog.GetLog("PLC鏃ュ織鍑哄簱鏃ュ織").Write($"绌烘墭鍑哄簱澶辫触锛岃鎯咃細{content.Message}", "闇�瑕佺┖鎵�");
+                    }
                 }
                 return content = WebResponseContent.Instance.Error();
             }
@@ -296,6 +302,20 @@
             }
         }
 
+
+        public WebResponseContent RequestWMSTask4()
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+
+                return content = HttpHelper.Get<WebResponseContent>($"{urlPalletQueryinventory}");
+            }
+            catch (Exception ex)
+            {
+                return content = WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
         /// <summary>
         /// 鏍规嵁娣卞簱浣嶅悜wms鐢宠鍒ゆ柇娴呭簱浣嶆槸鍚︽湁璐э紝鏄惁闇�瑕佽繘琛岀Щ搴撴搷浣�
         /// </summary>
@@ -326,6 +346,10 @@
                             return task;
                         }
                     }
+                }
+                else
+                {
+                    WriteLog.GetLog("PLC鏃ュ織").Write($"澶辫触淇℃伅锛歿content.Message}", "绉诲簱淇℃伅");
                 }
             }
 
@@ -404,7 +428,15 @@
         public Dt_Task IngStackerCraneTask2(string deviceNo)
         {
             //string deviceNot = deviceNo == "SC01" ? "1" : "2";
-            return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting);
+            try
+            {
+                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting);
+            }
+            catch (Exception ex)
+            {
+
+                throw;
+            }
         }
 
         /// <summary>

--
Gitblit v1.9.3