|
|
@@ -315,7 +315,7 @@ namespace UAS_MES.Make
|
|
|
//如果不是返修的
|
|
|
if (ifrework == "0")
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "' and mb_status=0", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_status=0", "select");
|
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
{
|
|
|
if (dt.Rows[i]["mb_id"].ToString() != dt.Rows[i]["mbr_mbid"].ToString())
|
|
|
@@ -447,7 +447,7 @@ namespace UAS_MES.Make
|
|
|
string status = dt.Rows[0]["ms_status"].ToString();
|
|
|
if (status == "1" || status == "2")
|
|
|
{
|
|
|
- dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='"+ms_sncode.Text+"')");
|
|
|
+ dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
|
|
|
dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
|
|
|
dh.UpdateByCondition("makeserial", "ms_nextstepcode=''", "ms_sncode='" + ms_sncode.Text + "'");
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集不良", "采集不良成功", ms_sncode.Text, ob_checkno.Text);
|