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
c4a8b06a
Commit
c4a8b06a
authored
Jul 13, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增初始化升压站方法
parent
20025645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+9
-15
No files found.
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 @
c4a8b06a
...
@@ -149,8 +149,7 @@ public class DemoController extends BaseController {
...
@@ -149,8 +149,7 @@ public class DemoController extends BaseController {
@ApiOperation
(
value
=
"初始化升压站"
)
@ApiOperation
(
value
=
"初始化升压站"
)
@GetMapping
(
"/test6"
)
@GetMapping
(
"/test6"
)
public
void
demoTest5
()
{
public
void
demoTest5
()
{
// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
//!!!!!!!!!!!!!!注意 初始化升压站的时候需要先更新monitor_fan_indicator_copy2表数据 且修改entity的表映射为monitor_fan_indicator_copy2
// System.out.println(o.toString());
QueryWrapper
<
MonitorFanIndicator
>
QueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
MonitorFanIndicator
>
QueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
.
eq
(
"gateway"
,
"1668801570352926721"
);
QueryWrapper
.
eq
(
"gateway"
,
"1668801570352926721"
);
long
DATE
=
new
Date
().
getTime
();
long
DATE
=
new
Date
().
getTime
();
...
@@ -160,19 +159,14 @@ public class DemoController extends BaseController {
...
@@ -160,19 +159,14 @@ public class DemoController extends BaseController {
for
(
MonitorFanIndicator
monitorFanIndicator
:
list
)
{
for
(
MonitorFanIndicator
monitorFanIndicator
:
list
)
{
Map
<
String
,
String
>
tag
=
new
HashMap
<>();
Map
<
String
,
String
>
tag
=
new
HashMap
<>();
Map
<
String
,
Object
>
maps2
=
new
HashMap
<>();
Map
<
String
,
Object
>
maps2
=
new
HashMap
<>();
//-------------------tag----------
tag
.
put
(
"address"
,
monitorFanIndicator
.
getIndexAddress
());
tag
.
put
(
"address"
,
monitorFanIndicator
.
getIndexAddress
());
tag
.
put
(
"dataType"
,
""
);
tag
.
put
(
"dataType"
,
monitorFanIndicator
.
getDataType
());
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
getDataType
()))
{
tag
.
put
(
"dataType"
,
monitorFanIndicator
.
getDataType
());
}
tag
.
put
(
"equipmentSpecificName"
,
monitorFanIndicator
.
getFanCode
());
tag
.
put
(
"equipmentSpecificName"
,
monitorFanIndicator
.
getFanCode
());
tag
.
put
(
"equipmentsIdx"
,
monitorFanIndicator
.
getAddressGateway
());
tag
.
put
(
"equipmentsIdx"
,
monitorFanIndicator
.
getAddressGateway
());
tag
.
put
(
"gatewayId"
,
monitorFanIndicator
.
getGateway
());
tag
.
put
(
"gatewayId"
,
monitorFanIndicator
.
getGateway
());
tag
.
put
(
"isAlarm"
,
monitorFanIndicator
.
getIsAlarm
());
tag
.
put
(
"isAlarm"
,
monitorFanIndicator
.
getIsAlarm
());
//--------------------field------------------------
maps2
.
put
(
"createdTime"
,
"2023-07-05 18:30:26"
);
maps2
.
put
(
"createdTime"
,
"2023-07-05 18:30:26"
);
maps2
.
put
(
"unit"
,
""
);
maps2
.
put
(
"unit"
,
""
);
maps2
.
put
(
"value"
,
""
);
maps2
.
put
(
"value"
,
""
);
...
@@ -183,14 +177,14 @@ public class DemoController extends BaseController {
...
@@ -183,14 +177,14 @@ public class DemoController extends BaseController {
maps2
.
put
(
"frontModule"
,
""
);
maps2
.
put
(
"frontModule"
,
""
);
maps2
.
put
(
"systemType"
,
""
);
maps2
.
put
(
"systemType"
,
""
);
//升压站的字段显示名称
//升压站的字段显示名称
maps2
.
put
(
"displayName"
,
""
);
maps2
.
put
(
"displayName"
,
monitorFanIndicator
.
getEquipmentNumber
()
);
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
getFrontModule
()))
{
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
getFrontModule
()))
{
maps2
.
put
(
"frontModule"
,
monitorFanIndicator
.
getFrontModule
());
maps2
.
put
(
"frontModule"
,
monitorFanIndicator
.
getFrontModule
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
getSystemType
()))
{
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
getSystemType
()))
{
maps2
.
put
(
"systemType"
,
monitorFanIndicator
.
getSystemType
());
maps2
.
put
(
"systemType"
,
monitorFanIndicator
.
getSystemType
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
get
SystemType
()))
{
if
(!
ObjectUtils
.
isEmpty
(
monitorFanIndicator
.
get
Unit
()))
{
maps2
.
put
(
"unit"
,
monitorFanIndicator
.
getUnit
());
maps2
.
put
(
"unit"
,
monitorFanIndicator
.
getUnit
());
}
}
influxDbConnection
.
insert
(
"indicators_"
+
monitorFanIndicator
.
getGateway
(),
tag
,
maps2
,
1688558007051L
,
TimeUnit
.
MILLISECONDS
);
influxDbConnection
.
insert
(
"indicators_"
+
monitorFanIndicator
.
getGateway
(),
tag
,
maps2
,
1688558007051L
,
TimeUnit
.
MILLISECONDS
);
...
@@ -200,9 +194,9 @@ public class DemoController extends BaseController {
...
@@ -200,9 +194,9 @@ public class DemoController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"测试动态图片"
)
@ApiOperation
(
value
=
"测试动态图片"
)
@GetMapping
(
"/test7"
)
@GetMapping
(
"/test7"
)
public
ResponseModel
<
HashMap
<
String
,
String
>>
demoTest6
()
{
public
ResponseModel
<
HashMap
<
String
,
String
>>
demoTest6
()
{
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"url"
,
"upload/jxiop/amos_studio/758F6F4BC695B777899485DB0C7E5D3.gif"
);
hashMap
.
put
(
"url"
,
"upload/jxiop/amos_studio/758F6F4BC695B777899485DB0C7E5D3.gif"
);
return
ResponseHelper
.
buildResponse
(
hashMap
);
return
ResponseHelper
.
buildResponse
(
hashMap
);
}
}
}
}
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