From 03f65e0bd159417fe698c3cb3493e2e730c16ff6 Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Wed, 22 Jul 2026 10:49:06 +0800 Subject: [PATCH] MQ --- MyHosListener/TestCode.xaml.cs | 6 ++---- MyHosListener/common/listener/CI0047Listener.cs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/MyHosListener/TestCode.xaml.cs b/MyHosListener/TestCode.xaml.cs index 4a8e718..037ea07 100755 --- a/MyHosListener/TestCode.xaml.cs +++ b/MyHosListener/TestCode.xaml.cs @@ -284,11 +284,9 @@ namespace MyHosListener } - // 17 获取 item[@root='2.16.156.10011.0.9.1.64']../../name/item/part + // 17 获取 wholeOrganization/name/item/part 作为病区名称 var areaName = xdoc - .Descendants(ns + "item") - .FirstOrDefault(x => (string)x.Attribute("root") == "2.16.156.10011.0.9.1.64") - ?.Ancestors(ns + "location") + .Descendants(ns + "wholeOrganization") .Descendants(ns + "name") .Descendants(ns + "item") .Descendants(ns + "part") diff --git a/MyHosListener/common/listener/CI0047Listener.cs b/MyHosListener/common/listener/CI0047Listener.cs index 629f11c..7cda0c7 100755 --- a/MyHosListener/common/listener/CI0047Listener.cs +++ b/MyHosListener/common/listener/CI0047Listener.cs @@ -278,11 +278,9 @@ namespace MyHosListener.common.listener } - // 17 获取 item[@root='2.16.156.10011.0.9.1.64']../../name/item/part + // 17 获取 wholeOrganization/name/item/part 作为病区名称 var areaName = xdoc - .Descendants(ns + "item") - .FirstOrDefault(x => (string)x.Attribute("root") == "2.16.156.10011.0.9.1.64") - ?.Ancestors(ns + "location") + .Descendants(ns + "wholeOrganization") .Descendants(ns + "name") .Descendants(ns + "item") .Descendants(ns + "part")