diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportHelper.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportHelper.cs index 8753024f7..33230b3b4 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportHelper.cs @@ -38,7 +38,7 @@ public static class ExcelExportHelper return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { - FileDownloadName = $"{exportFileNamePrefix}_{doc.Name.Substring(0,doc.Name.LastIndexOf('.'))}——{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx" + FileDownloadName = $"{exportFileNamePrefix}_{doc.Name.Substring(0,doc.Name.LastIndexOf('.'))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx" }; #endregion diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 729d37e80..85fe3ac58 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -10,11 +10,18 @@ namespace IRaCIS.Application.Services [ ApiExplorerSettings(GroupName = "Institution")] public class TestService : BaseService { + private readonly IRepository _dicRepository; + + public TestService(IRepository dicRepository) + { + _dicRepository = dicRepository; + } + [HttpPost] public string Get(testModel testModel) { - var c = _repository.Where().Select(t=>t.MappedValue).First(); + var c = _dicRepository.Where(t=>t.ParentId!=null).Select(t=>t.MappedValue).First(); CultureInfo culture = CultureInfo.CurrentUICulture; var a = 123; diff --git a/IRaCIS.Core.Domain/Common/Dictionary.cs b/IRaCIS.Core.Domain/Common/Dictionary.cs index 7cfe4f367..b41de14d5 100644 --- a/IRaCIS.Core.Domain/Common/Dictionary.cs +++ b/IRaCIS.Core.Domain/Common/Dictionary.cs @@ -9,21 +9,9 @@ namespace IRaCIS.Core.Domain.Models [Table("Dictionary")] public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd { - private readonly IUserInfo _userInfo; public List DoctorDicRelationList { get; set; } = new List(); - //³£¹æµ÷Óà - public Dictionary() - { - - } - - public Dictionary(IUserInfo userInfo ) - { - _userInfo = userInfo; - } - [Column("Value")] public string Value { get; set; } = string.Empty; @@ -72,7 +60,7 @@ namespace IRaCIS.Core.Domain.Models //²âÊÔ [NotMapped] - public string MappedValue => _userInfo.IsEn_Us ? Value : ValueCN; + public string MappedValue { get; set; } }