Commit be2563e7 authored by liuzeheng's avatar liuzeheng

业绩判断

parent 24a33a1d
......@@ -974,7 +974,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order.setCustomerId(orderConsignorDO.getCustomerId());
order.setSalesmanId(consignorDO.getCustomerService());
}
} else if (order.getDrawee() == 2 && CollectionUtil.isEmpty(offerBackVOList) && !consignorDO.getDefaultPay()) {//收货人付款 层级5 第一个
} else if (order.getDrawee() == 2 ) {//收货人付款 层级5 第一个
if(consigneeDO!=null){
order.setCustomerId(orderConsigneeDO.getCustomerId());
order.setSalesmanId(consigneeDO.getCustomerService());
......@@ -1049,7 +1049,36 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
//List<TargetOfferBackVO> offerBackVOList =targetLogMapper.getTargetOfferBackByOrerId(order.getOrderId()) ;
// else{
// List<CustomDraweeVO> list = JSONObject.parseArray(order.getCustomDrawee(), CustomDraweeVO.class);
// if(CollectionUtil.isNotEmpty(list)){
// List<CustomDraweeVO> freightList = list.stream().filter(s-> s.getName().equals("freight") ).collect(Collectors.toList());
// List<CustomDraweeVO> clearanceFeeList = list.stream().filter(s-> s.getName().equals("clearanceFee") ).collect(Collectors.toList());
// int freight = freightList.get(0).getValue() ;//运费
// int clearanceFee = clearanceFeeList.get(0).getValue();//清关费
// if((createReqVO.getOfferId()!=null && order.getDrawee() == 1) || (createReqVO.getOfferId()!=null && freight==1) || (createReqVO.getOfferId()!=null && clearanceFee==1)){
// order.setCustomerId(orderConsignorDO.getCustomerId());
// order.setSalesmanId(consignorDO.getCustomerService()!=null?consignorDO.getCustomerService():0);
// }else{
// if( (consignorDO.getDefaultPay() && order.getDrawee() == 2 ) || (consignorDO.getDefaultPay() && freight==1 ) || (consignorDO.getDefaultPay() && clearanceFee==1 )){
// order.setCustomerId(orderConsignorDO.getCustomerId());
// order.setSalesmanId(consignorDO.getCustomerService()!=null?consignorDO.getCustomerService():0);
// }else{
// if(order.getDrawee() == 2 || (order.getDrawee() == 3 && freight==2) || (order.getDrawee() == 3 && clearanceFee==2)){//层级5
// order.setCustomerId(orderConsigneeDO.getCustomerId());
// order.setSalesmanId(consigneeDO.getCustomerService());
// }else{
// order.setSalesmanId(0L); //层级6
// }
// }
// }
// }
//
// }
List<TargetOfferBackVO> offerBackVOList =targetLogMapper.getTargetOfferBackByOrerId(order.getOrderId()) ;
if (order.getDrawee() == 1) {//发货人付款
if (order.getDrawee() == 1 && createReqVO.getOfferId()!=null) {//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
......@@ -1060,7 +1089,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order.setCustomerId(orderConsignorDO.getCustomerId());
order.setSalesmanId(consignorDO.getCustomerService());
}
} else if (order.getDrawee() == 2 && createReqVO.getOfferId()==null && !consignorDO.getDefaultPay()) {//收货人付款 层级5 第一个
} else if (order.getDrawee() == 2 ) {//收货人付款 层级5 第一个
if(consigneeDO!=null){
order.setCustomerId(orderConsigneeDO.getCustomerId());
order.setSalesmanId(consigneeDO.getCustomerService());
......@@ -1342,7 +1371,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//业绩归公司
order.setSalesmanId(0L);
}
} else if ( order.getDrawee() == 2 && createReqVO.getOfferId()==null && !consignorDO.getDefaultPay()) {//收货人付款 层级5 第一个
} else if ( order.getDrawee() == 2 ) {//收货人付款 层级5 第一个
order.setCustomerId(orderConsigneeDO.getCustomerId()) ;
order.setSalesmanId(consigneeDO.getCustomerService()!=null?consigneeDO.getCustomerService():0);
} else if (order.getDrawee() == 3) { //自定义付款
......
......@@ -200,7 +200,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
}else{
customerId = consignorDO.getId();
}
} else if (info.getDrawee() == 2 && CollectionUtil.isEmpty(offerBackVOList) && !consignorDO.getDefaultPay()) {//收货人付款 层级5 第一个
} else if (info.getDrawee() == 2 ) {//收货人付款 层级5 第一个
customerId = orderConsigneeDO.getCustomerId()!=null? orderConsigneeDO.getCustomerId():consigneeDO.getId();
} else if (info.getDrawee() == 3) { //自定义付款
......
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