From 4e3ade94e3ffb7710e5a40c668d46745c98821b8 Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期一, 28 十月 2024 13:23:02 +0800 Subject: [PATCH] wcs基础代码 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 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..d714956 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,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 = DateTime.UtcNow.ToString(); var inputJson = input.ToDictionary(); var x = await HttpsClient.PostAsync("https://localhost:7274/api/AgingInOrOutInput", 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); } @@ -36,13 +47,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 = DateTime.UtcNow.ToString(); var inputJson = input.ToDictionary(); var x = await HttpsClient.PostAsync("https://localhost:7274/api/AgingInOrOutInput", 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