From 2b424ff45c2b90f230453a31c54bbf9900a93e05 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 13 Jun 2024 17:42:04 +0800 Subject: [PATCH] =?UTF-8?q?site=20=E8=B0=83=E7=A0=94=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiteSurvey/DTO/TrialSiteSurveyViewModel.cs | 2 ++ .../Service/SiteSurvey/TrialSiteSurveyService.cs | 8 ++++++-- IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs | 11 +++++++++++ IRaCIS.Core.Domain/Trial/Trial.cs | 3 +++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index aceccc161..38904e2cf 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -67,6 +67,8 @@ namespace IRaCIS.Core.Application.Contracts public List TrialSiteEquipmentSurveyList { get; set; } = new List(); public List TrialSiteUserSurveyList { get; set; } = new List(); + + public List FileConfigList { get; set; } = new List(); } public class TrialSiteUserSurveyAllDTO : TrialSiteUserSurveyView diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 52e7c802e..96a3c8bc8 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -22,6 +22,8 @@ using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Application.ViewModel; using Medallion.Threading; using Microsoft.Extensions.Options; +using NPOI.SS.Formula.Functions; +using Newtonsoft.Json; namespace IRaCIS.Core.Application.Contracts { @@ -386,10 +388,12 @@ namespace IRaCIS.Core.Application.Contracts } - - var result = await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId && t.TrialId == trialId).IgnoreQueryFilters() .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); + + var siteSurveryConfig= _trialSiteSurveyRepository.Where(t=>t.Id == trialSiteSurveyId).Select(t=>t.Trial.SiteSurveyConfigJsonStr).FirstOrDefault(); + + result.FileConfigList= JsonConvert.DeserializeObject>(siteSurveryConfig) ?? new List(); return result; } diff --git a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs index 8a794bf0e..655849cbd 100644 --- a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs +++ b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs @@ -39,6 +39,17 @@ } + public class SiteSurveyFiledConfig + { + public string NotShowField { get; set; } + + public string NeedMofifyFiled { get; set; } + + public string ReplaceContent { get; set; } + + public string ReplaceContentCN { get; set; } + } + public enum DeclarationType { Other=3, diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 7a714aea5..20d54c291 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -182,6 +182,9 @@ namespace IRaCIS.Core.Domain.Models + //public List + + public string SiteSurveyConfigJsonStr { get; set; } = string.Empty; public bool VisitPlanConfirmed { get; set; }