From 1924bdeca6414b6fec314c37260b44f20865d593 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期四, 22 一月 2026 20:49:05 +0800
Subject: [PATCH] 代码同步,接口更新

---
 项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs"
index 98d7133..b606cbb 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs"
@@ -1,24 +1,22 @@
 锘縰sing Newtonsoft.Json;
 using WIDESEA_Common;
+using WIDESEA_Common.MES;
 using WIDESEA_Core;
 using WIDESEA_Core.Const;
 using WIDESEA_Core.Helper;
 
 namespace WIDESEA_StoragIntegrationServices
 {
-    /// <summary>
-    /// 杞﹁韩杩囩偣璇锋眰
-    /// </summary>
     public partial class MESService
     {
-        public WebResponseContent PassPoint(string stationCode)
+        public WebResponseContent PassPoint(string stationCode, string rfid)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
                 var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_MESIPAddress);
                 var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.MESIPAddress)?.ConfigValue;
-                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.PassPoint)?.ConfigValue;
+                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.AVIPASS)?.ConfigValue;
                 if (wmsBase == null || ipAddress == null)
                 {
                     throw new InvalidOperationException("WMS IP 鏈厤缃�");
@@ -32,25 +30,30 @@
                     union_key = Guid.NewGuid().ToString(),
                     line_code = stationInfo.stationChildCode,
                     message_time = DateTime.Now,
-                    plant_code = "",
-                    pvi = "",
+                    plant_code = "1052",
+                    pvi = rfid,
                     station_code = stationInfo.stationChildCode,
                     vin = "",
                     pass_time = DateTime.Now
                 };
 
-                var MESrespon = HttpHelper.Post(wmsIpAddress, passPoint.ToJson());
+                var MESrespon = HttpHelper.PostAsync(wmsIpAddress, passPoint.ToJson(), contentType, headers).Result;
 
-                WebResponseContent responseContent = JsonConvert.DeserializeObject<WebResponseContent>(MESrespon);
-                if (!responseContent.Status)
+                MesResponse responseContent = JsonConvert.DeserializeObject<MesResponse>(MESrespon.ToString());
+                if (responseContent.code != 200)
                 {
-                    throw new Exception($"杞﹁韩杩囩偣寮傚父锛歿responseContent.Message}");
+                    throw new Exception($"杞﹁韩杩囩偣寮傚父锛歿responseContent.message}");
                 }
+
+                LogFactory.GetLog("杞﹁韩杩囩偣").Info(true, $"\r\r--------------------------------------");
+                LogFactory.GetLog("杞﹁韩杩囩偣").Info(true, $"宸ヤ綅鍙�:{stationCode},RFID:{rfid}");
 
                 return content;
             }
             catch (Exception ex)
             {
+                LogFactory.GetLog("杞﹁韩杩囩偣").Info(true, $"\r\r--------------------------------------");
+                LogFactory.GetLog("杞﹁韩杩囩偣").Info(true, $"宸ヤ綅鍙�:{stationCode},RFID:{rfid}");
                 return content.Error(ex.Message);
             }
         }

--
Gitblit v1.9.3