From 6768e9f5d677e53e6d788d49e1ca5b9755236ca4 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期二, 22 十月 2024 13:56:24 +0800 Subject: [PATCH] 工艺路线关闭其它功能,分页异常bug修复 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index fd8b5f0..2d3d0fb 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -375,7 +375,7 @@ if (HStandard) { //璁剧疆榛樿宸ヨ壓璺嚎 - oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); //璁剧疆榛樿宸ヨ壓璺嚎 + oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + user + "'"); } //鍒ゆ柇鏄惁閲嶅宸ュ簭鍙� @@ -2194,5 +2194,70 @@ } #endregion + #region 宸ヨ壓璺嚎 鍏抽棴鍏跺畠鍗曟嵁 + [Route("Gy_Routing/CloseOther")] + [HttpGet] + public object CloseOther(int HInterID, string CurUserName) + { + DBUtility.ClsPub.CurUserName = CurUserName; + try + { + //鍒ゆ柇鏄惁鏈夊叧闂叾瀹冩潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_CloseOther", 1, false, CurUserName)) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "宸ヨ壓璺嚎鏃犳潈闄愬叧闂叾瀹冨崟鎹�!"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran();//寮�濮嬩簨鍔� + + //鍒ゆ柇鍗曟嵁鏄惁瀛樺湪 + DataSet ds; + string sql = "select * from Gy_RoutingBillMain where HinterID = " + HInterID; + ds = oCN.RunProcReturn(sql, "Gy_RoutingBillMain"); + if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) + { + //if (!(ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶅彲浠ヨ鍚敤涓鸿鐗╂枡鐨勯粯璁ゅ伐鑹鸿矾绾�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + } + else + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紝妫�鏌ヨ鍗曟嵁鏄惁宸茬粡琚垹闄�!"; + objJsonResult.data = null; + return objJsonResult; + } + + //鍒锋柊榛樿宸ヨ壓璺嚎 + oCN.RunProc("exec h_p_Gy_RoutingBillClose " + HInterID + ",'" + CurUserName + "'"); + + oCN.Commit();//鎻愪氦浜嬪姟 + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "鎵ц鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; ; + } + catch (Exception e) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鍏抽棴鍏跺畠澶辫触澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1