Explorar o código

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 %!s(int64=8) %!d(string=hai) anos
pai
achega
773733ab37

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_PositionStock.Designer.cs

@@ -311,6 +311,7 @@
             this.pr_detail1,
             this.pr_spec,
             this.DeleteRow});
+            this.BatchProductDGV.EnableContentClick = true;
             this.BatchProductDGV.Location = new System.Drawing.Point(0, 143);
             this.BatchProductDGV.Name = "BatchProductDGV";
             this.BatchProductDGV.RowTemplate.Height = 23;
@@ -394,6 +395,7 @@
             this.mss_id.DataPropertyName = "mss_id";
             this.mss_id.HeaderText = "ID";
             this.mss_id.Name = "mss_id";
+            this.mss_id.Visible = false;
             // 
             // mss_prodcode
             // 

+ 7 - 2
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -31,6 +31,10 @@ namespace UAS_MES.Query
 
         DataTable dt;
 
+        string ms_id;//记录ms_id
+
+        DataTable ListA;//记录数据的当前序列号和之前序列号
+
         AutoSizeFormClass asc = new AutoSizeFormClass();
 
         public Query_ExeProgress()
@@ -56,7 +60,8 @@ namespace UAS_MES.Query
         {
             if (e.KeyCode == Keys.Enter)
             {
-                string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + sn_code.Text + "' or ms_beforesn='"+sn_code.Text+"'").ToString();
+                ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + sn_code.Text + "' or ms_beforesn='"+sn_code.Text+"'").ToString();
+                ListA = (DataTable)dh.ExecuteSql("select ms_beforesn,ms_sncode from makeserial where ms_id='"+ms_id+"'","select");
                 dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id='" + ms_id + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -211,7 +216,7 @@ namespace UAS_MES.Query
                     sql.Clear();
                     sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
                     sql.Append("mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
-                    sql.Append("mp_sourcecode=sc_code where mp_sncode='" + sn_code.Text + "' and ma_code='" + dt.Rows[0]["ms_makecode"].ToString() + "'");
+                    sql.Append("mp_sourcecode=sc_code where mp_sncode in ('" + ListA.Rows[0]["ms_sncode"].ToString() + "'"+(ListA.Rows[0]["ms_beforesn"].ToString()==""?"":(",'"+ListA.Rows[0]["ms_beforesn"].ToString()+"'")) +") and ma_code='" + dt.Rows[0]["ms_makecode"].ToString() + "' order by mp_indate");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
                 }