Commit 4dc95f26 authored by hezhen's avatar hezhen

123

parent dd727160
......@@ -22,6 +22,9 @@ public interface ConfigFeign {
//旅游提前天数
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)
ObjectRestResponse<List<Cofig>> getAllByType(@RequestParam("types") String types);
......
......@@ -74,10 +74,6 @@ public class CompanyWalletDetailDTO{
private BigDecimal violateAmount =BigDecimal.ZERO;
@ApiModelProperty("车辆收益比例")
private BigDecimal vehicleExtract = new BigDecimal(1);
@ApiModelProperty("订单抽成比例")
private BigDecimal orderExtract = new BigDecimal(1);
......@@ -87,13 +83,11 @@ public class CompanyWalletDetailDTO{
//算出来
@ApiModelProperty("车辆租赁费")
private BigDecimal rentVehicleAmount;
@ApiModelProperty("车辆费用")
private BigDecimal vehicleAmount;
public BigDecimal getRentVehicleAmount(){
return (orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion)).multiply(vehicleExtract).setScale(2, BigDecimal.ROUND_HALF_UP);
public BigDecimal getVehicleAmount(){
return orderAmount.subtract(closedVehicleAmout).subtract(damageSafeAmount).subtract(deposit).subtract(comssion);
}
......@@ -102,7 +96,7 @@ public class CompanyWalletDetailDTO{
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{
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("出发门店金额")
private BigDecimal startCompanyAmount;
public BigDecimal getStartCompanyAmount(){
return getOrderAmount();
return getOrderComssion();
}
@ApiModelProperty("出发门店金额")
@ApiModelProperty("收车门店金额")
private BigDecimal endCompanyAmount;
......@@ -139,7 +146,7 @@ public class CompanyWalletDetailDTO{
private BigDecimal vehicleCompanyAmount;
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;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.activity.entity.Coupon;
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.OrderRentVehicleBiz;
import com.xxfc.platform.order.biz.OrderTemplateBiz;
......@@ -92,6 +94,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
@Autowired
ActivityFeign activityFeign;
@Autowired
ConfigFeign configFeign;
@PostConstruct
public void init(){
......@@ -127,13 +132,13 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
}
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.setOrderExtract(BigDecimal.ZERO);//订单抽成比例
companyWalletDetailDTO.setPlatformExtract(BigDecimal.ZERO);//平台抽成比例
companyWalletDetailDTO.setVehicleExtract(BigDecimal.ZERO);//车辆收益比例
companyWalletDetailDTO.setPlatformExtract(BigDecimal.ZERO);//平台抽成比例*/
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