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
973ea840
Commit
973ea840
authored
Jul 06, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加初始化方法
parent
2643f2be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
10 deletions
+44
-10
MonitorFanIndicator.java
...mos/boot/module/jxiop/api/entity/MonitorFanIndicator.java
+2
-1
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+41
-7
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+0
-1
StationDataTask.java
...oin/amos/boot/module/jxiop/biz/tasks/StationDataTask.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/entity/MonitorFanIndicator.java
View file @
973ea840
...
...
@@ -45,7 +45,8 @@ public class MonitorFanIndicator extends BaseEntity {
private
String
addressGateway
;
//地址加网管
@TableField
(
"equipment_number"
)
private
String
equipmentNumber
;
//设备编号
@TableField
(
"data_type"
)
private
String
dataType
;
//设备编号
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
973ea840
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
...
...
@@ -24,10 +27,8 @@ import org.springframework.web.bind.annotation.*;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
@RestController
@Api
(
tags
=
"Demo-test"
)
...
...
@@ -53,7 +54,8 @@ public class DemoController extends BaseController {
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Autowired
InfluxDButils
influxDButils
;
@Autowired
private
MonitorFanIndicatorMapper
monitorFanIndicatorregionMapper
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"demo测试prodcutcion 库"
)
...
...
@@ -79,8 +81,40 @@ public class DemoController extends BaseController {
@ApiOperation
(
value
=
"测试获取风速平均值"
)
@GetMapping
(
"/test4"
)
public
void
demoTest3
()
{
Object
o
=
this
.
monitorFanIndicatorImpl
.
getIndicatoralueAvage
(
"1668801435891929089"
,
"60秒平均风速"
);
System
.
out
.
println
(
o
.
toString
());
// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
// System.out.println(o.toString());
QueryWrapper
<
MonitorFanIndicator
>
QueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
.
eq
(
"gateway"
,
"1668801435891929089"
);
long
DATE
=
new
Date
().
getTime
();
System
.
out
.
println
(
DATE
);
List
<
MonitorFanIndicator
>
list
=
monitorFanIndicatorregionMapper
.
selectList
(
QueryWrapper
);
for
(
MonitorFanIndicator
monitorFanIndicator
:
list
)
{
Map
<
String
,
String
>
tag
=
new
HashMap
<>();
Map
<
String
,
Object
>
maps2
=
new
HashMap
<>();
tag
.
put
(
"address"
,
monitorFanIndicator
.
getIndexAddress
()
);
tag
.
put
(
"dataType"
,
monitorFanIndicator
.
getDataType
());
tag
.
put
(
"equipmentSpecificName"
,
monitorFanIndicator
.
getFanCode
()
);
tag
.
put
(
"equipmentsIdx"
,
monitorFanIndicator
.
getAddressGateway
()
);
tag
.
put
(
"gatewayId"
,
monitorFanIndicator
.
getGateway
());
tag
.
put
(
"isAlarm"
,
monitorFanIndicator
.
getIsAlarm
());
maps2
.
put
(
"createdTime"
,
"2023-07-05 18:30:26"
);
maps2
.
put
(
"unit"
,
monitorFanIndicator
.
getUnit
());
maps2
.
put
(
"value"
,
null
);
maps2
.
put
(
"valueLabel"
,
null
);
maps2
.
put
(
"traceId"
,
null
);
maps2
.
put
(
"equipmentNumber"
,
monitorFanIndicator
.
getEquipmentNumber
());
maps2
.
put
(
"frontModule"
,
monitorFanIndicator
.
getFrontModule
());
maps2
.
put
(
"systemType"
,
monitorFanIndicator
.
getSystemType
());
influxDbConnection
.
insert
(
"indicators_"
+
monitorFanIndicator
.
getGateway
(),
tag
,
maps2
,
1688558007051L
,
TimeUnit
.
MILLISECONDS
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
973ea840
...
...
@@ -59,7 +59,6 @@ public class MonitorFanIdxController extends BaseController {
@RequestParam
(
value
=
"gateway"
,
required
=
false
)
String
gateway
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
int
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
int
size
)
{
String
[]
gateways
=
gateway
.
split
(
","
);
IPage
<
RunRecord
>
page
=
monitorFanIndicator
.
queryRunRecord
(
size
,
gateways
,
current
);
return
ResponseHelper
.
buildResponse
(
page
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tasks/StationDataTask.java
View file @
973ea840
...
...
@@ -26,7 +26,7 @@ public class StationDataTask {
//定时获取场站指标最新数据
@Scheduled
(
cron
=
"${station.task.cron}"
)
//
@Scheduled(cron = "${station.task.cron}")
public
void
getStationDataTask
(){
//获取所有场站信息
List
<
StationTaksDto
>
list
=
stationDataTask
.
getListStationBasic
();
...
...
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