瀏覽代碼

修改箱过站paststep记录错误

章政 8 年之前
父節點
當前提交
d0c6214317
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      UAS-MES/PublicMethod/LogicHandler.cs

+ 2 - 2
UAS-MES/PublicMethod/LogicHandler.cs

@@ -597,7 +597,7 @@ namespace UAS_MES.PublicMethod
                     sql.Append("and ms_sncode=v_barcode and ms_makecode=v_makecode) when matched then update ");
                     sql.Append("and ms_sncode=v_barcode and ms_makecode=v_makecode) when matched then update ");
                     sql.Append(" set ms_stepcode='" + CurrentStep + "',ms_stepname='" + CurrentStepName + "',");
                     sql.Append(" set ms_stepcode='" + CurrentStep + "',ms_stepname='" + CurrentStepName + "',");
                     sql.Append("ms_nextstepcode='" + nextstepcode + "', ms_sccode = '" + iSourceCode + "',ms_paststep = ");
                     sql.Append("ms_nextstepcode='" + nextstepcode + "', ms_sccode = '" + iSourceCode + "',ms_paststep = ");
-                    sql.Append("ms_paststep || case when " + ifpast + " > 0 then ',' || '" + ifpast + "' end");
+                    sql.Append("ms_paststep || case when " + ifpast + " > 0 then ',' || '" + CurrentStep + "' end");
                     ExeSQL.Add(sql.ToString());
                     ExeSQL.Add(sql.ToString());
                 }
                 }
                 else
                 else
@@ -608,7 +608,7 @@ namespace UAS_MES.PublicMethod
                     sql.Append("and ms_sncode=v_barcode and ms_makecode=v_makecode) when matched then update ");
                     sql.Append("and ms_sncode=v_barcode and ms_makecode=v_makecode) when matched then update ");
                     sql.Append(" set ms_stepcode='" + CurrentStep + "',ms_stepname='" + CurrentStepName + "',ms_status=2,");
                     sql.Append(" set ms_stepcode='" + CurrentStep + "',ms_stepname='" + CurrentStepName + "',ms_status=2,");
                     sql.Append("ms_nextstepcode='', ms_sccode = '" + iSourceCode + "',ms_paststep = ");
                     sql.Append("ms_nextstepcode='', ms_sccode = '" + iSourceCode + "',ms_paststep = ");
-                    sql.Append("ms_paststep || case when " + ifpast + " > 0 then ',' || '" + ifpast + "' end");
+                    sql.Append("ms_paststep || case when " + ifpast + " > 0 then ',' || '" + CurrentStep + "' end");
                     ExeSQL.Add(sql.ToString());
                     ExeSQL.Add(sql.ToString());
                     //更新完工数量
                     //更新完工数量
                     ExeSQL.Add("update make set ma_madeqty=nvl(ma_madeqty,0)+" + totalcount + " where ma_code='" + iMakeCode + "'");
                     ExeSQL.Add("update make set ma_madeqty=nvl(ma_madeqty,0)+" + totalcount + " where ma_code='" + iMakeCode + "'");