修改稽查和界面统计 需要迁移02
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2023-11-23 15:08:53 +08:00
parent 767c24dd56
commit 14826ee44b
2 changed files with 116 additions and 42 deletions

View File

@ -208,8 +208,9 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeRepliedCount > 0);
var defalutSortArray = new string[] { nameof(CheckToBeDoneDto.UrgentCount) + " desc", nameof(CheckToBeDoneDto.ToBeCheckedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(CheckToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var totalToBeCheckedCount = await _subjectVisitRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
.Where(u => u.CheckState == CheckStateEnum.ToCheck).CountAsync();
@ -251,7 +252,9 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeApprovalCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApplyToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ReReadingApplyToBeDoneDto.UrgentCount) + " desc", nameof(ReReadingApplyToBeDoneDto.ToBeApprovalCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeApprovalCount = _visitTaskReReadingRepository
@ -288,7 +291,10 @@ namespace IRaCIS.Core.Application
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count()
}).Where(x => x.ToBeApprovalCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ReviewerSelectToBeDoneDto.IsUrgent) + " desc", nameof(ReReadingApplyToBeDoneDto.ToBeApprovalCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync();
@ -320,7 +326,11 @@ namespace IRaCIS.Core.Application
ToBeApprovalCount = t.ReadModuleList.Where(u => u.IsCRCConfirm && !u.IsPMConfirm).Count()
}).Where(x => x.ToBeApprovalCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(GetPMClinicalDataToBeDoneListOutDto.ToBeApprovalCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var all = await _trialRepository
@ -365,7 +375,11 @@ namespace IRaCIS.Core.Application
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count()
}).Where(x => x.ToBeApprovalCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ReviewerSelectToBeDoneDto.IsUrgent) + " desc", nameof(ReviewerSelectToBeDoneDto.ToBeApprovalCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync();
@ -403,7 +417,10 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeApprovalCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApprovalToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ReReadingApprovalToBeDoneDto.UrgentCount) + " desc", nameof(ReReadingApprovalToBeDoneDto.ToBeApprovalCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeApprovalCount = _visitTaskReReadingRepository
.Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -447,7 +464,9 @@ namespace IRaCIS.Core.Application
ReadModuleCount = t.ReadModuleList.Where(x => !x.IsPMConfirm).Count(),
}).Where(x => x.ToBeDealedCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageClinicalDataToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageClinicalDataToBeDoneDto.UrgentCount) + " desc", nameof(ImageClinicalDataToBeDoneDto.ToBeDealedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
//.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.Trial.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
@ -486,7 +505,10 @@ namespace IRaCIS.Core.Application
ReadModuleCount = t.ReadModuleList.Where(x => !x.IsPMConfirm).Count(),
}).Where(x => x.ReadModuleCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageClinicalDataToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageClinicalDataToBeDoneDto.UrgentCount) + " desc", nameof(ImageClinicalDataToBeDoneDto.ToBeDealedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
//.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.Trial.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
@ -533,7 +555,10 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeDealedCount > 0); ;
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageQuestionToBeDoneDto.UrgentCount) + " desc", nameof(ImageQuestionToBeDoneDto.ToBeDealedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -575,9 +600,10 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeReplyedCount > 0);
var defalutSortArray = new string[] { nameof(ImageCheckQuestionToBeDoneDto.UrgentCount) + " desc", nameof(ImageCheckQuestionToBeDoneDto.ToBeReplyedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageCheckQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var toBeDealedCount = _subjectVisitRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -620,7 +646,10 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeReUploadCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageReUploadToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageReUploadToBeDoneDto.UrgentCount) + " desc", nameof(ImageReUploadToBeDoneDto.ToBeReUploadCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -664,7 +693,12 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeDealedCount > 0); ;
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageSubmittedToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageSubmittedToBeDoneDto.UrgentCount) + " desc", nameof(ImageSubmittedToBeDoneDto.ToBeDealedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -717,7 +751,11 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQualityToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageQualityToBeDoneDto.UrgentCount) + " desc", nameof(ImageQualityToBeDoneDto.ToBeClaimedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeClaimedCount = _subjectVisitRepository
@ -762,7 +800,10 @@ namespace IRaCIS.Core.Application
}).Where(x => x.ToBeDealedCount > 0); ;
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var defalutSortArray = new string[] { nameof(ImageQuestionToBeDoneDto.UrgentCount) + " desc", nameof(ImageQuestionToBeDoneDto.ToBeDealedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _subjectVisitRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -903,8 +944,9 @@ namespace IRaCIS.Core.Application
#endregion
var defalutSortArray = new string[] { nameof(IRImageReadingToBeDoneDto.UrgentCount) + " desc", nameof(IRImageReadingToBeDoneDto.UnReadCount) + " desc" };
var result = await newQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(IRImageReadingToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var result = await newQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var toBeDealedCount = _trialRepository
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -969,9 +1011,14 @@ namespace IRaCIS.Core.Application
//ToBeReplyedCount = g.Where(u =>
// u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
});
}).Where(t => t.ToBeReplyedCount > 0);
var defalutSortArray = new string[] { nameof(MedicalCommentsToBeDoneDto.UrgentCount) + " desc", nameof(MedicalCommentsToBeDoneDto.ToBeReplyedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(MedicalCommentsToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var toBeDealedCount = _taskMedicalReviewRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
@ -1036,13 +1083,16 @@ namespace IRaCIS.Core.Application
ToBeReviewedCount = g.Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count()
});
}).Where(t => t.ToBeReplyedCount > 0);
#endregion
var defalutSortArray = new string[] { nameof(MedicalCommentsToBeDoneDto.UrgentCount) + " desc", nameof(MedicalCommentsToBeDoneDto.ToBeReplyedCount) + " desc" };
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(MedicalCommentsToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
var toBeReplyedQuery = _taskMedicalReviewRepository
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))

View File

@ -1534,6 +1534,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common
});
}
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteUserSurvey)))
{
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialSiteUserSurvey;
await InsertInspection<TrialSiteUserSurvey>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false
});
}
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteEquipmentSurvey)))
{
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialSiteEquipmentSurvey;
await InsertInspection<TrialSiteEquipmentSurvey>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false
});
}
#endregion