|
@@ -9,6 +9,7 @@ import com.gyee.frame.model.custom.StatisticalAnalysisTopVo;
|
|
|
import com.gyee.frame.model.custom.StatisticalAnalysisWarningTopVo;
|
|
|
import com.gyee.frame.model.custom.Tablepar;
|
|
|
import com.gyee.frame.service.leaderboard.LeaderboardService;
|
|
|
+import com.gyee.frame.util.DateUtils;
|
|
|
import com.gyee.frame.util.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -27,10 +28,19 @@ public class LeaderboardController {
|
|
|
/**查询拟合优度列表**/
|
|
|
@GetMapping("/fittingtoplist")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult fittingtoplist(Tablepar tablepar, String wpIps, Date beginDate, Date endDate) {
|
|
|
+ public AjaxResult fittingtoplist(Tablepar tablepar, String wpIps, String beginDate, String endDate) {
|
|
|
|
|
|
-
|
|
|
- List<StatisticalAnalysisTopVo> vos= leaderboardService.getRnewTopDate(wpIps, beginDate, endDate);
|
|
|
+ Date beginDate_d=null;
|
|
|
+ Date endDate_d=null;
|
|
|
+ if (StringUtils.isNotEmpty(beginDate))
|
|
|
+ {
|
|
|
+ beginDate_d= DateUtils.parseDate(beginDate);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(endDate))
|
|
|
+ {
|
|
|
+ endDate_d= DateUtils.parseDate(endDate);
|
|
|
+ }
|
|
|
+ List<StatisticalAnalysisTopVo> vos= leaderboardService.getRnewTopDate(wpIps, beginDate_d, endDate_d);
|
|
|
|
|
|
for (StatisticalAnalysisTopVo vo : vos) {
|
|
|
if (vo.getPower() > 1) {
|
|
@@ -86,11 +96,20 @@ public class LeaderboardController {
|
|
|
/**查询拟合优度图表**/
|
|
|
@GetMapping("/fittingtopchart")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult fittingtopchart(String wtIds, Date beginDate, Date endDate) throws Exception {
|
|
|
-
|
|
|
+ public AjaxResult fittingtopchart(String wtIds, String beginDate, String endDate) throws Exception {
|
|
|
+ Date beginDate_d=null;
|
|
|
+ Date endDate_d=null;
|
|
|
+ if (StringUtils.isNotEmpty(beginDate))
|
|
|
+ {
|
|
|
+ beginDate_d= DateUtils.parseDate(beginDate);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(endDate))
|
|
|
+ {
|
|
|
+ endDate_d= DateUtils.parseDate(endDate);
|
|
|
+ }
|
|
|
Map<String, List> map =new HashMap<>();
|
|
|
if (StringUtils.notEmp(wtIds) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
|
|
|
- map = leaderboardService.fittingtopchart(wtIds, beginDate, endDate);
|
|
|
+ map = leaderboardService.fittingtopchart(wtIds, beginDate_d, endDate_d);
|
|
|
}
|
|
|
|
|
|
if (map != null && !map.isEmpty()) {
|
|
@@ -103,10 +122,19 @@ public class LeaderboardController {
|
|
|
/**查询总发电量排行列表**/
|
|
|
@GetMapping("/totalPowerCapacityTopList")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult totalPowerCapacityTopList(Tablepar tablepar, String wpIps, Date beginDate, Date endDate) {
|
|
|
+ public AjaxResult totalPowerCapacityTopList(Tablepar tablepar, String wpIps, String beginDate, String endDate) {
|
|
|
|
|
|
-
|
|
|
- List<StatisticalAnalysisTopVo> vos= leaderboardService.totalPowerCapacityTopList(wpIps, beginDate, endDate);
|
|
|
+ Date beginDate_d=null;
|
|
|
+ Date endDate_d=null;
|
|
|
+ if (StringUtils.isNotEmpty(beginDate))
|
|
|
+ {
|
|
|
+ beginDate_d= DateUtils.parseDate(beginDate);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(endDate))
|
|
|
+ {
|
|
|
+ endDate_d= DateUtils.parseDate(endDate);
|
|
|
+ }
|
|
|
+ List<StatisticalAnalysisTopVo> vos= leaderboardService.totalPowerCapacityTopList(wpIps, beginDate_d, endDate_d);
|
|
|
|
|
|
|
|
|
if (tablepar.getOrderByColumn().equals("power")) {
|
|
@@ -191,10 +219,19 @@ public class LeaderboardController {
|
|
|
/**查询损失率排行榜列表**/
|
|
|
@GetMapping("/lossList")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult lossList(Tablepar tablepar, String wpId, Date beginDate, Date endDate,String type) {
|
|
|
+ public AjaxResult lossList(Tablepar tablepar, String wpId, String beginDate, String endDate,String type) {
|
|
|
|
|
|
-
|
|
|
- List<Windturbineinfoday3> vos= leaderboardService.lossList(tablepar, wpId, beginDate, endDate, type);
|
|
|
+ Date beginDate_d=null;
|
|
|
+ Date endDate_d=null;
|
|
|
+ if (StringUtils.isNotEmpty(beginDate))
|
|
|
+ {
|
|
|
+ beginDate_d= DateUtils.parseDate(beginDate);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(endDate))
|
|
|
+ {
|
|
|
+ endDate_d= DateUtils.parseDate(endDate);
|
|
|
+ }
|
|
|
+ List<Windturbineinfoday3> vos= leaderboardService.lossList(tablepar, wpId, beginDate_d, endDate_d, type);
|
|
|
|
|
|
|
|
|
if (vos != null && !vos.isEmpty()) {
|