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
eb3a4bfa
Commit
eb3a4bfa
authored
Oct 12, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
18f8a09d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+40
-0
IdxBizFanWarningRuleSetController.java
...iop/biz/controller/IdxBizFanWarningRuleSetController.java
+1
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/AnalyseController.java
View file @
eb3a4bfa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -31,6 +35,8 @@ public class AnalyseController extends BaseController {
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Autowired
IdxBizFanHealthIndexMapper
idxBizFanHealthIndexMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-风机"
,
notes
=
"工况测点区间划分-风机"
)
...
...
@@ -154,4 +160,38 @@ public class AnalyseController extends BaseController {
public
ResponseModel
<
Map
<
String
,
String
>>
getUnitByIndexAddress
(
@RequestParam
String
stationType
,
@RequestParam
String
pointId
)
{
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getUnitByIndexAddress
(
stationType
,
pointId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取influxdb数据"
,
notes
=
"获取influxdb数据"
)
@PostMapping
(
value
=
"/getInfluxdbDataByConditon"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDataByConditon
(
@RequestParam
String
stationType
,
@RequestParam
(
required
=
false
)
String
pointId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
if
(
"FD"
.
equals
(
stationType
)){
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
indexLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getStation
,
map
.
get
(
"STATION"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getEquipmentName
,
map
.
get
(
"EQUIPNAME"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getPointName
,
map
.
get
(
"EQUIPINDEX"
)).
last
(
"limit 1"
);
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndices
=
idxBizFanHealthIndexMapper
.
selectList
(
indexLambdaQueryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
idxBizFanHealthIndices
)){
pointId
=
idxBizFanHealthIndices
.
get
(
0
).
getIndexAddress
();
}
}
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
){
Date
currentDayStartTime
=
null
;
try
{
currentDayStartTime
=
DateUtils
.
minDateOfMonth
(
new
Date
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Date
currentDayEndTime
=
DateUtils
.
getCurrentMonthEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
currentDayEndTime
,
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRuleSetController.java
View file @
eb3a4bfa
...
...
@@ -100,6 +100,7 @@ public class IdxBizFanWarningRuleSetController extends BaseController {
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
List
<
Map
<
String
,
Object
>>
data
=
idxBizFanWarningRuleSetServiceImpl
.
queryList
(
current
,
current
*
size
);
page
.
setRecords
(
data
);
int
i
=
idxBizFanWarningRuleSetServiceImpl
.
queryListCount
();
page
.
setTotal
(
i
);
return
ResponseHelper
.
buildResponse
(
page
);
...
...
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