|
|
@@ -103,7 +103,7 @@ namespace UAS_MES_NEW.Special
|
|
|
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_ISACTIVE=0,ms_outboxcode='',ms_keyid='',ms_printcount = 0,ms_stepcode='', ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
|
|
|
+ dh.ExecuteSql("update makeserial set ms_status=1,MS_ISACTIVE=0,ms_outboxcode='',ms_keyid='',ms_printcount = 0,ms_stepcode='', ms_nextstepcode= '" + stepcode + "',ms_paststep=case when instr(ms_paststep,'"+stepcode+"')>0 then substr(ms_paststep,0,instr(ms_paststep,'"+ stepcode + "')-2) else ms_paststep end where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
|
|
|
dh.ExecuteSql("update sninfo set si_keyid='' where si_sn='" + sncode + "'", "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");
|