From 0d20fe0cb1199f4e5b7b3fdb8d8ab875b196b807 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期五, 23 八月 2024 10:42:08 +0800
Subject: [PATCH] 11
---
WebAPI/Controllers/GG_NoticeController.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs
index 6d253d8..0753af0 100644
--- a/WebAPI/Controllers/GG_NoticeController.cs
+++ b/WebAPI/Controllers/GG_NoticeController.cs
@@ -306,5 +306,51 @@
}
#endregion
+ /// <summary>
+ /// 鏍规嵁鐢ㄦ埛鍚嶈幏鍙栧叕鍛婂垪琛�
+ /// </summary>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("GG_Notice/notices")]
+ [HttpGet]
+ public object getNotices(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ var sql = "select top(10) m.HMakeDate as 鏃ユ湡, m.HLevel as 绱ф�ョ▼搴�, m.HContext as 涓婚 " +
+ " , m.HSendMan as 鍙戦�佷汉, s.HReceiveMan as 鎺ユ敹浜�, d.HName as 鍙戦�侀儴闂� " +
+ " from OA_InformBillMain as m" +
+ " inner join OA_InformBillSub as s on m.HInterID = s.HInterID" +
+ " left join Gy_Department d on m.HDeptID = d.HItemID" +
+ " where 1 = 1 and" + " s.HReceiveMan =" + "'" + user + "'" +
+ " order by m.HMakeDate desc";
+
+ ds = new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain");
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch(Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
}
}
--
Gitblit v1.9.1