提交 4b089a73 authored 作者: liruixin's avatar liruixin

货主违约金

上级 a4986e4a
......@@ -408,7 +408,6 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
@Override
public void saveSettlementOwnerForCancelOrder(BigDecimal transportWeight,BigDecimal validFreightPrice,String orderNo,Integer cancelType) {
System.out.println(transportWeight+"========================122222444========================="+validFreightPrice+""+cancelType);
//获取订单配置的违约金方案
OwnerQuotationDetailVO quotationDetailVO = quotationService.getQuotationByOrderNo(orderNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
if(Objects.isNull(quotationDetailVO.getLiquidatedDamagesPlanId())){
......@@ -425,7 +424,7 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
String autoRuleJson = ownerRule.getAutoRuleJson();//系统自动违规
BreakContractOwnerRuleVO.AutoRule autoRule = JSONObject.parseObject(autoRuleJson, BreakContractOwnerRuleVO.AutoRule.class);
BreakContractOwnerRuleVO.OrderCancelRule orderCancelRule = autoRule.getOrderCancelRule();//订单取消规则
System.out.println(orderCancelRule+"========================122222=========================");
//运单状态(包括货主取消)
//运单状态(包括货主取消)
List<Integer> statusList = new ArrayList<>();
......@@ -443,18 +442,15 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
if(Objects.equals(cancelType,CancelOrderEnum.Type.NOT_ARRIVE.getCode())){
statusList.add(OrderChildEnum.Status.OWNER_CANCEL.getCode());
}
System.out.println(statusList+"========================1=========================");
BigDecimal figure ;//总费用
//订单号查询货单
List<OrderGoods> orderGoods = orderGoodsDao.getOrderGoodsListByOrderNo(orderNo);
System.out.println(orderGoods+"========================11=========================");
if(CollectionUtils.isEmpty(orderGoods)){
figure = transportWeight.multiply(validFreightPrice).multiply(orderCancelRule.getBeforeRatio());
}else{
List<OrderChild> orderChilds = orderChildDao.listOrderChildByOrderNoAndStatus(orderNo, statusList);
System.out.println(orderChilds+"========================122222=========================");
//没有司机拉运
if(CollectionUtils.isEmpty(orderChilds)){
figure = transportWeight.multiply(validFreightPrice).multiply(orderCancelRule.getAfterRatio());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论