From 65f280ee9b3b998df59b59cff117624eefae157c Mon Sep 17 00:00:00 2001
From: 陈勇 <chenyong@hnkhzn.com>
Date: 星期四, 14 十一月 2024 09:49:56 +0800
Subject: [PATCH] 忽略项目

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
index 40ca493..098b029 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
@@ -1,4 +1,5 @@
-锘縰sing Masuit.Tools;
+锘縰sing LogLibrary.Log;
+using Masuit.Tools;
 using WIDESEA_Common;
 using WIDESEA_DTO;
 using WIDESEA_IStoragIntegrationServices;
@@ -7,6 +8,8 @@
 
 public class AgingInOrOutInputService : IAgingInOrOutInputService
 {
+    private readonly LogFactory LogFactory = new LogFactory();
+
     /// <summary>
     /// 闈欑疆\闄堝寲鍏ュ簱锛堟暣鎵樼洏锛�
     /// </summary>
@@ -16,13 +19,26 @@
     {
         try
         {
-            //TODO: Implement the logic to get the aging input for the given id
+            input.SessionId = Guid.NewGuid().ToString();
+            input.Software = "闄堝寲鏈�";
+            input.EquipmentCode = "P1K10040";
+            input.EmployeeNo = "T00001";
+            input.RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
             var inputJson = input.ToDictionary();
-            var x = await HttpsClient.PostAsync("https://localhost:7274/api/AgingInOrOutInput", inputJson);
+            var x = await HttpsClient.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/AgingInput", inputJson);
+            if (x != null)
+            {
+
+            }
+
+            LogFactory.GetLog("闈欑疆闄堝寲鍏ュ簱锛堟暣鎵樼洏锛�").Info(true, $"\r\r--------------------------------------");
+            LogFactory.GetLog("闈欑疆闄堝寲鍏ュ簱锛堟暣鎵樼洏锛�").Info(true, x);
         }
         catch (Exception err)
         {
             Console.WriteLine(err.Message.ToString());
+            LogFactory.GetLog("闈欑疆闄堝寲鍏ュ簱锛堟暣鎵樼洏锛�").Error(true, $"\r\r--------------------------------------");
+            LogFactory.GetLog("闈欑疆闄堝寲鍏ュ簱锛堟暣鎵樼洏锛�").Error(true, err.StackTrace);
         }
         return Task.FromResult<dynamic>(null);
     }
@@ -36,13 +52,21 @@
     {
         try
         {
-            //TODO: Implement the logic to get the aging input for the given id
+            input.SessionId = Guid.NewGuid().ToString();
+            input.Software = "闄堝寲鏈�";
+            input.EquipmentCode = "P1K10040";
+            input.EmployeeNo = "T00001";
+            input.RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); ;
             var inputJson = input.ToDictionary();
-            var x = await HttpsClient.PostAsync("https://localhost:7274/api/AgingInOrOutInput", inputJson);
+            var x = await HttpsClient.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/AgingOutput", inputJson);
+            LogFactory.GetLog("闈欑疆闄堝寲鍑哄簱锛堟暣鎵樼洏锛�").Info(true, $"\r\r--------------------------------------");
+            LogFactory.GetLog("闈欑疆闄堝寲鍑哄簱锛堟暣鎵樼洏锛�").Info(true, x);
         }
         catch (Exception err)
         {
             Console.WriteLine(err.Message.ToString());
+            LogFactory.GetLog("闈欑疆/闄堝寲鍑哄簱锛堟暣鎵樼洏锛�").Error(true, $"\r\r--------------------------------------");
+            LogFactory.GetLog("闈欑疆/闄堝寲鍑哄簱锛堟暣鎵樼洏)").Error(true, err.StackTrace);
         }
         return Task.FromResult<dynamic>(null);
     }

--
Gitblit v1.9.3