From 0d59b3fd8050b0f0766be47ed5527d96bd4bf2f7 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 07 四月 2025 09:38:43 +0800
Subject: [PATCH] 斯莫尔插件优化

---
 WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs b/WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs
index 6bf8ef0..d6f430a 100644
--- a/WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs
+++ b/WFormSynchronizeData_SMR/WFormReadData_SMR/ReadCoordinateExcelFrom.cs
@@ -26,6 +26,8 @@
             this.cmbJYSelect.SelectedIndex = 0;
             this.cmbJYSelect.DropDownStyle = ComboBoxStyle.DropDownList;
 
+          
+
             //鎵规鐮佸彧璇�
             this.txtPcm.ReadOnly = true;
 
@@ -174,15 +176,17 @@
                             if (nums == 1)
                             {
                                 dr["Characteristic"] = "FAI 3-16-3-" + (i + 1);
-                                dr["Actual"] = dt2.Rows[0][dt2.Columns[j]].ToString();
                             }
                             else
                             {
                                 dr["Characteristic"] = "FAI 3-16-1-" + (i + 1);
-                                dr["Actual"] = dt2.Rows[0][dt2.Columns[j]].ToString();
                             }
+                            dr["Actual"] = dt2.Rows[i][dt2.Columns[j]].ToString();
 
-                            dt.Rows.Add(dr);
+                            if (dt2.Rows[i][dt2.Columns[j]].ToString() != "") {
+                                dt.Rows.Add(dr);
+                            }
+                          
                             nums++;
 
                             if (nums == 2)
@@ -328,6 +332,7 @@
 
         //鎶婃暟鎹樉绀哄湪椤甸潰涓�
         public void ShowData(DataSet ds,string HNumber) {
+            string HProcID = this.cmbPro.SelectedValue.ToString();
             //娓呯┖缃戞牸鍐呭
             ListData.Items.Clear();
             //娓呯┖琛ㄦ牸鍐呭
@@ -353,7 +358,7 @@
 inner join Gy_InspectInstruMent men  with(nolock) on b.HInspectInstruMentID=men.HItemID   and men.HNumber='"+ HNumber + @"'  
 left join Gy_Material m with(nolock) on a.HMaterID=m.HItemID
 left join Gy_QCCheckItem ch with(nolock) on b.HQCCheckItemID=ch.HItemID  
-where pr.HBillNo='" + this.txtLzk.Text + "'", "Gy_QCCheckProjectMain");
+where pr.HBillNo='" + this.txtLzk.Text + "' and a.HProcID="+ HProcID, "Gy_QCCheckProjectMain");
 
                 if (dataSet.Tables[0].Rows.Count == 0)
                 {
@@ -523,7 +528,7 @@
                         "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" +
                         "," + HSourceID + "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HPlanQty + "," + HProcExchInterID + "," + HProcExchEntryID +
                         ",'" + HProcExchBillNo + "'," + HQty + "," + HMaterID + ",'"+this.labHMakerID.Text + "', " + HLastResults +
-                        "," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + ",0,''" +
+                        "," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + "," + this.HShiftsID.Text + ",''" +
                         "," + this.HTakeSampleCheckBillID.Text + ",'" + this.HTakeSampleCheckBillNo.Text + "'," + HProcID + "" +
                         ",'" + this.txtPcm.Text + "') ");
 
@@ -628,7 +633,7 @@
                         "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" +
                         "," + HSourceID + "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HPlanQty + "," + HProcExchInterID + "," + HProcExchEntryID +
                         ",'" + HProcExchBillNo + "'," + HQty + "," + HMaterID + ",'" + this.labHMakerID.Text + "', " + HLastResults +
-                        "," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + ",0,''" +
+                        "," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + "," + this.HShiftsID.Text + ",''" +
                         "," + this.HTakeSampleCheckBillID.Text + ",'" + this.HTakeSampleCheckBillNo.Text + "',"+ HProcID + ",'" + this.txtPcm.Text + "') ");
 
                     oCN.Commit();
@@ -735,14 +740,14 @@
                     ",HProcExchQty,HShiftsID,HErrTreatment" +
                     ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo" +
                     ",HBatchNo,HCheckerResult) " +
-                    " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,'"+ HMakeDate + "','" + this.txtHMaker.Text + "',getdate()" +
+                    " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,'" + HMakeDate + "','" + this.txtHMaker.Text + "',getdate()" +
                     "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" +
                     "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "'" +
                     "," + HMaterID + "," + HProcID + "," + HSourceID + ",0,0,0,0,0," + this.labHMakerID.Text + ",'" + HLastResults + "'" +
                     ",'','',0,'',''" +
-                    ",0,0,'',0,0,0,0,'',0," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + "," + HPlanQty + "," + HQty + ",0,''" +
+                    ",0,0,'',0,0,0,0,'',0," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "',''," + HICMOEntryID + "," + HQCSchemeID + "," + HPlanQty + "," + HQty + "," + this.HShiftsID.Text + ",''" +
                     "," + this.HTakeSampleCheckBillID.Text + ",'" + this.HTakeSampleCheckBillNo.Text + "'" +
-                    ",'" + this.txtPcm.Text + "','"+ HLastResults + "') ");
+                    ",'" + this.txtPcm.Text + "','" + HLastResults + "') ");
 
 
                     oCN.Commit();
@@ -792,6 +797,7 @@
                     this.txtLzk.Text = ds.Tables[0].Rows[0]["宸ュ簭娴佽浆鍗″彿"].ToString();
                     this.HTakeSampleCheckBillID.Text = ds.Tables[0].Rows[0]["hmainid"].ToString();
                     this.HTakeSampleCheckBillNo.Text = ds.Tables[0].Rows[0]["鍗曟嵁鍙�"].ToString();
+                    this.HShiftsID.Text = ds.Tables[0].Rows[0]["HShiftsID"].ToString();
                     this.txtLzk.ReadOnly = true;
                     this.label2.Text = "娴佽浆鍗�:";
                 }

--
Gitblit v1.9.1