From a0586edd1c53e6c7065fd2a90809ecb4fa293922 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 12 十一月 2024 17:43:02 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CGGL/YF_PayMentBillController.cs | 121 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 119 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs index 03729bf..bbc13bd 100644 --- a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs +++ b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs @@ -8,6 +8,7 @@ using System.Data.SqlClient; using System.Web.Http; using WebAPI.Models; +using SyntacticSugar.constant; namespace WebAPI.Controllers { @@ -284,6 +285,31 @@ { bResult = false; } + + //鑷姩瀹℃牳璁剧疆 + if (refSav == "Add") + { + objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D + //绯荤粺鍙傛暟 鑷姩瀹℃牳 + string sReturn = ""; + if (oSystemParameter.ShowBill(ref sReturn) == true) + { + if (oSystemParameter.omodel.YF_PayMentBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳 + { + objJsonResult.Verify = "Y"; + } + else + { + objJsonResult.Verify = "N"; + } + } + } + else if (refSav == "Update") + { + objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D + objJsonResult.Verify = "N"; + } + if (bResult) { objJsonResult.code = "0"; @@ -447,7 +473,13 @@ string sReturn = ""; oCN.BeginTran(); - + ds = oCN.RunProcReturn("select * from h_v_YF_PayMentBillList where hmainid=" + HInterID, "h_v_YF_PayMentBillList"); + string hSourceBillType = ds.Tables[0].Rows[0]["婧愬崟绫诲瀷"].ToString(); + if (hSourceBillType == "1114") + { + //鏀舵鍗� 鍒犻櫎鍥炲~ 搴斾粯鍗曞叧鑱旀暟閲� + oCN.RunProc("exec h_p_Cg_UpDateRelation_PayableToPayMent_Del " + HInterID); + } oCN.RunProc("delete from YF_PayMentBillMain where HInterID = " + HInterID); oCN.RunProc("delete from YF_PayMentBillSub where HInterID= " + HInterID); @@ -872,7 +904,6 @@ } #endregion - #region 浠樻鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� [Route("YF_PayMentBill/DropYF_PayMentBill")] [HttpGet] @@ -1019,6 +1050,92 @@ } #endregion + #region 浠樻鍗曟煡璇㈠垪琛� + [Route("YF_PayMentBill/QueryList")] + [HttpGet] + public object QueryList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = "select * from h_v_YF_PayMentBillQuery where 1 = 1 "; + + if (sWhere == "" || sWhere == null) + { + ds = oCN.RunProcReturn("select * from h_v_YF_PayMentBillQuery order by hmainid desc", "h_v_YF_PayMentBillQuery"); + } + else + { + ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_YF_PayMentBillQuery"); + } + + + + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浠樻鍗曟煡璇㈠瓙鍒楄〃 + [Route("YF_PayMentBill/QuerySubList")] + [HttpGet] + public object QuerySubList(string hmainid, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = "select * from h_v_YF_PayMentBillQuerySub where hmainid = " + hmainid; + + ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_YF_PayMentBillQuerySub"); + + + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 搴斾粯鍗曢┏鍥� [Route("YF_PayMentBill/RejectCheckFlow_POOrderBill")] [HttpGet] -- Gitblit v1.9.1