Commit 4dc95f26 authored by hezhen's avatar hezhen

123

parent dd727160
...@@ -22,6 +22,9 @@ public interface ConfigFeign { ...@@ -22,6 +22,9 @@ public interface ConfigFeign {
//旅游提前天数 //旅游提前天数
public static final int TYPE_TOUR_DAYS=99; public static final int TYPE_TOUR_DAYS=99;
public static final int TYPE_ORDER_EXTRACT= 66;
@RequestMapping(value = "/cofig/app/unauth/types",method = RequestMethod.GET) @RequestMapping(value = "/cofig/app/unauth/types",method = RequestMethod.GET)
ObjectRestResponse<List<Cofig>> getAllByType(@RequestParam("types") String types); ObjectRestResponse<List<Cofig>> getAllByType(@RequestParam("types") String types);
......
...@@ -74,10 +74,6 @@ public class CompanyWalletDetailDTO{ ...@@ -74,10 +74,6 @@ public class CompanyWalletDetailDTO{
private BigDecimal violateAmount =BigDecimal.ZERO; private BigDecimal violateAmount =BigDecimal.ZERO;
@ApiModelProperty("车辆收益比例")
private BigDecimal vehicleExtract = new BigDecimal(1);
@ApiModelProperty("订单抽成比例") @ApiModelProperty("订单抽成比例")
private BigDecimal orderExtract = new BigDecimal(1); private BigDecimal orderExtract = new BigDecimal(1);
...@@ -87,13 +83,11 @@ public class CompanyWalletDetailDTO{ ...@@ -87,13 +83,11 @@ public class CompanyWalletDetailDTO{
//算出来 //算出来
@ApiModelProperty("车辆租赁费") @ApiModelProperty("车辆费用")
private BigDecimal rentVehicleAmount; private BigDecimal vehicleAmount;
public BigDecimal getVehicleAmount(){
public BigDecimal getRentVehicleAmount(){ return orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion);
return (orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion)).multiply(vehicleExtract).setScale(2, BigDecimal.ROUND_HALF_UP);
} }
...@@ -102,7 +96,7 @@ public class CompanyWalletDetailDTO{ ...@@ -102,7 +96,7 @@ public class CompanyWalletDetailDTO{
public BigDecimal getOrderComssion(){ public BigDecimal getOrderComssion(){
return (orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion)).multiply(orderExtract).setScale(2, BigDecimal.ROUND_HALF_UP); return getViolateAmount().multiply(orderExtract).setScale(2, BigDecimal.ROUND_HALF_UP);
} }
...@@ -111,21 +105,34 @@ public class CompanyWalletDetailDTO{ ...@@ -111,21 +105,34 @@ public class CompanyWalletDetailDTO{
public BigDecimal getPlatformComssion(){ public BigDecimal getPlatformComssion(){
return (orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion)).multiply(platformExtract).setScale(2, BigDecimal.ROUND_HALF_UP); return getViolateAmount().multiply(platformExtract).setScale(2, BigDecimal.ROUND_HALF_UP);
}
//算出来
@ApiModelProperty("车辆租赁费")
private BigDecimal rentVehicleAmount;
public BigDecimal getRentVehicleAmount(){
return getVehicleAmount().subtract(getOrderComssion()).subtract(getPlatformComssion());
} }
@ApiModelProperty("出发门店金额") @ApiModelProperty("出发门店金额")
private BigDecimal startCompanyAmount; private BigDecimal startCompanyAmount;
public BigDecimal getStartCompanyAmount(){ public BigDecimal getStartCompanyAmount(){
return getOrderAmount(); return getOrderComssion();
} }
@ApiModelProperty("出发门店金额") @ApiModelProperty("收车门店金额")
private BigDecimal endCompanyAmount; private BigDecimal endCompanyAmount;
...@@ -139,7 +146,7 @@ public class CompanyWalletDetailDTO{ ...@@ -139,7 +146,7 @@ public class CompanyWalletDetailDTO{
private BigDecimal vehicleCompanyAmount; private BigDecimal vehicleCompanyAmount;
public BigDecimal getVehicleCompanyAmount(){ public BigDecimal getVehicleCompanyAmount(){
return damageSafeAmount.add(getRentVehicleAmount()).add(lossSpecifiedAmount).add(breakRulesRegulation); return getVehicleAmount().add(damageSafeAmount).add(lossSpecifiedAmount).add(breakRulesRegulation).add(violateAmount);
} }
......
...@@ -16,6 +16,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -16,6 +16,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.activity.entity.Coupon; import com.xxfc.platform.activity.entity.Coupon;
import com.xxfc.platform.activity.feign.ActivityFeign; import com.xxfc.platform.activity.feign.ActivityFeign;
import com.xxfc.platform.app.entity.Cofig;
import com.xxfc.platform.app.feign.ConfigFeign;
import com.xxfc.platform.order.biz.OrderCostDetailBiz; import com.xxfc.platform.order.biz.OrderCostDetailBiz;
import com.xxfc.platform.order.biz.OrderRentVehicleBiz; import com.xxfc.platform.order.biz.OrderRentVehicleBiz;
import com.xxfc.platform.order.biz.OrderTemplateBiz; import com.xxfc.platform.order.biz.OrderTemplateBiz;
...@@ -92,6 +94,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl ...@@ -92,6 +94,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
@Autowired @Autowired
ActivityFeign activityFeign; ActivityFeign activityFeign;
@Autowired
ConfigFeign configFeign;
@PostConstruct @PostConstruct
public void init(){ public void init(){
...@@ -127,13 +132,13 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl ...@@ -127,13 +132,13 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
} }
public void initDetailSecond(RentVehicleBO bo) { public void initDetailSecond(RentVehicleBO bo) {
CompanyWalletDetailDTO companyWalletDetailDTO = new CompanyWalletDetailDTO(); Cofig cofig = configFeign.getAllByType(ConfigFeign.TYPE_ORDER_EXTRACT+ "").getData().get(0);
CompanyWalletDetailDTO companyWalletDetailDTO =JSONUtil.toBean(cofig.getParams(), CompanyWalletDetailDTO.class);
//下单 //下单
companyWalletDetailDTO.setClosedVehicleAmout(BigDecimal.ZERO);//收车服务费 /*companyWalletDetailDTO.setClosedVehicleAmout(BigDecimal.ZERO);//收车服务费
companyWalletDetailDTO.setPlatformCompanyId(0);//平台门店 companyWalletDetailDTO.setPlatformCompanyId(0);//平台门店
companyWalletDetailDTO.setOrderExtract(BigDecimal.ZERO);//订单抽成比例 companyWalletDetailDTO.setOrderExtract(BigDecimal.ZERO);//订单抽成比例
companyWalletDetailDTO.setPlatformExtract(BigDecimal.ZERO);//平台抽成比例 companyWalletDetailDTO.setPlatformExtract(BigDecimal.ZERO);//平台抽成比例*/
companyWalletDetailDTO.setVehicleExtract(BigDecimal.ZERO);//车辆收益比例
initDictionary(); initDictionary();
......
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