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
65d9171f
Commit
65d9171f
authored
Nov 13, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
34cdfd81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+12
-4
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+8
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanHealthIndexController.java
View file @
65d9171f
...
...
@@ -35,6 +35,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.POST
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -66,6 +67,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
FanHealthIndexMomentMapper
fanHealthIndexMomentMapper
;
@Autowired
FanWaringRecordMapper
fanWarningRecord
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
/**
* 新增
*
...
...
@@ -381,6 +383,12 @@ public class IdxBizFanHealthIndexController extends BaseController {
startTimeTop
=
formatter
.
format
(
startDate
);
}
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,(
current
-
1
)*
size
,
size
);
fanHealthIndexDays
.
forEach
(
item
->
{
double
roundedNumber
=
Double
.
parseDouble
(
df
.
format
(
item
.
getHealthIndex
()));
item
.
setHealthIndex
(
roundedNumber
);
});
int
total
=
fanHealthIndexDayMapper
.
selectDataTotal
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
);
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setTotal
(
total
);
...
...
@@ -423,7 +431,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
fanHealthIndexDays
.
get
(
0
).
getValue
(
));
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
fanHealthIndexDays
.
get
(
0
).
getValue
())
));
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
@@ -708,7 +716,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
for
(
FanHealthIndexDay
obj
:
fanHealthIndexDays
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
obj
.
getHealthIndex
().
intValue
(
));
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())
));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
());
}
...
...
@@ -729,7 +737,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexHour:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexHour
obj
:
fanHealthIndexHours
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
obj
.
getHealthIndex
().
intValue
(
));
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())
));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
());
}
...
...
@@ -751,7 +759,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
fanHealthIndexMoments
=
fanHealthIndexMoments
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexMoment:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexMoment
obj
:
fanHealthIndexMoments
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
obj
.
getHealthIndex
().
intValue
(
));
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())
));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
65d9171f
...
...
@@ -140,8 +140,13 @@
<select
id=
"selectWarningPointTotal"
resultType=
"int"
>
SELECT
count(1)
select count(1) from (SELECT
a.station,
a.warning_name,
a.content,
a.equipment_name,
a.point_name,
a.rec_date
from
analysis_data.fan_warning_record a
where
...
...
@@ -158,7 +163,7 @@
point_name,
rec_date ,
content,
warning_name
warning_name
) b
</select>
<select
id=
"selectEquipWarningTotal"
resultType=
"map"
>
...
...
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