|
|
@@ -12,13 +12,12 @@ import com.fs.app.controller.AppBaseController;
|
|
|
import com.fs.common.config.FSSysConfig;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
-import com.fs.common.utils.IpUtil;
|
|
|
-import com.fs.common.utils.ParseUtils;
|
|
|
-import com.fs.common.utils.ServletUtils;
|
|
|
-import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.common.utils.*;
|
|
|
import com.fs.common.utils.ip.IpUtils;
|
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
+import com.fs.his.config.FsSysConfig;
|
|
|
+import com.fs.his.dto.ExpressInfoDTO;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
import com.fs.hisStore.config.FsErpConfig;
|
|
|
import com.fs.hisStore.domain.*;
|
|
|
@@ -94,7 +93,34 @@ public class StoreOrderScrmController extends AppBaseController {
|
|
|
private IFsStoreProductPackageScrmService productPackageService;
|
|
|
@Autowired
|
|
|
private RedissonClient redissonClient;
|
|
|
+ @Autowired
|
|
|
+ private ConfigUtil configUtil;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("erpOrderServiceImpl")
|
|
|
+ private IErpOrderService gyOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("wdtErpOrderServiceImpl")
|
|
|
+ private IErpOrderService wdtOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("hzOMSErpOrderServiceImpl")
|
|
|
+ private IErpOrderService hzOMSErpOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("dfOrderServiceImpl")
|
|
|
+ private IErpOrderService dfOrderService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("JSTErpOrderServiceImpl")
|
|
|
+ private IErpOrderService jSTOrderService;
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("k9OrderScrmServiceImpl")
|
|
|
+ private IErpOrderService k9OrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsExpressScrmService expressService;
|
|
|
|
|
|
|
|
|
@Login
|
|
|
@@ -476,7 +502,51 @@ public class StoreOrderScrmController extends AppBaseController {
|
|
|
if (order.getStatus() <2) {
|
|
|
throw new CustomException("未发货订单不能查询");
|
|
|
}
|
|
|
+ //代服管家 查询自己的物流
|
|
|
+ if (CloudHostUtils.hasCloudHostName("康年堂")){
|
|
|
+ IErpOrderService erpService = getErpService();
|
|
|
+ if (erpService == dfOrderService){
|
|
|
+ ExpressInfoDTO dto = orderService.getDfExpressInfoDTO(order);
|
|
|
+ dto.setShipperName(order.getDeliveryName());
|
|
|
+ FsExpressScrm express = expressService.selectFsExpressByName(order.getDeliveryName());
|
|
|
+ return R.ok().put("data", dto).put("express", express).put("deliveryId", order.getDeliveryId());
|
|
|
+ }
|
|
|
+ }
|
|
|
return orderService.getExpress(order);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private IErpOrderService getErpService() {
|
|
|
+ FsSysConfig sysConfig = configUtil.getSysConfig();
|
|
|
+ Integer erpOpen = sysConfig.getErpOpen();
|
|
|
+ if (erpOpen != null && erpOpen == 1){
|
|
|
+ //判断erp类型
|
|
|
+ Integer erpType = sysConfig.getErpType();
|
|
|
+ if (erpType != null){
|
|
|
+ IErpOrderService erpOrderService = null;
|
|
|
+ if (erpType == 1){
|
|
|
+ //管易
|
|
|
+ erpOrderService = gyOrderService;
|
|
|
+ } else if (erpType == 2){
|
|
|
+ //旺店通
|
|
|
+ erpOrderService = wdtOrderService;
|
|
|
+ } else if (erpType == 3){
|
|
|
+ //
|
|
|
+ erpOrderService = hzOMSErpOrderService;
|
|
|
+ } else if (erpType == 4){
|
|
|
+ //代服
|
|
|
+ erpOrderService = dfOrderService;
|
|
|
+ }else if(erpType == 5){
|
|
|
+ erpOrderService=jSTOrderService;
|
|
|
+ }else if(erpType == 6){
|
|
|
+ erpOrderService=k9OrderService;
|
|
|
+ }
|
|
|
+ return erpOrderService;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
|