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
bd89ebf3
Commit
bd89ebf3
authored
Dec 18, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改延迟还车
parent
a1106348
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+16
-1
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+3
-0
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+9
-0
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
bd89ebf3
...
...
@@ -3,9 +3,11 @@ package com.xxfc.platform.order.biz.inner;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.common.util.AssertUtils
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
...
...
@@ -32,6 +34,7 @@ import com.xxfc.platform.universal.entity.Dictionary;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.inter.CalculateInterface
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleDaysPrice
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
...
...
@@ -313,7 +316,19 @@ public class OrderCalculateBiz implements CalculateInterface {
Integer
overDays
=
0
-
realResidueDays
;
String
violateDesc
=
StrUtil
.
format
(
" 延迟{}天"
,
overDays
);
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
orderItemBiz
.
getOverAmountList
(
realVmcpds
.
get
(
realVmcpds
.
size
()
-
1
).
getDate
(),
overDays
,
vehicleItemDTO
.
getGoodId
(),
baseOrder
.
getUserId
());
VehicleDaysPrice
vehicleDaysPrice
=
AssertUtils
.
isFeignSucc
(
vehicleFeign
.
getVehicleDaysInfo
(
vehicleItemDTO
.
getGoodId
())).
getData
();
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
if
(
null
!=
vehicleDaysPrice
)
{
VMCalendarPriceCostDTO
dto
=
realVmcpds
.
get
(
realVmcpds
.
size
()
-
1
);
for
(
int
i
=
0
;
i
<
overDays
;
i
++)
{
VMCalendarPriceCostDTO
current
=
BeanUtil
.
toBean
(
dto
,
VMCalendarPriceCostDTO
.
class
);
current
.
setDate
(
DateUtil
.
offsetDay
(
current
.
getDate
(),
1
));
overAmountList
.
add
(
current
);
}
}
else
{
overAmountList
=
orderItemBiz
.
getOverAmountList
(
realVmcpds
.
get
(
realVmcpds
.
size
()
-
1
).
getDate
(),
overDays
,
vehicleItemDTO
.
getGoodId
(),
baseOrder
.
getUserId
());
}
BigDecimal
overAmount
=
overAmountList
.
parallelStream
()
.
map
(
VMCalendarPriceCostDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
multiply
(
new
BigDecimal
(
2
+
""
));
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
bd89ebf3
...
...
@@ -269,4 +269,7 @@ public interface VehicleFeign {
@PostMapping
(
"app/publishAeceive/app/unauth/updReceive"
)
ObjectRestResponse
updReceive
(
@RequestBody
VehiclePublishReceiveDTO
publishReceiveDTO
);
@GetMapping
(
value
=
"/app/unauth/getVehicleDaysInfo"
)
public
ObjectRestResponse
<
VehicleDaysPrice
>
getVehicleDaysInfo
(
@RequestParam
(
"vehicleId"
)
String
vehicleId
);
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
bd89ebf3
...
...
@@ -58,6 +58,9 @@ import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TR
@Api
(
value
=
"车辆管理controller"
,
tags
={
"车辆管理接口"
})
public
class
VehicleController
extends
BaseController
<
VehicleBiz
>
implements
UserRestInterface
{
@Autowired
private
VehicleDaysPriceBiz
vehicleDaysPriceBiz
;
@Autowired
private
VehicleBookRecordBiz
vehicleBookRecordBiz
;
...
...
@@ -737,6 +740,12 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
return
baseBiz
.
getAllVehicleById
(
vehicleFindAppDTO
);
}
@GetMapping
(
value
=
"/app/unauth/getVehicleDaysInfo"
)
@IgnoreUserToken
public
ObjectRestResponse
<
VehicleDaysPrice
>
getVehicleDaysInfo
(
@RequestParam
(
"vehicleId"
)
String
vehicleId
)
{
return
ObjectRestResponse
.
succ
(
vehicleDaysPriceBiz
.
getInfo
(
vehicleId
));
}
@Data
static
public
class
VehicleVO
extends
Vehicle
{
private
VehicleModel
vehicleModel
;
...
...
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