Browse Source

收费申请

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
ed0cd87bfb
  1. 4
      src/Shentun.Peis.Application/ChargeRequests/ChargeRequestAppService.cs
  2. 32
      src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs
  3. 21
      src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs

4
src/Shentun.Peis.Application/ChargeRequests/ChargeRequestAppService.cs

@ -193,8 +193,8 @@ namespace Shentun.Peis.ChargeRequests
return result;
}
[HttpPost("api/app/ChargeRequest/GetChargeRequestsByPatientRegisterId")]
public async Task<List<ChargeRequestAsbitemDto>> GetChargeRequestAsbitemsByPatientRegisterIdAsync(ChargeRequestIdInputDto input)
[HttpPost("api/app/ChargeRequest/GetChargeRequestAsbitemsByChargeQuestId")]
public async Task<List<ChargeRequestAsbitemDto>> GetChargeRequestAsbitemsByChargeQuestIdAsync(ChargeRequestIdInputDto input)
{
if (input == null)
{

32
src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.Configuration;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PlugIns;
@ -20,6 +21,8 @@ namespace Shentun.Peis.ChargeRequests
{
private readonly IRepository<ChargeRequest, Guid> _repository;
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository;
private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository;
private readonly IRepository<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository;
private readonly IRepository<PrimarykeyBuilder> _primarykeyBuilderRepository;
private readonly SysParmValueManager _sysParmValueManager;
private readonly IRepository<ThirdInterface, Guid> _thirdInterfaceRepository;
@ -27,14 +30,17 @@ namespace Shentun.Peis.ChargeRequests
IRepository<PrimarykeyBuilder> primarykeyBuilderRepository,
SysParmValueManager sysParmValueManager,
IRepository<PatientRegister, Guid> patientRegisterRepository,
IRepository<ThirdInterface, Guid> thirdInterfaceRepository)
IRepository<ThirdInterface, Guid> thirdInterfaceRepository,
IRepository<RegisterCheck, Guid> registerCheckRepository,
IRepository<RegisterCheckAsbitem, Guid> registerCheckAsbitemRepository)
{
_repository = repository;
_primarykeyBuilderRepository = primarykeyBuilderRepository;
_sysParmValueManager = sysParmValueManager;
_patientRegisterRepository = patientRegisterRepository;
_thirdInterfaceRepository = thirdInterfaceRepository;
_registerCheckRepository = registerCheckRepository;
_registerCheckAsbitemRepository = registerCheckAsbitemRepository;
}
/// <summary>
/// 创建
@ -60,7 +66,25 @@ namespace Shentun.Peis.ChargeRequests
public async Task SendThirChargeRequestAsync(Guid id,string funName)
{
var thirdInterfaces = (await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ChargeRequest))
var patientRegisterEntity = await (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync()
on patientRegister.Id equals registerCheck.PatientRegisterId
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync()
on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId
join chargeRequest in await _repository.GetQueryableAsync()
on registerCheckAsbitem.LisRequestId equals chargeRequest.Id
where chargeRequest.Id == id
select new
{
patientRegister
}).FirstOrDefaultAsync();
if (patientRegisterEntity == null)
{
return;
}
var thirdInterfaces = (await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ChargeRequest
&& o.MedicalCenterId == patientRegisterEntity.patientRegister.MedicalCenterId))
.OrderBy(o => o.DisplayOrder).ToList();
foreach (var thirdInterface in thirdInterfaces)
{

21
src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Org.BouncyCastle.Asn1.Ocsp;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PlugIns;
@ -11,6 +12,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
@ -321,7 +323,24 @@ namespace Shentun.Peis.LisRequests
public async Task SendThirdLisRequestAsync(Guid id)
{
var thirdInterfaces = (await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.LisRequest))
var patientRegisterEntity = await (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync()
on patientRegister.Id equals registerCheck.PatientRegisterId
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync()
on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId
join lisRequest in await _lisRequestRepository.GetQueryableAsync()
on registerCheckAsbitem.LisRequestId equals lisRequest.Id
where lisRequest.Id == id
select new
{
patientRegister
}).FirstOrDefaultAsync();
if(patientRegisterEntity == null)
{
return;
}
var thirdInterfaces = (await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.LisRequest
&& o.MedicalCenterId == patientRegisterEntity.patientRegister.MedicalCenterId))
.OrderBy(o => o.DisplayOrder).ToList();
foreach (var thirdInterface in thirdInterfaces)
{

Loading…
Cancel
Save