diff --git a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs index 751d5f1..8fe18e6 100644 --- a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs +++ b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs @@ -278,7 +278,16 @@ namespace Shentun.Peis.RegisterChecks { throw new UserFriendlyException("input参数不能为空"); } - var registerCheck = await _registerCheckRepository.GetAsync(input.RegisterCheckId); + if (input.RegisterCheckItems == null) + { + throw new UserFriendlyException("RegisterCheckItems参数不能为空"); + } + if(!input.RegisterCheckItems.Where(o=>!string.IsNullOrWhiteSpace(o.Result)).ToList().Any()) + { + throw new UserFriendlyException("明细结果不能全部为空"); + } + + var registerCheck = await _registerCheckRepository.GetAsync(input.RegisterCheckId); var patientRegister = await _patientRegisterRepository.GetAsync(registerCheck.PatientRegisterId); //修改医生和检查日期 if(string.IsNullOrWhiteSpace(input.CheckDoctorId)) diff --git a/src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs b/src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs index e087f5e..9190d6e 100644 --- a/src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs +++ b/src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs @@ -539,6 +539,11 @@ namespace Shentun.Peis.RegisterAsbitems createRegisterCheckAsbitemEntity.DeleteRegisterCheckItems.Add(registerItem); } } + //没有检查申请单号的,重新生成检查申请单号 + if(string.IsNullOrWhiteSpace(registerCheck.CheckRequestNo)) + { + registerCheck.CheckRequestNo = await _registerCheckManager.CreateCheckRequestNo(patientRegister.MedicalCenterId); + } } //获取所有已有的itemtype和checkId