|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fs.company.controller.live;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
@@ -8,6 +9,7 @@ import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ParseUtils;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.framework.security.LoginUser;
|
|
|
import com.fs.framework.security.SecurityUtils;
|
|
|
@@ -18,7 +20,10 @@ import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.param.FsStoreOrderBindCustomerParam;
|
|
|
import com.fs.his.service.IFsExpressService;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
|
+import com.fs.hisStore.dto.ExpressInfoDTO;
|
|
|
+import com.fs.hisStore.enums.ShipperCodeEnum;
|
|
|
import com.fs.hisStore.param.FsStoreOrderExpressParam;
|
|
|
+import com.fs.hisStore.service.IFsExpressScrmService;
|
|
|
import com.fs.live.domain.*;
|
|
|
import com.fs.live.enums.LiveOrderCancleReason;
|
|
|
import com.fs.live.param.LiveOrderExpressParam;
|
|
|
@@ -40,6 +45,8 @@ import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import static com.fs.his.utils.PhoneUtil.decryptPhone;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 订单Controller
|
|
|
@@ -67,7 +74,7 @@ public class LiveOrderController extends BaseController
|
|
|
@Autowired
|
|
|
private TokenService tokenService;
|
|
|
@Autowired
|
|
|
- private IFsExpressService expressService;
|
|
|
+ private IFsExpressScrmService expressService;
|
|
|
|
|
|
|
|
|
// @Autowired
|
|
|
@@ -204,8 +211,8 @@ public class LiveOrderController extends BaseController
|
|
|
@PostMapping("/getExpressByDeliverId")
|
|
|
public R getExpressByDeliverId(@Validated @RequestBody FsStoreOrderExpressParam param, HttpServletRequest request){
|
|
|
|
|
|
-// return expressService.getLiveExpressByDeliverId(param);
|
|
|
- return R.ok();
|
|
|
+ return expressService.getLiveExpressByDeliverId(param);
|
|
|
+// return R.ok();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -287,40 +294,12 @@ public class LiveOrderController extends BaseController
|
|
|
/**
|
|
|
* 查看物流状态
|
|
|
* */
|
|
|
-// @PreAuthorize("@ss.hasPermi('live:liveOrder:express')")
|
|
|
-// @GetMapping(value = "/getExpress/{id}")
|
|
|
-// public R getExpress(@PathVariable("id") String id)
|
|
|
-// {
|
|
|
-// LiveOrder order=liveOrderService.selectLiveOrderByOrderId(id);
|
|
|
-// ExpressInfoDTO expressInfoDTO=null;
|
|
|
-// if(StringUtils.isNotEmpty(order.getDeliverySn())){
|
|
|
-// String lastFourNumber = "";
|
|
|
-// if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
|
|
|
-//
|
|
|
-// lastFourNumber = order.getUserPhone();
|
|
|
-// if (lastFourNumber.length() == 11) {
|
|
|
-// lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
|
|
|
-// }else if (lastFourNumber.length()>11){
|
|
|
-// String jm = decryptPhone(lastFourNumber);
|
|
|
-// lastFourNumber = StrUtil.sub(jm, jm.length(), -4);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// expressInfoDTO=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(),order.getDeliverySn(),lastFourNumber);
|
|
|
-//
|
|
|
-// if((expressInfoDTO.getStateEx()!=null&&expressInfoDTO.getStateEx().equals("0"))&&(expressInfoDTO.getState()!=null&&expressInfoDTO.getState().equals("0"))){
|
|
|
-// lastFourNumber = "19923690275";
|
|
|
-// if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
|
|
|
-// if (lastFourNumber.length() == 11) {
|
|
|
-// lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// expressInfoDTO=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(),order.getDeliverySn(),lastFourNumber);
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return R.ok().put("data",expressInfoDTO);
|
|
|
-// }
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveOrder:express')")
|
|
|
+ @GetMapping(value = "/getExpress/{id}")
|
|
|
+ public R getExpress(@PathVariable("id") String id)
|
|
|
+ {
|
|
|
+ return liveOrderService.syncExpress(Long.valueOf(id));
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 支付订单
|