Bläddra i källkod

站点重置的时候更新ms_paststep

callm 1 vecka sedan
förälder
incheckning
f3011c05f8

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_Reset.cs

@@ -73,7 +73,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_outboxcode='',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_outboxcode='',ms_printcount = 0,ms_stepcode='',ms_paststep=, 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("delete makebad where mb_sncode = '" + sncode + "' and mb_makecode='" + makecode + "' and mb_status = 0", "delete");
             dh.ExecuteSql("delete labelprintlog where lpl_value = '" + sncode + "'  ", "delete");
             sql.Clear();

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyFreeze.cs

@@ -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");

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyRelease.cs

@@ -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_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_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");