3 Commits

Author SHA1 Message Date
DESKTOP-G961P6V\Zhh b8e7dadca6 预约 1 year ago
DESKTOP-G961P6V\Zhh e888e6745e Merge branch 'master' of http://140.143.162.39:3000/shentun/peis 1 year ago
DESKTOP-G961P6V\Zhh cb88b85f7f 预约 1 year ago
  1. 6
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs
  2. 21
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs
  3. 13
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebPatientRegisterIdInput.cs
  4. 4
      src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs
  5. 35
      src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs

6
src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs

@ -42,6 +42,12 @@ namespace Shentun.Peis.PlugIns.WebAppoints
}
public virtual async Task<AppointPatientRegisterDto> GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input)
{
throw new NotImplementedException();
}
/// <summary>
/// 获取需要同步到web的人员ID
/// </summary>

21
src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs

@ -29,6 +29,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints
private static string _webPeisToken;
private string _webPeisGetAppointPatientRegisterListByFilterUrl;
private string _webPeisGetAppointRegisterAsbitemListByIdUrl;
private string _webPeisGetByPatientRegisterIdUrl;
private Guid _medicalCenterId;
public WebAppointWebPeisPlugIns(Guid thirdInterfaceId) : base(thirdInterfaceId)
{
@ -46,6 +47,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints
_webPeisBaseAddress = InterfaceConfig.GetSection("Interface").GetSection("BaseAddress").Value;
_webPeisGetAppointPatientRegisterListByFilterUrl = InterfaceConfig.GetSection("Interface").GetSection("GetAppointPatientRegisterListByFilterUrl").Value;
_webPeisGetAppointRegisterAsbitemListByIdUrl = InterfaceConfig.GetSection("Interface").GetSection("GetAppointRegisterAsbitemListByIdUrl").Value;
_webPeisGetByPatientRegisterIdUrl = InterfaceConfig.GetSection("Interface").GetSection("GetByPatientRegisterId").Value;
}
/// <summary>
/// 获取预约人员列表
@ -70,7 +72,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints
}
/// <summary>
/// 获取组合项目列表
/// 获取组合项目列表通过预约ID
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -85,7 +87,22 @@ namespace Shentun.Peis.PlugIns.WebAppoints
(_webPeisGetAppointRegisterAsbitemListByIdUrl, webAppointPatientRegisterIdInput);
return appointRegisterAsbitemDtos;
}
/// <summary>
/// 获取预约信息人员通过登记ID
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<AppointPatientRegisterDto> GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input)
{
var webAppointPatientRegisterIdInput = new WebPatientRegisterIdInput()
{
PatientRegisterId = input.PatientRegisterId
};
var appointPatientRegisterDto = await CallWePeisAppServiceAsync<WebPatientRegisterIdInput,
AppointPatientRegisterDto>
(_webPeisGetByPatientRegisterIdUrl, webAppointPatientRegisterIdInput);
return appointPatientRegisterDto;
}
/// <summary>
/// 获取需要同步到web的人员ID
/// </summary>

13
src/Shentun.ColumnReferencePlugIns/WebAppoints/WebPatientRegisterIdInput.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shentun.Peis.PlugIns.WebAppoints
{
public class WebPatientRegisterIdInput
{
public Guid PatientRegisterId { get; set; }
}
}

4
src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs

@ -9,6 +9,8 @@ namespace Shentun.Peis.PlugIns
public class AppointPatientRegisterIdInputDto
{
public Guid ThirdInterFaceId { get; set; }
public string AppointPatientRegisterId { get; set; }
public string? AppointPatientRegisterId { get; set; }
public Guid PatientRegisterId { get; set; }
}
}

35
src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs

@ -5,6 +5,7 @@ using NUglify.JavaScript.Syntax;
using Shentun.Peis.AppointRegisterAsbitems;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.PlugIns;
using System;
using System.Collections.Generic;
@ -66,6 +67,12 @@ namespace Shentun.Peis.AppointPatientRegisters
return pluginsOut;
}
/// <summary>
/// 获取预约组合项目通过预约ID
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById")]
public async Task<List<AppointRegisterAsbitemDto>> GetAppointRegisterAsbitemListByIdAsync(AppointPatientRegisterIdInputDto input)
{
@ -88,5 +95,33 @@ namespace Shentun.Peis.AppointPatientRegisters
return pluginsOut;
}
/// <summary>
/// 获取预约人员信息通过人员登记ID
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("api/app/AppointPatientRegister/GetByPatientRegisterId")]
public async Task<AppointPatientRegisterDto> GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input)
{
var thirdInterface = await _thirdInterfaceRepository.GetAsync(input.ThirdInterFaceId);
if (thirdInterface.IsActive != 'Y')
{
throw new UserFriendlyException("该接口已禁用");
}
object[] objects = [input];
var parmValue = thirdInterface.ParmValue;
var configurationBuilder = new ConfigurationBuilder()
.AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue)));
var config = configurationBuilder.Build();
var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value;
var className = config.GetSection("Interface").GetSection("ClassName").Value;
var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync<AppointPatientRegisterDto>(assemblyName,
className, [thirdInterface.Id], "GetByPatientRegisterIdAsync", objects);
return pluginsOut;
}
}
}
Loading…
Cancel
Save