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
9c15ddfd
Commit
9c15ddfd
authored
Jul 29, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、解决风电监测,查询结果为空,获取数据报空指针异常问题
parent
2ee282ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+8
-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/IdxBizFanHealthIndexController.java
View file @
9c15ddfd
...
@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -455,7 +456,13 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -455,7 +456,13 @@ public class IdxBizFanHealthIndexController extends BaseController {
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
Double
.
parseDouble
(
fanHealthIndexDays
.
get
(
0
).
getValue
()))));
//预防查询结果为空
if
(
CollectionUtils
.
isEmpty
(
fanHealthIndexDays
)){
map
.
put
(
"value"
,
0
);
}
else
{
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
Double
.
parseDouble
(
fanHealthIndexDays
.
get
(
0
).
getValue
()))));
}
return
ResponseHelper
.
buildResponse
(
map
);
return
ResponseHelper
.
buildResponse
(
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