From fc9cba5f058089887aa7061d2e6b4006b9e04a9a Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期二, 10 三月 2026 09:46:43 +0800
Subject: [PATCH] 同步

---
 项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs"
index ded569a..e48b6ee 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs"
@@ -21,8 +21,7 @@
     /// </summary>
     public partial class MESService
     {
-       
-        public WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo)
+        public WebResponseContent issuedCharacter(string rfidPrint, string stationNo, string palletCode)
         {
             WebResponseContent content = new WebResponseContent();
             try
@@ -31,7 +30,7 @@
                 {
                     plantCode = "1052",
                     rfidPrint = rfidPrint,
-                    vin = vin,
+                    vin = null,
                     messageTime = DateTime.Now
                 };
 
@@ -44,23 +43,32 @@
                 }
                 var wmsIpAddress = wmsBase + ipAddress;
 
-                var MESrespon = HttpHelper.Post(wmsIpAddress, characterInfo.ToJson());
-
-                IssuedCharacterRespon characterRespon = JsonConvert.DeserializeObject<IssuedCharacterRespon>(MESrespon);
-                if (!characterRespon.success)
+                var MESrespon = HttpHelper.PostAsync(wmsIpAddress, characterInfo.ToJson(), contentType, headers).Result;
+                Console.WriteLine(MESrespon);
+                WebResponseContent webResponse = JsonConvert.DeserializeObject<WebResponseContent>(MESrespon.ToString());
+                if (webResponse.Code != 200)
                 {
-                    throw new Exception($"{characterRespon}");
+                    throw new Exception($"{webResponse.msg}");
                 }
 
-                Dt_CarBody CarBody = new Dt_CarBody()
+                IssuedCharacterRespon characterRespon = JsonConvert.DeserializeObject<IssuedCharacterRespon>(webResponse.Data.ToJson());
+
+                Dt_CarBodyInfo CarBody = new Dt_CarBodyInfo()
                 {
-                    BodyStatus = "",
-                    CarType = 1,
+                    biwInPassTime = Convert.ToDateTime(characterRespon.biwInPassTime),
+                    biwMaterialCode = characterRespon.biwMaterialCode,
+                    skylightCharacteristic = characterRespon.skylightCharacteristic,
+                    vehicleCharacteristic = characterRespon.vehicleCharacteristic,
+                    workOrderNo = characterRespon.workOrderNo,
+                    workOrderType = characterRespon.workOrderType,
+                    BodyStatus = 1,
+                    CarType = stationNo == "EL01RB01" ? 2 : 1,
                     CreateDate = DateTime.Now,
-                    Creater = "system",
+                    Creater = "System",
                     Description = "",
-                    PalletCode = rfidPrint,
-                    PVI = characterRespon.rfidPrint
+                    PalletCode = palletCode,
+                    PVI = characterRespon.pvi,
+                    RFID = rfidPrint
                 };
 
                 _carBodyRepository.AddData(CarBody);
@@ -69,7 +77,7 @@
                 LogFactory.GetLog("璇锋眰鐒婅鐗瑰緛淇℃伅").Info(true, $"宸ヤ綅鍙�:{stationNo},RFID:{rfidPrint}");
 
 
-                return content;
+                return content.OK("鑾峰彇鐒婅鐧借溅韬俊鎭垚鍔�");
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3