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
e8a7e860
Commit
e8a7e860
authored
Aug 22, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into base-modify
parents
53879272
233ab582
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+15
-7
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
e8a7e860
...
@@ -437,17 +437,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -437,17 +437,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
throw
new
BaseException
(
ResultCode
.
ONLY_BOOK_TWO_MONTH
);
throw
new
BaseException
(
ResultCode
.
ONLY_BOOK_TWO_MONTH
);
}
}
//检验时间是否可以预定
//检验时间是否可以预定
Map
<
String
,
Integer
>
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
//加入预定申请记录
//加入预定申请记录
VehicleBookRecord
vehicleBookRecord
=
null
;
VehicleBookRecord
vehicleBookRecord
=
null
;
if
(
bookVehicleVo
.
getVehicleBookRecordId
()
==
null
)
{
if
(
bookVehicleVo
.
getVehicleBookRecordId
()
==
null
)
{
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
vehicleBookRecord
=
new
VehicleBookRecord
();
vehicleBookRecord
=
new
VehicleBookRecord
();
BeanUtil
.
copyProperties
(
bookVehicleVo
,
vehicleBookRecord
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
BeanUtil
.
copyProperties
(
bookVehicleVo
,
vehicleBookRecord
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
...
@@ -468,6 +469,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -468,6 +469,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
bookVehicleVo
.
setUnbookEndDate
(
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookEndDate
(
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
unbookVehicle
(
bookVehicleVo
);
unbookVehicle
(
bookVehicleVo
);
map
=
vehicleBookHourInfoBiz
.
getPredictableHours
(
bookVehicleVo
.
getBookStartDate
(),
bookVehicleVo
.
getBookEndDate
(),
bookVehicleVo
.
getNotCheckTimeLegal
());
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
(),
map
);
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
ResultCode
.
VEHICLE_IS_BOOKED
);
}
}
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
...
...
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