From 4ca8ab6ae136d3a99211240aab3867a7962ab9ef Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期一, 05 八月 2024 15:03:52 +0800 Subject: [PATCH] 采购订单多级审核添加 --- WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 74 +++++++++++++++++++++++++++++++++--- 1 files changed, 67 insertions(+), 7 deletions(-) diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs index d2606ac..1143f51 100644 --- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs @@ -2399,6 +2399,66 @@ #endregion + #region 閲囪喘璁㈠崟椹冲洖 + [Route("Cg_POOrderBill/RejectCheckFlow_POOrderBill")] + [HttpGet] + public object RejectCheckFlow_POOrderBill(string HInterID,string CurUserID) + { + try + { + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� + DAL.ClsCg_POOrderBill oBill = new DAL.ClsCg_POOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + { + if (oBill.omodel.HBillStatus != 6) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈湪瀹℃牳涓笉鑳介┏鍥�"; + objJsonResult.data = null; + return objJsonResult; + } + //鍙戣捣椹冲洖 + if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo,CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "椹冲洖鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "椹冲洖澶辫触澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 閲囪喘璁㈠崟 鍙戣捣瀹℃壒 [Route("Cg_POOrderBill/StartCheckFlow_POOrderBill")] [HttpGet] @@ -2469,9 +2529,9 @@ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param> /// <param name="CurUserName">瀹℃牳浜�</param> /// <returns></returns> - [Route("Cg_POOrderBill/AuditXs_POOrderBill_Flow")] + [Route("Cg_POOrderBill/AuditCg_POOrderBill_Flow")] [HttpGet] - public object AuditXs_POOrderBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) + public object AuditCg_POOrderBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) { //string ModRightNameCheck = "Cg_POOrderBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; @@ -2756,7 +2816,7 @@ string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //瀹℃壒娴佸唴鐮� string HCheckItemNowID = "0"; //褰撳墠瀹℃壒椤圭洰鍐呯爜 string HCheckItemNextID = "0"; //寰呭鎵归」鐩唴鐮� - if (oBill.omodel.HBillStatus <= 1) + if (oBill.omodel.HBillStatus == 6) { for (int i = 0; i < ds0.Tables[0].Rows.Count; i++) { @@ -2801,7 +2861,7 @@ oCN.RunProc(sql02); //鍒ゆ柇鍙嶅鏍哥殑鍗曟嵁鏄惁宸茬粡瀹℃牳瀹屾垚锛岃嫢瀹℃牳瀹屾垚锛屽弽瀹℃牳闇�瑕佸彉鏇村崟鎹姸鎬併�� - if (oBill.omodel.HBillStatus <= 1) + if (oBill.omodel.HBillStatus == 6) { //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁 string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; @@ -2815,13 +2875,13 @@ } else { - //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁 - string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; - oCN.RunProc(sql04); //鍙嶅鏍告彁浜bandonCheck if (oBill.AbandonCheck(oCN, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SeOrderBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁 + string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 "+" where HInterID = " + lngBillKey; + oCN.RunProc(sql04); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "鍙嶅鏍告垚鍔�"; -- Gitblit v1.9.1