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
535a5bf3
Commit
535a5bf3
authored
Sep 03, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-price' into dev-tiande
parents
ac13074d
013741c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+1
-1
VehicleHolidayPriceInfoController.java
...tform/vehicle/rest/VehicleHolidayPriceInfoController.java
+13
-13
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
535a5bf3
...
@@ -663,7 +663,7 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
...
@@ -663,7 +663,7 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
if
(
StrUtil
.
isNotBlank
(
priceStartDate
)
&&
StrUtil
.
isNotBlank
(
priceEndDate
))
{
if
(
StrUtil
.
isNotBlank
(
priceStartDate
)
&&
StrUtil
.
isNotBlank
(
priceEndDate
))
{
vehicleVO
.
setPriceDTOS
(
vehicleHolidayPriceInfoBiz
.
getSynthesizePrice
(
vehicleVO
.
getId
(),
priceStartDate
,
priceEndDate
,
null
,
vehicleVO
.
getSubordinateBranch
()));
vehicleVO
.
setPriceDTOS
(
vehicleHolidayPriceInfoBiz
.
getSynthesizePrice
(
vehicleVO
.
getId
(),
priceStartDate
,
priceEndDate
,
null
,
vehicleVO
.
getSubordinateBranch
()));
}
else
{
}
else
{
vehicleVO
.
setPriceDTOS
(
vehicleHolidayPriceInfoBiz
.
getSynthesizePrice
(
vehicleVO
.
getId
(),
DateUtil
.
today
(),
DateUtil
.
offsetDay
(
DateUtil
.
date
(),
7
).
toDateStr
(),
null
,
vehicleVO
.
getSubordinateBranch
()));
vehicleVO
.
setPriceDTOS
(
vehicleHolidayPriceInfoBiz
.
getSynthesizePrice
(
vehicleVO
.
getId
(),
DateUtil
.
today
(),
DateUtil
.
offsetDay
(
DateUtil
.
date
(),
6
).
toDateStr
(),
null
,
vehicleVO
.
getSubordinateBranch
()));
}
}
return
RestResponse
.
data
(
vehicleVO
);
return
RestResponse
.
data
(
vehicleVO
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleHolidayPriceInfoController.java
View file @
535a5bf3
...
@@ -52,22 +52,22 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
...
@@ -52,22 +52,22 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
@GetMapping
(
value
=
"multiCalendarPrice"
)
@GetMapping
(
value
=
"multiCalendarPrice"
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
<
List
<
VehicleVO
>>
multiCalendarPrice
(
String
startDate
,
String
endDate
,
Integer
companyId
)
{
public
ObjectRestResponse
<
List
<
VehicleVO
>>
multiCalendarPrice
(
String
vehicleIds
,
String
startDate
,
String
endDate
)
{
Integer
userId
=
Integer
.
valueOf
(
getCurrentUserId
());
Integer
userId
=
Integer
.
valueOf
(
getCurrentUserId
());
List
<
VehicleVO
>
vehicleVOS
=
CollUtil
.
newArrayList
();
List
<
VehicleVO
>
vehicleVOS
=
CollUtil
.
newArrayList
();
//
if(StrUtil.isNotBlank(vehicleIds)) {
if
(
StrUtil
.
isNotBlank
(
vehicleIds
))
{
//
String[] strs = StrUtil.split(vehicleIds, ",");
String
[]
strs
=
StrUtil
.
split
(
vehicleIds
,
","
);
//
List<Vehicle> vehicleList = vehicleBiz.selectByWeekend(w -> {
List
<
Vehicle
>
vehicleList
=
vehicleBiz
.
selectByWeekend
(
w
->
{
//
w.andIn(Vehicle::getId, CollUtil.toList(strs));
w
.
andIn
(
Vehicle:
:
getId
,
CollUtil
.
toList
(
strs
));
//
return w;
return
w
;
//
});
});
//
for (Vehicle vehicle : vehicleList) {
for
(
Vehicle
vehicle
:
vehicleList
)
{
//
VehicleVO vehicleVO = BeanUtil.toBean(vehicle, VehicleVO.class);
VehicleVO
vehicleVO
=
BeanUtil
.
toBean
(
vehicle
,
VehicleVO
.
class
);
// vehicleVO.setPriceDTOS(baseBiz.getSynthesizePrice(vehicle.getId(), startDate, endDate, userId, companyId
));
vehicleVO
.
setPriceDTOS
(
baseBiz
.
getSynthesizePrice
(
vehicle
.
getId
(),
startDate
,
endDate
,
userId
,
vehicle
.
getSubordinateBranch
()
));
//
vehicleVOS.add(vehicleVO);
vehicleVOS
.
add
(
vehicleVO
);
//
}
}
//
}
}
return
ObjectRestResponse
.
succ
(
vehicleVOS
);
return
ObjectRestResponse
.
succ
(
vehicleVOS
);
}
}
...
...
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