|
|
@@ -51,6 +51,7 @@ import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
|
|
|
import com.fs.hisStore.mapper.FsStorePaymentScrmMapper;
|
|
|
import com.fs.hisStore.param.FsStoreOrderRefundByProductParam;
|
|
|
import com.fs.hisStore.service.IFsStoreOrderLogsScrmService;
|
|
|
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
|
import com.fs.hisapi.domain.ApiResponse;
|
|
|
import com.fs.hisapi.param.CreateOrderParam;
|
|
|
import com.fs.hisapi.param.RecipeDetailParam;
|
|
|
@@ -292,6 +293,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
|
|
|
//ERP 类型到服务的映射
|
|
|
private Map<Integer, IErpOrderService> erpServiceMap;
|
|
|
+
|
|
|
+ private IFsStoreOrderScrmService orderScrmService;
|
|
|
@PostConstruct
|
|
|
public void initErpServiceMap() {
|
|
|
erpServiceMap = new HashMap<>();
|
|
|
@@ -2183,6 +2186,27 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ List<FsStoreOrderScrm> orders2 = orderScrmService.selectFsStoreOrderListByDeliveryId(dto.getLogisticCode());
|
|
|
+ if (orders != null) {
|
|
|
+ for (FsStoreOrderScrm order : orders2) {
|
|
|
+ logger.info("订单信息:" + JSONUtil.toJsonStr(order));
|
|
|
+ logger.info("运单号:" + dto.getLogisticCode());
|
|
|
+ if (order != null && (order.getDeliveryStatus()==null|| order.getDeliveryStatus()!= 3)) {
|
|
|
+ FsStoreOrderScrm map = new FsStoreOrderScrm();
|
|
|
+ map.setDeliveryStatus(Integer.parseInt(dto.getState()));
|
|
|
+ map.setId(order.getId());
|
|
|
+ map.setDeliveryType(dto.getStateEx());
|
|
|
+ orderScrmService.updateFsStoreOrder(map);
|
|
|
+ //如果是正常签收,更新订单状态
|
|
|
+ if (dto.getState().equals("3") && (dto.getStateEx().equals("301") || dto.getStateEx().equals("302") || dto.getStateEx().equals("304") || dto.getStateEx().equals("311"))) {
|
|
|
+ orderScrmService.finishOrder(order.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
return ExpressResultDTO.success(sysConfig.getKdnId().trim());
|
|
|
}
|