|
@@ -47,14 +47,13 @@ public class StationAnalysisController {
|
|
|
@RequestParam(value = "target", required = false) String target,
|
|
|
@RequestParam(value = "sort", required = false) String sort
|
|
|
) throws Exception {
|
|
|
-
|
|
|
- Map<String, List<StationAnalysis>> resultList = windturbinegoodnessService.stationAnalysis(companys, type, wpid, beginDate, endDate, target, sort);
|
|
|
-
|
|
|
- if (StringUtils.isNotNull(resultList)) {
|
|
|
- return R.data(ResultMsg.ok(resultList));
|
|
|
- } else {
|
|
|
- return R.error(ResultMsg.error());
|
|
|
+ try {
|
|
|
+ Map<String, List<StationAnalysis>> resultList = windturbinegoodnessService.stationAnalysis(companys, type, wpid, beginDate, endDate, target, sort);
|
|
|
+ if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
+ return R.error(ResultMsg.error());
|
|
|
}
|
|
|
|
|
|
@GetMapping("/analysis")
|
|
@@ -65,15 +64,14 @@ public class StationAnalysisController {
|
|
|
@RequestParam(value = "month", required = true) String month,
|
|
|
@RequestParam(value = "target", required = false) String target,
|
|
|
@RequestParam(value = "sort", required = false) String sort
|
|
|
- ) throws Exception {
|
|
|
-
|
|
|
- Map<String, List<String>> resultList = economyAnalysisService.getReport(wpid, year, month, target, sort);
|
|
|
-
|
|
|
- if (StringUtils.isNotNull(resultList)) {
|
|
|
- return R.data(ResultMsg.ok(resultList));
|
|
|
- } else {
|
|
|
- return R.error(ResultMsg.error());
|
|
|
+ ) {
|
|
|
+ try {
|
|
|
+ Map<String, List<String>> resultList = economyAnalysisService.getReport(wpid, year, month, target, sort);
|
|
|
+ if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
+ return R.error(ResultMsg.error());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -90,15 +88,14 @@ public class StationAnalysisController {
|
|
|
@RequestParam(value = "target", required = false) String target,
|
|
|
@RequestParam(value = "sort", required = false) String sort
|
|
|
|
|
|
- ) throws Exception {
|
|
|
-
|
|
|
- Page<InverterAnalysis> resultList = windturbinegoodnessService.inverterAnalysis(companys, type, wpid, pageSize, pageNum, target, sort);
|
|
|
-
|
|
|
- if (com.gyee.common.model.StringUtils.isNotNull(resultList)) {
|
|
|
- return R.data(ResultMsg.ok(resultList));
|
|
|
- } else {
|
|
|
- return R.error(ResultMsg.error());
|
|
|
+ ) {
|
|
|
+ try {
|
|
|
+ Page<InverterAnalysis> resultList = windturbinegoodnessService.inverterAnalysis(companys, type, wpid, pageSize, pageNum, target, sort);
|
|
|
+ if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
+ return R.error(ResultMsg.error());
|
|
|
}
|
|
|
|
|
|
|