模块类型
parent
8a7cdc6313
commit
3f1b3f02ec
|
@ -28,7 +28,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<List<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument)
|
public async Task<List<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var commonDocumentQueryable = _commonDocumentRepository.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider);
|
var commonDocumentQueryable = _commonDocumentRepository.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await commonDocumentQueryable.ToListAsync();
|
return await commonDocumentQueryable.ToListAsync();
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public class CommonDocumentView : CommonDocumentAddOrEdit
|
public class CommonDocumentView : CommonDocumentAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
||||||
//public string FileType { get; set; } = String.Empty;
|
public string FileType { get; set; } = String.Empty;
|
||||||
//public string ModuleType { get; set; } = String.Empty;
|
public string ModuleType { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
|
@ -43,7 +43,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(o => o.ParentCode, t => t.MapFrom(u => u.Parent.Code));
|
.ForMember(o => o.ParentCode, t => t.MapFrom(u => u.Parent.Code));
|
||||||
|
|
||||||
|
|
||||||
CreateMap<CommonDocument, CommonDocumentView>();
|
CreateMap<CommonDocument, CommonDocumentView>()
|
||||||
|
.ForMember(o => o.FileType, t => t.MapFrom(u => u.FileType.Value))
|
||||||
|
.ForMember(o => o.ModuleType, t => t.MapFrom(u => u.ModuleType.Value));
|
||||||
|
|
||||||
CreateMap<CommonDocument, CommonDocumentAddOrEdit>().ReverseMap();
|
CreateMap<CommonDocument, CommonDocumentAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
|
|
|
@ -54,17 +54,23 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
public UserTypeEnum UserTypeEnum { get; set; }
|
public UserTypeEnum UserTypeEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string OrganizationName { get; set; } = String.Empty;
|
public string OrganizationName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string UserRealName { get; set; } = String.Empty;
|
public string UserRealName { get; set; } = String.Empty;
|
||||||
public string UserName { get; set; } = String.Empty;
|
public string UserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TrialUserExportDTO
|
||||||
|
{
|
||||||
|
public TrialSelectDTO TrialInfo { get; set; }
|
||||||
|
|
||||||
|
public List<TrialMaintenanceDTO> TrialUserList { get; set; } = new List<TrialMaintenanceDTO>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class SiteCRCCommand : UserTrialCommand
|
public class SiteCRCCommand : UserTrialCommand
|
||||||
{
|
{
|
||||||
public Guid SiteId { get; set; }
|
public Guid SiteId { get; set; }
|
||||||
|
|
|
@ -5,6 +5,9 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Contracts.DTO;
|
using IRaCIS.Core.Application.Contracts.DTO;
|
||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
|
using Magicodes.ExporterAndImporter.Core;
|
||||||
|
using Magicodes.ExporterAndImporter.Excel;
|
||||||
|
using Magicodes.ExporterAndImporter.Excel.AspNetCore;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -12,10 +15,12 @@ namespace IRaCIS.Application.Services
|
||||||
public class TrialMaintenanceService : BaseService, ITrialMaintenanceService
|
public class TrialMaintenanceService : BaseService, ITrialMaintenanceService
|
||||||
{
|
{
|
||||||
private readonly IRepository<TrialUser> _trialUseRepository;
|
private readonly IRepository<TrialUser> _trialUseRepository;
|
||||||
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
|
||||||
public TrialMaintenanceService(IRepository<TrialUser> trialUseRepository)
|
public TrialMaintenanceService(IRepository<TrialUser> trialUseRepository,IRepository<Trial> trialRepository)
|
||||||
{
|
{
|
||||||
_trialUseRepository = trialUseRepository;
|
_trialUseRepository = trialUseRepository;
|
||||||
|
_trialRepository = trialRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -41,6 +46,25 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> TrialUserListExport(Guid trialId)
|
||||||
|
{
|
||||||
|
var list = _trialUseRepository.Where(t => t.TrialId == trialId).IgnoreQueryFilters()
|
||||||
|
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
//var trialInfo= _re
|
||||||
|
|
||||||
|
IExporter exporter = new ExcelExporter();
|
||||||
|
|
||||||
|
var result = await exporter.ExportAsByteArray(list);
|
||||||
|
|
||||||
|
|
||||||
|
return new XlsxFileResult(bytes: result, fileDownloadName: $"检查导出_{DateTime.Now.ToString("yyyy-MM-dd:hh:mm:ss")}.xlsx");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
public Guid ModuleId { get; set; }
|
public Guid ModuleId { get; set; }
|
||||||
|
|
||||||
}
|
|
||||||
|
public Dictionary FileType { get; set; }
|
||||||
|
|
||||||
|
public Dictionary ModuleType { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue