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
cb283c02
Commit
cb283c02
authored
Nov 06, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加出车日志
parent
5494b4e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+9
-2
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
cb283c02
...
@@ -62,10 +62,12 @@ public class VehicleActiveService {
...
@@ -62,10 +62,12 @@ public class VehicleActiveService {
log
.
info
(
"出车参数: departureVo = {}"
,
departureVo
.
toString
());
log
.
info
(
"出车参数: departureVo = {}"
,
departureVo
.
toString
());
Vehicle
vehicle
=
vehicleBiz
.
selectById
(
departureVo
.
getVehicleId
());
Vehicle
vehicle
=
vehicleBiz
.
selectById
(
departureVo
.
getVehicleId
());
if
(
vehicle
==
null
)
{
if
(
vehicle
==
null
)
{
log
.
info
(
"出车异常,车辆不存在!"
);
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getDesc
(),
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getCode
());
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getCode
());
}
}
if
(
StringUtils
.
isBlank
(
departureVo
.
getCheckMan
())
||
StringUtils
.
isBlank
(
departureVo
.
getCheckManTel
()))
{
if
(
StringUtils
.
isBlank
(
departureVo
.
getCheckMan
())
||
StringUtils
.
isBlank
(
departureVo
.
getCheckManTel
()))
{
log
.
error
(
"出车 核销人姓名不能为空!"
);
throw
new
BaseException
(
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getDesc
(),
throw
new
BaseException
(
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getDesc
(),
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getCode
());
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getCode
());
}
}
...
@@ -74,7 +76,11 @@ public class VehicleActiveService {
...
@@ -74,7 +76,11 @@ public class VehicleActiveService {
ResCode
.
VEHICLE_STATUS_IS_NOT_NORMAL
.
getCode
());
ResCode
.
VEHICLE_STATUS_IS_NOT_NORMAL
.
getCode
());
}
}
//添加出车时间过滤 再出车开始时间前一天至结束时间内可以出车,并且预定记录为已审核状态
//添加出车时间过滤 再出车开始时间前一天至结束时间内可以出车,并且预定记录为已审核状态
try
{
checkDateInvalid
(
departureVo
);
checkDateInvalid
(
departureVo
);
}
catch
(
BaseException
b
)
{
throw
new
BaseException
(
b
.
getMessage
(),
b
.
getStatus
());
}
Integer
MileageLift
=
vehicle
.
getMileageLastUpdate
();
Integer
MileageLift
=
vehicle
.
getMileageLastUpdate
();
Integer
MileageLift1
=
departureVo
.
getMileage
();
Integer
MileageLift1
=
departureVo
.
getMileage
();
if
(
MileageLift1
==
null
)
{
if
(
MileageLift1
==
null
)
{
...
@@ -259,7 +265,7 @@ public class VehicleActiveService {
...
@@ -259,7 +265,7 @@ public class VehicleActiveService {
throw
new
BaseException
(
ResCode
.
VEHICLE_UNBOOK_FAIL
.
getDesc
(),
ResCode
.
VEHICLE_UNBOOK_FAIL
.
getCode
());
throw
new
BaseException
(
ResCode
.
VEHICLE_UNBOOK_FAIL
.
getDesc
(),
ResCode
.
VEHICLE_UNBOOK_FAIL
.
getCode
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"提前还车失败,bookVehicleVo = {}"
,
bookVehicleVo
.
toString
());
log
.
error
(
"提前还车失败,bookVehicleVo = {}"
,
bookVehicleVo
.
toString
());
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
else
if
(
actualArrivalDate
.
compareTo
(
arrivalDate
)
>
0
)
{
//实际还车时间大于预计还车时间
}
else
if
(
actualArrivalDate
.
compareTo
(
arrivalDate
)
>
0
)
{
//实际还车时间大于预计还车时间
...
@@ -339,6 +345,7 @@ public class VehicleActiveService {
...
@@ -339,6 +345,7 @@ public class VehicleActiveService {
}
}
}
}
if
(!(
startDate
.
minusDays
(
1
).
compareTo
(
DateTime
.
now
())
<=
0
&&
DateTime
.
now
().
compareTo
(
endDate
)
<=
0
&&
vehicleBookRecord
.
getStatus
()
==
VehicleBookRecordStatus
.
APPROVE
.
getCode
()
&&
(
list
==
null
||
list
.
size
()
<=
0
)))
{
if
(!(
startDate
.
minusDays
(
1
).
compareTo
(
DateTime
.
now
())
<=
0
&&
DateTime
.
now
().
compareTo
(
endDate
)
<=
0
&&
vehicleBookRecord
.
getStatus
()
==
VehicleBookRecordStatus
.
APPROVE
.
getCode
()
&&
(
list
==
null
||
list
.
size
()
<=
0
)))
{
log
.
error
(
"出车过滤,有正常未还车记录,请按照预定的日期出车"
);
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getDesc
(),
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED
.
getCode
());
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