|
|
@@ -45,7 +45,7 @@ namespace UAS_MES_NEW.Special
|
|
|
{
|
|
|
if (ms_id == "") { OperateResult.AppendText(">>请先获取SN\n"); return; }
|
|
|
if (cd_stepcode.Text == "") { OperateResult.AppendText(">>请选择回流工序\n"); return; }
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode,nvl(ms_qctest,0)ms_qctest,ms_firstsn,ms_sncode,ms_prodcode,ms_checkno,ms_craftcode,ms_outboxcode from makeserial where ms_id='" + ms_id + "' and instr(ms_paststep,'" + cd_stepcode.Text + "')>0 ", "select");
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode,nvl(ms_qctest,0)ms_qctest,ms_status,ms_firstsn,ms_sncode,ms_prodcode,ms_checkno,ms_craftcode,ms_outboxcode from makeserial where ms_id='" + ms_id + "' and instr(ms_paststep,'" + cd_stepcode.Text + "')>0 ", "select");
|
|
|
string ms_qctest = dt.Rows[0]["ms_qctest"].ToString();
|
|
|
if (ms_qctest != "1") { OperateResult.AppendText(">>" + SN.Text + "未抽检或者不需要回流,不允许回流\n", System.Drawing.Color.Red, SN); return; }
|
|
|
|
|
|
@@ -57,10 +57,15 @@ namespace UAS_MES_NEW.Special
|
|
|
string ms_sncode = dt.Rows[0]["ms_sncode"].ToString();
|
|
|
string ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
|
|
|
string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
+ string ms_status = dt.Rows[0]["ms_status"].ToString();
|
|
|
if (ms_outboxcode != "")
|
|
|
{
|
|
|
OperateResult.AppendText(">>序列号已经装箱" + ms_outboxcode + "\n"); return;
|
|
|
}
|
|
|
+ if (ms_status == "3")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>序列号处于不良待维修状态,不允许回流\n"); return;
|
|
|
+ }
|
|
|
if (cr_code.Text != "" && cr_code.Text != ms_craftcode) { OperateResult.AppendText(">>序列号途程和所选途程不一致\n"); return; }
|
|
|
|
|
|
dt = (DataTable)dh.ExecuteSql("select cd_id from craft left join craftdetail on cr_id=cd_crid where cr_prodcode='" + ms_prodcode + "' and cr_code='" + ms_craftcode + "' and cd_stepcode='" + cd_stepcode.Text + "'", "select");
|