mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
bugfix 空指针异常
This commit is contained in:
@@ -21,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@RequestMapping("/chargealgorithm")
|
@RequestMapping("/chargealgorithm")
|
||||||
public class ChargeAlgorithmController extends BaseController {
|
public class ChargeAlgorithmController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ChargeAlgorithmService chargeAlgorithmService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BatteryChargeReportService batteryChargeReportService;
|
private BatteryChargeReportService batteryChargeReportService;
|
||||||
|
|
||||||
|
|||||||
@@ -129,10 +129,14 @@ public class ChargeAlgorithmRecordServiceImpl implements ChargeAlgorithmRecordSe
|
|||||||
String reportType = dto.getReportType();
|
String reportType = dto.getReportType();
|
||||||
if (StringUtils.equals(Constants.ONE, reportType)) {
|
if (StringUtils.equals(Constants.ONE, reportType)) {
|
||||||
// 1-web 端
|
// 1-web 端
|
||||||
return record.getWebUrl();
|
if (StringUtils.isNotBlank(record.getWebUrl())) {
|
||||||
|
return record.getWebUrl();
|
||||||
|
}
|
||||||
}else if (StringUtils.equals(Constants.TWO, reportType)) {
|
}else if (StringUtils.equals(Constants.TWO, reportType)) {
|
||||||
// 2-pdf 端
|
// 2-pdf 端
|
||||||
return record.getPdfUrl();
|
if (StringUtils.isNotBlank(record.getPdfUrl())) {
|
||||||
|
return record.getPdfUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user