|
|
@@ -573,7 +573,7 @@ namespace UAS_MES.PublicMethod
|
|
|
public static bool SetStepFinish(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
- string StepCode = dh.getFieldDataByCondition("Makeserial", "ms_stepcode", "ms_sncode='" + iSN + "' and ms_makecode='"+iMakeCode+"'").ToString();
|
|
|
+ string StepCode = dh.getFieldDataByCondition("Makeserial", "ms_stepcode", "ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'").ToString();
|
|
|
string CurrentStep = GetStepCodeBySource(iSourceCode);
|
|
|
if (StepCode == CurrentStep)
|
|
|
{
|
|
|
@@ -701,7 +701,7 @@ namespace UAS_MES.PublicMethod
|
|
|
/// <param name="iBadRemark"></param>
|
|
|
/// <param name="oErrorMessage"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserCode, string iSourceCode, string iResult, string[] iBadGroupCode, string[] iBadCode, string[] iBadRemark, out string oErrorMessage)
|
|
|
+ public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserCode, string iSourceCode, string iResult, string[] iBadGroupCode, string[] iBadCode, string[] iBadGroupName, string[] iBadName, string[] iBadRemark, out string oErrorMessage)
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
string StepCode = "";
|
|
|
@@ -711,11 +711,11 @@ namespace UAS_MES.PublicMethod
|
|
|
GetStepCodeAndNameBySource(iSourceCode, ref StepCode, ref StepName);
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
|
|
|
- sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status,mb_badremark)");
|
|
|
+ sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status,mb_badremark,mb_bgname,mb_badname)");
|
|
|
sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserCode + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
|
|
|
- sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
|
|
|
+ sql.Append("sp_soncode,'0',:bc_remark,:bg_name,:bc_name from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
|
|
|
sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
- dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark" }, iBadCode, iBadGroupCode, iBadRemark);
|
|
|
+ dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, iBadCode, iBadGroupCode, iBadRemark, iBadGroupName, iBadName);
|
|
|
//更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
|
|
|
//如果存在送检批号则进行删除
|
|
|
if (dh.CheckExist("oqcbatchdetail", "obd_sncode='" + iSnCode + "'"))
|
|
|
@@ -1011,7 +1011,7 @@ namespace UAS_MES.PublicMethod
|
|
|
switch (iRule)
|
|
|
{
|
|
|
case "TSN":
|
|
|
- dt = (DataTable)dh.ExecuteSql("select ms_id,ms_prodcode,ms_nextmacode,ms_salecode,ms_downstatus from makeserial where ms_sncode='" + iSN + "' and ms_makecode='"+iMakeCode+"' and ms_status=2 order by ms_id desc", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select ms_id,ms_prodcode,ms_nextmacode,ms_salecode,ms_downstatus from makeserial where ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "' and ms_status=2 order by ms_id desc", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
if (dt.Rows[0]["ms_downstatus"].ToString() != "0")
|