Bladeren bron

QC回流选择工序

callm 4 uur geleden
bovenliggende
commit
49ba70cffa

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_Repair.cs

@@ -367,6 +367,7 @@ namespace UAS_MES_NEW.Make
                                 }
                             }
                             cd_stepcode.Text = cdstepcode;
+                            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and instr('"+ ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
                             //if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
                             //    cd_stepcode.Enabled = false;
                             //else

+ 3 - 2
UAS_MES_YDCY/FunctionCode/Special/Special_CancelOQC.cs

@@ -93,18 +93,19 @@ namespace UAS_MES_NEW.Special
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select ms_id,ms_craftcode,ms_prodcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_id,ms_paststep,ms_craftcode,ms_prodcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
 
                 if (dt.Rows.Count == 0) { OperateResult.AppendText(">>" + SN.Text + "不存在\n", System.Drawing.Color.Red, SN); return; }
 
                 ms_id = dt.Rows[0]["ms_id"].ToString();
+                string ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                 string ms_checkno = dt.Rows[0]["ms_checkno"].ToString();
 
                 if (ms_checkno == "") { OperateResult.AppendText(">>" + SN.Text + "不存在抽检批次中\n", System.Drawing.Color.Red, SN); return; }
 
                 cr_code.Text = dt.Rows[0]["ms_craftcode"].ToString();
                 string ms_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
-                cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' order by cd_stepno";
+                cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' and instr('" + ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
                 SaveRepairInf_Click(sender, e);
             }
         }

+ 3 - 3
UAS_MES_YDCY/FunctionCode/Special/Special_CancelOQCToLastStep.cs

@@ -90,12 +90,12 @@ namespace UAS_MES_NEW.Special
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_firstsn,ms_makecode,ms_id,ms_craftcode,ms_prodcode,ms_nextstepcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_paststep,ms_firstsn,ms_makecode,ms_id,ms_craftcode,ms_prodcode,ms_nextstepcode,ms_checkno from makeserial where ms_sncode='" + SN.Text + "' order by ms_id desc", "select");
 
                 if (dt.Rows.Count == 0) { OperateResult.AppendText(">>" + SN.Text + "不存在\n", System.Drawing.Color.Red, SN); return; }
 
                 ms_id = dt.Rows[0]["ms_id"].ToString();
-                string ms_checkno = dt.Rows[0]["ms_checkno"].ToString();
+                string ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                 string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
                 string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
                 string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
@@ -104,7 +104,7 @@ namespace UAS_MES_NEW.Special
                 string ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
 
                 cr_code.Text = dt.Rows[0]["ms_craftcode"].ToString();
-                //cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' order by cd_stepno";
+                cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode + "' and instr('" + ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
 
                 dt = (DataTable)dh.ExecuteSql("select cd_detno-1  cd_detno from craft left join craftdetail on cr_id=cd_crid where cr_prodcode='" + ms_prodcode + "' and cr_code='" + ms_craftcode + "' and cd_stepcode='" + ms_nextstepcode + "'", "select");
                 if (dt.Rows.Count == 0)