Commit 88dd7332 authored by hezhen's avatar hezhen

Merge branch 'dev-chw' of http://113.105.137.151:22280/youjj/cloud-platform into dev-chw

parents bacd349a 30d598f3
package com.xxfc.platform.order.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
......@@ -237,4 +238,7 @@ public class ShuntApply implements Serializable {
@Column(name = "is_bizdel")
private Integer isBizdel;
@Column(name = "real_amount")
private BigDecimal realAmount;
}
......@@ -266,4 +266,11 @@ public class SpecialRent implements Serializable {
@Column(name = "over_time")
@ApiModelProperty(value = "超时时间戳", hidden = true )
private Long overTime;
/**
* 超时时间戳
*/
@Column(name = "price_type")
@ApiModelProperty(value = "超时时间戳", hidden = true )
private Integer priceType;
}
......@@ -650,17 +650,20 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
).map(OrderAccountDeduction::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal toExtendDeduction = oad.getOriginOrderAmount().subtract(toOdDeduction);
BigDecimal residueOrderAmount = oad.getOriginOrderAmount().subtract(toOdDeduction);
//如果订单原款 - 扣费 小于零,则押金有额外扣费
if(toExtendDeduction.compareTo(BigDecimal.ZERO) < 0) {
//置反
//置反 去用押金抵扣
toExtendDeduction = BigDecimal.ZERO.subtract(toExtendDeduction);
residueOrderAmount = BigDecimal.ZERO;
}else {
//否则 则置为零
toExtendDeduction = BigDecimal.ZERO;
}
oad.setDepositAmount(oad.getOriginDepositAmount().subtract(toDeduction).subtract(toExtendDeduction));
oad.setOrderAmount(residueOrderAmount);
}
private void handleViolateDetail(DeductionTypeEnum dte, OrderAccountDetail oad, DedDetailDTO vio, CancelStartedVO csv) {
......
......@@ -113,6 +113,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
specialRent.setBrandId(vehicle.getBrandId());
specialRent.setCategoryId(vehicle.getCategoryId());
specialRent.setGoodsType(vehicle.getGoodsType());
specialRent.setPriceType(vehicle.getPriceType());
//缓存商品信息
specialRent.setGoodsJson(JSONUtil.parse(vehicle).toString());
......
......@@ -402,7 +402,7 @@ public class OrderCancelBiz {
orderRentVehicleBiz.updateSelectiveById(orvd);
}
if(BaseOrder.ORDER_SIGN_APPLY == baseOrder.getOrderOrigin()) {
if(BaseOrder.ORDER_SIGN_APPLY == baseOrder.getOrderSign()) {
//更新 申请状态
ShuntApply shuntApply = shuntApplyBiz.selectOne(new ShuntApply(){{
setOrderNo(baseOrder.getNo());
......@@ -422,7 +422,7 @@ public class OrderCancelBiz {
}
}
if(BaseOrder.ORDER_SIGN_SPECIAL == baseOrder.getOrderOrigin()) {
if(BaseOrder.ORDER_SIGN_SPECIAL == baseOrder.getOrderSign()) {
//更新 申请状态
SpecialRent specialRent = specialRentBiz.selectOne(new SpecialRent(){{
setOrderNo(baseOrder.getNo());
......
......@@ -223,12 +223,14 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
dto.setEndCompanyId(shuntApply.getEndCompanyId());
RentVehicleBO bo = orderRentVehicleBiz.initRentVehicleBO(dto);
bo.setOrderSign(BaseOrder.ORDER_SIGN_APPLY);
bo.setBookRecordId(shuntApply.getBookRecordId());
bo.setAppUserDTO(userFeign.userDetailByToken(BaseContextHandler.getToken()).getData());
orderRentVehicleService.applyCreateOrder(bo, shuntApply.getOrderNo());
baseBiz.updateSelectiveById(new ShuntApply(){{
setId(shuntApply.getId());
setStatus(ShuntApply.STATUS_ORDER);
setOrderStatus(ShuntApply.ORDER_STATUS_TOPAY);
setRealAmount(bo.getOrder().getRealAmount());
}});
return ObjectRestResponse.succ(bo.getOrder());
}
......
......@@ -191,6 +191,7 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
RentVehicleBO bo = orderRentVehicleBiz.initRentVehicleBO(dto);
bo.setOrderSign(BaseOrder.ORDER_SIGN_SPECIAL);
bo.setAppUserDTO(getAppUser());
bo.setBookRecordId(specialRent.getBookRecordId());
orderRentVehicleService.specialCreateOrder(bo, specialRent.getOrderNo());
baseBiz.updateSelectiveById(new SpecialRent(){{
setId(specialRent.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment