From 9bac080be3e4a700ee55f2fb0a564eea8ad55582 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 1 Sep 2026 09:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E5=88=97=E8=A1=A8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E8=AF=B7=E6=B1=82=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Inspection/InspectionService.cs | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 111366a40..cef4fdb20 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -35,11 +35,11 @@ namespace IRaCIS.Core.Application.Service.Inspection [HttpPost] public async Task getInspectionById(InspectionDto inDto) { - var dataInspection = await _dataInspectionRepository.Where(x=>x.Id==inDto.Id).Select(x=> new InspectionDto() - { - Id=x.Id, - JsonDetail = x.JsonDetail, - + var dataInspection = await _dataInspectionRepository.Where(x => x.Id == inDto.Id).Select(x => new InspectionDto() + { + Id = x.Id, + JsonDetail = x.JsonDetail, + }).FirstOrDefaultAsync(); return ResponseOutput.Ok(dataInspection); @@ -101,13 +101,13 @@ namespace IRaCIS.Core.Application.Service.Inspection Description = data.Description, DescriptionCN = data.DescriptionCN, FrontAuditConfigId = data.Id, - ParentId= data.ParentId, - Sort=data.Sort, + ParentId = data.ParentId, + Sort = data.Sort, IsShow = lefttrialdata != null ? lefttrialdata.IsShow : data.IsDefaultChoice }; - var frontAuditList =await query.ToListAsync(); + var frontAuditList = await query.ToListAsync(); - var result= frontAuditList.Where(x=>x.ParentId==default(Guid)).OrderBy(x=>x.Sort).ToList(); + var result = frontAuditList.Where(x => x.ParentId == default(Guid)).OrderBy(x => x.Sort).ToList(); result.ForEach(x => { @@ -130,7 +130,7 @@ namespace IRaCIS.Core.Application.Service.Inspection #region 逻辑代码 var query = from data in _dataInspectionRepository.Where() - //.Where(x => (x.TrialId == dto.TrialId)||(x.TrialId==null&&x.CreateTime>= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) + //.Where(x => (x.TrialId == dto.TrialId)||(x.TrialId==null&&x.CreateTime>= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) join trial in _trialRepository.Where().IgnoreQueryFilters() on data.TrialId equals trial.Id into trialtemp @@ -173,7 +173,7 @@ namespace IRaCIS.Core.Application.Service.Inspection { IsShow = lefttrialShow != null ? lefttrialShow.IsShow : leftfrontAuditConfig.IsDefaultChoice, CreateTime = data.CreateTime, - CriterionType= leftreadingQuestionCriterionTrial==null? null: leftreadingQuestionCriterionTrial.CriterionType, + CriterionType = leftreadingQuestionCriterionTrial == null ? null : leftreadingQuestionCriterionTrial.CriterionType, CreateUserId = data.CreateUserId, ModuleTypeId = leftmoduleTypec.Id, BlindName = data.VisitTask.TaskBlindName, @@ -184,7 +184,7 @@ namespace IRaCIS.Core.Application.Service.Inspection SubjectVisitId = data.SubjectVisitId, //OptType = data.OptType, IP = data.IP, - Reason = leftfrontAuditConfig.IsHaveReason? data.Reason:string.Empty, + Reason = leftfrontAuditConfig.IsHaveReason ? data.Reason : string.Empty, IsSign = leftfrontAuditConfig.IsHaveSign && lefttrialSign.SignText != null && lefttrialSign.SignText != string.Empty, SignId = data.SignId, ParentId = data.ParentId, @@ -240,7 +240,11 @@ namespace IRaCIS.Core.Application.Service.Inspection GeneralId = data.GeneralId, TrialReadingCriterionId = data.TrialReadingCriterionId, - TrialReadingCriterionName = data.TrialReadingCriterion.CriterionName + TrialReadingCriterionName = data.TrialReadingCriterion.CriterionName, + + DeviceType = data.DeviceType, + Browser = data.Browser, + OS = data.OS }; query = query.WhereIf(inQuery.TrialSiteId != null, x => x.TrialSiteId == inQuery.TrialSiteId)