From 4bfab3d9173fcced07cea4afb71227b83b47c469 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 25 六月 2024 12:32:22 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 113 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 85 insertions(+), 28 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs index 6dbe67c..a9e4e6e 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs @@ -318,34 +318,34 @@ return objJsonResult; } - ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); - if (ds == null) - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (ds.Tables[0].Rows.Count == 0) - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); - objJsonResult.data = null; - return objJsonResult; - } + //ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); + //if (ds == null) + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //if (ds.Tables[0].Rows.Count == 0) + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + // objJsonResult.data = null; + // return objJsonResult; + //} oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",1"); //鍒ゆ柇鏄惁鏄� 棣栭亾宸ュ簭 ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a " + @@ -468,6 +468,63 @@ } #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")] -- Gitblit v1.9.1