Tiandele
2026-03-20 daea1a90c2fa1b5cc2f52e62be15bd95cc4155f6
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs
@@ -21,23 +21,16 @@
    /// </summary>
    public partial class MESService
    {
        /// <summary>
        ///  BDC请求焊装特征信息
        /// </summary>
        /// <param name="rfidPrint">RFID</param>
        /// <param name="vin">VIN号</param>
        /// <param name="stationNo">站台请求点位</param>
        /// <returns></returns>
        public WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo)
        public WebResponseContent issuedCharacter(string rfidPrint, string stationNo, string palletCode)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                IssuedCharacterInfo characterInfo = new IssuedCharacterInfo()
                {
                    plantCode = "1022",
                    plantCode = "1052",
                    rfidPrint = rfidPrint,
                    vin = vin,
                    vin = null,
                    messageTime = DateTime.Now
                };
@@ -50,30 +43,45 @@
                }
                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);
                return content;
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"工位号:{stationNo},RFID:{rfidPrint},响应信息:{webResponse.ToJson()}");
                return content.OK("获取焊装白车身信息成功");
            }
            catch (Exception ex)
            {
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"请求焊装特征信息异常RFID:{rfidPrint}异常信息:{ex.Message}");
                return content.Error($"请求焊装特征信息异常::{ex.Message}");
            }
        }