From f331a2915eebc492e872206d9aa7e13fc7f0861f Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 12 八月 2024 09:04:51 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 154 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 142 insertions(+), 12 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs index a698f0e..5c5ebd7 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs @@ -1047,10 +1047,49 @@ oCN.BeginTran();//寮�濮嬩簨鍔� - //Type 1 浣滃簾 2 鍙嶄綔搴� - if (Type == 1) + //Type 0 浣滃簾 1 鍙嶄綔搴� + if (Type == 0) { - if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾 + DataSet ds; + string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; + ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; + objJsonResult.data = null; + return objJsonResult; + } + 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; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() == "6") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鍦ㄥ鏍镐腑!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -1061,7 +1100,38 @@ } else { - if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴� + DataSet ds; + string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; + ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); + 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; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸啀鍙嶄綔搴�!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() == "瀹℃牳涓�") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鍦ㄥ鏍镐腑!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -1477,12 +1547,71 @@ } #endregion + #region 閿�鍞鍗� 椹冲洖 + [Route("Xs_SeOrderBill/RejectCheckFlow_POOrderBill")] + [HttpGet] + public object RejectCheckFlow_POOrderBill(string HInterID, string CurUserID) + { + try + { + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� + DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + 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("Xs_SeOrderBill/StartCheckFlow_SeOrderBIll")] [HttpGet] - public object StartCheckFlow_SeOrderBIll(int HInterID,int HCheckFlowID_select, string CurUserName) + public object StartCheckFlow_SeOrderBIll(int HInterID,string CurUserName) { - string ModRightNameCheck = "Xs_SeOrderBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; try { @@ -1512,7 +1641,7 @@ DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� //鍙戣捣瀹℃壒 - if (oBill.startCheckFlow(lngBillKey,HCheckFlowID_select, ref DBUtility.ClsPub.sExeReturnInfo) ==true) + if (oBill.startCheckFlow(lngBillKey,ref DBUtility.ClsPub.sExeReturnInfo) ==true) { objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1858,7 +1987,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++) { @@ -1903,7 +2032,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; @@ -1917,13 +2046,14 @@ } 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