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
56bde389
Commit
56bde389
authored
Oct 26, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
f8afbc91
8873bfb5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+16
-12
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+0
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+2
-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/AnalyseController.java
View file @
56bde389
...
...
@@ -139,16 +139,18 @@ public class AnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取influxdb数据"
,
notes
=
"获取influxdb数据"
)
@GetMapping
(
value
=
"/getInfluxdbDataByConditon"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfluxdbDataByConditon
(
@RequestParam
String
stationType
,
@RequestParam
String
pointId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
current
DayStartTime
=
null
;
if
(
StringUtils
.
isEmpty
(
startTime
)
)
{
Date
sevenAgo
DayStartTime
=
null
;
try
{
currentDayStartTime
=
DateUtils
.
minDateOfMonth
(
new
Date
()
);
sevenAgoDayStartTime
=
DateUtils
.
dateAddDays
(
new
Date
(),
-
7
);
}
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
);
startTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
sevenAgoDayStartTime
,
-
8
),
DateUtils
.
DATE_TIME_PATTERN
);
}
DateUtils
.
dateAddHours
(
DateUtils
.
getCurrentDayStartTime
(
new
Date
()),
-
8
);
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
8
),
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
...
...
@@ -180,16 +182,18 @@ public class AnalyseController extends BaseController {
}
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
current
DayStartTime
=
null
;
if
(
StringUtils
.
isEmpty
(
startTime
)
)
{
Date
sevenAgo
DayStartTime
=
null
;
try
{
currentDayStartTime
=
DateUtils
.
minDateOfMonth
(
new
Date
()
);
sevenAgoDayStartTime
=
DateUtils
.
dateAddDays
(
new
Date
(),
-
7
);
}
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
);
startTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
sevenAgoDayStartTime
,
-
8
),
DateUtils
.
DATE_TIME_PATTERN
);
}
DateUtils
.
dateAddHours
(
DateUtils
.
getCurrentDayStartTime
(
new
Date
()),
-
8
);
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
8
),
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/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
56bde389
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
56bde389
...
...
@@ -1002,7 +1002,7 @@
HEALTH_INDEX,
HEALTH_INDEX as value,
HEALTH_LEVEL,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '
告警
' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '
警告
' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
SUB_SYSTEM,
REC_DATE,
EQUIPMENT_NAME,
...
...
@@ -1048,7 +1048,7 @@
CAST(HEALTH_INDEX AS UNSIGNED) as HEALTH_INDEX,
CAST(HEALTH_INDEX AS UNSIGNED) as value,
HEALTH_LEVEL,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '
告警
' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '
警告
' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS status,
SUB_SYSTEM,
REC_DATE,
EQUIPMENT_NAME,
...
...
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