From 98d104d8fa3312080244a173bb52205d31311b63 Mon Sep 17 00:00:00 2001 From: "Wang.Huan" Date: Thu, 20 Mar 2025 10:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=82=E5=8F=B7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OutpatientRegistrationAppServiceImpl.java | 12 +++++++----- .../dto/EncounterParticipantFormData.java | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java index 7aec115b..f01c4d3f 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java @@ -211,11 +211,13 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra EncounterLocation encounterLocation = new EncounterLocation(); BeanUtils.copyProperties(encounterLocationFormData, encounterLocation); iEncounterLocationService.saveEncounterLocationByRegister(encounterLocation); - // 保存就诊参数者信息 - encounterParticipantFormData.setEncounterId(encounterId); - EncounterParticipant encounterParticipant = new EncounterParticipant(); - BeanUtils.copyProperties(encounterParticipantFormData, encounterParticipant); - iEncounterParticipantService.saveEncounterParticipantByRegister(encounterParticipant); + // 保存就诊参数者信息 , 选了参与这才保存 + if (encounterParticipantFormData.getPractitionerId() != null) { + encounterParticipantFormData.setEncounterId(encounterId); + EncounterParticipant encounterParticipant = new EncounterParticipant(); + BeanUtils.copyProperties(encounterParticipantFormData, encounterParticipant); + iEncounterParticipantService.saveEncounterParticipantByRegister(encounterParticipant); + } // 保存就诊账户信息 accountFormData.setEncounterId(encounterId); Account account = new Account(); diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java index d86d844b..dbbf2fa8 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java @@ -1,6 +1,5 @@ package com.openhis.web.chargemanage.dto; -import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -27,7 +26,6 @@ public class EncounterParticipantFormData { private String typeCode; /** 参与者ID */ - @NotNull(message = "参与者ID不能为空") @JsonSerialize(using = ToStringSerializer.class) private Long practitionerId;