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
9f0485c3
Commit
9f0485c3
authored
Nov 30, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
飞书文档bug修改
parent
c58efed9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
3 deletions
+69
-3
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+29
-1
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+40
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRecordController.java
View file @
9f0485c3
...
@@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl
;
...
@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
*
*
...
@@ -52,6 +55,10 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -52,6 +55,10 @@ public class IdxBizFanWarningRecordController extends BaseController {
@Autowired
@Autowired
FanWaringRecordMapper
fanWaringRecordMapper
;
FanWaringRecordMapper
fanWaringRecordMapper
;
@Autowired
IdxBizFanPointProcessVariableClassificationMapper
idxBizFanPointProcessVariableClassificationMapper
;
/**
/**
* 新增
* 新增
*
*
...
@@ -330,13 +337,24 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -330,13 +337,24 @@ public class IdxBizFanWarningRecordController extends BaseController {
return
ResponseHelper
.
buildResponse
(
b
);
return
ResponseHelper
.
buildResponse
(
b
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectFanWarningNum"
)
@GetMapping
(
value
=
"/selectFanWarningNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询各风机预警状况"
,
notes
=
"查询各风机预警状况"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询各风机预警状况"
,
notes
=
"查询各风机预警状况"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
LambdaQueryWrapper
<
IdxBizFanPointProcessVariableClassification
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
select
(
IdxBizFanPointProcessVariableClassification:
:
getEquipmentName
);
wrapper
.
eq
(
IdxBizFanPointProcessVariableClassification:
:
getStation
,
station
);
wrapper
.
groupBy
(
IdxBizFanPointProcessVariableClassification:
:
getEquipmentName
);
wrapper
.
last
(
" ORDER BY RIGHT(EQUIPMENT_NAME,6) desc"
);
List
<
IdxBizFanPointProcessVariableClassification
>
variableClassificationList
=
idxBizFanPointProcessVariableClassificationMapper
.
selectList
(
wrapper
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
maps
=
fanWaringRecordMapper
.
selectFanWarningNum
(
station
);
List
<
Map
<
String
,
Object
>>
maps
=
fanWaringRecordMapper
.
selectFanWarningNum
(
station
);
Map
<
String
,
Map
<
String
,
Object
>>
equipmentNameInfoMap
=
maps
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"EQUIPMENT_NAME"
).
toString
(),
t
->
t
));
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
...
@@ -348,6 +366,16 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -348,6 +366,16 @@ public class IdxBizFanWarningRecordController extends BaseController {
list
.
add
(
map
.
get
(
"EQUIPMENT_NAME"
).
toString
());
list
.
add
(
map
.
get
(
"EQUIPMENT_NAME"
).
toString
());
}
}
variableClassificationList
.
forEach
(
item
->
{
if
(!
equipmentNameInfoMap
.
containsKey
(
item
.
getEquipmentName
()))
{
wxList
.
add
(
0
);
zyList
.
add
(
0
);
jgList
.
add
(
0
);
list
.
add
(
item
.
getEquipmentName
());
}
});
HashMap
<
String
,
Object
>
wxMapResult
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
wxMapResult
=
new
HashMap
<>();
wxMapResult
.
put
(
"data"
,
wxList
);
wxMapResult
.
put
(
"data"
,
wxList
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
9f0485c3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.HealthLevelSortEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.HealthLevelSortEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvHealthIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvHealthIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*
;
...
@@ -46,6 +51,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -46,6 +51,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
PvHealthIndexMomentMapper
pvHealthIndexMomentMapper
;
PvHealthIndexMomentMapper
pvHealthIndexMomentMapper
;
@Autowired
@Autowired
PvWaringRecordMapper
pvWaringRecordMapper
;
PvWaringRecordMapper
pvWaringRecordMapper
;
@Autowired
IdxBizPvPointProcessVariableClassificationMapper
idxBizPvPointProcessVariableClassificationMapper
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
/**
/**
* 新增
* 新增
...
@@ -450,6 +460,9 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -450,6 +460,9 @@ public class IdxBizPvHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
else
{
}
else
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatterNYRSF
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
if
(
null
!=
endTimeTop
){
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
endTimeTop
=
formatter
.
format
(
endDate
);
...
@@ -465,7 +478,13 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -465,7 +478,13 @@ public class IdxBizPvHealthIndexController extends BaseController {
}
else
{
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
());
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
());
}
}
axisData
.
add
(
obj
.
getAnalysisTime
());
Date
format
=
null
;
try
{
format
=
formatterNYRSF
.
parse
(
obj
.
getAnalysisTime
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
axisData
.
add
(
format
);
}
}
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
result
.
put
(
"axisData"
,
axisData
);
...
@@ -574,13 +593,24 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -574,13 +593,24 @@ public class IdxBizPvHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
maps
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectFanWarningNum"
)
@GetMapping
(
value
=
"/selectFanWarningNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询各风机预警状况"
,
notes
=
"查询各风机预警状况"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询各风机预警状况"
,
notes
=
"查询各风机预警状况"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
LambdaQueryWrapper
<
IdxBizPvPointProcessVariableClassification
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
select
(
IdxBizPvPointProcessVariableClassification:
:
getSubarray
);
wrapper
.
eq
(
IdxBizPvPointProcessVariableClassification:
:
getStation
,
station
);
wrapper
.
groupBy
(
IdxBizPvPointProcessVariableClassification:
:
getSubarray
);
wrapper
.
last
(
" ORDER BY SUBARRAY desc"
);
List
<
IdxBizPvPointProcessVariableClassification
>
variableClassificationList
=
idxBizPvPointProcessVariableClassificationMapper
.
selectList
(
wrapper
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
maps
=
pvWaringRecordMapper
.
selectFanWarningNum
(
station
);
List
<
Map
<
String
,
Object
>>
maps
=
pvWaringRecordMapper
.
selectFanWarningNum
(
station
);
Map
<
String
,
Map
<
String
,
Object
>>
equipmentNameInfoMap
=
maps
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subarray"
).
toString
(),
t
->
t
));
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
...
@@ -592,6 +622,14 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -592,6 +622,14 @@ public class IdxBizPvHealthIndexController extends BaseController {
list
.
add
(
map
.
get
(
"subarray"
).
toString
());
list
.
add
(
map
.
get
(
"subarray"
).
toString
());
}
}
variableClassificationList
.
forEach
(
item
->
{
if
(!
equipmentNameInfoMap
.
containsKey
(
item
.
getSubarray
()))
{
wxList
.
add
(
0
);
zyList
.
add
(
0
);
jgList
.
add
(
0
);
list
.
add
(
item
.
getSubarray
());
}
});
HashMap
<
String
,
Object
>
wxMapResult
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
wxMapResult
=
new
HashMap
<>();
wxMapResult
.
put
(
"data"
,
wxList
);
wxMapResult
.
put
(
"data"
,
wxList
);
...
...
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