|
|
|
@ -40,6 +40,7 @@ using Shentun.Utilities; |
|
|
|
using IdentityModel; |
|
|
|
using Shentun.WebPeis.SysParmValues; |
|
|
|
using Scriban.Syntax; |
|
|
|
using static SKIT.FlurlHttpClient.Wechat.TenpayV3.Models.DepositMarketingMemberCardOpenCardCodesResponse.Types; |
|
|
|
namespace Shentun.WebPeis.Persons |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
@ -67,6 +68,7 @@ namespace Shentun.WebPeis.Persons |
|
|
|
private readonly IRepository<RegisterCheck> _registerCheckRepository; |
|
|
|
private readonly IRepository<RegisterCheckAsbitem> _registerCheckAsbitemRepository; |
|
|
|
private readonly IRepository<Asbitem> _asbitemRepository; |
|
|
|
private readonly IRepository<CustomerOrgRegister> _customerOrgRegisterRepository; |
|
|
|
public PersonAppService(IRepository<Person> repository, |
|
|
|
IConfiguration configuration, |
|
|
|
IRepository<Volo.Abp.Identity.IdentityUser, Guid> identityUserRepository, |
|
|
|
@ -84,7 +86,8 @@ namespace Shentun.WebPeis.Persons |
|
|
|
SysParmValueManager sysParmValueManager, |
|
|
|
IRepository<RegisterCheck> registerCheckRepository, |
|
|
|
IRepository<RegisterCheckAsbitem> registerCheckAsbitemRepository, |
|
|
|
IRepository<Asbitem> asbitemRepository) |
|
|
|
IRepository<Asbitem> asbitemRepository, |
|
|
|
IRepository<CustomerOrgRegister> customerOrgRegisterRepository) |
|
|
|
{ |
|
|
|
_repository = repository; |
|
|
|
_configuration = configuration; |
|
|
|
@ -104,6 +107,7 @@ namespace Shentun.WebPeis.Persons |
|
|
|
_registerCheckRepository = registerCheckRepository; |
|
|
|
_registerCheckAsbitemRepository = registerCheckAsbitemRepository; |
|
|
|
_asbitemRepository = asbitemRepository; |
|
|
|
_customerOrgRegisterRepository = customerOrgRegisterRepository; |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<PersonDto> GetByIdAsync(PersonIdInputDto input) |
|
|
|
@ -578,6 +582,26 @@ namespace Shentun.WebPeis.Persons |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("没有报告单"); |
|
|
|
} |
|
|
|
|
|
|
|
#region 检查是否需要填写问卷
|
|
|
|
var isQuestion = _customerOrgRegisterRepository.FirstOrDefaultAsync(f => f.CustomerOrgRegisterId == entity.CustomerOrgRegisterId && f.IsQuestion == 'Y'); |
|
|
|
if (isQuestion != null) |
|
|
|
{ |
|
|
|
string baseAddress = _configuration.GetSection("MedicalHealthReport").GetSection("BaseAddress").Value; |
|
|
|
string isQuestionApiUrl = _configuration.GetSection("MedicalHealthReport").GetSection("IsQuestionApiUrl").Value; |
|
|
|
|
|
|
|
isQuestionApiUrl = isQuestionApiUrl + $"?recordNo={entity.PatientRegisterNo}"; //查询是否填写问卷
|
|
|
|
|
|
|
|
var isQuestionResult = await CallAppServiceAsync<IsQuestionDto, IsQuestionDto>(baseAddress, isQuestionApiUrl, null, "get"); |
|
|
|
if (isQuestionResult.code != 200 |
|
|
|
|| isQuestionResult.data != true |
|
|
|
) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("请先填写问卷再来查看"); |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
var Host = $"{_httpContextAccessor.HttpContext.Request.Scheme}://{_httpContextAccessor.HttpContext.Request.Host.Host}:{_httpContextAccessor.HttpContext.Request.Host.Port}"; |
|
|
|
var returnValue = new MedicalReportDto() |
|
|
|
{ |
|
|
|
|