Compare commits
2 Commits
9f19dfceac
...
34e9269916
| Author | SHA1 | Date |
|---|---|---|
|
|
34e9269916 | |
|
|
29d50fdd2d |
|
|
@ -449,6 +449,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
public List<GetTrialShowInspectionOutDto> Children { get; set; }
|
public List<GetTrialShowInspectionOutDto> Children { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class InspectionDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public string? JsonDetail { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class SetTrialShowInspection
|
public class SetTrialShowInspection
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,39 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
IRepository<FrontAuditConfig> _frontAuditConfigRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IInspectionService
|
IRepository<FrontAuditConfig> _frontAuditConfigRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IInspectionService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据Id获取稽查记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> getInspectionById(InspectionDto inDto)
|
||||||
|
{
|
||||||
|
var dataInspection = await _dataInspectionRepository.Select(x=> new InspectionDto()
|
||||||
|
{
|
||||||
|
Id=x.Id,
|
||||||
|
JsonDetail = x.JsonDetail,
|
||||||
|
|
||||||
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(dataInspection);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置稽查记录JsonDetail
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> SetJsonDetail(InspectionDto inDto)
|
||||||
|
{
|
||||||
|
await _dataInspectionRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.Id, u => new DataInspection() { JsonDetail = inDto.JsonDetail });
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(inDto);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置项目稽查配置
|
/// 设置项目稽查配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1074,28 +1074,28 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
private async Task VerifyTaskIsSign(Guid visitTaskid)
|
private async Task VerifyTaskIsSign(Guid visitTaskid)
|
||||||
{
|
{
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskid).FirstNotNullAsync();
|
//var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskid).FirstNotNullAsync();
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.ReadingTaskState == ReadingTaskState.HaveSigned))
|
//if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.ReadingTaskState == ReadingTaskState.HaveSigned))
|
||||||
{
|
//{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_BeSigned"]);
|
// throw new BusinessValidationFailedException(_localizer["ReadingImage_BeSigned"]);
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.TaskState != TaskState.Effect))
|
//if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.TaskState != TaskState.Effect))
|
||||||
{
|
//{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Beinvalid"]);
|
// throw new BusinessValidationFailedException(_localizer["ReadingImage_Beinvalid"]);
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
//if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||||
&& x.IsAnalysisCreate && taskInfo.IsAnalysisCreate
|
//&& x.IsAnalysisCreate && taskInfo.IsAnalysisCreate
|
||||||
&& x.SubjectId == taskInfo.SubjectId && x.TaskState == TaskState.Effect &&
|
//&& x.SubjectId == taskInfo.SubjectId && x.TaskState == TaskState.Effect &&
|
||||||
((x.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && x.DoctorUserId == taskInfo.DoctorUserId) || x.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
//((x.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && x.DoctorUserId == taskInfo.DoctorUserId) || x.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
||||||
|
|
||||||
))
|
//))
|
||||||
{
|
//{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_PresenceReview"]);
|
// throw new BusinessValidationFailedException(_localizer["ReadingImage_PresenceReview"]);
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue