|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 工序进站接收单流水号回车 系统参数判断是否绑定配件清单 | 
|---|
|  |  |  | [Route("Cj_StationInBill/MES_StationInBillSubBindSource")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object MES_StationInBillSubBindSource(string HInterID, string HProcExchInterID,string HProcExchEntryID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //如果系统参数启用了 进站单绑定配件清单则 从生产用料清单中获取工序BOM写入 临时表,并加载表格 | 
|---|
|  |  |  | Pub_Class.ClsXt_SystemParameter oParam = new ClsXt_SystemParameter(); | 
|---|
|  |  |  | string sIsBingLine = oParam.GetSingleSystemParameter("MES_StationInBill_LineBindCtl", ref DBUtility.ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | if (sIsBingLine.Trim() == "Y") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | oCN.RunProc("exec h_p_MES_StationInBillSubBindSource_Insert " + HProcExchInterID.ToString() + " , " + HProcExchEntryID.ToString() + "," + HInterID.ToString() + " "); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn($@"select * from | 
|---|
|  |  |  | ( | 
|---|
|  |  |  | select | 
|---|
|  |  |  | a.HICMOInterID,a.HICMOEntryID,b.HProcID | 
|---|
|  |  |  | from Sc_ProcessExchangeBillMain a with(nolock) | 
|---|
|  |  |  | inner join Sc_ProcessExchangeBillSub b with(nolock)  on a.HInterID=b.HinterID | 
|---|
|  |  |  | Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID} | 
|---|
|  |  |  | ) a | 
|---|
|  |  |  | inner join ( | 
|---|
|  |  |  | select a.HICMOInterID,a.HICMOEntryID, b.HProcID | 
|---|
|  |  |  | from Sc_PPBomBillMain a with(nolock) | 
|---|
|  |  |  | inner join Sc_PPBomBillSub b with(nolock)  on a.HInterID=b.HInterID | 
|---|
|  |  |  | Where b.HKeyMaterID_Line<>0 | 
|---|
|  |  |  | )b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (ds.Tables[0].Rows.Count > 0) { | 
|---|
|  |  |  | objJsonResult.Message = "需要绑定配件!"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.Message = "不需要绑定配件!"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else { | 
|---|
|  |  |  | objJsonResult.Message = "不需要绑定配件!"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.data =null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "Exception!" + e.ToString(); | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 工序进站接收单流水号回车获取工序信息 | 
|---|
|  |  |  | [Route("Cj_StationInBill/txtHProcNo_KeyDown_qiaoyi")] | 
|---|