New file |
| | |
| | | using 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(); |
| | | } |
| | | } |
| | | } |