修改展示样式,修改排序,增加查询条件

IRC_NewDev
hang 2024-04-01 11:02:21 +08:00
parent ba984f9263
commit a8da0c0b55
3 changed files with 9 additions and 4 deletions

View File

@ -71,7 +71,7 @@ namespace IRaCIS.Core.Application.ViewModel
{ {
if (!ReadingDurationTimeSpan.HasValue) if (!ReadingDurationTimeSpan.HasValue)
return ""; return "";
else return string.Format("{0}d {1}h {2}min", (SignTime - FirstReadingTime)?.Days, (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes) else return string.Format("{0}h:{1}m:{2}s", (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes, (SignTime - FirstReadingTime)?.Seconds)
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/; /*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
} }
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Web;
using IRaCIS.Application.Contracts; using IRaCIS.Application.Contracts;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
@ -274,7 +275,9 @@ namespace IRaCIS.Core.Application.Contracts
public Guid? SponsorId { get; set; } public Guid? SponsorId { get; set; }
public CriterionType? CriterionType { get; set; }
public string? PM_EMail { get; set; }
} }
public class TrialToBeDoneDto : TrialBaseInfoDto public class TrialToBeDoneDto : TrialBaseInfoDto

View File

@ -971,7 +971,7 @@ namespace IRaCIS.Core.Application
#endregion #endregion
var defalutSortArray = new string[] { nameof(IRImageReadingToBeDoneDto.UrgentCount) + " desc", nameof(IRImageReadingToBeDoneDto.UnReadCount) + " desc" }; var defalutSortArray = new string[] { nameof(IRImageReadingToBeDoneDto.TrialCode) ,nameof(IRImageReadingToBeDoneDto.UrgentCount) + " desc", nameof(IRImageReadingToBeDoneDto.UnReadCount) + " desc" };
var result = await newQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray); var result = await newQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
@ -1465,6 +1465,8 @@ namespace IRaCIS.Core.Application
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo)) .WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false)
.WhereIf(inQuery.CriterionType != null, o => o.ReadingQuestionCriterionTrialList.Any(t=>t.CriterionType==inQuery.CriterionType))
.WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserList.Any(t => t.User.EMail == inQuery.PM_EMail))
.Select(t => new TrialToBeDoneDto() .Select(t => new TrialToBeDoneDto()
{ {
TrialId = t.Id, TrialId = t.Id,
@ -1525,9 +1527,9 @@ namespace IRaCIS.Core.Application
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0, .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0,
IR_ReadingCriterionList =isIR ? t.ReadingQuestionCriterionTrialList.Where(t=>t.IsConfirm && t.IsSigned).Select(t=>t.CriterionName).ToList():null, IR_ReadingCriterionList =isIR ? t.ReadingQuestionCriterionTrialList.Where(t=>t.IsConfirm && t.IsSigned).Select(t=>t.CriterionName).Order().ToList():null,
IR_PMEmailList= isIR ? t.TrialUserList.Where(t=>t.User.UserTypeEnum==UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).Select(t => t.User.EMail).ToList() : null, IR_PMEmailList= isIR ? t.TrialUserList.Where(t=>t.User.UserTypeEnum==UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).Select(t => t.User.EMail).Order().ToList() : null,
IR_TotalReadCount= isIR ? t.VisitTaskList.Where(t=>t.DoctorUserId==_userInfo.Id && t.TaskState==TaskState.Effect && t.ReadingTaskState==ReadingTaskState.HaveSigned).Count():0, IR_TotalReadCount= isIR ? t.VisitTaskList.Where(t=>t.DoctorUserId==_userInfo.Id && t.TaskState==TaskState.Effect && t.ReadingTaskState==ReadingTaskState.HaveSigned).Count():0,