From 8e850782329bf032220a4bc396d895f14ad80f9c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 11 Aug 2026 13:35:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiteSurvey/TrialSiteSurveyService.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index deeb0691f..a2cd24c05 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1190,12 +1190,19 @@ namespace IRaCIS.Core.Application.Contracts var queitUserTypeIdList = needQuitUserList.Select(t => t.UserTypeId).ToList(); - - await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && queitUserTypeIdList.Contains(t.UserRole.UserTypeId), c => new TrialSiteUserRole() + foreach (var item in needQuitUserList) { - IsDeleted = true, - DeletedTime = DateTime.Now, - }); + await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId + && t.UserRole.UserTypeId == item.UserTypeId + && t.UserRole.IdentityUserId == item.SystemUserId, c => new TrialSiteUserRole() + { + IsDeleted = true, + DeletedTime = DateTime.Now, + }); + } + + + await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.UserRoleId, ReviewerTime = DateTime.Now }); From 3cf60f3e9ed8026f3fb1a0afeebff5c6ef907621 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 11 Aug 2026 17:21:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=94=B9=E4=B8=BA=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiteSurvey/DTO/TrialSiteSurveyViewModel.cs | 4 ++-- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index 842444f73..9ffc200c5 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -488,7 +488,7 @@ namespace IRaCIS.Core.Application.Contracts public string TrialSiteAliasName { get; set; } = String.Empty; } - public class SiteSurveyEquipmentQuery + public class SiteSurveyEquipmentQuery : PageInput { [NotDefault] public Guid TrialId { get; set; } @@ -497,7 +497,7 @@ namespace IRaCIS.Core.Application.Contracts public string? TrialSiteName { get; set; } } - public class SiteSurveyInfoQuery + public class SiteSurveyInfoQuery : PageInput { [NotDefault] public Guid TrialId { get; set; } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index a2cd24c05..c5a2fc105 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1465,17 +1465,17 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyEquipmentList(SiteSurveyEquipmentQuery inQuery) { - var list = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + var pageList = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || t.TrialSiteSurvey.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteName)) - .ProjectTo(_mapper.ConfigurationProvider).ToList(); + .ProjectTo(_mapper.ConfigurationProvider).ToPagedListAsync(inQuery); var siteSurveryConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty; var config = JsonConvert.DeserializeObject(siteSurveryConfig) ?? new TrialExtraConfig(); - return ResponseOutput.Ok(list, config); + return ResponseOutput.Ok(pageList, config); } /// @@ -1486,16 +1486,16 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyInfoList(SiteSurveyInfoQuery inQuery) { - var list = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + var pageList = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) - .ProjectTo(_mapper.ConfigurationProvider).ToList(); + .ProjectTo(_mapper.ConfigurationProvider).ToPagedListAsync(inQuery); var siteSurveryConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty; var config = JsonConvert.DeserializeObject(siteSurveryConfig) ?? new TrialExtraConfig(); - return ResponseOutput.Ok(list, config); + return ResponseOutput.Ok(pageList, config); } /// From 3850be9ab85c4038a6ad64235446fbb7e4c9d1ea Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 11 Aug 2026 17:36:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E7=A0=94=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 14 ++++++++++++++ .../SiteSurvey/DTO/TrialSiteSurveyViewModel.cs | 8 ++++++++ .../Service/SiteSurvey/TrialSiteSurveyService.cs | 9 +++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index d848555a1..aa9be20bd 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -19588,6 +19588,20 @@ + + + 调研表基本信息 + + + + + + + SPM 是否参与流程 + + + + TrialSiteUserSurveyService diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index 9ffc200c5..c653b9082 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -492,6 +492,8 @@ namespace IRaCIS.Core.Application.Contracts { [NotDefault] public Guid TrialId { get; set; } + + public Guid? TrialSiteId { get; set; } public string? TrialSiteCode { get; set; } public string? TrialSiteName { get; set; } @@ -501,6 +503,12 @@ namespace IRaCIS.Core.Application.Contracts { [NotDefault] public Guid TrialId { get; set; } + + public Guid? TrialSiteId { get; set; } + + public string? TrialSiteCode { get; set; } + + public string? TrialSiteName { get; set; } } public class SiteSurveyInfoDto diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index c5a2fc105..512f01876 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1465,7 +1465,8 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyEquipmentList(SiteSurveyEquipmentQuery inQuery) { - var pageList = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + var pageList = await _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId==inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || t.TrialSiteSurvey.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteName)) @@ -1486,7 +1487,11 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyInfoList(SiteSurveyInfoQuery inQuery) { - var pageList = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + var pageList = await _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) + .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || + t.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteName)) .ProjectTo(_mapper.ConfigurationProvider).ToPagedListAsync(inQuery);