From 09da63542ee94c083c2d7efd28ed6838ba1d1a8a Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Fri, 5 Jul 2024 16:02:53 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=E5=91=98=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...sterBaseInfoByPatientRegisterIdInputDto.cs | 33 ++++++++++++
.../PatientRegisterAppService.cs | 50 +++++++++++++++++++
2 files changed, 83 insertions(+)
create mode 100644 src/Shentun.Peis.Application.Contracts/PatientRegisters/UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto.cs
diff --git a/src/Shentun.Peis.Application.Contracts/PatientRegisters/UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto.cs b/src/Shentun.Peis.Application.Contracts/PatientRegisters/UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto.cs
new file mode 100644
index 0000000..d612d73
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/PatientRegisters/UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace Shentun.Peis.PatientRegisters
+{
+ public class UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto
+ {
+ ///
+ /// 人员登记ID
+ ///
+ public Guid PatientRegisterId { get; set;}
+
+ ///
+ /// 姓名
+ ///
+ public string PatientName { get; set;}
+
+ ///
+ /// 手机
+ ///
+ public string MobileTelephone { get; set; }
+
+ ///
+ /// 身份证号
+ ///
+ public string IdNo { get; set; }
+
+
+ }
+}
diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
index 7edde26..ae76144 100644
--- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
+++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
@@ -43,6 +43,7 @@ using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.Identity;
@@ -3563,6 +3564,55 @@ namespace Shentun.Peis.PatientRegisters
}
#endregion
+
+
+ ///
+ /// 修改人员 手机、姓名、身份证 已总检特殊情况修改
+ ///
+ ///
+ ///
+ [HttpGet("api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId")]
+ public async Task UpdatePatientRegisterBaseInfoByPatientRegisterIdAsync(UpdatePatientRegisterBaseInfoByPatientRegisterIdInputDto input)
+ {
+ PatientRegisterOrNoDto msg = new PatientRegisterOrNoDto();
+
+ if (input == null ||
+ string.IsNullOrWhiteSpace(input.IdNo)
+ && string.IsNullOrWhiteSpace(input.PatientName)
+ && string.IsNullOrWhiteSpace(input.MobileTelephone))
+ throw new UserFriendlyException("请求参数有误");
+
+ var patientRegisterEnt = await _repository.FirstOrDefaultAsync(f => f.Id == input.PatientRegisterId);
+ if (patientRegisterEnt == null)
+ {
+ throw new UserFriendlyException("人员ID不正确");
+ }
+
+ var patientEnt = await _patientRepository.FirstOrDefaultAsync(f => f.Id == patientRegisterEnt.PatientId);
+ if (patientEnt != null)
+ {
+ if (!string.IsNullOrWhiteSpace(input.PatientName))
+ {
+ patientEnt.DisplayName = input.PatientName;
+ patientRegisterEnt.PatientName = input.PatientName;
+ }
+ if (!string.IsNullOrWhiteSpace(input.IdNo))
+ {
+ patientEnt.IdNo = input.IdNo;
+ }
+ if (!string.IsNullOrWhiteSpace(input.MobileTelephone))
+ {
+ patientEnt.MobileTelephone = input.MobileTelephone;
+ }
+
+ await _patientRepository.UpdateAsync(patientEnt, true);
+ await _repository.UpdateAsync(patientRegisterEnt, true);
+ }
+
+ msg = await GetPatientRegisterOrNo(patientRegisterEnt.Id);
+ return msg;
+ }
+
private async Task UpdateRegisterChecks(CreateRegisterCheckAsbitemEntity createRegisterCheckAsbitemEntity)
{
if (createRegisterCheckAsbitemEntity == null)