From f08587091afe24ea5445cb52a493f98e95c8ef6a Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Wed, 26 Jun 2024 18:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransToWebPeis/TransToWebPeisAppService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs index a53a10e..b0ac022 100644 --- a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs +++ b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs @@ -1344,9 +1344,11 @@ namespace Shentun.Peis.TransToWebPeis await WebDb.Ado.ExecuteCommandAsync($"delete from register_check where patient_register_id='{PatientRegisterId}'"); - await WebDb.Ado.ExecuteCommandAsync($"delete from patient_register where patient_register_id='{PatientRegisterId}'"); + await WebDb.Ado.ExecuteCommandAsync($"delete from patient where patient_id in (select patient_id from patient_register where patient_register_id='{PatientRegisterId}')"); + await WebDb.Ado.ExecuteCommandAsync($"delete from patient_register where patient_register_id='{PatientRegisterId}'"); + await WebDb.Ado.CommitTranAsync(); } catch (Exception ex)