Browse Source

预约项目增加字段,获取网上预约增加收费标志

master
wxd 12 months ago
parent
commit
09c307b42f
  1. 2
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs
  2. 6
      src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterDto.cs
  3. 7
      src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs
  4. 35
      src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs
  5. 19
      src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs
  6. 4
      src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs
  7. 16135
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241115071112_update_register_check_asbitem_charge.Designer.cs
  8. 37
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241115071112_update_register_check_asbitem_charge.cs
  9. 9
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

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

@ -67,7 +67,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints
MobilePhone = input.MobilePhone,
AppointStartDate = input.AppointStartDate,
AppointStopDate = input.AppointStopDate,
CompleteFlag = input.CompleteFlag,
CompleteFlag = input.CompleteFlag
};
var appointPatientRegisterDtos = await CallWePeisAppServiceAsync<WebAppointPatientRegisterInput, List<AppointPatientRegisterDto>>(_webPeisGetAppointPatientRegisterListByFilterUrl,
webAppointPatientRegisterInput);

6
src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterDto.cs

@ -82,6 +82,12 @@ namespace Shentun.Peis.AppointPatientRegisters
/// </summary>
public char CompleteFlag { get; set; }
/// <summary>
/// 收费状态 0-未收费 1-已收费 2-已退费
/// </summary>
public char ChargeFlag { get; set; }
/// <summary>
/// 预约日期
/// </summary>

7
src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs

@ -365,5 +365,12 @@ namespace Shentun.Peis.PatientRegisters
/// </summary>
public short Amount { get; set; }
/// <summary>
/// 收费来源 (0-体检系统收费,1-小程序收费,2-第三方HIS收费) 小程序预约导入时传过来
/// </summary>
public char? ChargeSourceFlag { get; set; }
}
}

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

@ -26,10 +26,15 @@ namespace Shentun.Peis.AppointPatientRegisters
public class AppointPatientRegisterAppService : ApplicationService
{
private readonly IRepository<ThirdInterface, Guid> _thirdInterfaceRepository;
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository;
public AppointPatientRegisterAppService(IRepository<ThirdInterface, Guid> thirdInterfaceRepository)
public AppointPatientRegisterAppService(
IRepository<ThirdInterface, Guid> thirdInterfaceRepository,
IRepository<PatientRegister, Guid> patientRegisterRepository
)
{
_thirdInterfaceRepository = thirdInterfaceRepository;
_patientRegisterRepository = patientRegisterRepository;
}
/// <summary>
/// 获取网上预约数据
@ -133,14 +138,14 @@ namespace Shentun.Peis.AppointPatientRegisters
[HttpPost("api/app/AppointPatientRegister/GetAppointStatisticsReport")]
public async Task<List<GetAppointStatisticsReportDto>> GetAppointStatisticsReportAsync(List<CustomerOrgInputDto> input)
{
var thirdInterface = await _thirdInterfaceRepository.FirstOrDefaultAsync(f => f.ThirdInterfaceType == ThirdInterfaceTypeFlag.WebAppoint);
if (thirdInterface.IsActive != 'Y')
{
throw new UserFriendlyException("该接口已禁用");
}
object[] objects = [input];
var parmValue = thirdInterface.ParmValue;
var configurationBuilder = new ConfigurationBuilder()
@ -152,7 +157,29 @@ namespace Shentun.Peis.AppointPatientRegisters
var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync<List<GetAppointStatisticsReportDto>>(assemblyName,
className, [thirdInterface.Id], "GetAppointStatisticsReportAsync", objects);
return pluginsOut;
}
#region 提供给小程序的接口
/// <summary>
/// 获取预约记录是否在体检系统登记,用于判断是否能退款
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/AppointPatientRegister/GetAppointPatientRegisterIsPeisRegister")]
public async Task<bool> GetAppointPatientRegisterIsPeisRegisterAsync(AppointPatientRegisterIdInputDto input)
{
var isRegister = false;
var patientRegisterEnt = await _patientRegisterRepository.FirstOrDefaultAsync(f => f.AppointPatientRegisterId == input.AppointPatientRegisterId);
if (patientRegisterEnt != null)
{
isRegister = true;
}
return isRegister;
}
#endregion
}
}

19
src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs

@ -18,9 +18,9 @@ namespace Shentun.Peis.Models
{
public RegisterCheckAsbitem()
{
// RegisterChecks = new HashSet<RegisterCheck>();
// RegisterChecks = new HashSet<RegisterCheck>();
}
public RegisterCheckAsbitem(Guid id):base(id)
public RegisterCheckAsbitem(Guid id) : base(id)
{
// RegisterChecks = new HashSet<RegisterCheck>();
}
@ -94,7 +94,7 @@ namespace Shentun.Peis.Models
/// <summary>
/// 分组或者套餐ID
@ -102,6 +102,19 @@ namespace Shentun.Peis.Models
[Column("group_package_id")]
public Guid? GroupPackageId { get; set; }
/// <summary>
/// 收费来源 (0-体检系统收费,1-小程序收费,2-第三方HIS收费)
/// </summary>
[Column("charge_source_flag")]
[MaxLength(1)]
public char? ChargeSourceFlag { get; set; }
/// <summary>
/// charge_asbitem表ID
/// </summary>
[Column("charge_asbitem_id")]
public Guid? ChargeAsbitemId { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }

4
src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs

@ -486,6 +486,7 @@ namespace Shentun.Peis.RegisterAsbitems
existRegisterAsbitem.StandardPrice = registerAsbitem.StandardPrice;
existRegisterAsbitem.ChargePrice = registerAsbitem.ChargePrice;
existRegisterAsbitem.PayTypeFlag = registerAsbitem.PayTypeFlag;
existRegisterAsbitem.ChargeSourceFlag = registerAsbitem.ChargeSourceFlag;
createRegisterCheckAsbitemEntity.UpdateRegisterCheckAsbitems.Add(existRegisterAsbitem);
}
}
@ -503,7 +504,8 @@ namespace Shentun.Peis.RegisterAsbitems
StandardPrice = registerAsbitem.StandardPrice,
ChargePrice = registerAsbitem.ChargePrice,
PayTypeFlag = registerAsbitem.PayTypeFlag,
IsCharge = registerAsbitem.IsCharge
IsCharge = registerAsbitem.IsCharge,
ChargeSourceFlag = registerAsbitem.ChargeSourceFlag
};
createRegisterCheckAsbitemEntity.NewRegisterCheckAsbitems.Add(newRegisterCheckAsbitem);

16135
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241115071112_update_register_check_asbitem_charge.Designer.cs
File diff suppressed because it is too large
View File

37
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241115071112_update_register_check_asbitem_charge.cs

@ -0,0 +1,37 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class update_register_check_asbitem_charge : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "charge_asbitem_id",
table: "register_check_asbitem",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<char>(
name: "charge_source_flag",
table: "register_check_asbitem",
type: "character(1)",
maxLength: 1,
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "charge_asbitem_id",
table: "register_check_asbitem");
migrationBuilder.DropColumn(
name: "charge_source_flag",
table: "register_check_asbitem");
}
}
}

9
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -8917,6 +8917,10 @@ namespace Shentun.Peis.Migrations
.IsFixedLength()
.HasComment("组合项目");
b.Property<Guid?>("ChargeAsbitemId")
.HasColumnType("uuid")
.HasColumnName("charge_asbitem_id");
b.Property<decimal>("ChargePrice")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
@ -8927,6 +8931,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("charge_request_id");
b.Property<char?>("ChargeSourceFlag")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("charge_source_flag");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)

Loading…
Cancel
Save