Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
c94a1bb2
Commit
c94a1bb2
authored
Sep 10, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提前还车逻辑
parent
026f9ad9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+3
-5
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
c94a1bb2
...
...
@@ -88,10 +88,6 @@ public class VehicleActiveService {
// 修改车辆状态,确认是空闲状态
int
result
=
vehicleMapper
.
updateStatusByIdAndStatus
(
departureVo
.
getVehicleId
(),
VehicleStatus
.
DEPARTURE
.
getCode
(),
VehicleStatus
.
NORMAL
.
getCode
());
if
(!
vehicle
.
getStatus
().
equals
(
VehicleStatus
.
NORMAL
.
getCode
()))
{
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_DISABLE
.
getDesc
()
+
", 车辆状态是:"
+
getVehicleStatus
(
vehicle
.
getStatus
(),
vehicle
.
getId
()),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_DISABLE
.
getCode
());
}
//修改预约记录状态
VehicleBookRecord
vehicleBookRecord
=
null
;
if
(
departureVo
.
getBookRecordId
()
!=
null
)
{
...
...
@@ -302,11 +298,13 @@ public class VehicleActiveService {
Iterator
<
VehicleBookRecordVo
>
iterator
=
list
.
iterator
();
while
(
iterator
.
hasNext
())
{
VehicleBookRecordVo
vehicleBookRecordVo
=
iterator
.
next
();
if
(
vehicleBookRecordVo
.
getVehicleDepartureLogVo
()
==
null
&&
vehicleBookRecordVo
.
getBookEndDate
().
getTime
()
-
new
Date
().
getTime
()
<
0
)
{
//未出车且出车时间小于当前时间
if
(
vehicleBookRecordVo
.
getVehicleDepartureLogVo
()
==
null
&&
(
vehicleBookRecordVo
.
getBookEndDate
().
getTime
()
-
new
Date
().
getTime
())
<
0
)
{
iterator
.
remove
();
}
}
}
//出车前一天,且当前时间小于结束时间,且没有未出车的记录
if
(!(
startDate
.
minusDays
(
1
).
compareTo
(
DateTime
.
now
())
<=
0
&&
DateTime
.
now
().
compareTo
(
endDate
)
<=
0
&&
vehicleBookRecord
.
getStatus
()
==
VehicleBookRecordStatus
.
APPROVE
.
getCode
()
&&
(
list
==
null
||
list
.
size
()
<=
0
)))
{
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getCode
());
...
...
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