Browse Source

人寿

master
wxd 1 year ago
parent
commit
d531211aa6
  1. 10
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  2. 2
      src/Shentun.Peis.Application/ThirdBookingPushs/ThirdBookingPushAppService.cs
  3. 14
      src/Shentun.Peis.Application/ThirdBookings/ThirdBookingAppService.cs

10
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -131,6 +131,7 @@ namespace Shentun.Peis.PatientRegisters
private readonly PatientPoisonManager _patientPoisonManager;
private readonly IRepository<Diagnosis> _diagnosisRepository;
private readonly ThirdBookingPushAppService _thirdBookingPushAppService;
private readonly IRepository<ThirdBooking, Guid> _thirdBookingRepository;
public PatientRegisterAppService(
IRepository<PatientRegister, Guid> repository,
IRepository<Patient, Guid> patientRepository,
@ -191,7 +192,8 @@ namespace Shentun.Peis.PatientRegisters
IRepository<PatientPoison> patientPoisonRepository,
PatientPoisonManager patientPoisonManager,
IRepository<Diagnosis> diagnosisRepository,
ThirdBookingPushAppService thirdBookingPushAppService)
ThirdBookingPushAppService thirdBookingPushAppService,
IRepository<ThirdBooking, Guid> thirdBookingRepository)
: base(repository)
{
this._repository = repository;
@ -254,6 +256,7 @@ namespace Shentun.Peis.PatientRegisters
_patientPoisonManager = patientPoisonManager;
_diagnosisRepository = diagnosisRepository;
_thirdBookingPushAppService = thirdBookingPushAppService;
_thirdBookingRepository = thirdBookingRepository;
}
/// <summary>
/// 获取通过主键
@ -2659,7 +2662,10 @@ namespace Shentun.Peis.PatientRegisters
var customerOrgRegisterId = interfaceConfig.GetSection("Interface").GetSection("CustomerOrgRegisterId").Value;
if (customerOrgRegisterId == input.CustomerOrgRegisterId.ToString())
{
patientRegister.ThirdBookingId = patientRegister.Id.ToString();
var thirdBookingEnt = await _thirdBookingRepository.FirstOrDefaultAsync(f => f.PatientName == input.PatientName
&& f.IdNo == input.IdNo
&& (f.Phone == input.MobileTelephone || f.Phone == input.Telephone));
patientRegister.ThirdBookingId = thirdBookingEnt.Id.ToString();
}
}

2
src/Shentun.Peis.Application/ThirdBookingPushs/ThirdBookingPushAppService.cs

@ -7,6 +7,7 @@ using Microsoft.Net.Http.Headers;
using Newtonsoft.Json;
using NPOI.HPSF;
using NPOI.SS.Formula.Functions;
using NPOI.Util;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
@ -75,6 +76,7 @@ namespace Shentun.Peis.ThirdBookingPushs
var privateKey = interfaceConfig.GetSection("Interface").GetSection("MinZhongPrivateKey").Value;
var medicalYear = interfaceConfig.GetSection("Interface").GetSection("MedicalYear").Value;
var isActive = interfaceConfig.GetSection("Interface").GetSection("IsActive").Value;
//var customerOrgRegisterId = interfaceConfig.GetSection("Interface").GetSection("CustomerOrgRegisterId").Value;
var iCode = interfaceConfig.GetSection("Interface").GetSection("ICODE").Value;
if (!string.IsNullOrWhiteSpace(isActive)
&& isActive == "Y")

14
src/Shentun.Peis.Application/ThirdBookings/ThirdBookingAppService.cs

@ -130,6 +130,20 @@ namespace Shentun.Peis.ThirdBookings
if (string.IsNullOrWhiteSpace(input.BookingDate))
throw new UserFriendlyException("日期不能为空");
if (!string.IsNullOrWhiteSpace(input.MaritalStatus)
&& input.MaritalStatus != "0"
&& input.MaritalStatus != "1")
{
throw new UserFriendlyException("婚姻状况格式不正确");
}
if (!string.IsNullOrWhiteSpace(input.EmpStatus)
&& input.EmpStatus != "0"
&& input.EmpStatus != "1")
{
throw new UserFriendlyException("是否在职格式不正确");
}
var thirdBookingEnt = new ThirdBooking(GuidGenerator.Create())
{
Age = input.Age,

Loading…
Cancel
Save