|
|
@@ -22,6 +22,8 @@ namespace UAS_MES.OQC
|
|
|
LogStringBuilder sql = new LogStringBuilder();
|
|
|
string[] LevelDefect = new string[] { "A#A", "B#B", "C#C", "D#D" };
|
|
|
|
|
|
+ string ifrework = "";
|
|
|
+
|
|
|
DataTable TempForCheckType = new DataTable();
|
|
|
|
|
|
string ErrorMessage = "";
|
|
|
@@ -55,7 +57,8 @@ namespace UAS_MES.OQC
|
|
|
OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
- if (temp.Rows[0]["ms_ifrework"].ToString() != "0")
|
|
|
+ ifrework = temp.Rows[0]["ms_ifrework"].ToString();
|
|
|
+ if (ifrework != "0")
|
|
|
{
|
|
|
ob_checkno.Text = temp.Rows[0]["ms_reworkcheckno"].ToString();
|
|
|
}
|
|
|
@@ -304,16 +307,15 @@ namespace UAS_MES.OQC
|
|
|
sql.Append("nvl(ois_ifng,0)=0 then 0 else 1 end),0) ,count(1) from OQCItemSamples where ois_checkno=oi_checkno ");
|
|
|
sql.Append("and ois_itemcode=oi_itemcode)where oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode ='" + ob_projectcode.Text + "'");
|
|
|
dh.ExecuteSql(sql.GetString(), "update");
|
|
|
- ////含有不良的将序列号更新为不良
|
|
|
- //if (IfContainNG)
|
|
|
- // dh.ExecuteSql("update makeserial set ms_status=3 where ms_sncode='" + sncode.Text + "'", "update");
|
|
|
- //else
|
|
|
- // dh.ExecuteSql("update makeserial set ms_status=1 where ms_sncode='" + sncode.Text + "'", "update");
|
|
|
//更新检验状态,如果是待检验的更新为检验中
|
|
|
if (ob_status.Text == "待检验")
|
|
|
{
|
|
|
dh.ExecuteSql("update OQCBatch set ob_status='CHECKING' where ob_checkno='" + ob_checkno.Text + "' and ob_status='UNCHECK'", "update");
|
|
|
- dh.ExecuteSql("update makecraftdetail set mcd_inqty=mcd_inqty+" + ob_nowcheckqty.Text + " where mcd_macode='" + ob_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
+ //如果返工的不需要更新数量
|
|
|
+ if (!(ifrework != "0" && ifrework != ""))
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("update makecraftdetail set mcd_inqty=mcd_inqty+" + ob_nowcheckqty.Text + " where mcd_macode='" + ob_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
+ }
|
|
|
}
|
|
|
//更新批次中的合格数不合格数:用抽检批检验项目表获取最大的抽检数和不合格数
|
|
|
sql.Clear();
|