From 98cd144e4d58dbfcc09a2ffb0dbb6925519088b3 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 06 十一月 2024 14:12:56 +0800
Subject: [PATCH] 最新代码更改

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs |   58 ++++++++++++++++++++++++++++++----------------------------
 1 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs
index 3601449..11e418b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/CellState/CellStateService.cs
@@ -94,34 +94,36 @@
             input.RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
             var inputJson = input.ToDictionary();
             var x = await HttpsClient.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/TrayCellsStatus", inputJson);
-            if (x != null)
-            {
-                ResultTrayCellsStatus result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(x);
-                DtBoxingInfo boxingInfo = new DtBoxingInfo()
-                {
-                    IsFull = true,
-                    PalletCode = result.TrayBarcode,
-                };
-                var details = new List<DtBoxingInfoDetail>();
-                foreach (var item in result.SerialNos)
-                {
-                    DtBoxingInfoDetail detail = new DtBoxingInfoDetail()
-                    {
-                        SerialNumber = item.SerialNo,
-                        OrderNo = item.PositionNo.ToString(),
-                        Status = item.SerialNoStatus,
-                        Remark = result.TrayBarcodePropertys.ToJsonString(),
-                        MaterielCode = result.BindCode,
-                    };
-                    details.Add(detail);
-                }
-                boxingInfo.BoxingInfoDetails = details;
-                var abc = await _boxingInfoService.AddBoxingInfoAsync(boxingInfo);
-                if (abc.Status)
-                    content.OK("缁勭洏鎴愬姛", result);
-                else
-                    content.Error("缁勭洏澶辫触");
-            }
+            //if (x != null)
+            //{
+            //    // 鍙嶅簭鍒楀寲ResultTrayCellsStatus瀵硅薄
+            //    ResultTrayCellsStatus result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(x);
+
+            //    // 鍒涘缓DtBoxingInfo瀵硅薄
+            //    DtBoxingInfo boxingInfo = new DtBoxingInfo
+            //    {
+            //        IsFull = true,
+            //        PalletCode = result.TrayBarcode,
+            //    };
+
+            //    // 浣跨敤LINQ鍒涘缓DtBoxingInfoDetail瀵硅薄鍒楄〃
+            //    var details = result.SerialNos.Select(item => new DtBoxingInfoDetail
+            //    {
+            //        SerialNumber = item.SerialNo,
+            //        OrderNo = item.PositionNo.ToString(),
+            //        Status = item.SerialNoStatus,
+            //        Remark = result.TrayBarcodePropertys.ToJsonString(),
+            //        MaterielCode = result.BindCode,
+            //    }).ToList();
+
+            //    // 璧嬪�糄tBoxingInfoDetails
+            //    boxingInfo.BoxingInfoDetails = details;
+            //    var abc = await _boxingInfoService.AddBoxingInfoAsync(boxingInfo);
+            //    if (abc.Status)
+            //        content.OK("缁勭洏鎴愬姛", result);
+            //    else
+            //        content.Error("缁勭洏澶辫触");
+            //}
             LogFactory.GetLog("鏁寸洏鐢佃姱灞炴�ц幏鍙�").Info(true, $"\r\r--------------------------------------");
             LogFactory.GetLog("鏁寸洏鐢佃姱灞炴�ц幏鍙�").Info(true, x);
         }

--
Gitblit v1.9.3