From 980b78709fef23248956382fe72571e431c4d289 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 06 一月 2026 10:46:05 +0800
Subject: [PATCH] 单品过站同步插件增加打印生产质量汇报单单号日志

---
 WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
index 1b174bf..549b2e0 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
@@ -687,8 +687,8 @@
             // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
             var formData = new FormUrlEncodedContent(new[]
             {
-                    new KeyValuePair<string, string>("userName", "admin"),
-                    new KeyValuePair<string, string>("password", "admin")
+                    new KeyValuePair<string, string>("userName", "mes"),
+                    new KeyValuePair<string, string>("password", "MesApi123")
                     // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
                 });
             JsonResult jsonResult = await getUrl(urls, formData);
@@ -843,8 +843,8 @@
             // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
             var formData = new FormUrlEncodedContent(new[]
             {
-                    new KeyValuePair<string, string>("userName", "admin"),
-                    new KeyValuePair<string, string>("password", "admin")
+                    new KeyValuePair<string, string>("userName", "mes"),
+                    new KeyValuePair<string, string>("password", "MesApi123")
                     // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
                 });
             JsonResult jsonResult = await getUrl(urls, formData);
@@ -1025,6 +1025,8 @@
 
                             JsonEquipmentData data = await FindDevicePropCalc(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
 
+                            await Task.Delay(200);
+
                             for (int j = 0; j < data.data.Count; j++)
                             {
                                 //鍚堟牸鏁�
@@ -1137,7 +1139,11 @@
                             staus = "鍛婅";
                             break;
                     }
-                    if (jsonEquipment.data.Count > 0)
+                    if (jsonEquipment == null || jsonEquipment.data == null)
+                    {
+                        JsonData += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+                    }
+                    else if (jsonEquipment.data.Count > 0)
                     {
                         JsonData += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
                     }
@@ -1202,8 +1208,8 @@
             // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
             var formData = new FormUrlEncodedContent(new[]
             {
-                    new KeyValuePair<string, string>("userName", "admin"),
-                    new KeyValuePair<string, string>("password", "admin")
+                    new KeyValuePair<string, string>("userName", "mes"),
+                    new KeyValuePair<string, string>("password", "MesApi123")
                     // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
                 });
             JsonResult jsonResult = await getUrl(urls, formData);

--
Gitblit v1.9.1