稽查列表返回请求相关信息
continuous-integration/drone/push Build is running

This commit is contained in:
2026-09-01 09:10:33 +08:00
parent c04a24fb9b
commit 9bac080be3
@@ -35,11 +35,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
[HttpPost] [HttpPost]
public async Task<IResponseOutput> getInspectionById(InspectionDto inDto) public async Task<IResponseOutput> getInspectionById(InspectionDto inDto)
{ {
var dataInspection = await _dataInspectionRepository.Where(x=>x.Id==inDto.Id).Select(x=> new InspectionDto() var dataInspection = await _dataInspectionRepository.Where(x => x.Id == inDto.Id).Select(x => new InspectionDto()
{ {
Id=x.Id, Id = x.Id,
JsonDetail = x.JsonDetail, JsonDetail = x.JsonDetail,
}).FirstOrDefaultAsync(); }).FirstOrDefaultAsync();
return ResponseOutput.Ok(dataInspection); return ResponseOutput.Ok(dataInspection);
@@ -101,13 +101,13 @@ namespace IRaCIS.Core.Application.Service.Inspection
Description = data.Description, Description = data.Description,
DescriptionCN = data.DescriptionCN, DescriptionCN = data.DescriptionCN,
FrontAuditConfigId = data.Id, FrontAuditConfigId = data.Id,
ParentId= data.ParentId, ParentId = data.ParentId,
Sort=data.Sort, Sort = data.Sort,
IsShow = lefttrialdata != null ? lefttrialdata.IsShow : data.IsDefaultChoice 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 => result.ForEach(x =>
{ {
@@ -130,7 +130,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
#region #region
var query = from data in _dataInspectionRepository.Where() 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 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, IsShow = lefttrialShow != null ? lefttrialShow.IsShow : leftfrontAuditConfig.IsDefaultChoice,
CreateTime = data.CreateTime, CreateTime = data.CreateTime,
CriterionType= leftreadingQuestionCriterionTrial==null? null: leftreadingQuestionCriterionTrial.CriterionType, CriterionType = leftreadingQuestionCriterionTrial == null ? null : leftreadingQuestionCriterionTrial.CriterionType,
CreateUserId = data.CreateUserId, CreateUserId = data.CreateUserId,
ModuleTypeId = leftmoduleTypec.Id, ModuleTypeId = leftmoduleTypec.Id,
BlindName = data.VisitTask.TaskBlindName, BlindName = data.VisitTask.TaskBlindName,
@@ -184,7 +184,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
SubjectVisitId = data.SubjectVisitId, SubjectVisitId = data.SubjectVisitId,
//OptType = data.OptType, //OptType = data.OptType,
IP = data.IP, 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, IsSign = leftfrontAuditConfig.IsHaveSign && lefttrialSign.SignText != null && lefttrialSign.SignText != string.Empty,
SignId = data.SignId, SignId = data.SignId,
ParentId = data.ParentId, ParentId = data.ParentId,
@@ -240,7 +240,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
GeneralId = data.GeneralId, GeneralId = data.GeneralId,
TrialReadingCriterionId = data.TrialReadingCriterionId, 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) query = query.WhereIf(inQuery.TrialSiteId != null, x => x.TrialSiteId == inQuery.TrialSiteId)