|
|
@@ -60,18 +60,23 @@ namespace UAS_MES_NEW.Special
|
|
|
|
|
|
private bool ReSN(string sncode, string stepcode)
|
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select ms_paststep,ms_makecode from makeserial where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select ms_paststep,ms_makecode,ms_outboxcode from makeserial where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
|
|
|
if (!dt.Rows[0]["ms_paststep"].ToString().Contains(cd_stepcode.Text))
|
|
|
{
|
|
|
OperatResult.AppendText(">>序列号" + sncode + "不允许回流到未执行工序\n", Color.Red);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
|
|
|
+ {
|
|
|
+ OperatResult.AppendText(">>序列号" + sncode + "已装箱不允许回流\n", Color.Red);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
string makecode = dt.Rows[0]["ms_makecode"].ToString();
|
|
|
string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode + "'").ToString();
|
|
|
dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_printcount = 0, ms_nextstepcode= '" + stepcode + "',ms_stepcode='' where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
|
|
|
dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_makecode='" + makecode + "' and mb_status = 0", "delete");
|
|
|
dh.ExecuteSql("delete labelprintlog where lpl_value = '" + sncode + "' ", "delete");
|
|
|
- dh.ExecuteSql("update oqcbatchdetail set OBD_IFNG='' where obd_sncode='"+sncode+"' and obd_makecode='"+makecode+"'", "update");
|
|
|
+ dh.ExecuteSql("update oqcbatchdetail set OBD_IFNG='' where obd_sncode='" + sncode + "' and obd_makecode='" + makecode + "'", "update");
|
|
|
sql.Clear();
|
|
|
sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
|
|
|
sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
|