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