|
|
@@ -306,6 +306,23 @@ namespace UAS_MES.Make
|
|
|
cdstepcode = dt.Rows[0][0].ToString();
|
|
|
}
|
|
|
}
|
|
|
+ if (cdstepcode == "")
|
|
|
+ {
|
|
|
+ //加严完工判断
|
|
|
+ if (dh.CheckExist("configs", "code = 'checkpack' and data = '1'"))
|
|
|
+ {
|
|
|
+ string currentdetno = dh.getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid", "cd_detno", "cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_stepcode='" + ms_stepcode + "'").ToString();
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("select cd_stepcode from craft left join craftdetail on cr_id=cd_crid left join step on cd_stepcode=st_code ");
|
|
|
+ sql.Append("where cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno<='" + currentdetno + "' ");
|
|
|
+ sql.Append("and nvl(st_checkpack,0)<>0 order by cd_detno");
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
+ if (dt1.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ cdstepcode = dt1.Rows[0][0].ToString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//如果ms_stepcode和扣料工序均没有查到返修的工序
|
|
|
if (cdstepcode == "")
|
|
|
{
|