Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
3605580e
Commit
3605580e
authored
Jan 15, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加调用算法日志
parent
6a462d9c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
27 deletions
+42
-27
UserEmpowerMapper.java
...module/jxiop/biz/amosprojectmapper/UserEmpowerMapper.java
+1
-0
AmosProjectDbConfig.java
...mos/boot/module/jxiop/biz/config/AmosProjectDbConfig.java
+5
-5
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+0
-0
IPermissionServiceImpl.java
...module/jxiop/biz/service/impl/IPermissionServiceImpl.java
+11
-7
application-dev.properties
...analyse-biz/src/main/resources/application-dev.properties
+8
-8
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+8
-4
AlarmEventServiceImpl.java
.../module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
+8
-2
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/amosprojectmapper/UserEmpowerMapper.java
View file @
3605580e
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/AmosProjectDbConfig.java
View file @
3605580e
...
@@ -19,23 +19,23 @@ import javax.sql.DataSource;
...
@@ -19,23 +19,23 @@ import javax.sql.DataSource;
import
java.util.Properties
;
import
java.util.Properties
;
@Configuration
@Configuration
@MapperScan
(
basePackages
=
"com.yeejoin.amos.boot.module.jxiop.
api
.amosprojectmapper"
,
sqlSessionFactoryRef
=
"amosProjectSqlSessionFactory"
)
@MapperScan
(
basePackages
=
"com.yeejoin.amos.boot.module.jxiop.
biz
.amosprojectmapper"
,
sqlSessionFactoryRef
=
"amosProjectSqlSessionFactory"
)
public
class
AmosProjectDbConfig
{
public
class
AmosProjectDbConfig
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosProjectDbConfig
.
class
);
private
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosProjectDbConfig
.
class
);
// 精确到 master 目录,以便跟其他数据源隔离
// 精确到 master 目录,以便跟其他数据源隔离
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/amosproject/*.xml"
;
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/amosproject/*.xml"
;
@Value
(
"${spring.db
5
.datasource.url}"
)
@Value
(
"${spring.db
6
.datasource.url}"
)
private
String
dbUrl
;
private
String
dbUrl
;
@Value
(
"${spring.db
5
.datasource.username}"
)
@Value
(
"${spring.db
6
.datasource.username}"
)
private
String
username
;
private
String
username
;
@Value
(
"${spring.db
5
.datasource.password}"
)
@Value
(
"${spring.db
6
.datasource.password}"
)
private
String
password
;
private
String
password
;
@Value
(
"${spring.db
5
.datasource.driver-class-name}"
)
@Value
(
"${spring.db
6
.datasource.driver-class-name}"
)
private
String
driverClassName
;
private
String
driverClassName
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
3605580e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IPermissionServiceImpl.java
View file @
3605580e
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMappe
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMappe
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService
;
import
org.apache.kafka.common.metrics.Stat
;
import
org.apache.kafka.common.metrics.Stat
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
@@ -22,21 +23,24 @@ import java.util.HashMap;
...
@@ -22,21 +23,24 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
public
class
IPermissionServiceImpl
implements
IPermissionService
{
public
class
IPermissionServiceImpl
implements
IPermissionService
{
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
@Autowired
private
UserEmpowerMapper
userEmpowerMapper
;
private
UserEmpowerMapper
userEmpowerMapper
;
@Autowired
private
StationBasicMapper
stationBasicMapper
;
private
StationBasicMapper
stationBasicMapper
;
@Autowired
//
@Autowired
public
IPermissionServiceImpl
(
RedisUtils
redisUtils
,
UserEmpowerMapper
userEmpowerMapper
,
StationBasicMapper
stationBasicMapper
)
{
//
public IPermissionServiceImpl(RedisUtils redisUtils, UserEmpowerMapper userEmpowerMapper, StationBasicMapper stationBasicMapper) {
this
.
redisUtils
=
redisUtils
;
//
this.redisUtils = redisUtils;
this
.
userEmpowerMapper
=
userEmpowerMapper
;
//
this.userEmpowerMapper = userEmpowerMapper;
this
.
stationBasicMapper
=
stationBasicMapper
;
//
this.stationBasicMapper = stationBasicMapper;
}
//
}
@Override
@Override
public
List
<
String
>
getCurrentUserPermissions
()
{
public
List
<
String
>
getCurrentUserPermissions
()
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev.properties
View file @
3605580e
...
@@ -26,15 +26,15 @@ spring.db6.datasource.password=Yeejoin@2020
...
@@ -26,15 +26,15 @@ spring.db6.datasource.password=Yeejoin@2020
spring.db6.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db6.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## eureka properties:
## eureka properties:
eureka.instance.hostname
=
1
72.16.10.220
eureka.instance.hostname
=
1
39.9.173.44
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
## redis properties:
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
1
72.16.10.220
spring.redis.host
=
1
39.9.173.44
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
openHealth
=
true
spring.cache.type
=
GENERIC
spring.cache.type
=
GENERIC
j2cache.open-spring-cache
=
true
j2cache.open-spring-cache
=
true
j2cache.cache-clean-mode
=
passive
j2cache.cache-clean-mode
=
passive
...
@@ -66,10 +66,10 @@ lettuce.timeout=10000
...
@@ -66,10 +66,10 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://1
72.16.10.220:1
883
emqx.broker
=
tcp://1
39.9.173.44:2
883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
public
emqx.password
=
public
mqtt.scene.host
=
mqtt://1
72.16.10.220
:8083/mqtt
mqtt.scene.host
=
mqtt://1
39.9.173.44
:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
spring.mqtt.completionTimeout
=
3000
...
@@ -84,7 +84,7 @@ password: taosdata
...
@@ -84,7 +84,7 @@ password: taosdata
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS-RS://1
39.9.170.47
:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.url
=
jdbc:TAOS-RS://1
0.20.0.203
:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username
=
root
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
...
@@ -92,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...
@@ -92,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# 分析专用td数据库 analyse_data
# 分析专用td数据库 analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url
=
jdbc:TAOS-RS://1
39.9.170.47
:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.url
=
jdbc:TAOS-RS://1
0.20.0.203
:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username
=
root
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
...
@@ -149,7 +149,7 @@ amos.secret.key=qaz
...
@@ -149,7 +149,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://1
72.16.10.220
:61616
spring.activemq.broker-url
=
tcp://1
39.9.173.44
:61616
spring.activemq.user
=
admin
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
spring.jms.pub-sub-domain
=
false
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
3605580e
...
@@ -91,12 +91,16 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
...
@@ -91,12 +91,16 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
// } else if ("false".equals(i.getValue())) {
// } else if ("false".equals(i.getValue())) {
// i.setValue("分");
// i.setValue("分");
// }
// }
long
mills
=
i
.
getCreatedTime
()
/
1000000
;
long
mills
=
i
.
getCreatedTime
()
;
car
.
setTimeInMillis
(
mills
);
car
.
setTimeInMillis
(
mills
);
// System.out.println(sdf.format(car.getTime()));
// System.out.println(sdf.format(car.getTime()));
i
.
setTime
(
sdf
.
format
(
car
.
getTime
()));
String
time
=
sdf
.
format
(
car
.
getTime
());
// car.add(Calendar.HOUR, 12);
if
(
time
.
contains
(
"1970"
))
{
// System.out.println(sdf.format(car.getTime()));
mills
=
i
.
getCreatedTime
()/
1000000
;
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
}
i
.
setTime
(
time
);
});
});
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
View file @
3605580e
...
@@ -166,10 +166,16 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
...
@@ -166,10 +166,16 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
i
.
setValue
(
"分"
);
i
.
setValue
(
"分"
);
}
}
i
.
setStationName
(
"升压站"
);
i
.
setStationName
(
"升压站"
);
long
mills
=
i
.
getCreatedTime
()
/
1000000
;
long
mills
=
i
.
getCreatedTime
()
;
car
.
setTimeInMillis
(
mills
);
car
.
setTimeInMillis
(
mills
);
// System.out.println(sdf.format(car.getTime()));
// System.out.println(sdf.format(car.getTime()));
i
.
setTime
(
sdf
.
format
(
car
.
getTime
()));
String
time
=
sdf
.
format
(
car
.
getTime
());
if
(
time
.
contains
(
"1970"
))
{
mills
=
i
.
getCreatedTime
()/
1000000
;
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
}
i
.
setTime
(
time
);
});
});
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
// 构建平台数据
// 构建平台数据
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
3605580e
...
@@ -69,7 +69,7 @@ public class EquipAlarmEventServiceImpl
...
@@ -69,7 +69,7 @@ public class EquipAlarmEventServiceImpl
// System.out.println(sdf.format(car.getTime()));
// System.out.println(sdf.format(car.getTime()));
String
time
=
sdf
.
format
(
car
.
getTime
());
String
time
=
sdf
.
format
(
car
.
getTime
());
if
(
time
.
contains
(
"1970"
))
{
if
(
time
.
contains
(
"1970"
))
{
mills
=
i
.
getCreatedTime
()/
1000000
;
;
mills
=
i
.
getCreatedTime
()/
1000000
;
car
.
setTimeInMillis
(
mills
);
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
time
=
sdf
.
format
(
car
.
getTime
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment