diff --git a/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs b/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs
index fcbbb3e..a3fa7de 100644
--- a/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs
+++ b/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs
@@ -6,6 +6,7 @@ using NPOI.SS.Formula.Functions;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
+using Shentun.Peis.Patients;
using Shentun.Peis.Permissions;
using SqlSugar;
using System;
@@ -82,6 +83,29 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces
_columnReferenceInterfaceRepository = columnReferenceInterfaceRepository;
}
+ ///
+ /// 根据身份证获取体检记录
+ ///
+ ///
+ ///
+ [Authorize(PeisPermissions.Third.Default)]
+ [HttpPost("api/Third/ThirdPartyPublicInterface/GetPatientRegisterListByIdNo")]
+ public async Task> GetPatientRegisterListByIdNoAsync(IdNoInputDto input)
+ {
+ var entListDto = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
+ join patient in await _patientRepository.GetQueryableAsync() on patientRegister.PatientId equals patient.Id
+ where patient.IdNo == input.IdNo
+ orderby patientRegister.MedicalStartDate descending
+ select new GetPatientRegisterListByIdNoDto
+ {
+ MedicalStartDate = DataHelper.ConversionDateShortToString(patientRegister.MedicalStartDate),
+ PatientName = patientRegister.PatientName,
+ PatientRegisterNo = patientRegister.PatientRegisterNo
+ }).ToList();
+
+ return entListDto;
+ }
+
///
/// 查询体检人员基本信息
@@ -276,6 +300,9 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces
}
+
+
+
/////
///// 查询体检明细项目信息
/////
diff --git a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
index 6018829..cedd2a5 100644
--- a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
+++ b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
@@ -918,7 +918,7 @@ namespace Shentun.Peis.TransToWebPeis
- short newMedicalTimes = patientRegisterEnt.MedicalTimes;
+
var IsPatient = (await WebDb.Ado.GetDataTableAsync($"select patient_id from patient where patient_id='{patientRegisterEnt.PatientId}'")).Rows.Count;
@@ -957,10 +957,9 @@ namespace Shentun.Peis.TransToWebPeis
#endregion
}
- else
- {
- newMedicalTimes = (short)((short)(await WebDb.Ado.GetScalarAsync($"select max(medical_times) from patient_register where patient_id='{patientRegisterEnt.PatientId}'")) + 1);
- }
+
+ short newMedicalTimes = (short)((short)(await WebDb.Ado.GetScalarAsync($"select max(medical_times) from patient_register where patient_id='{patientRegisterEnt.PatientId}'")) + 1);
+