From 359be0508a24daeabe1e687265aa6783961d1221 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 18 九月 2024 18:59:20 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs | 130 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 130 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs index 6c85f51..bf7fca2 100644 --- a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs @@ -8,6 +8,7 @@ using System.Data.SqlClient; using System.Web.Http; using WebAPI.Models; +using SyntacticSugar.constant; namespace WebAPI.Controllers { @@ -257,6 +258,31 @@ { bResult = false; } + + //鑷姩瀹℃牳璁剧疆 + if (refSav == "Add") + { + objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D + //绯荤粺鍙傛暟 鑷姩瀹℃牳 + string sReturn = ""; + if (oSystemParameter.ShowBill(ref sReturn) == true) + { + if (oSystemParameter.omodel.Xs_ReceivableBill_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"; @@ -1506,5 +1532,109 @@ } #endregion + #region 搴旀敹鍗曟煡璇㈠垪琛� + [Route("Xs_ReceivableBill/QueryList")] + [HttpGet] + public object QueryList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + + if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user)) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鏃犳潈闄愭煡鐪�!"; + objJsonResult.data = null; + return objJsonResult; + } + string sql = "select * from h_v_Xs_ReceivableBillQuery where 1 = 1 "; + + if (sWhere == "" || sWhere == null) + { + ds = oCN.RunProcReturn("select * from h_v_Xs_ReceivableBillQuery order by hmainid desc", "h_v_Xs_ReceivableBillQuery"); + } + else + { + ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_Xs_ReceivableBillQuery"); + } + + + + 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("Xs_ReceivableBill/QuerySubList")] + [HttpGet] + public object QuerySubList(string hmainid, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + + if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user)) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鏃犳潈闄愭煡鐪�!"; + objJsonResult.data = null; + return objJsonResult; + } + string sql = "select * from h_v_Xs_ReceivableBillQuerySub where hmainid = " + hmainid; + + ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Xs_ReceivableBillQuerySub"); + + + 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 + } } \ No newline at end of file -- Gitblit v1.9.1