From 7c6e35dcc34b4e466e68c09e730c46177d9a482d Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 20 May 2026 10:16:22 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#547:=20=E5=86=B2=E7=AA=81=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=94=B9=E4=B8=BA=E5=90=8C=E7=A7=91=E5=AE=A4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=20=E2=80=94=20=E8=B7=A8=E7=A7=91=E5=AE=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=87=8D=E5=8F=A0=E4=B8=8D=E5=BA=94=E9=98=BB=E6=96=AD?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E8=AF=8A=E7=96=97=E5=9C=A8=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E7=A7=91=E5=AE=A4=E7=9A=84=E7=8B=AC=E7=AB=8B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../appservice/impl/OrganizationLocationAppServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java index d9ab38c8..e4d40048 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java @@ -158,8 +158,10 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation ? activityDefinitionMapper.selectById(activityDefinitionId) : null; String activityName = activityDef != null ? activityDef.getName() : ""; + // Only check for time conflicts within the same department List organizationLocationList = - organizationLocationService.getOrgLocListByActivityDefinitionId(orgLoc.getActivityDefinitionId()); + organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getOrganizationId(), + orgLoc.getActivityDefinitionId()); organizationLocationList = (orgLoc.getId() != null) ? organizationLocationList.stream().filter(item -> !orgLoc.getId().equals(item.getId())).toList() : organizationLocationList;