Prechádzať zdrojové kódy

优化回流焊,设备切换

yhluo 5 mesiacov pred
rodič
commit
ce6a7a3260

+ 3 - 8
UAS_MES_BG/FunctionCode/Make/Make_CollectHLH.cs

@@ -478,16 +478,11 @@ namespace UAS_MES_NEW.Make
                                 dh.ExecuteSql($@"insert into hlh(SPEEDPV1,ZONE1PV_UP,ZONE1PV_DOWN,ZONE2PV_UP,Zone2PV_Down,Zone3PV_UP,Zone3PV_Down,
                                                 Zone4PV_UP,Zone4PV_Down,Zone5PV_UP,Zone5PV_Down,Zone6PV_UP,Zone6PV_Down,Zone7PV_UP,Zone7PV_Down,
                                                 Zone8PV_UP,Zone8PV_Down,Fan1_PV,Fan2_PV,Fan3_PV) values 
-                                                ({hlh["SpeedPV"]},{hlh["Zone1PV_UP"]},{hlh["ZONE1PV_DOWN"]},{hlh["ZONE2PV_UP"]},{hlh["Zone2PV_Down"]},{hlh["Zone3PV_UP"]},{hlh["Zone3PV_Down"]},
-                                                 {hlh["Zone4PV_UP"]},{hlh["Zone4PV_Down"]},{hlh["Zone5PV_UP"]},{hlh["Zone5PV_Down,"]},{hlh["Zone6PV_UP"]},{hlh["Zone6PV_Down"]},{hlh["Zone7PV_UP"]},{hlh["Zone7PV_Down"]},
-                                                 {hlh["Zone8PV_UP"]},{hlh["Zone8PV_Down"]},{hlh["Fan1_PV"]},{hlh["Fan2_PV"]},{hlh["Fan3_PV"]})", "insert");
+                                                ({hlh["SPEEDPV"]},{hlh["ZONE1PV_UP"]},{hlh["ZONE1PV_DOWN"]},{hlh["ZONE2PV_UP"]},{hlh["ZONE2PV_DOWN"]},{hlh["ZONE3PV_UP"]},{hlh["ZONE3PV_DOWN"]},
+                                                 {hlh["ZONE4PV_UP"]},{hlh["ZONE4PV_DOWN"]},{hlh["ZONE5PV_UP"]},{hlh["ZONE5PV_DOWN,"]},{hlh["ZONE6PV_UP"]},{hlh["ZONE6PV_DOWN"]},{hlh["ZONE7PV_UP"]},{hlh["ZONE7PV_DOWN"]},
+                                                 {hlh["ZONE8PV_UP"]},{hlh["ZONE8PV_DOWN"]},{hlh["FAN1_PV"]},{hlh["FAN2_PV"]},{hlh["FAN3_PV"]})", "insert");
                             }
-
-
-
                         }
-
-
                     }
                 }
             }

+ 9 - 1
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

@@ -90,8 +90,12 @@ namespace UAS_MES_NEW.Make
 
         private void Device_SelectedIndexChanged(object sender, EventArgs e)
         {
+            if (Device.SelectedIndex == -1) return;
+
             if (Device.SelectedIndex == 4 || Device.SelectedIndex == 2 || Device.SelectedIndex == 5)
             {
+                txtPath.Text = fileList[Device.SelectedIndex];
+                ma_code.Text = "";
                 ma_code.Enabled = false;
                 txtPath.Focus();
                 txtPath.SelectAll();
@@ -100,6 +104,7 @@ namespace UAS_MES_NEW.Make
             if (string.IsNullOrEmpty(ma_code.Text))
             {
                 Device.SelectedIndex = -1;
+                txtPath.Text = "";
                 MessageBox.Show(this.ParentForm, "请选择工单", "提示");
                 return;
             }
@@ -297,7 +302,9 @@ namespace UAS_MES_NEW.Make
                         }
                         else if (Device.SelectedIndex == 1) // 思泰克SPI
                         {
-                            return; // 20250630 M 暂不对接 
+                            return; // 20250630 M 调整对接方式 
+
+                            #region
                             List<SpiData> csvData;
                             //csvData = ParseCsvFile(file);
                             csvData = ParseCsvFile<SpiData>(file, MapToSpiData);
@@ -373,6 +380,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 File.Delete(file);
                             }
+                            #endregion
                         }
                         else if (Device.SelectedIndex == 2) // AOI
                         {