Browse Source

问卷限制

master
wxd 8 months ago
parent
commit
fcffcfa308
  1. 8
      src/Shentun.WebPeis.Application.Contracts/Persons/MedicalHealthReportDto.cs
  2. 26
      src/Shentun.WebPeis.Application/Persons/PersonAppService.cs
  3. 3
      src/Shentun.WebPeis.HttpApi.Host/appsettings.json

8
src/Shentun.WebPeis.Application.Contracts/Persons/MedicalHealthReportDto.cs

@ -50,4 +50,12 @@ namespace Shentun.WebPeis.Persons
}
public class IsQuestionDto
{
public int code { get; set; }
public string msg { get; set; }
public bool data { get; set; }
}
}

26
src/Shentun.WebPeis.Application/Persons/PersonAppService.cs

@ -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()
{

3
src/Shentun.WebPeis.HttpApi.Host/appsettings.json

@ -67,7 +67,8 @@
"MedicalHealthReport": {
"BaseAddress": "http://10.1.13.31",
"ReportListApiUrl": "http://10.1.13.31/api/report/page",
"ReportApiUrl": "http://10.1.13.31/api/report/download"
"ReportApiUrl": "http://10.1.13.31/api/report/download",
"IsQuestionApiUrl": "http://10.1.13.31/api/hasFillQueByRecordNo"
},
"Swagger": {
"IsEnabled": true

Loading…
Cancel
Save