|
|
@@ -18,10 +18,10 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.redis.utils.SequenceUtils;
|
|
|
import org.dromara.customer.api.RemoteCustomerService;
|
|
|
-import org.dromara.order.domain.OrderDeliver;
|
|
|
-import org.dromara.order.domain.OrderDeliverProduct;
|
|
|
-import org.dromara.order.domain.OrderMain;
|
|
|
-import org.dromara.order.domain.OrderStatusLog;
|
|
|
+import org.dromara.external.api.zhongche.RemoteZhongChePullService;
|
|
|
+import org.dromara.external.api.zhongche.domain.bo.ZhongCheOrderDeliverBo;
|
|
|
+import org.dromara.external.api.zhongche.domain.vo.ZhongCheOrderDeliverVo;
|
|
|
+import org.dromara.order.domain.*;
|
|
|
import org.dromara.order.domain.bo.OrderDeliverBo;
|
|
|
import org.dromara.order.domain.bo.OrderDeliverProductBo;
|
|
|
import org.dromara.order.domain.vo.OrderDeliverProductVo;
|
|
|
@@ -29,6 +29,9 @@ import org.dromara.order.domain.vo.OrderDeliverVo;
|
|
|
import org.dromara.order.domain.vo.OrderQuantitySummary;
|
|
|
import org.dromara.order.mapper.*;
|
|
|
import org.dromara.order.service.IOrderDeliverService;
|
|
|
+import org.dromara.order.service.IOrderDeliverThirdService;
|
|
|
+import org.dromara.order.service.IOrderMainCrrcExtService;
|
|
|
+import org.dromara.order.service.IZhongCheOrderMainService;
|
|
|
import org.dromara.order.utils.kd100.Kd100Util;
|
|
|
import org.dromara.order.utils.kd100.domain.QueryTrackDTO;
|
|
|
import org.dromara.order.utils.kd100.domain.TrackVO;
|
|
|
@@ -61,6 +64,10 @@ public class OrderDeliverServiceImpl extends ServiceImpl<OrderDeliverMapper, Ord
|
|
|
@DubboReference
|
|
|
private RemoteCustomerService remoteCustomerService;
|
|
|
|
|
|
+ @DubboReference
|
|
|
+ private RemoteZhongChePullService remoteZhongChePullService;
|
|
|
+
|
|
|
+
|
|
|
private final OrderDeliverMapper baseMapper;
|
|
|
|
|
|
private final OrderMainMapper orderMainMapper;
|
|
|
@@ -72,6 +79,10 @@ public class OrderDeliverServiceImpl extends ServiceImpl<OrderDeliverMapper, Ord
|
|
|
|
|
|
private final OrderDeliverProductMapper orderDeliverProductMapper;
|
|
|
|
|
|
+ private final IOrderMainCrrcExtService orderMainCrrcExtService;
|
|
|
+
|
|
|
+ private final IOrderDeliverThirdService orderDeliverThirdService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询订单发货主
|
|
|
*
|
|
|
@@ -280,7 +291,41 @@ public class OrderDeliverServiceImpl extends ServiceImpl<OrderDeliverMapper, Ord
|
|
|
}
|
|
|
/*中车订单发货后调用接口通知中车*/
|
|
|
if ("zhongche".equals(orderMain.getDataSource())) {
|
|
|
-
|
|
|
+ OrderMainCrrcExt orderMainCrrcExt = orderMainCrrcExtService.getById(bo.getOrderId());
|
|
|
+ ZhongCheOrderDeliverBo zhongCheOrderDeliverBo = new ZhongCheOrderDeliverBo();
|
|
|
+ zhongCheOrderDeliverBo.setOrderNo(orderMainCrrcExt.getCrrcOrderNo());
|
|
|
+ if (Objects.equals(bo.getDeliverMethod(),"0")) {
|
|
|
+ zhongCheOrderDeliverBo.setDeliveryType("2");
|
|
|
+ }else if (Objects.equals(bo.getDeliverMethod(),"1")){
|
|
|
+ zhongCheOrderDeliverBo.setDeliveryType("1");
|
|
|
+ zhongCheOrderDeliverBo.setExpressCode(bo.getLogisticNo());
|
|
|
+ zhongCheOrderDeliverBo.setExpressCompanyName(bo.getLogisticsCompanyCode());
|
|
|
+ }
|
|
|
+ ZhongCheOrderDeliverVo zhongCheOrderDeliverVo = remoteZhongChePullService.mallOrderDeliverGoods(zhongCheOrderDeliverBo);
|
|
|
+ //保存第三方订单发货信息
|
|
|
+ OrderDeliverThird orderDeliverThird = new OrderDeliverThird();
|
|
|
+ orderDeliverThird.setDeliverId(deliver.getId());
|
|
|
+ orderDeliverThird.setOutgoingCode(zhongCheOrderDeliverVo.getOutgoingCode());
|
|
|
+ orderDeliverThirdService.save(orderDeliverThird);
|
|
|
+ }
|
|
|
+ /*同济订单发货后调用接口通知同济*/
|
|
|
+ if ("tongji".equals(orderMain.getDataSource())) {
|
|
|
+ OrderMainCrrcExt orderMainCrrcExt = orderMainCrrcExtService.getById(bo.getOrderId());
|
|
|
+ ZhongCheOrderDeliverBo zhongCheOrderDeliverBo = new ZhongCheOrderDeliverBo();
|
|
|
+ zhongCheOrderDeliverBo.setOrderNo(orderMainCrrcExt.getCrrcOrderNo());
|
|
|
+ if (Objects.equals(bo.getDeliverMethod(),"0")) {
|
|
|
+ zhongCheOrderDeliverBo.setDeliveryType("2");
|
|
|
+ }else if (Objects.equals(bo.getDeliverMethod(),"1")){
|
|
|
+ zhongCheOrderDeliverBo.setDeliveryType("1");
|
|
|
+ zhongCheOrderDeliverBo.setExpressCode(bo.getLogisticNo());
|
|
|
+ zhongCheOrderDeliverBo.setExpressCompanyName(bo.getLogisticsCompanyCode());
|
|
|
+ }
|
|
|
+ ZhongCheOrderDeliverVo zhongCheOrderDeliverVo = remoteZhongChePullService.mallOrderDeliverGoods(zhongCheOrderDeliverBo);
|
|
|
+ //保存第三方订单发货信息
|
|
|
+ OrderDeliverThird orderDeliverThird = new OrderDeliverThird();
|
|
|
+ orderDeliverThird.setDeliverId(deliver.getId());
|
|
|
+ orderDeliverThird.setOutgoingCode(zhongCheOrderDeliverVo.getOutgoingCode());
|
|
|
+ orderDeliverThirdService.save(orderDeliverThird);
|
|
|
}
|
|
|
|
|
|
// 8. 处理父订单状态同步
|