From 479b6cfc60113f692f6f9146bcd7b9231a32b0e8 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期六, 08 二月 2025 09:07:57 +0800
Subject: [PATCH] Merge branch 'cyronghe'

---
 cylsg/cylsg.Application/CyOS/CyOSSettingController.cs |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs
new file mode 100644
index 0000000..5442385
--- /dev/null
+++ b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs
@@ -0,0 +1,67 @@
+锘縰sing cylsg.Model.ECTEModel;
+using ECTESTOA;
+using EzCoreNet.Redis;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace cylsg.Application.CyOS
+{
+    /// <summary>
+    /// 宸濆嵃閫氱敤淇℃伅鑾峰彇
+    /// </summary>
+    public class CYOSSettingController: IDynamicApiController
+    {
+
+        private readonly ISqlSugarClient _client;
+        private readonly IOAServices _oAServices;
+        private readonly IEzCoreNetRedisService _eZCoreNetRedisService;
+         
+        public CYOSSettingController( ISqlSugarClient client,IOAServices oAServices,IEzCoreNetRedisService netRedisService )
+        {
+            _client = client.AsTenant().GetConnection("ECTESTOADB");
+            _oAServices = oAServices;
+            _eZCoreNetRedisService = netRedisService;
+        }
+
+        /// <summary>
+        /// 鑾峰彇閮ㄩ棬鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public async Task< List<OaDepartment>> GetDepartLstt()
+        {
+            return await _client.Queryable<OaDepartment>().Where(x=>x.Status== "鍚敤"&&x.FirmId== _oAServices.firmId).Select(x=>new OaDepartment
+            {
+                  Name=x.Name,
+                    Keyid=x.Keyid,
+                     Remark=x.Remark,
+            }).WithCache(3600).ToListAsync();
+        }
+        /// <summary>
+        /// 鑾峰彇绉戠洰鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public async Task<List<OaSubjectSet>> getKeMuList()
+        {
+            return await _client.Queryable<OaSubjectSet>().Where(x => x.Status == true && x.FirmId == _oAServices.firmId&& x.SubjectType=="璐�").Select(x => new OaSubjectSet
+            {
+                SubjectName = x.SubjectName,
+                Keyid = x.Keyid,
+                Remark = x.Remark,
+            }).WithCache(3600).ToListAsync();
+        }
+        /// <summary>
+        /// 鑾峰彇娴佹按鍙�
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public  string GetShowID()
+        {
+          return   _eZCoreNetRedisService.GetYYYMMddAnd4sn();
+        }
+    }
+}

--
Gitblit v1.9.1