Browse Source

青藏公司

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
4029af9c6d
  1. 27
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportPatientRegisterPlugInsGem.cs
  2. 2
      test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs

27
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportPatientRegisterPlugInsGem.cs

@ -50,8 +50,11 @@ namespace Shentun.Peis.PlugIns.Gem
{ {
return; return;
} }
//设置导入人员信息 //设置导入人员信息
foreach (var patient in qztlPatientRegisterFromInterface.plans) foreach (var patient in qztlPatientRegisterFromInterface.plans)
{
try
{ {
//婚姻状况 //婚姻状况
var maritalStatusId = ConvertMaritalStatus(patient.wedding); var maritalStatusId = ConvertMaritalStatus(patient.wedding);
@ -272,6 +275,25 @@ namespace Shentun.Peis.PlugIns.Gem
await NoteOk(succesIds, deleteIds); await NoteOk(succesIds, deleteIds);
} }
catch (Exception ex)
{
if (ex.Message.Contains("人员信息姓名和性别和原来的信息都不一致") ||
ex.Message.Contains("身份证号解析出的性别与填入的性别不一致"))
{
continue;
}
else
{
throw ex;
}
}
}
} }
@ -379,7 +401,10 @@ namespace Shentun.Peis.PlugIns.Gem
result = await response.Content.ReadAsStringAsync(); result = await response.Content.ReadAsStringAsync();
result = result.Replace(":\"[{", ":[{").Replace("}]\"", "}]").Replace("\\", ""); result = result.Replace(":\"[{", ":[{").Replace("}]\"", "}]").Replace("\\", "");
if(result.IndexOf("status") < 0)
{
throw new Exception($"调用WebApi中无status,返回值:" + result);
}
QztlPatientRegisterFromInterface? resultDto = JsonConvert.DeserializeObject<QztlPatientRegisterFromInterface>(result); QztlPatientRegisterFromInterface? resultDto = JsonConvert.DeserializeObject<QztlPatientRegisterFromInterface>(result);
if (resultDto != null) if (resultDto != null)
{ {

2
test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs

@ -34,7 +34,7 @@ namespace Shentun.Peis
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
{ {
var items = await _appService.GetLisRequestReportByPatientRegisterIdAsync(new PatientRegisterIdInputDto() var items = await _appService.GetLisRequestReportByPatientRegisterIdAsync(new PatientRegisterIdInputDto()
{ PatientRegisterId = new Guid("3a127094-8fcf-78cc-3397-dedd7decb7b4") });
{ PatientRegisterId = new Guid("3a12815b-da56-ef02-4782-5760e0965cd8") });
_output.WriteLine(items.Count().ToString()); _output.WriteLine(items.Count().ToString());
foreach (var item in items) foreach (var item in items)
{ {

Loading…
Cancel
Save