|
@@ -32,6 +32,7 @@ import com.fs.common.event.TemplateEvent;
|
|
|
import com.fs.common.event.TemplateListenEnum;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
+import com.fs.common.utils.PhoneUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.domain.Company;
|
|
|
import com.fs.company.domain.CompanyDept;
|
|
@@ -68,6 +69,7 @@ import com.fs.tzBank.TzBankService;
|
|
|
import com.fs.tzBank.utils.TzConfigUtils;
|
|
|
import com.hc.openapi.tool.util.Ids;
|
|
|
import lombok.Synchronized;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -996,10 +998,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
//顺丰轨迹查询处理
|
|
|
String lastFourNumber = "";
|
|
|
if (order.getDeliverySn().equals(ShipperCodeEnum.SF.getValue())) {
|
|
|
- lastFourNumber = order.getUserPhone();
|
|
|
- if (lastFourNumber.length() == 11) {
|
|
|
- lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
|
|
|
- }
|
|
|
+ lastFourNumber = PhoneUtils.getLastFourNum(order.getUserPhone());
|
|
|
}
|
|
|
ExpressInfoDTO dto=expressService.getExpressInfo(order.getOrderCode(),order.getDeliverySn(),order.getDeliveryId(),lastFourNumber);
|
|
|
dto.setShipperName(order.getDeliveryName());
|
|
@@ -1007,6 +1006,31 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
return R.ok().put("data", dto).put("express",express).put("deliveryId",order.getDeliveryId());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R getExpressMulti(FsStoreOrder order) {
|
|
|
+ //顺丰轨迹查询处理
|
|
|
+ String lastFourNumber = "";
|
|
|
+ if (order.getDeliverySn().equals(ShipperCodeEnum.SF.getValue())) {
|
|
|
+ lastFourNumber = PhoneUtils.getLastFourNum(order.getUserPhone());
|
|
|
+ }
|
|
|
+ // 获取该订单关联的物流信息
|
|
|
+ List<FsStoreDelivers> fsStoreDelivers = fsStoreDeliversMapper.findByOrderId(order.getId());
|
|
|
+ if(CollectionUtils.isEmpty(fsStoreDelivers)){
|
|
|
+ return R.ok("当前订单号暂无物流信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ExpressInfoDTO> result = new ArrayList<>();
|
|
|
+ for (FsStoreDelivers fsStoreDeliver : fsStoreDelivers) {
|
|
|
+ ExpressInfoDTO dto=expressService.getExpressInfo(order.getOrderCode(),
|
|
|
+ fsStoreDeliver.getDeliverSn(),
|
|
|
+ fsStoreDeliver.getDeliverId(),
|
|
|
+ lastFourNumber);
|
|
|
+ result.add(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.ok().put("data",result);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public R createUserOrder(FsStoreOrderCreateUserParam param) {
|