|
@@ -11,6 +11,7 @@ import com.fs.common.annotation.DataScope;
|
|
|
import com.fs.common.annotation.RepeatSubmit;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
+import com.fs.common.utils.CloudHostUtils;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
@@ -275,7 +276,8 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
|
|
|
return R.error("未支付订单不能申请售后");
|
|
|
}
|
|
|
if("1".equals(configUtil.generateConfigByKey(SysConfigEnum.HIS_CONFIG.getKey()).getString("erpOpen"))
|
|
|
- && StringUtils.isEmpty(order.getExtendOrderId())){
|
|
|
+ && StringUtils.isEmpty(order.getExtendOrderId())
|
|
|
+ && !CloudHostUtils.hasCloudHostName("康年堂")){
|
|
|
logger.info("erpOpen:{}",configUtil.generateConfigByKey(SysConfigEnum.HIS_CONFIG.getKey()).getString("erpOpen"));
|
|
|
return R.error("仓库未生成订单,暂时不能申请退款,请联系客服");
|
|
|
}
|
|
@@ -389,15 +391,17 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
|
|
|
request.setOid(order.getOrderCode());
|
|
|
request.setRefund_state(1);
|
|
|
request.setStoreAfterSalesId(storeAfterSales.getId());
|
|
|
- BaseResponse response=erpOrderService.refundUpdateScrm(request);
|
|
|
- if(response.getSuccess()){
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
- else{
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return R.error(response.getErrorDesc());
|
|
|
+ if (StringUtils.isNotBlank(order.getExtendOrderId())){
|
|
|
+ BaseResponse response=erpOrderService.refundUpdateScrm(request);
|
|
|
+ if(response.getSuccess()){
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return R.error(response.getErrorDesc());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ return R.ok();
|
|
|
}
|
|
|
|
|
|
private IErpOrderService getErpService() {
|