|
|
@@ -914,6 +914,7 @@ namespace UAS_MES.PublicMethod
|
|
|
return CS_SetFinish(iMakeCode, iSourceCode, iSN, iUserCode, out oErrorMessage);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
@@ -1272,56 +1273,6 @@ namespace UAS_MES.PublicMethod
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- //public static bool UpdateOQCMessage(string iSnCode, string iCheckno, string iMakeCode, string iMPKind, string iSourceCode, string iUserCode, string iResult, out string oErrorMessage)
|
|
|
- //{
|
|
|
- // oErrorMessage = "";
|
|
|
- // string StepCode = "";
|
|
|
- // string StepName = "";
|
|
|
- // string LineCode = "";
|
|
|
- // if (iResult == "" || iResult == null)
|
|
|
- // {
|
|
|
- // iResult = "测试合格";
|
|
|
- // }
|
|
|
- // GetStepCodeAndNameAndLineBySource(iSourceCode, ref StepCode, ref StepName, ref LineCode);
|
|
|
- // //查询批次和批数量
|
|
|
- // string batchqty = dh.getFieldDataByCondition("oqcbatch", "ob_nowcheckqty", "ob_checkno='" + iCheckno + "'").ToString();
|
|
|
- // string nextstepcode = dh.getFieldDataByCondition("make left join craft on ma_craftcode=cr_code and ma_prodcode=cr_prodcode left join craftdetail on cr_id = cd_crid", "cd_nextstepcode", "ma_code='" + iMakeCode + "' and cd_stepcode='" + StepCode + "'").ToString();
|
|
|
- // if (iResult.Contains("批次通过"))
|
|
|
- // {
|
|
|
- // //更新执行的数量
|
|
|
- // sqls.Add("update makecraftdetail set mcd_inqty=mcd_inqty+" + batchqty + ",mcd_outqty = mcd_outqty + " + batchqty + ",mcd_okqty = mcd_okqty + " + batchqty + " where mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "' ");
|
|
|
- // //更新makeSerial 的下一工序
|
|
|
- // sqls.Add("update makeserial set ms_paststep = ms_paststep || '," + StepCode + "',ms_stepcode='" + StepCode + "',ms_nextstepcode='" + nextstepcode + "' where ms_checkno='" + iCheckno + "' and ms_status<>3");
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // //更新执行的数量
|
|
|
- // sqls.Add("update makecraftdetail set mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1,mcd_okqty = mcd_okqty + 1 where mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "' ");
|
|
|
- // //更新makeSerial 的下一工序
|
|
|
- // sqls.Add("update makeserial set ms_paststep = ms_paststep || '," + StepCode + "',ms_stepcode='" + StepCode + "',ms_nextstepcode='" + nextstepcode + "' where ms_checkno='" + iCheckno + "' and ms_status<>3");
|
|
|
- // }
|
|
|
- // //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
|
|
|
- // dh.ExecuteSQLTran(sqls.ToArray());
|
|
|
- // sqls.Clear();
|
|
|
- // //检测下道工序是否存在,不存在 更新状态为已完成
|
|
|
- // if (nextstepcode == null || nextstepcode == "")
|
|
|
- // {
|
|
|
- // if (iResult.Contains("批次通过"))
|
|
|
- // {
|
|
|
- // sqls.Add("update make set ma_madeqty=ma_madeqty+" + batchqty + " where ma_code='" + iMakeCode + "'");
|
|
|
- // sqls.Add("update makeserial set ms_status=2 where ms_checkno='" + iCheckno + "' and ms_status<>3");
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // sqls.Add("update make set ma_madeqty=ma_madeqty+1 where ma_code='" + iMakeCode + "'");
|
|
|
- // sqls.Add("update makeserial set ms_status=2 where ms_checkno='" + iCheckno + "' and ms_status<>3");
|
|
|
- // }
|
|
|
- // dh.ExecuteSQLTran(sqls.ToArray());
|
|
|
- // sqls.Clear();
|
|
|
- // }
|
|
|
- // return true;
|
|
|
- //}
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 设置良品采集结果,iResult含有“批次通过”按抽检批次通过
|
|
|
/// </summary>
|