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
371b04a6
Commit
371b04a6
authored
Jul 12, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态获取风机装态图
parent
553dc03b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+10
-1
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+30
-0
application-dev.properties
...monitor-biz/src/main/resources/application-dev.properties
+3
-0
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 @
371b04a6
...
@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.*;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -193,7 +195,14 @@ public class DemoController extends BaseController {
...
@@ -193,7 +195,14 @@ public class DemoController extends BaseController {
}
}
influxDbConnection
.
insert
(
"indicators_"
+
monitorFanIndicator
.
getGateway
(),
tag
,
maps2
,
1688558007051L
,
TimeUnit
.
MILLISECONDS
);
influxDbConnection
.
insert
(
"indicators_"
+
monitorFanIndicator
.
getGateway
(),
tag
,
maps2
,
1688558007051L
,
TimeUnit
.
MILLISECONDS
);
}
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"测试动态图片"
)
@GetMapping
(
"/test7"
)
public
ResponseModel
<
HashMap
<
String
,
String
>>
demoTest6
()
{
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"url"
,
"upload/jxiop/amos_studio/758F6F4BC695B777899485DB0C7E5D3.gif"
);
return
ResponseHelper
.
buildResponse
(
hashMap
);
}
}
}
}
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 @
371b04a6
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.elasticsearch.index.Index
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -24,6 +25,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -24,6 +25,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.File
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -51,6 +53,9 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -51,6 +53,9 @@ public class MonitorFanIdxController extends BaseController {
@Value
(
"${gl.avg.column}"
)
@Value
(
"${gl.avg.column}"
)
String
avgColumn
;
String
avgColumn
;
@Value
(
"${fan.statuts.stattuspath}"
)
private
String
fanStatusImagePathPrefix
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据设备编号、场站id、前段展示模块、系统类型查询表数据"
)
@ApiOperation
(
value
=
"根据设备编号、场站id、前段展示模块、系统类型查询表数据"
)
@GetMapping
(
"/getFanIdxInfoByPage"
)
@GetMapping
(
"/getFanIdxInfoByPage"
)
...
@@ -89,6 +94,31 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -89,6 +94,31 @@ public class MonitorFanIdxController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风机布置图 - 风机状态图片"
)
@GetMapping
(
"/getFanStatusListImage"
)
public
ResponseModel
<
IPage
<
HashMap
<
String
,
String
>>>
getFanStatusListImages
()
{
List
<
IndexDto
>
fanStatusList
=
monitorFanIndicator
.
getFanStatusList
(
"1660231556607774721"
);
List
<
IndexDto
>
collect
=
fanStatusList
.
stream
()
.
limit
(
999
)
.
collect
(
Collectors
.
toList
());
IPage
<
HashMap
<
String
,
String
>>
page
=
new
Page
<>();
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
List
<
IndexDto
>
indexDtoList
=
collect
.
stream
().
sorted
(
Comparator
.
comparing
(
IndexDto:
:
getEquipmentNumber
)).
collect
(
Collectors
.
toList
());
for
(
int
i
=
1
;
i
<=
indexDtoList
.
size
();
i
++)
{
IndexDto
indexDto
=
indexDtoList
.
get
(
i
-
1
);
hashMap
.
put
(
"url"
+
i
,
fanStatusImagePathPrefix
+
"/"
+
"风机-"
+
indexDto
.
getState
()+
".gif"
);
hashMap
.
put
(
"name"
+
i
,
indexDto
.
getEquipmentNumber
());
}
page
.
setTotal
(
10
);
page
.
setSize
(
10
);
page
.
setCurrent
(
1
);
List
<
HashMap
<
String
,
String
>>
hashMapList
=
new
ArrayList
<>();
hashMapList
.
add
(
hashMap
);
page
.
setRecords
(
hashMapList
);
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风机布置图 - 风机数量"
)
@ApiOperation
(
value
=
"风机布置图 - 风机数量"
)
@GetMapping
(
"/getFanNum"
)
@GetMapping
(
"/getFanNum"
)
public
ResponseModel
<
Integer
>
getFanNum
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
public
ResponseModel
<
Integer
>
getFanNum
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application-dev.properties
View file @
371b04a6
...
@@ -99,3 +99,6 @@ spring.activemq.user=admin
...
@@ -99,3 +99,6 @@ spring.activemq.user=admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
# ?????????
fan.statuts.stattuspath
=
upload/jxiop/device_status
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