提交 e37f8c3c authored 作者: 000516's avatar 000516

获取BI中日日顺物流发货单,并组装html地址回写到勤策中

上级 7f444811
package com.sfa.job.service.order.impl;
import com.alibaba.fastjson.JSONObject;
import com.sfa.common.core.enums.ECode;
import com.sfa.common.core.exception.ServiceException;
import com.sfa.job.domain.order.dao.IOrdersSentDao;
import com.sfa.job.pojo.response.OrdersSentDto;
import com.sfa.job.service.order.IOrdersSentQueryService;
......@@ -45,10 +47,21 @@ public class OrdersSentQueryServiceImpl implements IOrdersSentQueryService {
private void pushQc(OrdersSentDto sent){
try {
log.info("start push qc sent no [{}] 物流轨迹", sent.getAhSentNo());
String wlHtmlPath = qinCeUtils.wlHtmlPath;
wlHtmlPath += sent.getAhSentNo();
String htmlPath = "";
String transport = sent.getTransport();
switch (transport) {
case "134":
htmlPath = qinCeUtils.wlHtmlPath + sent.getAhSentNo();
break;
case "132":
htmlPath = qinCeUtils.wlRrsPath + sent.getExpressNo();
break;
default:
throw new ServiceException(ECode.SENT_ISNULL_ERROR);
}
// 勤策中发货单按安徽匹配
Map<String, Object> params = qinCeUtils.modifySentDefinedValParams(sent.getAhSentNo(), wlHtmlPath);
Map<String, Object> params = qinCeUtils.modifySentDefinedValParams(sent.getAhSentNo(), htmlPath);
String url = qinCeUtils.builderUrl(QinCeUtils.MODIFY_SENT_DEFINED_VAL, params);
qinCeUtils.postQC(url, params);
// 推送成功
......
......@@ -34,6 +34,8 @@ public class QinCeUtils {
private String APP_KEY;
@Value("${wxl.wl.html_path}")
public String wlHtmlPath;
@Value("${wxl.wl.rrs_path}")
public String wlRrsPath;
/**
* =================== 勤策API - path ===================
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论