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
53c23df8
Commit
53c23df8
authored
Jul 24, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租车bug
parent
422ce7dd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
216 additions
and
4 deletions
+216
-4
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+4
-4
ListTest.java
...ver/src/test/java/com/xxfc/platform/vehicle/ListTest.java
+18
-0
RegionTest.java
...r/src/test/java/com/xxfc/platform/vehicle/RegionTest.java
+194
-0
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
53c23df8
...
@@ -398,12 +398,8 @@ public class VehicleController extends BaseController<VehicleBiz> {
...
@@ -398,12 +398,8 @@ public class VehicleController extends BaseController<VehicleBiz> {
Integer
operatorId
=
USER_APP
;
Integer
operatorId
=
USER_APP
;
String
userName
=
dto
.
getUserName
();
String
userName
=
dto
.
getUserName
();
//BaseContextHandler.getName();
//BaseContextHandler.getName();
dto
.
setBookStartDate
(
dto
.
getBookStartDate
()+
" 00:00:00"
);
dto
.
setBookEndDate
(
dto
.
getBookEndDate
()+
" 23:59:59"
);
BookVehicleVO
bookVehicleVo
=
BeanUtil
.
toBean
(
dto
,
BookVehicleVO
.
class
);
dto
.
setLimit
(
1
);
dto
.
setLimit
(
1
);
dto
.
setPage
(
1
);
dto
.
setPage
(
1
);
bookVehicleVo
.
setBookType
(
BookType
.
USER_RENT
.
getCode
());
//查询可车辆信息
//查询可车辆信息
PageDataVO
<
Vehicle
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
dto
);
PageDataVO
<
Vehicle
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
dto
);
if
(
pageDataVO
.
getData
().
size
()
<=
0
)
{
if
(
pageDataVO
.
getData
().
size
()
<=
0
)
{
...
@@ -411,6 +407,10 @@ public class VehicleController extends BaseController<VehicleBiz> {
...
@@ -411,6 +407,10 @@ public class VehicleController extends BaseController<VehicleBiz> {
add
(
"可用车辆不存在"
);
add
(
"可用车辆不存在"
);
}});
}});
}
}
dto
.
setBookStartDate
(
dto
.
getBookStartDate
()+
" 00:00:00"
);
dto
.
setBookEndDate
(
dto
.
getBookEndDate
()+
" 23:59:59"
);
BookVehicleVO
bookVehicleVo
=
BeanUtil
.
toBean
(
dto
,
BookVehicleVO
.
class
);
bookVehicleVo
.
setBookType
(
BookType
.
USER_RENT
.
getCode
());
bookVehicleVo
.
setVehicleId
(
pageDataVO
.
getData
().
get
(
0
).
getId
());
bookVehicleVo
.
setVehicleId
(
pageDataVO
.
getData
().
get
(
0
).
getId
());
VehicleBookRecord
vehicleBookRecord
=
baseBiz
.
applyVehicle4Employee
(
operatorId
,
bookVehicleVo
,
userName
);
VehicleBookRecord
vehicleBookRecord
=
baseBiz
.
applyVehicle4Employee
(
operatorId
,
bookVehicleVo
,
userName
);
return
ObjectRestResponse
.
succ
(
vehicleBookRecord
);
return
ObjectRestResponse
.
succ
(
vehicleBookRecord
);
...
...
xx-vehicle/xx-vehicle-server/src/test/java/com/xxfc/platform/vehicle/ListTest.java
View file @
53c23df8
package
com
.
xxfc
.
platform
.
vehicle
;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
import
org.junit.Test
;
import
java.lang.reflect.Array
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
ListTest
{
@Test
public
void
ListTest
(){
List
<
Object
>
objects
=
Arrays
.
asList
();
DateTime
startDay
=
DateTime
.
parse
(
"2019-07-30 00:00:00"
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
));
System
.
out
.
println
(
startDay
);
}
}
xx-vehicle/xx-vehicle-server/src/test/java/com/xxfc/platform/vehicle/RegionTest.java
0 → 100644
View file @
53c23df8
This diff is collapsed.
Click to expand it.
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