Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
5bc24244
Commit
5bc24244
authored
Aug 12, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改计算分数bug
parent
de106d1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+16
-20
PvHealthIndexMapper.java
.../boot/module/jxiop/biz/tdMapper2/PvHealthIndexMapper.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TdInfoQueryController.java
View file @
5bc24244
...
@@ -104,22 +104,19 @@ public class TdInfoQueryController extends BaseController {
...
@@ -104,22 +104,19 @@ public class TdInfoQueryController extends BaseController {
String
startDate
=
dto
.
getStartDate
();
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_day"
,
startDate
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_day"
,
startDate
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_hour"
,
startDate
+
":00:00"
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_hour"
,
startDate
+
":00:00"
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
String
nextWholeMinute
=
DateUtils
.
getNextWholeMinute
(
dto
.
getStartDate
()+
":00"
);
String
nextWholeMinute
=
DateUtils
.
getNextWholeMinute
(
dto
.
getStartDate
()+
":00"
);
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_moment"
,
nextWholeMinute
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_moment"
,
nextWholeMinute
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
{
}
else
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_data"
,
startDate
+
" 00:00:00"
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_data"
,
startDate
+
" 00:00:00"
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
}
}
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
dateNowShortStr
=
DateUtils
.
getDateNowShortStr
();
String
dateNowShortStr
=
DateUtils
.
getDateNowShortStr
();
...
@@ -129,22 +126,21 @@ public class TdInfoQueryController extends BaseController {
...
@@ -129,22 +126,21 @@ public class TdInfoQueryController extends BaseController {
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DateUtils
.
DATE_PATTERN
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DateUtils
.
DATE_PATTERN
);
endDate
=
formatter
.
format
(
date
);
endDate
=
formatter
.
format
(
date
);
}
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_day"
,
endDate
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_day"
,
endDate
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"fan_health_index_day"
);
dto
.
setTableName
(
"fan_health_index_day"
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_hour"
,
endDate
+
":00:00"
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_hour"
,
endDate
+
":00:00"
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"fan_health_index_hour"
);
dto
.
setTableName
(
"fan_health_index_hour"
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
String
nextWholeMinute
=
DateUtils
.
getBeforeWholeMinute
(
endDate
+
":00"
);
String
nextWholeMinute
=
DateUtils
.
getBeforeWholeMinute
(
endDate
+
":00"
);
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_moment"
,
nextWholeMinute
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_moment"
,
nextWholeMinute
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"fan_health_index_moment"
);
dto
.
setTableName
(
"fan_health_index_moment"
);
}
else
{
}
else
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_data"
,
endDate
+
" 00:00:00"
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"fan_health_index_data"
,
endDate
+
" 00:00:00"
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"fan_health_index_data"
);
dto
.
setTableName
(
"fan_health_index_data"
);
}
}
...
@@ -218,17 +214,17 @@ public class TdInfoQueryController extends BaseController {
...
@@ -218,17 +214,17 @@ public class TdInfoQueryController extends BaseController {
String
startDate
=
dto
.
getStartDate
();
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_day"
,
startDate
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_day"
,
startDate
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_hour"
,
startDate
+
":00:00"
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_hour"
,
startDate
+
":00:00"
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
String
nextWholeMinute
=
DateUtils
.
getNextWholeMinute
(
dto
.
getStartDate
()+
":00"
);
String
nextWholeMinute
=
DateUtils
.
getNextWholeMinute
(
dto
.
getStartDate
()+
":00"
);
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_moment"
,
nextWholeMinute
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_moment"
,
nextWholeMinute
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
else
{
}
else
{
l
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_data"
,
startDate
+
" 00:00:00"
,
"Asc "
);
L
ong
startTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_data"
,
startDate
+
" 00:00:00"
,
"Asc "
);
dto
.
setStartDateTs
(
startTs
);
dto
.
setStartDateTs
(
startTs
);
}
}
...
@@ -244,20 +240,20 @@ public class TdInfoQueryController extends BaseController {
...
@@ -244,20 +240,20 @@ public class TdInfoQueryController extends BaseController {
endDate
=
formatter
.
format
(
date
);
endDate
=
formatter
.
format
(
date
);
}
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_day"
,
endDate
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_day"
,
endDate
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"pv_health_index_day"
);
dto
.
setTableName
(
"pv_health_index_day"
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_hour"
,
endDate
+
":00:00"
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_hour"
,
endDate
+
":00:00"
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"pv_health_index_hour"
);
dto
.
setTableName
(
"pv_health_index_hour"
);
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
}
else
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
String
nextWholeMinute
=
DateUtils
.
getBeforeWholeMinute
(
endDate
+
":00"
);
String
nextWholeMinute
=
DateUtils
.
getBeforeWholeMinute
(
endDate
+
":00"
);
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_moment"
,
nextWholeMinute
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_moment"
,
nextWholeMinute
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"pv_health_index_moment"
);
dto
.
setTableName
(
"pv_health_index_moment"
);
}
else
{
}
else
{
l
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_data"
,
endDate
+
" 00:00:00"
,
"desc "
);
L
ong
endTs
=
pvHealthIndexMapper
.
getTsByRecDate
(
"pv_health_index_data"
,
endDate
+
" 00:00:00"
,
"desc "
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setEndDateTs
(
endTs
);
dto
.
setTableName
(
"pv_health_index_data"
);
dto
.
setTableName
(
"pv_health_index_data"
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/PvHealthIndexMapper.java
View file @
5bc24244
...
@@ -62,7 +62,7 @@ public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
...
@@ -62,7 +62,7 @@ public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
List
<
PvHealthIndex
>
getInfoByPage
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
List
<
PvHealthIndex
>
getInfoByPage
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
l
ong
getTsByRecDate
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"recDate"
)
String
recDate
,
@Param
(
"sort"
)
String
sort
);
L
ong
getTsByRecDate
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"recDate"
)
String
recDate
,
@Param
(
"sort"
)
String
sort
);
Integer
getInfoByPageTotal
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
Integer
getInfoByPageTotal
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
...
...
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