From a15a8cfd7b01ce4bba6fe9fd876f6704ca23a12d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 07 一月 2025 16:40:32 +0800
Subject: [PATCH] 1、取水口用水日统计表中增加金额、次数字段; 2、优化或重写“累计流量超过指定值的取水口”、“累计流量低于指定值的取水口”、“指定时间段内用水量超过指定值的取水口”、“指定时间段内消费金额超过指定值的取水口”几个统计查询; 3、改“指定时间段内用水时长超过指定值的取水口”为“指定时间段内用水次数超过指定值的取水口”

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java |   35 ++++++++++++++++++++++-------------
 1 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java
index 9098e5b..7a24c20 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java
@@ -1,22 +1,31 @@
 package com.dy.sso.util;
 
-import jakarta.servlet.ServletContext;
-import jakarta.servlet.ServletContextEvent;
-import jakarta.servlet.ServletContextListener;
-import lombok.extern.slf4j.Slf4j;
+import com.dy.pipIrrGlobal.util.OrgListenerSupport;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.stereotype.Component;
 
-@Slf4j
-public class SsoListener implements ServletContextListener {
+@Component
+public class SsoListener extends OrgListenerSupport implements ApplicationListener<ApplicationReadyEvent> {
+
+    @Autowired
+    protected ResourceLoader resourceLoader ;
+
 
     @Override
-    public void contextInitialized(ServletContextEvent event) {
-        ServletContextListener.super.contextInitialized(event);
-        ServletContext con = event.getServletContext();
+    public void onApplicationEvent(ApplicationReadyEvent event) {
+        try {
+            //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource瀹炲鍖栧畬鎴�
+            Thread.sleep(1000L);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        } finally {
+            //鍒濆鍖栨満鏋�
+            super.init(resourceLoader);
+        }
     }
 
-    @Override
-    public void contextDestroyed(ServletContextEvent event) {
-        ServletContextListener.super.contextDestroyed(event);
-    }
 
 }
\ No newline at end of file

--
Gitblit v1.8.0