影响上传导出
parent
1d82214520
commit
fbc9955715
|
@ -3,6 +3,7 @@ using IRaCIS.Core.Application.Helper;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
|
using MiniExcelLibs.OpenXml;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
@ -25,10 +26,10 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
//字典表查询出所有需要翻译的数据
|
//字典表查询出所有需要翻译的数据
|
||||||
|
|
||||||
var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).ToArray());
|
var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).Distinct().ToArray());
|
||||||
|
|
||||||
|
|
||||||
var dic = JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonStr());
|
var dic = JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonNotIgnoreNull());
|
||||||
|
|
||||||
foreach (var key in dic.Keys)
|
foreach (var key in dic.Keys)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +42,7 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
foreach (var item in dic[key] as JArray)
|
foreach (var item in dic[key] as JArray)
|
||||||
{
|
{
|
||||||
var itemDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(item.ToJsonStr());
|
var itemDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(item.ToJsonNotIgnoreNull());
|
||||||
|
|
||||||
|
|
||||||
foreach (var needTranslateProperty in needTranslatePropertyList)
|
foreach (var needTranslateProperty in needTranslatePropertyList)
|
||||||
|
@ -80,7 +81,12 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
var memoryStream = new MemoryStream();
|
var memoryStream = new MemoryStream();
|
||||||
|
|
||||||
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, data);
|
var config = new OpenXmlConfiguration()
|
||||||
|
{
|
||||||
|
IgnoreTemplateParameterMissing = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, data, config);
|
||||||
|
|
||||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|
|
@ -6925,6 +6925,22 @@
|
||||||
<param name="subjectVisitId"></param>
|
<param name="subjectVisitId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.CRCVisitListExport(IRaCIS.Core.Application.Contracts.CRCVisitSearchDTO,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||||
|
<summary>
|
||||||
|
影像上传列表 只导出已上传状态的访视记录
|
||||||
|
</summary>
|
||||||
|
<param name="visitSearchDTO"></param>
|
||||||
|
<param name="_commonDocumentRepository"></param>
|
||||||
|
<param name="_dictionaryService"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.GetQCChallengeList_EXport(IRaCIS.Core.Application.Contracts.ChallengeQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||||
|
<summary>
|
||||||
|
质疑列表
|
||||||
|
</summary>
|
||||||
|
<param name="challengeQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.GetCRCVisitList(IRaCIS.Core.Application.Contracts.CRCVisitSearchDTO)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.GetCRCVisitList(IRaCIS.Core.Application.Contracts.CRCVisitSearchDTO)">
|
||||||
<summary>
|
<summary>
|
||||||
CRC 访视上传列表
|
CRC 访视上传列表
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType }).FirstOrDefaultAsync()).IfNullThrowException();
|
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType,x.IsArbitrationReading,x.IsOncologyReading }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
return (pageList, criterionConfig);
|
return (pageList, criterionConfig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid[] SubjectVisitIds { get; set; }=new Guid[0];
|
public Guid[] SubjectVisitIds { get; set; } = new Guid[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,7 +120,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public class CRCVisitExportDTO
|
public class CRCVisitExportDTO
|
||||||
{
|
{
|
||||||
public ChallengeStateEnum ChallengeState { get; set; }
|
public ChallengeStateEnum ChallengeState { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("YesOrNo")]
|
||||||
public bool IsUrgent { get; set; }
|
public bool IsUrgent { get; set; }
|
||||||
public string BlindName { get; set; } = String.Empty;
|
public string BlindName { get; set; } = String.Empty;
|
||||||
public string VisitName { get; set; } = string.Empty;
|
public string VisitName { get; set; } = string.Empty;
|
||||||
|
@ -134,7 +136,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public DateTime? SubmitTime { get; set; }
|
public DateTime? SubmitTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[DictionaryTranslateAttribute("SubmitState")]
|
[DictionaryTranslateAttribute("SubmitState")]
|
||||||
public SubmitStateEnum SubmitState { get; set; }
|
public SubmitStateEnum SubmitState { get; set; }
|
||||||
|
|
||||||
|
@ -149,6 +151,78 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class QCChanllengeExportDto
|
||||||
|
{
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("Subject_Visit_Status")]
|
||||||
|
public SubjectStatus SubjectState { get; set; }
|
||||||
|
|
||||||
|
public string ChallengeCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public String TrialSiteCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string VisitName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string CreateUserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? LatestMsgTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string LatestReplyUserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string Content { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("YesOrNo")]
|
||||||
|
public bool IsClosed { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ClosedTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DeadlineTime { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("YesOrNo")]
|
||||||
|
public bool IsOverTime => IsClosed ? ClosedTime > DeadlineTime : DateTime.Now > DeadlineTime;
|
||||||
|
|
||||||
|
public string ChallengeDuration
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!ClosedTime.HasValue)
|
||||||
|
return "";
|
||||||
|
else return string.Format("{0}天{1}小时{2}分钟", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public QCChanllengeReuploadEnum ReuploadEnum { get; set; }
|
||||||
|
//public SubmitStateEnum SubmitState { get; set; }
|
||||||
|
//public string? CurrentActionUserName { get; set; }
|
||||||
|
|
||||||
|
//public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
//public DateTime? ReUploadedTime { get; set; }
|
||||||
|
|
||||||
|
//public RequestBackStateEnum RequestBackState { get; set; }
|
||||||
|
|
||||||
|
//public string PreliminaryAuditUserName { get; set; } = String.Empty;
|
||||||
|
//public AuditStateEnum AuditState { get; set; }
|
||||||
|
//public CurrentQC CurrentQCEnum { get; set; }
|
||||||
|
//public string ChallengeType { get; set; } = string.Empty;
|
||||||
|
//public string Note { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class QCCRCVisitViewModel : QCVisitBasicListViewModel
|
public class QCCRCVisitViewModel : QCVisitBasicListViewModel
|
||||||
{
|
{
|
||||||
|
@ -174,7 +248,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public bool IsHaveClinicalData { get; set; }
|
public bool IsHaveClinicalData { get; set; }
|
||||||
|
|
||||||
public string MedicalNo { get; set; }
|
public string MedicalNo { get; set; }
|
||||||
|
|
||||||
public int? Age { get; set; }
|
public int? Age { get; set; }
|
||||||
public string Sex { get; set; } = string.Empty;
|
public string Sex { get; set; } = string.Empty;
|
||||||
|
@ -386,9 +460,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public class CheckDialogDTO
|
public class CheckDialogDTO
|
||||||
{
|
{
|
||||||
public QCCheckViewModel SubjectVisitCheck { get; set; }
|
public QCCheckViewModel SubjectVisitCheck { get; set; }
|
||||||
|
|
||||||
public List<CheckChanllengeDialogDTO> DialogList { get; set; }
|
public List<CheckChanllengeDialogDTO> DialogList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QCCheckViewModel
|
public class QCCheckViewModel
|
||||||
|
|
|
@ -41,7 +41,13 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
#region 导表查询
|
#region 导表查询
|
||||||
|
|
||||||
|
|
||||||
//影像上传列表
|
/// <summary>
|
||||||
|
/// 影像上传列表 只导出已上传状态的访视记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="visitSearchDTO"></param>
|
||||||
|
/// <param name="_commonDocumentRepository"></param>
|
||||||
|
/// <param name="_dictionaryService"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> CRCVisitListExport(CRCVisitSearchDTO visitSearchDTO,
|
public async Task<IActionResult> CRCVisitListExport(CRCVisitSearchDTO visitSearchDTO,
|
||||||
|
@ -49,7 +55,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
[FromServices] IDictionaryService _dictionaryService)
|
[FromServices] IDictionaryService _dictionaryService)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray);
|
var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray);
|
||||||
|
|
||||||
var list = await _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId)
|
var list = await _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId)
|
||||||
|
@ -67,24 +72,54 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.ProjectTo<CRCVisitExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<CRCVisitExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
//var needTranslatePropertyList = typeof(CRCVisitExportDTO).GetProperties().Where(t => t.IsDefined(typeof(DictionaryTranslateAttribute), false))
|
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
// .Select(c => new { c.Name, DicParentCode = ((DictionaryTranslateAttribute?)c.GetCustomAttributes(typeof(DictionaryTranslateAttribute), false)[0])?.DicParentCode }).ToList()
|
|
||||||
// ;
|
|
||||||
|
|
||||||
//var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).ToArray());
|
exportInfo.List = list;
|
||||||
|
|
||||||
//var obj = new { cc = "aa", list };
|
|
||||||
|
|
||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<TrialSelectDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
|
||||||
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, "", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dynamic obj = exportInfo;
|
|
||||||
|
|
||||||
((IDictionary<string, object>)obj).Add("List", list);
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, obj, "", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
/// <summary>
|
||||||
|
/// 质疑列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="challengeQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<IActionResult> GetQCChallengeList_EXport(ChallengeQuery challengeQuery,
|
||||||
|
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
||||||
|
[FromServices] IDictionaryService _dictionaryService)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
var svExpression = QCCommon.GetQCChallengeFilter(challengeQuery.VisitPlanArray);
|
||||||
|
|
||||||
|
var list =await _repository.Where<QCChallenge>(x => x.TrialId == challengeQuery.TrialId)
|
||||||
|
//.WhereIf(challengeQuery.ChallengeState != null, t => t.SubjectVisit.ChallengeState == challengeQuery.ChallengeState)
|
||||||
|
.WhereIf(challengeQuery.ReuploadEnum != null, t => t.ReuploadEnum == challengeQuery.ReuploadEnum)
|
||||||
|
.WhereIf(challengeQuery.IsClosed != null, t => t.IsClosed == challengeQuery.IsClosed)
|
||||||
|
.WhereIf(challengeQuery.SiteId != null, t => t.SubjectVisit.SiteId == challengeQuery.SiteId)
|
||||||
|
.WhereIf(challengeQuery.SubjectId != null, t => t.SubjectVisit.SubjectId == challengeQuery.SubjectId)
|
||||||
|
.WhereIf(challengeQuery.CreateUserId != null, t => t.CreateUserId == challengeQuery.CreateUserId)
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(challengeQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(challengeQuery.SubjectCode))
|
||||||
|
.WhereIf(challengeQuery.VisitPlanArray != null && challengeQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
|
//.WhereIf(!string.IsNullOrEmpty(challengeQuery.VisitPlanInfo), challengeQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.InPlan == false : t => t.SubjectVisit.VisitNum == decimal.Parse(challengeQuery.VisitPlanInfo))
|
||||||
|
.WhereIf(challengeQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == challengeQuery.IsUrgent)
|
||||||
|
.WhereIf(challengeQuery.IsOverTime != null, t => DateTime.Now > t.DeadlineTime)
|
||||||
|
.ProjectTo<QCChanllengeExportDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var exportInfo = (await _trialRepository.Where(t => t.Id == challengeQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
exportInfo.List = list;
|
||||||
|
|
||||||
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, "", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using AutoMapper.EquivalencyExpression;
|
using AutoMapper.EquivalencyExpression;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts.DTO;
|
using IRaCIS.Core.Application.Contracts.DTO;
|
||||||
using IRaCIS.Core.Application.MediatR.CommandAndQueries;
|
using IRaCIS.Core.Application.MediatR.CommandAndQueries;
|
||||||
|
@ -13,17 +14,28 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
#region 导出列表
|
#region 导出列表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CreateMap<SubjectVisit, CRCVisitExportDTO>()
|
CreateMap<Trial, ExcelExportInfo>();
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
CreateMap<SubjectVisit, CRCVisitExportDTO>()
|
||||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||||
|
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
|
||||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
|
||||||
|| t.PreviousSurgeryList.Any() : false));
|
|
||||||
|
|
||||||
|
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||||
|
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||||
|
|| t.PreviousSurgeryList.Any() : false));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CreateMap<QCChallenge, QCChanllengeExportDto>()
|
||||||
|
|
||||||
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
||||||
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode))
|
||||||
|
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||||
|
|
||||||
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||||
|
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
||||||
|
.ForMember(d => d.SubjectState, u => u.MapFrom(s => s.SubjectVisit.Subject.Status));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +97,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<QCQuestion, QCQuestionConfigureView>()
|
CreateMap<QCQuestion, QCQuestionConfigureView>()
|
||||||
.ForMember(d => d.ParentShowOrder, u => u.MapFrom(s => s.ParentQuestion.ShowOrder))
|
.ForMember(d => d.ParentShowOrder, u => u.MapFrom(s => s.ParentQuestion.ShowOrder))
|
||||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentQuestion.QuestionName));
|
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentQuestion.QuestionName));
|
||||||
|
|
||||||
CreateMap<QCQuestion, QCQuestionAddOrEdit>();
|
CreateMap<QCQuestion, QCQuestionAddOrEdit>();
|
||||||
|
|
||||||
|
@ -119,7 +131,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<SubjectVisit, SubjectVisitDTO>();
|
CreateMap<SubjectVisit, SubjectVisitDTO>();
|
||||||
CreateMap<SubjectVisit, SubjectVisitSelectItem>()
|
CreateMap<SubjectVisit, SubjectVisitSelectItem>()
|
||||||
.ForMember(d => d.IsUploadedImage, u => u.MapFrom(s => s.StudyList.Count() > 0 || s.NoneDicomStudyList.SelectMany(u => u.NoneDicomFileList).Count() > 0));
|
.ForMember(d => d.IsUploadedImage, u => u.MapFrom(s => s.StudyList.Count() > 0 || s.NoneDicomStudyList.SelectMany(u => u.NoneDicomFileList).Count() > 0));
|
||||||
|
|
||||||
CreateMap<PreviousPDF, PreviousPDFView>()
|
CreateMap<PreviousPDF, PreviousPDFView>()
|
||||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
||||||
|
|
||||||
|
@ -249,18 +261,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
// 一致性核查文件
|
// 一致性核查文件
|
||||||
CreateMap<ConsistencyCheckFile, GetConsistencyCheckFileDto>()
|
CreateMap<ConsistencyCheckFile, GetConsistencyCheckFileDto>()
|
||||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.User.FirstName +"/"+ t.User.LastName));
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.User.FirstName + "/" + t.User.LastName));
|
||||||
|
|
||||||
|
|
||||||
//CRC 质疑列表
|
//CRC 质疑列表
|
||||||
CreateMap<QCChallenge, QCCRCChallengeViewModel>()
|
CreateMap<QCChallenge, QCCRCChallengeViewModel>()
|
||||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName))
|
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName))
|
||||||
.ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId))
|
.ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId))
|
||||||
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(s => s.SubjectVisit.CurrentActionUserId))
|
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(s => s.SubjectVisit.CurrentActionUserId))
|
||||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.SubjectVisit .CurrentActionUser.UserName))
|
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.SubjectVisit.CurrentActionUser.UserName))
|
||||||
.ForMember(d => d.SubmitState, u => u.MapFrom(s => s.SubjectVisit.SubmitState))
|
.ForMember(d => d.SubmitState, u => u.MapFrom(s => s.SubjectVisit.SubmitState))
|
||||||
|
|
||||||
|
|
||||||
.ForMember(d => d.SiteId, u => u.MapFrom(s => s.SubjectVisit.SiteId))
|
.ForMember(d => d.SiteId, u => u.MapFrom(s => s.SubjectVisit.SiteId))
|
||||||
.ForMember(d => d.AuditState, u => u.MapFrom(s => s.SubjectVisit.AuditState))
|
.ForMember(d => d.AuditState, u => u.MapFrom(s => s.SubjectVisit.AuditState))
|
||||||
.ForMember(d => d.IsUrgent, u => u.MapFrom(s => s.SubjectVisit.IsUrgent))
|
.ForMember(d => d.IsUrgent, u => u.MapFrom(s => s.SubjectVisit.IsUrgent))
|
||||||
|
@ -277,7 +289,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
||||||
.ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)); //排序的时候有坑 把这个带到sql 中去了
|
.ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)); //排序的时候有坑 把这个带到sql 中去了
|
||||||
//.AfterMap((src, dest) => dest.ChallengeCode = "Q" + src.ChallengeCode.ToString("D5"));//实测没有效果
|
//.AfterMap((src, dest) => dest.ChallengeCode = "Q" + src.ChallengeCode.ToString("D5"));//实测没有效果
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,5 +326,5 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,25 +104,30 @@ namespace IRaCIS.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class TrialCRCUploadImageList_Export: ExcelExportTrialInfo
|
public class TrialCRCUploadImageList_Export: ExcelExportInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ExcelExportTrialInfo : TrialSelectDTO
|
public class ExcelExportInfo : TrialSelectDTO
|
||||||
{
|
{
|
||||||
public DateTime CurrentTime { get; set; } = DateTime.Now;
|
public DateTime CurrentTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
|
public object List { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialUserExportDTO : ExcelExportTrialInfo
|
public class TrialUserExportDTO : ExcelExportInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<TrialMaintenanceDTO> TrialUserList { get; set; } = new List<TrialMaintenanceDTO>();
|
public List<TrialMaintenanceDTO> TrialUserList { get; set; } = new List<TrialMaintenanceDTO>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class TrialSiteUserExportDto : ExcelExportTrialInfo
|
public class TrialSiteUserExportDto : ExcelExportInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<SiteUserExportDTO> TrialSiteUserList { get; set; } = new List<SiteUserExportDTO>();
|
public List<SiteUserExportDTO> TrialSiteUserList { get; set; } = new List<SiteUserExportDTO>();
|
||||||
|
@ -136,7 +141,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string TrialSiteAliasName { get; set; } = String.Empty;
|
public string TrialSiteAliasName { get; set; } = String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialSiteUserSummaryExportDto : ExcelExportTrialInfo
|
public class TrialSiteUserSummaryExportDto : ExcelExportInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<TrialSiteUserSummaryDto> TrialSiteUserList { get; set; } = new List<TrialSiteUserSummaryDto>();
|
public List<TrialSiteUserSummaryDto> TrialSiteUserList { get; set; } = new List<TrialSiteUserSummaryDto>();
|
||||||
|
|
|
@ -124,6 +124,8 @@ public static class StaticData
|
||||||
public const string TrialUserList_Export = "TrialUserList_Export";
|
public const string TrialUserList_Export = "TrialUserList_Export";
|
||||||
|
|
||||||
public const string TrialCRCUploadImageList_Export = "TrialCRCUploadImageList_Export";
|
public const string TrialCRCUploadImageList_Export = "TrialCRCUploadImageList_Export";
|
||||||
|
|
||||||
|
public const string TrialQCImageChanllengeList_Export = "TrialQCImageChanllengeList_Export";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,5 +29,16 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(obj, new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss", ReferenceLoopHandling = ReferenceLoopHandling.Ignore, NullValueHandling = NullValueHandling.Ignore });
|
return JsonConvert.SerializeObject(obj, new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss", ReferenceLoopHandling = ReferenceLoopHandling.Ignore, NullValueHandling = NullValueHandling.Ignore });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将对象序列化成稽查需要的Json字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string ToJsonNotIgnoreNull(this object obj)
|
||||||
|
{
|
||||||
|
|
||||||
|
return JsonConvert.SerializeObject(obj, new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss", ReferenceLoopHandling = ReferenceLoopHandling.Ignore, NullValueHandling = NullValueHandling.Include });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue