From 49b93cbbbadb7fc951c71532b02d22100dbc9b11 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 07 五月 2025 14:58:42 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/OrgListenerSupport.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/OrgListenerSupport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/OrgListenerSupport.java
index 10b769a..233e6f8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/OrgListenerSupport.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/OrgListenerSupport.java
@@ -4,6 +4,9 @@
import org.jdom2.Document;
import org.springframework.core.io.ResourceLoader;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* @Author: liurunyu
* @Date: 2024/7/24 13:41
@@ -52,4 +55,55 @@
}
}
}
+
+
+ /////////////////////////////////
+ // 寰楀埌
+ ////////////////////////////////
+ /**
+ * 瀹炲鍖�
+ */
+ @SuppressWarnings("unused ")
+ protected List<Org.OrgVo> get(ResourceLoader resourceLoader) {
+ return this.doGet(resourceLoader);
+ }
+
+ /**
+ * 瀹炲鍖�
+ */
+ @SuppressWarnings("unused ")
+ protected List<Org.OrgVo> doGet(ResourceLoader resourceLoader) {
+ List<Org.OrgVo> list = null ;
+ try {
+ ConfigXml4Springboot configXml = new ConfigXml4Springboot() ;
+ Document doc = configXml.createDom(resourceLoader, "init-config.xml") ;
+ list = this.doGet(configXml, doc);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return list ;
+ }
+
+ private List<Org.OrgVo> doGet(ConfigXml4Springboot configXml, Document doc) throws Exception {
+ List<Org.OrgVo> list = null ;
+ if (configXml != null && doc != null) {
+ list = new ArrayList<>();
+ for (int num = 1; num <= 10000; num++) {
+ if (configXml.existElement(doc, "config.orgs.org" + num)) {
+ String orgTag = configXml.getSetAttrTxt(doc, "config.orgs.org" + num, "tag", null, false, null);
+ String orgName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num, "name", null, false, null);
+ Boolean enable = configXml.getSetAttrBoolean(doc, "config.orgs.org" + num, "enable", null, null);
+ if(enable != null && enable.booleanValue()){
+ Org.OrgVo vo = new Org().new OrgVo() ;
+ vo.tag = orgTag ;
+ vo.name = orgName ;
+ list.add(vo) ;
+ }
+ }else{
+ break ;
+ }
+ }
+ }
+ return list ;
+ }
}
--
Gitblit v1.8.0