|
@@ -33,6 +33,7 @@ import com.fs.huifuPay.domain.HuiFuRefundResult;
|
|
|
import com.fs.huifuPay.dto.*;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
|
+import com.fs.store.cache.IFsWarehouseCacheService;
|
|
|
import com.fs.store.mapper.FsStoreDeliversMapper;
|
|
|
import com.fs.store.mapper.FsWarehousesMapper;
|
|
|
import com.fs.system.config.SnowflakeUtils;
|
|
@@ -80,7 +81,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
Logger logger= LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
@Autowired
|
|
|
- IFsStorePaymentService paymentService;
|
|
|
+ private IFsStorePaymentService paymentService;
|
|
|
@Autowired
|
|
|
private ICompanyService companyService;
|
|
|
@Autowired
|
|
@@ -100,20 +101,20 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
@Autowired
|
|
|
private IFsStoreProductService productService;
|
|
|
@Autowired
|
|
|
- IErpOrderService erpOrderService;
|
|
|
+ private IErpOrderService erpOrderService;
|
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
|
@Autowired
|
|
|
private HuiFuService huiFuService;
|
|
|
|
|
|
@Autowired
|
|
|
- IFsUserService userService;
|
|
|
+ private IFsUserService userService;
|
|
|
|
|
|
@Autowired
|
|
|
- PayService ybPayService;
|
|
|
+ private PayService ybPayService;
|
|
|
|
|
|
@Autowired
|
|
|
- TzBankService tzBankService;
|
|
|
+ private TzBankService tzBankService;
|
|
|
@Autowired
|
|
|
private IFsStoreOrderService fsStoreOrderService;
|
|
|
@Autowired
|
|
@@ -126,6 +127,8 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
@Autowired
|
|
|
private FsStoreAfterSalesMapper afterSalesMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsWarehouseCacheService fsWarehouseCacheService;
|
|
|
/**
|
|
|
* 查询售后记录
|
|
|
*
|
|
@@ -333,7 +336,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
|
|
|
// 根据仓库code找erp
|
|
|
if(StringUtils.isNotBlank(order.getStoreHouseCode())){
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
|
|
|
if(StringUtils.equals(erp,ErpTypeConstant.JST_ERP)){
|
|
|
FsJstAftersalePush fsJstAftersalePush = new FsJstAftersalePush();
|
|
@@ -384,7 +387,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
// erp撤销售后单
|
|
|
// 如果当前订单是属于jst erp
|
|
|
if(StringUtils.isNotBlank(order.getStoreHouseCode())){
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
if(StringUtils.equals(erp, ErpTypeConstant.JST_ERP)){
|
|
|
FsJstAftersalePush fsJstAftersalePush = new FsJstAftersalePush();
|
|
|
fsJstAftersalePush.setOrderId(order.getOrderCode());
|
|
@@ -473,7 +476,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
|
|
|
// 如果当前订单是属于jst erp
|
|
|
if(order != null && StringUtils.isNotBlank(order.getStoreHouseCode())){
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
if(StringUtils.equals(erp, ErpTypeConstant.JST_ERP)){
|
|
|
FsJstAftersalePush fsJstAftersalePush = new FsJstAftersalePush();
|
|
|
fsJstAftersalePush.setOrderId(order.getOrderCode());
|
|
@@ -620,7 +623,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
|
|
|
// 财务审核通过,同步到jst erp
|
|
|
if(StringUtils.isNotBlank(order.getStoreHouseCode())){
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
if(StringUtils.equals(erp, ErpTypeConstant.JST_ERP)){
|
|
|
FsJstAftersalePush fsJstAftersalePush = new FsJstAftersalePush();
|
|
|
fsJstAftersalePush.setOrderId(order.getOrderCode());
|
|
@@ -798,7 +801,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
// 如果已发货走发货售后逻辑,否则直接取消
|
|
|
if(byOrderCode!=null){
|
|
|
if(StringUtils.isNotBlank(order.getStoreHouseCode())) {
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
if (StringUtils.equals(erp, ErpTypeConstant.JST_ERP)) {
|
|
|
|
|
|
FsJstAftersalePush fsJstAftersalePush = new FsJstAftersalePush();
|
|
@@ -1087,7 +1090,7 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService
|
|
|
|
|
|
// 根据仓库code找erp
|
|
|
if(StringUtils.isNotBlank(order.getStoreHouseCode())){
|
|
|
- String erp = fsWarehousesMapper.selectErpByCode(order.getStoreHouseCode());
|
|
|
+ String erp = fsWarehouseCacheService.selectErpByCode(order.getStoreHouseCode());
|
|
|
ErpContextHolder.setErpType(erp);
|
|
|
}
|
|
|
|