diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index 6c808bad0..52ce7513b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -449,6 +449,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public List Children { get; set; } } + public class InspectionDto + { + public Guid Id { get; set; } + + public string? JsonDetail { get; set; } + } public class SetTrialShowInspection { diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 16c5e2e3f..925fa3912 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -27,6 +27,39 @@ namespace IRaCIS.Core.Application.Service.Inspection IRepository _frontAuditConfigRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IInspectionService { + /// + /// 根据Id获取稽查记录 + /// + /// + /// + [HttpPost] + public async Task getInspectionById(InspectionDto inDto) + { + var dataInspection = await _dataInspectionRepository.Select(x=> new InspectionDto() + { + Id=x.Id, + JsonDetail = x.JsonDetail, + + }).FirstOrDefaultAsync(); + + return ResponseOutput.Ok(dataInspection); + + } + + + /// + /// 设置稽查记录JsonDetail + /// + /// + /// + [HttpPost] + public async Task SetJsonDetail(InspectionDto inDto) + { + await _dataInspectionRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.Id, u => new DataInspection() { JsonDetail = inDto.JsonDetail }); + + return ResponseOutput.Ok(inDto); + } + /// /// 设置项目稽查配置 ///