Commit 4c4fa64d authored by unset's avatar unset

Merge branch 'dev-chw-vehicle' into dev-chw

parents e05ef22e 51a82f5d
......@@ -703,6 +703,22 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
return mapper.getOrderAccountByOrderType(term);
}
public void handleRentDepositMarginV2(BaseOrder baseOrder, OrderRentVehicleDetail orvd){
Integer crosstownTypeEnum;
//判断是否定损过
if(SYS_TRUE.equals(orvd.getFixedLossStatus())) {
crosstownTypeEnum = CrosstownTypeEnum.FIXED_LOSS.getCode();
}else {
crosstownTypeEnum = CrosstownTypeEnum.ARRIVE.getCode();
}
OrderVehicleCrosstown crosstown = crosstownBiz.selectOne(new OrderVehicleCrosstown(){{
setOrderId(baseOrder.getId());
setType(crosstownTypeEnum);
}});
handleRentDepositMargin(baseOrder, orvd, crosstown);
}
public void handleRentDepositMargin(BaseOrder baseOrder, OrderRentVehicleDetail orvd, OrderVehicleCrosstown crosstown) {
OrderViolation orderViolation = orderViolationBiz.selectOne(new OrderViolation(){{
......
......@@ -55,6 +55,9 @@ public class OrderViolationBiz extends BaseBiz<OrderViolationMapper, OrderViolat
@Autowired
UserFeign userFeign;
@Autowired
OrderAccountBiz orderAccountBiz;
public static final DateTimeFormatter DEFAULT_DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd");
@Override
public UserFeign getUserFeign() {
......@@ -97,13 +100,14 @@ public class OrderViolationBiz extends BaseBiz<OrderViolationMapper, OrderViolat
if (baseOrder != null) {
baseOrder.setRefundStatus(3);
baseOrderBiz.updateSelectiveByIdRe(baseOrder);
//触发违章金退款
//orderAccountBiz.handleRentDepositMarginV2(baseOrder, orderRentVehicleDetail);
}
} else {
throw new BaseException("The operation cannot be changed at this time");
}
}
}
/**
......
......@@ -20,7 +20,6 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.order.biz.*;
import com.xxfc.platform.order.biz.inner.OrderCancelBiz;
import com.xxfc.platform.order.biz.inner.OrderMsgBiz;
import com.xxfc.platform.order.contant.enumerate.CrosstownTypeEnum;
import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.entity.*;
......@@ -59,7 +58,6 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
@Controller
......@@ -471,19 +469,7 @@ public class BaseOrderController extends CommonBaseController implements UserRes
setOrderId(baseOrder.getId());
}});
Integer crosstownTypeEnum;
//判断是否定损过
if(SYS_TRUE.equals(orvd.getFixedLossStatus())) {
crosstownTypeEnum = CrosstownTypeEnum.FIXED_LOSS.getCode();
}else {
crosstownTypeEnum = CrosstownTypeEnum.ARRIVE.getCode();
}
OrderVehicleCrosstown crosstown = crosstownBiz.selectOne(new OrderVehicleCrosstown(){{
setOrderId(baseOrder.getId());
setType(crosstownTypeEnum);
}});
orderAccountBiz.handleRentDepositMargin(baseOrder, orvd, crosstown);
orderAccountBiz.handleRentDepositMarginV2(baseOrder, orvd);
return ObjectRestResponse.succ();
}
......
......@@ -61,6 +61,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
return ObjectRestResponse.succ();
}
/**
* 通过订单id查询违章记录
*
......
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