导出名称
parent
0c0d0a504b
commit
0e7e405fb5
|
@ -38,7 +38,7 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
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
|
#endregion
|
||||||
|
|
|
@ -10,11 +10,18 @@ namespace IRaCIS.Application.Services
|
||||||
[ ApiExplorerSettings(GroupName = "Institution")]
|
[ ApiExplorerSettings(GroupName = "Institution")]
|
||||||
public class TestService : BaseService
|
public class TestService : BaseService
|
||||||
{
|
{
|
||||||
|
private readonly IRepository<Dictionary> _dicRepository;
|
||||||
|
|
||||||
|
public TestService(IRepository<Dictionary> dicRepository)
|
||||||
|
{
|
||||||
|
_dicRepository = dicRepository;
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public string Get(testModel testModel)
|
public string Get(testModel testModel)
|
||||||
{
|
{
|
||||||
|
|
||||||
var c = _repository.Where<Dictionary>().Select(t=>t.MappedValue).First();
|
var c = _dicRepository.Where(t=>t.ParentId!=null).Select(t=>t.MappedValue).First();
|
||||||
CultureInfo culture = CultureInfo.CurrentUICulture;
|
CultureInfo culture = CultureInfo.CurrentUICulture;
|
||||||
|
|
||||||
var a = 123;
|
var a = 123;
|
||||||
|
|
|
@ -9,21 +9,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[Table("Dictionary")]
|
[Table("Dictionary")]
|
||||||
public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd
|
public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd
|
||||||
{
|
{
|
||||||
private readonly IUserInfo _userInfo;
|
|
||||||
|
|
||||||
public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();
|
public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();
|
||||||
|
|
||||||
//常规调用
|
|
||||||
public Dictionary()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary(IUserInfo userInfo )
|
|
||||||
{
|
|
||||||
_userInfo = userInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[Column("Value")]
|
[Column("Value")]
|
||||||
public string Value { get; set; } = string.Empty;
|
public string Value { get; set; } = string.Empty;
|
||||||
|
@ -72,7 +60,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
//²âÊÔ
|
//²âÊÔ
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string MappedValue => _userInfo.IsEn_Us ? Value : ValueCN;
|
public string MappedValue { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue