From 987e39a7df25b94c28ad03165edfeb7fef5405a8 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 10 九月 2024 09:44:04 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs index d66ac75..da7070d 100644 --- a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs +++ b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs @@ -9,6 +9,7 @@ using System.Web.Http; using WebAPI.Models; using System.Windows.Forms; +using SyntacticSugar.constant; namespace WebAPI.Controllers { @@ -1843,5 +1844,55 @@ } } #endregion + + + #region 閿�鍞嚭搴撳崟涓嬫帹鏌ヨ鍒楄〃 + [Route("Kf_SellOutBill/PushList")] + [HttpGet] + public object PushList(string HBillNo, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = "select * from h_v_IF_SellOutBillList_EditInit where 鍗曟嵁鍙� = '" + HBillNo + "' and 鐘舵�� = '宸插鏍�' and 鏁伴噺 - 鍏宠仈鏁伴噺 > 0"; + + + ds = oCN.RunProcReturn(sql, "h_v_IF_SellOutBillList_EditInit"); + + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鎵句笉鍒扮鍚堟潯浠跺崟鎹�!"; + objJsonResult.data = null; + return objJsonResult; + } + + + 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