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
7bc290f0
Commit
7bc290f0
authored
May 21, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改健康等级查询问题
parent
a447640c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+8
-5
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+6
-6
FanHealthIndexDayMapper.java
...t/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
+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/IdxBizFanHealthIndexController.java
View file @
7bc290f0
...
...
@@ -40,6 +40,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.POST
;
import
java.sql.Timestamp
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -759,16 +761,17 @@ public class IdxBizFanHealthIndexController extends BaseController {
List
<
String
>
gatewayIds
=
permissionService
.
getCurrentUserAmosOrgCodes
();
String
orgCode
=
"NULL"
;
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
'%'
;
}
if
(
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -787,10 +790,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexHour
>
fanHealthIndexHours
=
fanHealthIndexHourMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexHour:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
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 @
7bc290f0
...
...
@@ -424,11 +424,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateParse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexDay
>
fanHealthIndexDays
=
pvHealthIndexDayMapper
.
selectData
(
station
,
analysisType
,
indexAddress
,
healthLevel
,
area
,
analysisObjType
,
subarray
,
pointName
,
startTimeTop
,
endTimeTop
,
equipmentName
,
(
current
-
1
)
*
size
,
size
,
orgCode
);
...
...
@@ -448,10 +448,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexHour
>
fanHealthIndexHours
=
pvHealthIndexHourMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexHour:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -474,10 +474,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
SimpleDateFormat
formatterNYRSF
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexMoment
>
fanHealthIndexMoments
=
pvHealthIndexMomentMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
View file @
7bc290f0
...
...
@@ -22,7 +22,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"<if test='orgCode!= null'>AND org_code like '
%${orgCode}%
' </if>"
+
"<if test='orgCode!= null'>AND org_code like '
${orgCode}
' </if>"
+
"order by health_index "
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
...
...
@@ -44,7 +44,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>"
+
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '
%${orgCode}%
' </if>"
+
"<if test='orgCode!= null'>AND org_code like '
${orgCode}
' </if>"
+
"</script>"
)
int
selectDataTotal
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
@Param
(
"orgCode"
)
String
orgCode
);
...
...
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