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
b4298805
Commit
b4298805
authored
Sep 25, 2020
by
Carit Zhu
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify to return "endCircuit" when checking the circuitState is 2 in updateEndTime interface.
parent
fe7adea4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
CircuitResultVo.java
src/main/java/com/example/tdl/domain/vo/CircuitResultVo.java
+1
-1
CircuitController.java
src/main/java/com/example/tdl/web/CircuitController.java
+13
-6
No files found.
src/main/java/com/example/tdl/domain/vo/CircuitResultVo.java
View file @
b4298805
...
...
@@ -16,7 +16,7 @@ public class CircuitResultVo {
private
Long
endTime
;
private
Integer
circuitState
;
private
Integer
circuitState
;
// 0: 未开始, 1: 运输中, 2: 完成
private
String
alarmType
;
...
...
src/main/java/com/example/tdl/web/CircuitController.java
View file @
b4298805
...
...
@@ -1223,20 +1223,27 @@ public class CircuitController {
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"transportationNo"
));
return
gson
.
toJson
(
fb
);
}
if
(
circuitService
.
getByTransportationNo
(
updateCircuitVo
.
getTransportationNo
(),
user
.
getCompanyNo
())==
null
){
ResultCircuitVo
resultCircuitVo
=
circuitService
.
getByTransportationNo
(
updateCircuitVo
.
getTransportationNo
(),
user
.
getCompanyNo
());
if
(
resultCircuitVo
==
null
)
{
// 线路不存在
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"noCircuit"
));
return
gson
.
toJson
(
fb
);
}
if
(
updateCircuitVo
.
getEndTime
()==
null
){
updateCircuitVo
.
setEndTime
(
System
.
currentTimeMillis
());
}
if
(
circuitService
.
getByTransportationNo
(
updateCircuitVo
.
getTransportationNo
(),
user
.
getCompanyNo
()).
getCircuitState
()
==
0
){
if
(
resultCircuitVo
.
getCircuitState
()
==
0
)
{
// 线路还未开始
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"notStarted"
));
return
gson
.
toJson
(
fb
);
}
ResultCircuitVo
resultCircuitVo
=
circuitService
.
getByTransportationNo
(
updateCircuitVo
.
getTransportationNo
(),
user
.
getCompanyNo
());
if
(
resultCircuitVo
.
getCircuitState
()
==
2
)
{
// 线路已经结束
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"endCircuit"
));
return
gson
.
toJson
(
fb
);
}
// 结束时间没有传则使用后台当前时间戳
if
(
updateCircuitVo
.
getEndTime
()==
null
){
updateCircuitVo
.
setEndTime
(
System
.
currentTimeMillis
());
}
//获取当前线路的gateway 和tdl信息
TDLLogVo
tdlLogVo
=
tdlLogService
.
getByTransportationNo
(
updateCircuitVo
.
getTransportationNo
());
if
(
tdlLogVo
==
null
){
...
...
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