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
104db640
Commit
104db640
authored
Aug 12, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取物联信息查询 iot数据
parent
8b1cc1a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
SystemStatisticController.java
...oin/equipmanage/controller/SystemStatisticController.java
+15
-0
IotFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
+5
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SystemStatisticController.java
View file @
104db640
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.utils.CommonPageable
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
...
...
@@ -20,6 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -98,6 +100,19 @@ public class SystemStatisticController extends AbstractBaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取物联信息"
,
notes
=
"获取物联信息"
)
public
ResponseModel
getIotInfo
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
Map
<
String
,
Object
>
map
=
fireFightingSystemMapper
.
getIotInfo
(
bizOrgCode
);
// 获取当天开始时间(0点0分0秒)
Date
startOfDay
=
DateUtil
.
beginOfDay
(
new
Date
());
String
startOfDayStr
=
DateUtil
.
formatDateTime
(
startOfDay
);
// 获取当天结束时间(23点59分59秒)
Date
endOfDay
=
DateUtil
.
endOfDay
(
new
Date
());
String
endOfDayStr
=
DateUtil
.
formatDateTime
(
endOfDay
);
ResponseModel
<
Map
<
String
,
Object
>>
mapResponseModel
=
iotFeign
.
queryIotDataNum
(
startOfDayStr
,
endOfDayStr
);
if
(
200
==
mapResponseModel
.
getStatus
()
&&
200
==
mapResponseModel
.
getStatus
())
{
Map
<
String
,
Object
>
result
=
mapResponseModel
.
getResult
();
Object
totalNum
=
result
.
get
(
"totalNum"
);
map
.
put
(
"indexMonitorNum"
,
totalNum
);
}
return
CommonResponseUtil
.
success
(
map
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
View file @
104db640
...
...
@@ -81,4 +81,9 @@ public interface IotFeign {
@RequestParam
(
"deviceName"
)
String
deviceName
,
@RequestParam
(
"timeStart"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
Date
timeStart
,
@RequestParam
(
"timeEnd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
Date
timeEnd
);
@RequestMapping
(
value
=
"v1/livedata/queryIotDataNum"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
<
Map
<
String
,
Object
>>
queryIotDataNum
(
@RequestParam
(
"timeStart"
)
String
timeStart
,
@RequestParam
(
"timeEnd"
)
String
timeEnd
);
}
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