Commit 677f45e8 authored by xinglei's avatar xinglei

修改首页告警统计bug

parent 67dfa82a
...@@ -18,7 +18,7 @@ public interface IAlarmRepository extends IBaseRepository<Alarm, String> { ...@@ -18,7 +18,7 @@ public interface IAlarmRepository extends IBaseRepository<Alarm, String> {
@Query(value="select * from spc_alarm where query_column =?1 AND current_state in ('未确认未清除','已确认未清除','异常','告警')",nativeQuery=true ) @Query(value="select * from spc_alarm where query_column =?1 AND current_state in ('未确认未清除','已确认未清除','异常','告警')",nativeQuery=true )
public List<Alarm> selectByQueryColumn(String type); public List<Alarm> selectByQueryColumn(String type);
@Query(value="select COUNT(*) value,sa.alarm_level name, sa.org_code orgCode from spc_alarm sa where sa.org_code like CONCAT('%', ?1, '%' ) and sa.current_state in ('未确认未清除','已确认未清除','异常','告警') GROUP BY sa.alarm_level, sa.org_code",nativeQuery=true ) @Query(value="select COUNT(*) value,sa.alarm_level name, sa.org_code orgCode from spc_alarm sa where sa.org_code like CONCAT('%', ?1, '%' ) and sa.current_state in ('未确认未清除','已确认未清除','异常','告警') GROUP BY sa.alarm_level",nativeQuery=true )
public List<Map<String, Object>> countnum(String code); public List<Map<String, Object>> countnum(String code);
} }
......
...@@ -10,7 +10,7 @@ eureka.client.fetchRegistry = true ...@@ -10,7 +10,7 @@ eureka.client.fetchRegistry = true
ribbon.eureka.enabled = true ribbon.eureka.enabled = true
#DB properties: #DB properties:
spring.datasource.url = jdbc:mysql://172.16.10.66:3306/amos_xian_bank? useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC spring.datasource.url = jdbc:mysql://172.16.10.66:3306/amos_xian_bank?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username = root spring.datasource.username = root
spring.datasource.password = root_123 spring.datasource.password = root_123
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = com.mysql.jdbc.Driver
...@@ -93,5 +93,5 @@ param.remoteurl=http://localhost:8080 ...@@ -93,5 +93,5 @@ param.remoteurl=http://localhost:8080
## emqx ## emqx
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://172.16.10.85:1883 emqx.broker=tcp://172.16.11.20:1883
emqx.password=0 emqx.password=0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment