update 电池充电报告Service

This commit is contained in:
Lemon
2025-09-23 10:44:29 +08:00
parent bd62f259ac
commit 896f69f496
4 changed files with 32 additions and 4 deletions

View File

@@ -33,4 +33,6 @@ public class BatteryReportResult {
private String taskId;
private String directUrl;
private String timestamp;
}

View File

@@ -2,6 +2,7 @@ package com.jsowell.thirdparty.platform.service.impl;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.ykc.*;
@@ -74,7 +75,7 @@ public class BatteryChargeReportService {
*
* @param orderCode
*/
public String getTaskIdByOrderCode(String orderCode, String reportType) {
public String getTaskIdByOrderCode(String orderCode) {
// 根据订单号查询订单信息
OrderVO orderVO = orderBasicInfoService.getChargeOrderInfoByOrderCode(orderCode);
if (orderVO == null) {
@@ -124,7 +125,8 @@ public class BatteryChargeReportService {
}
// 获取对应的 url
// 将 result 部分转换成 BatteryReportResult 对象
BatteryReportResult batteryReportResult = (BatteryReportResult) resultMap.get("result");
// BatteryReportResult batteryReportResult = (BatteryReportResult) resultMap.get("result");
BatteryReportResult batteryReportResult = JSONObject.parseObject(resultMap.get("result").toString(), BatteryReportResult.class);;
String pdfUrl = batteryReportResult.getPdfUrl();
if (StringUtils.isBlank(pdfUrl)) {
String webUrl = batteryReportResult.getWebUrl();