update 推送充电报告算法

This commit is contained in:
Lemon
2025-11-24 09:29:09 +08:00
parent e9a2e20d23
commit 0472df17c9
3 changed files with 44 additions and 25 deletions

View File

@@ -145,13 +145,17 @@ public class BatteryChargeReportService {
// BatteryReportResult batteryReportResult = (BatteryReportResult) resultMap.get("result");
BatteryReportResult batteryReportResult = JSONObject.parseObject(resultMap.get("result").toString(), BatteryReportResult.class);;
if (StringUtils.equals(Constants.ONE, reportType)) {
// 1-web 端
resultUrl = batteryReportResult.getWebUrl();
record.setWebUrl(resultUrl);
if (StringUtils.isNotBlank(batteryReportResult.getWebUrl())) {
// 1-web 端
resultUrl = batteryReportResult.getWebUrl();
record.setWebUrl(resultUrl);
}
}else {
// pdf 端
resultUrl = batteryReportResult.getPdfUrl();
record.setPdfUrl(resultUrl);
if (StringUtils.isNotBlank(batteryReportResult.getPdfUrl())) {
// pdf 端
resultUrl = batteryReportResult.getPdfUrl();
record.setPdfUrl(resultUrl);
}
}
// 保存到数据库
chargeAlgorithmRecordService.updateChargeAlgorithmRecord(record);