初次提交

This commit is contained in:
2025-06-30 10:11:32 +08:00
commit f059c64d0e
1785 changed files with 258159 additions and 0 deletions

View File

@ -0,0 +1,73 @@
server:
port: 8011
servlet:
context-path: /api
#swagger2配置
swagger2:
enable: true #开启swagger
projectName: 云平台--business-前端接口
controllerPath: com.ho.business.controller
spring:
jackson:
time-zone: GMT+8
application:
name: business-service
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.244:3306/business_db?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: root
password: 123456
druid:
initialSize: 5
minIdle: 5
maxActive: 5
keepAlive: true #保持长连接
connection-error-retry-attempts: 3
#Redis
redis:
port: 6379 #端口
timeout: 50000ms #连接超时
host: 192.168.100.242 #单机
password: 123456
database: 0
#port: 6379 #端口
#timeout: 5000ms #连接超时
#host: 127.0.0.1 #单机
#password:
#database: 0
#集群 真实环境开启
# record:
# nodes:
# - 127.0.0.1:6379
# - 127.0.0.1:6380
# - 127.0.0.1:6381
lettuce:
pool:
max-active: 8 #连接池最大连接 默认8
max-idle: 8 #连接池中最大空闲连接 默认8
min-idle: 1 #连接池中最小空闲连接 默认0
max-wait: 2000ms #连接池最大阻塞等待时间 使用负值表示没有限制
boot:
admin:
client:
url: http://localhost:8019/boot
minio:
accessKey: admin
secretKey: zzkj@688737
endpoint: http://192.168.0.236:9000
prefixUrl: http://192.168.0.236:9000
formula:
fieldmap:
RT_FIELD_BEAN: RT_FIELD_BEAN

View File

@ -0,0 +1,3 @@
spring:
profiles:
active: dev

View File

