|
@@ -26,6 +26,7 @@ import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.core.utils.bean.BeanUtils;
|
|
import com.ruoyi.common.core.utils.bean.BeanUtils;
|
|
|
|
|
+import com.ruoyi.common.redis.service.RedisIdGenerator;
|
|
|
import com.ruoyi.front.request.CommonBusinessGetQRCodeExtendRequest;
|
|
import com.ruoyi.front.request.CommonBusinessGetQRCodeExtendRequest;
|
|
|
import com.ruoyi.front.request.CommonMonthSettleQRQueryExtendRequest;
|
|
import com.ruoyi.front.request.CommonMonthSettleQRQueryExtendRequest;
|
|
|
import com.ruoyi.logistics.config.JDExpressConfig;
|
|
import com.ruoyi.logistics.config.JDExpressConfig;
|
|
@@ -54,6 +55,9 @@ public class JDLogisticsService implements LogisticsService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService sysConfigService;
|
|
private ISysConfigService sysConfigService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RedisIdGenerator redisIdGenerator;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public JSONObject precheckOrder(BizWaybillOrder bizWaybillOrder) {
|
|
public JSONObject precheckOrder(BizWaybillOrder bizWaybillOrder) {
|
|
|
log.info("京东开放平台订单预校验接口,入参:{}", bizWaybillOrder);
|
|
log.info("京东开放平台订单预校验接口,入参:{}", bizWaybillOrder);
|
|
@@ -725,16 +729,31 @@ public class JDLogisticsService implements LogisticsService {
|
|
|
queryRenderDTO.setCustomerCode(sysConfigService.selectConfigByKey(SysConfigConstants.JD_LOGISTICS_BUSINESSUNITCODE));
|
|
queryRenderDTO.setCustomerCode(sysConfigService.selectConfigByKey(SysConfigConstants.JD_LOGISTICS_BUSINESSUNITCODE));
|
|
|
queryRenderDTO.setTemplateCode("jdky100x113");
|
|
queryRenderDTO.setTemplateCode("jdky100x113");
|
|
|
}
|
|
}
|
|
|
-// queryRenderDTO.setOperator(sysConfigService.selectConfigByKey(SysConfigConstants.JD_LOGISTICS_OPERATOR));
|
|
|
|
|
|
|
+ queryRenderDTO.setOperator("瑞鲸速达");
|
|
|
queryRenderDTO.setTaskId(bizWaybillOrder.getWaybillNo());
|
|
queryRenderDTO.setTaskId(bizWaybillOrder.getWaybillNo());
|
|
|
|
|
|
|
|
List<PrintDataDTO> printDataDTOList = new ArrayList<>();
|
|
List<PrintDataDTO> printDataDTOList = new ArrayList<>();
|
|
|
PrintDataDTO printDataDTO = new PrintDataDTO();
|
|
PrintDataDTO printDataDTO = new PrintDataDTO();
|
|
|
|
|
+
|
|
|
|
|
+ printDataDTO.setOrderNumber(redisIdGenerator.generateUniqueId("JDMD"));
|
|
|
|
|
+ if (getOrderOrigin(bizWaybillOrder.getProductCode()) == 1) {
|
|
|
|
|
+ printDataDTO.setCarrierCode("JD");
|
|
|
|
|
+ printDataDTO.setScene(4);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ printDataDTO.setCarrierCode("JDKY");
|
|
|
|
|
+ printDataDTO.setScene(5);
|
|
|
|
|
+ }
|
|
|
|
|
+ printDataDTO.setBillCodeValue(bizWaybillOrder.getExternalWaybillNo());
|
|
|
|
|
+ printDataDTO.setBillCodeType("waybillCode");
|
|
|
|
|
+
|
|
|
printDataDTOList.add(printDataDTO);
|
|
printDataDTOList.add(printDataDTO);
|
|
|
queryRenderDTO.setPrintData(printDataDTOList);
|
|
queryRenderDTO.setPrintData(printDataDTOList);
|
|
|
|
|
|
|
|
List<OutputConfigDTO> outputConfigDTOList = new ArrayList<>();
|
|
List<OutputConfigDTO> outputConfigDTOList = new ArrayList<>();
|
|
|
OutputConfigDTO outputConfigDTO = new OutputConfigDTO();
|
|
OutputConfigDTO outputConfigDTO = new OutputConfigDTO();
|
|
|
|
|
+ outputConfigDTO.setOutputType(1);
|
|
|
|
|
+ outputConfigDTO.setDataFormat(1);
|
|
|
|
|
+ outputConfigDTO.setFileFormat(1);
|
|
|
outputConfigDTOList.add(outputConfigDTO);
|
|
outputConfigDTOList.add(outputConfigDTO);
|
|
|
queryRenderDTO.setOutputConfig(outputConfigDTOList);
|
|
queryRenderDTO.setOutputConfig(outputConfigDTOList);
|
|
|
|
|
|
|
@@ -750,9 +769,9 @@ public class JDLogisticsService implements LogisticsService {
|
|
|
log.info("京东开放平台根据运单信息查询面单pdf接口,响应结果:{}", JSON.toJSONString(response));
|
|
log.info("京东开放平台根据运单信息查询面单pdf接口,响应结果:{}", JSON.toJSONString(response));
|
|
|
|
|
|
|
|
if (response.getCode().equals("0")) {
|
|
if (response.getCode().equals("0")) {
|
|
|
- if (response.getPrintResultDTO().getCode() == 0) {
|
|
|
|
|
|
|
+ if (response.getPrintResultDTO().getCode() == 1000) {
|
|
|
result.put("success", true);
|
|
result.put("success", true);
|
|
|
- result.put("msg", response.getPrintResultDTO().getResult());
|
|
|
|
|
|
|
+ result.put("msg", response.getPrintResultDTO().getResult().get(0).getUrl());
|
|
|
} else {
|
|
} else {
|
|
|
result.put("success", false);
|
|
result.put("success", false);
|
|
|
result.put("msg", "京东开放平台根据运单信息查询面单pdf接口!失败原因:" + response.getPrintResultDTO().getMsg());
|
|
result.put("msg", "京东开放平台根据运单信息查询面单pdf接口!失败原因:" + response.getPrintResultDTO().getMsg());
|