From 0d5d4a8c55b562090f1a1ac48cda7fcab943979b Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 15 十月 2025 15:48:40 +0800
Subject: [PATCH] 更新二进制文件及新增异步POST方法
---
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
index 4280874..4b7265f 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
@@ -123,4 +123,37 @@
}
return content;
}
+ public async Task<WebResponseContent> Change(EqptRunDto input)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ input.SessionId = Guid.NewGuid().ToString();
+ input.EmployeeNo = "MITest";
+ input.RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
+ var inputJson = Masuit.Tools.ObjectExtensions.ToDictionary(input); // Specify the namespace explicitly
+ var configs = _configService.GetConfigsByCategory(CateGoryConst.SYS_MOMIPAddress);
+ var MOMBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.MOMBaseIP)?.ConfigValue;
+ var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.EqptRun)?.ConfigValue;
+ if (MOMBase == null || ipAddress == null)
+ {
+ throw new InvalidOperationException("WMS IP 鏈厤缃�");
+ }
+ var MOMIpAddress = MOMBase + ipAddress;
+
+ var result = HttpsClient.PostAsync(MOMIpAddress, inputJson).Result;
+
+ content.OK(data: result);
+ LogFactory.GetLog("鎹㈠瀷").Info(true, $"\r\r--------------------------------------");
+ LogFactory.GetLog("鎹㈠瀷").Info(true, input.EquipmentCode);
+ LogFactory.GetLog("鎹㈠瀷").Info(true, result);
+ }
+ catch (Exception err)
+ {
+ LogFactory.GetLog("鎹㈠瀷").Error(true, $"\r\r--------------------------------------");
+ LogFactory.GetLog("鎹㈠瀷").Error(true, err.StackTrace);
+ content.Error(err.Message);
+ }
+ return content;
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3