From bb09ad7c389f6100f6d3b9882ec377ebb3dab9a1 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 08 八月 2023 11:09:15 +0800 Subject: [PATCH] 扣补项目费用单_横向展示 --- WebAPI/Controllers/工资管理/Pay_DuSubsidyItemBillController.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" index ef87cdc..c4b7cf1 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" @@ -1369,5 +1369,51 @@ } #endregion #endregion + + #region 鎵hˉ椤圭洰璐圭敤鍗昣璐圭敤妯悜鏄剧ず 鑾峰彇鎵hˉ椤圭洰 + [Route("Pay_DuSubsidyItemBill_KS/getInitGrid_KS")] + [HttpGet] + public object getInitGrid_KS() + { + try + { + //鑾峰彇鏈鐢ㄧ殑鎵hˉ椤圭洰 + string sql = "select * from Gy_DuSubsidyItem where HStopFlag = 0"; + ds = oCN.RunProcReturn(sql, "Gy_DuSubsidyItem"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒扮浉鍏虫墸琛ラ」鐩紒"; + objJsonResult.data = null; + return objJsonResult; + } + //澶勭悊鎵hˉ椤圭洰 + List<object> columnNameList = new List<object>(); + for(int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + string field = ds.Tables[0].Rows[i]["HItemID"].ToString(); + string title = ds.Tables[0].Rows[i]["HName"].ToString(); + string dataType = "decimal(18,2)"; + string ColmString = "{\"field\":\"" + field + "\",\"title\":\"" + title + "\",\"dataType\":\"" + dataType + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file -- Gitblit v1.9.1