Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_java
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
葛齐林
energyai_java
Commits
7503fa3f
Commit
7503fa3f
authored
Apr 13, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口调整
parent
0789393b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
AnalysisServiceImpl.java
...rm/admin/modules/eq/service/impl/AnalysisServiceImpl.java
+13
-8
TotalDayMapper.xml
...ice-admin/src/main/resources/mapper/eq/TotalDayMapper.xml
+1
-1
TotalHourMapper.xml
...ce-admin/src/main/resources/mapper/eq/TotalHourMapper.xml
+1
-1
No files found.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/AnalysisServiceImpl.java
View file @
7503fa3f
...
...
@@ -32,8 +32,13 @@ public class AnalysisServiceImpl implements AnalysisService {
try
{
SysSystemParams
sysSystemParams
=
sysSystemParamsService
.
getById
(
Constants
.
STRING_1
);
Integer
dayTime
=
Integer
.
valueOf
(
sysSystemParams
.
getSystemRunningTime
())/(
24
*
60
*
60
);
Integer
hourTime
=
Integer
.
valueOf
(
sysSystemParams
.
getSystemRunningTime
())%(
24
*
60
*
60
)/(
60
*
60
);
List
<
Integer
>
timeList
=
new
ArrayList
<>();
timeList
.
add
(
dayTime
);
timeList
.
add
(
hourTime
);
//系统运行时间
map
.
put
(
"systemRunningTime"
,
sysSystemParams
.
getSystemRunningTime
()
);
map
.
put
(
"systemRunningTime"
,
timeList
);
//报警总数
map
.
put
(
"faultAlarm"
,
2
);
//供暖模式
...
...
@@ -57,16 +62,16 @@ public class AnalysisServiceImpl implements AnalysisService {
energy
.
put
(
"sdSystemRunningTimeMonth"
,
sysSystemParams
.
getSdSystemRunningTimeMonth
());
//节能运行时间-月
energy
.
put
(
"jnSystemRunningTimeMonth"
,
sysSystemParams
.
getJnSystemRunningTimeMonth
());
energy
.
put
(
"sdEnergyMonth"
,
100
);
energy
.
put
(
"jnEnergyMonth"
,
100
);
energy
.
put
(
"totalEnergyMonth"
,
200
);
energy
.
put
(
"sdEnergyMonth"
,
100
0
);
energy
.
put
(
"jnEnergyMonth"
,
100
0
);
energy
.
put
(
"totalEnergyMonth"
,
200
0
);
map
.
put
(
"energy"
,
energy
);
//能耗统计
List
<
List
<
String
>>
list
=
new
ArrayList
<
List
<
String
>>();
//当天
List
<
TotalHour
>
listHour
=
totalHourService
.
queryList
();
for
(
int
i
=
0
;
i
<
Integer
.
valueOf
(
DateUtil
.
getNowHour
());
i
++)
{
for
(
int
i
=
0
;
i
<
=
Integer
.
valueOf
(
DateUtil
.
getNowHour
());
i
++)
{
Boolean
flag
=
true
;
List
<
String
>
listDetail
=
new
ArrayList
<
String
>();
for
(
TotalHour
bean
:
listHour
){
...
...
@@ -82,7 +87,7 @@ public class AnalysisServiceImpl implements AnalysisService {
// 0 代表前面补充0
// 10代表长度为10
// d 代表参数为正数型
listDetail
.
add
(
DateUtils
.
format
(
new
Date
())
+
String
.
format
(
"%02d"
,
i
)
+
":00:00"
);
listDetail
.
add
(
DateUtils
.
format
(
new
Date
())
+
" "
+
String
.
format
(
"%02d"
,
i
)
+
":00:00"
);
listDetail
.
add
(
Constants
.
STRING_0
);
}
list
.
add
(
listDetail
);
...
...
@@ -92,7 +97,7 @@ public class AnalysisServiceImpl implements AnalysisService {
List
<
List
<
String
>>
listMonth
=
new
ArrayList
<
List
<
String
>>();
//当月
List
<
TotalDay
>
listDay
=
totalDayService
.
queryList
();
for
(
int
i
=
0
;
i
<
Integer
.
valueOf
(
DateUtil
.
getNowDay
());
i
++)
{
for
(
int
i
=
1
;
i
<=
Integer
.
valueOf
(
DateUtil
.
getNowDay
());
i
++)
{
Boolean
flag
=
true
;
List
<
String
>
listDetail
=
new
ArrayList
<
String
>();
for
(
TotalDay
bean
:
listDay
){
...
...
@@ -113,7 +118,7 @@ public class AnalysisServiceImpl implements AnalysisService {
}
listMonth
.
add
(
listDetail
);
}
map
.
put
(
"energyList"
,
list
Day
);
map
.
put
(
"energyList"
,
list
);
map
.
put
(
"energyListMonth"
,
listMonth
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
microservice-admin/src/main/resources/mapper/eq/TotalDayMapper.xml
View file @
7503fa3f
...
...
@@ -39,7 +39,7 @@
</if>
</select>
<select
id=
"queryList"
resultType=
"com.devplatform.admin.modules.eq.bean.TotalDay"
>
select * from total_day where
TO_DAYS(create_time) = TO_DAYS(NOW()
)
select * from total_day where
DATE_FORMAT(create_time,'%Y%m') = DATE_FORMAT(CURDATE( ),'%Y%m'
)
order by create_time
</select>
...
...
microservice-admin/src/main/resources/mapper/eq/TotalHourMapper.xml
View file @
7503fa3f
...
...
@@ -39,7 +39,7 @@
</if>
</select>
<select
id=
"queryList"
resultType=
"com.devplatform.admin.modules.eq.bean.TotalHour"
>
select * from total_
day where DATE_FORMAT(create_time,'%Y%m') = DATE_FORMAT(CURDATE( ),'%Y%m'
)
select * from total_
hour where TO_DAYS(create_time) = TO_DAYS(NOW()
)
order by create_time
</select>
...
...
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