From 3bf26dbbefb7abf0d9a2297d3d6c234d338e89d0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 14 May 2024 15:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Inspection/DTO/InspectionModel.cs | 1 + .../Service/Inspection/InspectionService.cs | 3 ++- .../Service/Management/DTO/UserLogViewModel.cs | 1 + IRaCIS.Core.Application/Service/Management/UserService.cs | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index 3ff512ed3..1fe3ba77c 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -509,6 +509,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public Guid? TrialReadingCriterionId { get; set; } + public string? TaskName { get; set; } } public class InspectionBase diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index f3d7b52e8..ad6e6268b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -183,8 +183,9 @@ namespace IRaCIS.Core.Application.Service.Inspection .WhereIf(dto.BatchId != null, x => x.BatchId == dto.BatchId) .WhereIf(dto.BatchId == null && dto.GeneralId != null, x => x.GeneralId == dto.GeneralId) .WhereIf(dto.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId) - + + .WhereIf(!dto.TaskName.IsNullOrEmpty(), x => x.TaskName.Contains(dto.TaskName) || x.BlindName.Contains(dto.TaskName)) .WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) .WhereIf(!dto.RoleName.IsNullOrEmpty(), x => x.RoleName.Contains(dto.RoleName)) //.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs index 5f205ff5b..ba6c604d9 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs @@ -57,6 +57,7 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? UserTypeId { get; set; } + public Guid? UserId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index e73b2798b..8ccd625d6 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -761,6 +761,7 @@ namespace IRaCIS.Application.Services _userLogRepository .WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && (c.UserId == t.LoginUserId || c.UserId == t.OptUserId))) .WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType) + .WhereIf(inQuery.UserId != null, t => t.LoginUserId == inQuery.UserId) .WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate) .WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate) .WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.LoginUser.UserName.Contains(inQuery.LoginUserName!))