|
@@ -594,6 +594,7 @@ namespace UAS_MES.PublicMethod
|
|
|
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 ',' || '" + ifpast + "' end");
|
|
|
|
|
+ ExeSQL.Add(sql.ToString());
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -635,8 +636,8 @@ namespace UAS_MES.PublicMethod
|
|
|
//更新工序会上一执行步骤
|
|
//更新工序会上一执行步骤
|
|
|
sql.Clear();
|
|
sql.Clear();
|
|
|
sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='"+ iOutBoxCode + "' and ms_sncode=");
|
|
sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='"+ iOutBoxCode + "' and ms_sncode=");
|
|
|
- sql.Append("v_barcode and ms_makecode=v_makecode) when matched then update set ms_nextstepcode=ms_stepcode, ");
|
|
|
|
|
- sql.Append(" ,ms_status=1,ms_sccode='" + iSourceCode + "' ");
|
|
|
|
|
|
|
+ sql.Append("v_barcode and ms_makecode=v_makecode) when matched then update set ms_nextstepcode=ms_stepcode");
|
|
|
|
|
+ sql.Append(",ms_status=1,ms_sccode='" + iSourceCode + "' ");
|
|
|
ExeSQL.Add(sql.ToString());
|
|
ExeSQL.Add(sql.ToString());
|
|
|
//更新完工数量
|
|
//更新完工数量
|
|
|
ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");
|
|
ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");
|