@ -0,0 +1,94 @@
spring:
#caffeine缓存
# 缓存改为使用配置类
# cache:
# type: caffeine
# caffeine:
# spec: initialCapacity=50,maximumSize=500,expireAfterWrite=10s
# cache-names: stationBySn,device,modelConfigList,pvPanel,realtimeCurve
#禁止servlet懒加载
mvc:
servlet:
load-on-startup: 1
servlet:
multipart:
max-file-size: 100MB
max-request-size: 1024MB
#mybatis配置
mybatis:
type-aliases-package: com.ho.business.entity
mapper-locations: classpath:mapper/*.xml
# 映射处理类
type-handlers-package: com.ho.business.handler
configuration:
#驼峰
mapUnderscoreToCamelCase: true
#Logging
logging:
config: classpath:logback.xml
level:
com.ho.user.mapper: debug
#ribbon的超时时间
ribbon:
ReadTimeout: 10000
ConnectTimeout: 10000
#开放端点用于SpringBoot Admin的监控
management:
endpoints:
web:
exposure:
include: '*'
#水电气转换系数 todo 转换系数
energy:
convertFactor:
elec: 2
water: 2
gas: 2
#二氧化碳到煤的转换系数
co2ToCole: 0.4
#二氧化碳到树的转化系数
co2ToTree: 1800
#二氧化碳到汽油的转化系数
co2ToGasoline: 2.30
#树到平方公里的转化系数
treeToSquareKilometer: 40000
#对比电站下的采集点时间差值
station:
timeDifference: 5
#告警配置
event:
#当前告警查询的时间跨度 (天)
currentMaxDay: -10
#大屏最大告警条数
bigScreenEventLimit: 200
#逆变器配置
inverter:
#查询逆变器发电量的时间间隔 分钟
timeInterval: 15
co2Factor: 0.997
# 大屏配置
largeScreen:
#收益系数
income: 0.6
weatherCode: 510105
#线上环境redis密码
openRedis:
host: 10.0.0.3
port: 6379
pass: HZNJ2025^03&24
#183redis密码
openTestRedis:
host: 192.168.1.183
port: 6379
pass: 123456

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<configuration>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{yyyy-MM-dd HH:mm:ss.SSS,CTT} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/home/hocloud/logs/business-service/business-service.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/home/hocloud/logs/business-service/business-service.%d{yyyy-MM-dd}-%i.log
</fileNamePattern>
<!--180天-->
<maxHistory>10</maxHistory>
<!-- 除按日志记录之外还配置了日志文件不能超过2M若超过2M日志文件会以索引0开始
命名日志文件例如log-error-2013-12-21.0.log -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>256MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%date{yyyy-MM-dd HH:mm:ss.SSS,CTT} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!--Error级别-->
<appender name="errorFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/home/hocloud/logs/business-service/business-service-error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/home/hocloud/logs/business-service/business-service-error.%d{yyyy-MM-dd}-%i.log
</fileNamePattern>
<!--180天-->
<maxHistory>10</maxHistory>
<!-- 除按日志记录之外还配置了日志文件不能超过2M若超过2M日志文件会以索引0开始
命名日志文件例如log-error-2013-12-21.0.log -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>256MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
<!-- 此filter过滤debug级别以下的日志-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<!-- 级别过滤器,根据日志级别进行过滤。-->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- project default level -->
<logger name="com.ho.business" level="DEBUG"/>
<!--log4jdbc -->
<logger name="jdbc.sqltiming" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="rollingFile"/>
<appender-ref ref="errorFile"/>
</root>
</configuration>

View File

@ -0,0 +1,60 @@
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-01 00:00:00', 1, 6595.00, '2023-01-01');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-01 00:00:00', 2, 6495.00, '2023-01-01');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-02 00:00:00', 1, 6995.00, '2023-01-02');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-02 00:00:00', 2, 6895.00, '2023-01-02');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-03 08:55:49', 1, 6895.00, '2023-01-03');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-03 08:55:49', 2, 6795.00, '2023-01-03');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-04 00:00:00', 1, 6795.00, '2023-01-04');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-04 00:00:00', 2, 6695.00, '2023-01-04');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-05 00:00:00', 1, 6795.00, '2023-01-05');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-05 00:00:00', 2, 6595.00, '2023-01-05');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-06 00:00:00', 1, 6595.00, '2023-01-06');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-06 00:00:00', 2, 6495.00, '2023-01-06');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-07 00:00:00', 1, 6395.00, '2023-01-07');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-07 00:00:00', 2, 6295.00, '2023-01-07');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-08 00:00:00', 1, 6495.00, '2023-01-08');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-08 00:00:00', 2, 6395.00, '2023-01-08');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-09 06:06:15', 1, 6595.00, '2023-01-09');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-09 13:33:42', 2, 6395.00, '2023-01-09');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-10 13:33:59', 1, 6595.00, '2023-01-10');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-10 13:34:12', 2, 6495.00, '2023-01-10');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-11 13:35:23', 1, 6995.00, '2023-01-11');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-11 13:35:58', 2, 6895.00, '2023-01-11');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-12 13:36:12', 1, 6895.00, '2023-01-12');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-12 13:36:17', 2, 6795.00, '2023-01-12');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-13 13:36:29', 1, 6795.00, '2023-01-13');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-13 13:36:45', 2, 6695.00, '2023-01-13');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-14 13:36:53', 1, 6795.00, '2023-01-14');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-14 13:37:02', 2, 6595.00, '2023-01-14');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-15 13:37:12', 1, 6595.00, '2023-01-15');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-15 13:37:25', 2, 6495.00, '2023-01-15');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-16 00:00:00', 1, 6395.00, '2023-01-16');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-16 19:51:27', 2, 6295.00, '2023-01-16');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-17 17:51:33', 1, 6495.00, '2023-01-17');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-17 17:51:42', 2, 6395.00, '2023-01-17');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-18 13:51:48', 1, 6595.00, '2023-01-18');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-18 21:51:59', 2, 6395.00, '2023-01-18');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-19 17:51:42', 1, 6595.00, '2023-01-19');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-19 17:51:42', 2, 6095.00, '2023-01-19');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-20 17:51:42', 1, 6195.00, '2023-01-20');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-20 17:51:42', 2, 6095.00, '2023-01-20');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-21 17:51:42', 1, 6595.00, '2023-01-21');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-21 17:51:42', 2, 6495.00, '2023-01-21');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-22 17:51:42', 1, 6795.00, '2023-01-22');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-22 17:51:42', 2, 6595.00, '2023-01-22');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-23 17:51:42', 1, 6595.00, '2023-01-23');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-23 17:51:42', 2, 6495.00, '2023-01-23');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-24 17:51:42', 1, 6395.00, '2023-01-24');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-24 17:51:42', 2, 6295.00, '2023-01-24');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-25 17:51:42', 1, 6495.00, '2023-01-25');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-25 17:51:42', 2, 6395.00, '2023-01-25');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-26 17:51:42', 1, 6595.00, '2023-01-26');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-26 19:55:31', 2, 6395.00, '2023-01-26');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-27 19:55:40', 1, 6595.00, '2023-01-27');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-27 19:55:50', 2, 6495.00, '2023-01-27');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-28 19:01:17', 1, 6595.00, '2023-01-28');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-28 19:01:21', 2, 6495.00, '2023-01-28');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-29 00:01:28', 1, 6595.00, '2023-01-29');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-29 00:00:00', 2, 6495.00, '2023-01-29');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-30 00:00:00', 1, 6895.00, '2023-01-30');
INSERT INTO `yc_value` (group_id,dept_id,station_id,create_time,type,digital,`day`) VALUES ( 1, 6, 1, '2023-01-30 00:00:00', 2, 6695.00, '2023-01-30');