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

@@ -3,6 +3,7 @@ package com.jsowell.api.thirdparty;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.thirdparty.platform.dto.BatteryChargeReportDTO;
import com.jsowell.thirdparty.platform.service.impl.BatteryChargeReportService;
import com.jsowell.thirdparty.platform.service.impl.ChargeAlgorithmService;
@@ -31,8 +32,12 @@ public class ChargeAlgorithmController extends BaseController {
RestApiResponse<?> response = null;
try {
// String result = chargeAlgorithmService.pushOrderInfo(orderCode);
String result = batteryChargeReportService.getTaskIdByOrderCode(dto.getOrderCode(), dto.getReportType());
response = new RestApiResponse<>(result);
String taskId = batteryChargeReportService.getTaskIdByOrderCode(dto.getOrderCode());
String url = "";
if (StringUtils.isNotBlank(taskId)) {
url = batteryChargeReportService.getUrlByTaskId(taskId, dto.getReportType());
}
response = new RestApiResponse<>(url);
}catch (Exception e) {
logger.error("算法应用推送订单信息 error, ", e);
response = new RestApiResponse<>(e);