From 53df515e7431fc9ba119a714b6fd61d530a0785b Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 04 二月 2026 15:55:08 +0800
Subject: [PATCH] yys 榆林数据推送增加开关
---
src/main/resources/application-tjxm.yml | 4 ++
src/main/resources/application-zqhx.yml | 4 ++
src/main/resources/application-cjny.yml | 4 ++
src/main/resources/application-zjyj.yml | 4 ++
src/main/resources/application-bhmy.yml | 4 ++
src/main/resources/application-hhkj.yml | 4 ++
src/main/resources/application-hxgy.yml | 4 ++
src/main/resources/application-jjxm.yml | 4 ++
src/main/resources/application-wdsy.yml | 5 ++
src/main/resources/application-hbxm.yml | 4 ++
src/main/resources/application-cmny.yml | 4 ++
src/main/resources/application-rzny.yml | 4 ++
src/main/resources/application-mkzs.yml | 4 ++
src/main/resources/application-hcmy.yml | 4 ++
src/main/resources/application-jlsn.yml | 4 ++
src/main/java/com/ruoyi/api/ScheduledApi.java | 16 +++++++-
src/main/resources/application-xyhb.yml | 4 ++
src/main/resources/application-bdsm.yml | 4 ++
src/main/resources/application-jsyny.yml | 4 ++
19 files changed, 86 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/ruoyi/api/ScheduledApi.java b/src/main/java/com/ruoyi/api/ScheduledApi.java
index c6e394b..8835f21 100644
--- a/src/main/java/com/ruoyi/api/ScheduledApi.java
+++ b/src/main/java/com/ruoyi/api/ScheduledApi.java
@@ -42,6 +42,12 @@
@Value("${api.electricityCost}")
private Double electricityCost;
+ @Value("${api.loginPush}")
+ private boolean loginPush;
+
+ @Value("${api.push}")
+ private boolean push;
+
@Autowired
private Api api;
@@ -52,8 +58,11 @@
private static final Random RANDOM = new Random();
//鎺ㄩ�佺櫥褰曟棩蹇楁瘡鍛�
-// @Scheduled(cron = "0 0 1 ? * 1")
+ @Scheduled(cron = "0 0 1 ? * 1")
public void logging(){
+ if (!loginPush){
+ return;
+ }
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//鑾峰彇鐧诲綍鏃ュ織
@@ -83,8 +92,11 @@
}
//鎺ㄩ�佺數姣忔湀
-// @Scheduled(cron = "0 0 1 1 * ?")
+ @Scheduled(cron = "0 0 1 1 * ?")
public void electricity(){
+ if (!push){
+ return;
+ }
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd");
//鑾峰彇鐧诲綍鏃ュ織
List<ElectricityDto> electricityDtos = new ArrayList<>();
diff --git a/src/main/resources/application-bdsm.yml b/src/main/resources/application-bdsm.yml
index ed247a7..6add4b6 100644
--- a/src/main/resources/application-bdsm.yml
+++ b/src/main/resources/application-bdsm.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 220 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-bhmy.yml b/src/main/resources/application-bhmy.yml
index 50cc28c..36bd317 100644
--- a/src/main/resources/application-bhmy.yml
+++ b/src/main/resources/application-bhmy.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1550 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-cjny.yml b/src/main/resources/application-cjny.yml
index ee02147..bdb797a 100644
--- a/src/main/resources/application-cjny.yml
+++ b/src/main/resources/application-cjny.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1300 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-cmny.yml b/src/main/resources/application-cmny.yml
index ee86007..e7c6266 100644
--- a/src/main/resources/application-cmny.yml
+++ b/src/main/resources/application-cmny.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 310 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-hbxm.yml b/src/main/resources/application-hbxm.yml
index 221f948..62eab2a 100644
--- a/src/main/resources/application-hbxm.yml
+++ b/src/main/resources/application-hbxm.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 2500 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-hcmy.yml b/src/main/resources/application-hcmy.yml
index eb933b4..2472f8e 100644
--- a/src/main/resources/application-hcmy.yml
+++ b/src/main/resources/application-hcmy.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 3200 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-hhkj.yml b/src/main/resources/application-hhkj.yml
index 5264162..6f26ca7 100644
--- a/src/main/resources/application-hhkj.yml
+++ b/src/main/resources/application-hhkj.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 2000 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 38000 #鏈堢數璐�(鍏�)
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-hxgy.yml b/src/main/resources/application-hxgy.yml
index 2973731..a2ba1fd 100644
--- a/src/main/resources/application-hxgy.yml
+++ b/src/main/resources/application-hxgy.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 130 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 5000 #鏈堢數璐�(鍏�)
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-jjxm.yml b/src/main/resources/application-jjxm.yml
index 9f2ef6e..6d1ad57 100644
--- a/src/main/resources/application-jjxm.yml
+++ b/src/main/resources/application-jjxm.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1600 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-jlsn.yml b/src/main/resources/application-jlsn.yml
index 3bde6dd..ea2018c 100644
--- a/src/main/resources/application-jlsn.yml
+++ b/src/main/resources/application-jlsn.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 100300 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1500 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 500000 #鏈堢數璐�(鍏�)
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: false
\ No newline at end of file
diff --git a/src/main/resources/application-jsyny.yml b/src/main/resources/application-jsyny.yml
index e0fe8f7..79b030d 100644
--- a/src/main/resources/application-jsyny.yml
+++ b/src/main/resources/application-jsyny.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1800 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-mkzs.yml b/src/main/resources/application-mkzs.yml
index b6a1053..38f5e7d 100644
--- a/src/main/resources/application-mkzs.yml
+++ b/src/main/resources/application-mkzs.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1400 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-rzny.yml b/src/main/resources/application-rzny.yml
index 780cda6..8cbb764 100644
--- a/src/main/resources/application-rzny.yml
+++ b/src/main/resources/application-rzny.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1000 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 32000 #鏈堢數璐�(鍏�)
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-tjxm.yml b/src/main/resources/application-tjxm.yml
index 7c774fe..fa2872a 100644
--- a/src/main/resources/application-tjxm.yml
+++ b/src/main/resources/application-tjxm.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 4100 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-wdsy.yml b/src/main/resources/application-wdsy.yml
index 61315b3..b291762 100644
--- a/src/main/resources/application-wdsy.yml
+++ b/src/main/resources/application-wdsy.yml
@@ -228,4 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 210 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
-
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
diff --git a/src/main/resources/application-xyhb.yml b/src/main/resources/application-xyhb.yml
index d8dccf6..17832f0 100644
--- a/src/main/resources/application-xyhb.yml
+++ b/src/main/resources/application-xyhb.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 1500 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-zjyj.yml b/src/main/resources/application-zjyj.yml
index 89044fb..c02b444 100644
--- a/src/main/resources/application-zjyj.yml
+++ b/src/main/resources/application-zjyj.yml
@@ -228,3 +228,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 360 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
diff --git a/src/main/resources/application-zqhx.yml b/src/main/resources/application-zqhx.yml
index ac16b90..dc0bfe6 100644
--- a/src/main/resources/application-zqhx.yml
+++ b/src/main/resources/application-zqhx.yml
@@ -229,3 +229,7 @@
dayPowerConsumption: 1200 #鏃ュ潎鐢ㄧ數閲�
outputValuesBase: 450 #鍗曚綅浜у�煎熀鏁帮紙涓囧厓锛�
electricityCost: 1200 #鏈堢數璐�
+ # 鐧诲綍鎺ㄩ�佸紑鍏�
+ loginPush: true
+ # 鐢垫暟鎹帹閫佸紑鍏�
+ push: true
\ No newline at end of file
--
Gitblit v1.9.3