Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
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
WitCloud
TDLCloud
Commits
81440563
Commit
81440563
authored
Oct 31, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警日志接口增加空值判断
parent
dc9380b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
64 deletions
+67
-64
AlarmLogController.java
src/main/java/com/example/tdl/web/AlarmLogController.java
+67
-64
No files found.
src/main/java/com/example/tdl/web/AlarmLogController.java
View file @
81440563
...
...
@@ -188,6 +188,7 @@ public class AlarmLogController {
//根据gateway的信息获取线路信息
String
transportationNo
=
gatewayService
.
getTransportationNo
(
addAlarmLogVo
.
getGsn
(),
addAlarmLogVo
.
getGtype
());
//获取终点,起点
if
(!
StringUtils
.
isEmpty
(
transportationNo
)){
ResultCircuitVo
resultCircuitVo
=
circuitService
.
getCircuit
(
transportationNo
);
for
(
int
i
=
0
,
length
=
addAlarmLogVo
.
getAlarm
().
size
();
i
<
length
;
i
++){
if
(
addAlarmLogVo
.
getAlarm
().
get
(
i
).
getAlarmno
()
!=
null
&&
addAlarmLogVo
.
getAlarm
().
get
(
i
).
getAlarmno
()
==
0
){
...
...
@@ -222,9 +223,11 @@ public class AlarmLogController {
fb
.
setMessage
(
"添加成功"
);
}
}
}
}
else
{
//根据gateway获取仓库编号
String
warehouseNo
=
gatewayService
.
getWarehouseNo
(
addAlarmLogVo
.
getGsn
(),
addAlarmLogVo
.
getGtype
());
if
(!
StringUtils
.
isEmpty
(
warehouseNo
)){
for
(
int
i
=
0
,
length
=
addAlarmLogVo
.
getAlarm
().
size
();
i
<
length
;
i
++){
if
(
addAlarmLogVo
.
getAlarm
().
get
(
i
).
getAlarmno
()
!=
null
&&
addAlarmLogVo
.
getAlarm
().
get
(
i
).
getAlarmno
()
==
0
){
continue
;
...
...
@@ -250,7 +253,7 @@ public class AlarmLogController {
}
}
}
}
return
gson
.
toJson
(
fb
);
}
...
...
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