|
@@ -2,9 +2,13 @@ package com.gyee.health.controller.leaderboard;
|
|
|
|
|
|
import com.gyee.health.dto.AjaxResult;
|
|
|
import com.gyee.health.dto.AjaxStatus;
|
|
|
+import com.gyee.health.init.CacheContext;
|
|
|
+import com.gyee.health.model.auto.ProBasicEquipment;
|
|
|
import com.gyee.health.model.auto.ProEconCurveFittMonthMain;
|
|
|
import com.gyee.health.model.auto.ProEconCurveFittingMain;
|
|
|
import com.gyee.health.model.custom.Tablepar;
|
|
|
+import com.gyee.health.model.vo.ProEconCurveFittMonthMainVo;
|
|
|
+import com.gyee.health.model.vo.ProEconCurveFittingMainVo;
|
|
|
import com.gyee.health.service.leaderboard.LeaderboardService;
|
|
|
import com.gyee.health.util.DateUtils;
|
|
|
import com.gyee.health.util.StringUtils;
|
|
@@ -46,9 +50,30 @@ public class LeaderboardController {
|
|
|
}
|
|
|
|
|
|
if (vos != null && !vos.isEmpty()) {
|
|
|
- return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
|
+
|
|
|
+ List<ProEconCurveFittingMainVo> ls=new ArrayList<>();
|
|
|
+ for(ProEconCurveFittingMain vo:vos)
|
|
|
+ {
|
|
|
+ ProEconCurveFittingMainVo po=new ProEconCurveFittingMainVo();
|
|
|
+ po.setId(vo.getId());
|
|
|
+ po.setRecordDate(vo.getRecordDate());
|
|
|
+ po.setDeviationRate1(vo.getDeviationRate1());
|
|
|
+ po.setDeviationRate3(vo.getDeviationRate3());
|
|
|
+ po.setDeviationRate2(vo.getDeviationRate2());
|
|
|
+ po.setWindturbineId(vo.getWindturbineId());
|
|
|
+ po.setMonthDeviationRate(vo.getMonthDeviationRate());
|
|
|
+ po.setStandardDeviationRate(vo.getStandardDeviationRate());
|
|
|
+ po.setYearDeviationRate(vo.getYearDeviationRate());
|
|
|
+ if(CacheContext.wtmap.containsKey(vo.getWindturbineId()))
|
|
|
+ {
|
|
|
+ ProBasicEquipment wt=CacheContext.wtmap.get(vo.getWindturbineId());
|
|
|
+ po.setWtCode(wt.getNemCode());
|
|
|
+ }
|
|
|
+ ls.add(po);
|
|
|
+ }
|
|
|
+ return AjaxResult.successData(AjaxStatus.success.code, ls);
|
|
|
} else {
|
|
|
- return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
|
+ return AjaxResult.successData(AjaxStatus.success.code, new ArrayList<ProEconCurveFittingMainVo>());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -167,9 +192,31 @@ public class LeaderboardController {
|
|
|
List<ProEconCurveFittMonthMain> vos= leaderboardService.curvefittingmonthmainList( tablepar, wpId, year, month);
|
|
|
|
|
|
if (vos != null && !vos.isEmpty()) {
|
|
|
- return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
|
+
|
|
|
+ List<ProEconCurveFittMonthMainVo> ls=new ArrayList<>();
|
|
|
+ for(ProEconCurveFittMonthMain vo:vos)
|
|
|
+ {
|
|
|
+ ProEconCurveFittMonthMainVo po=new ProEconCurveFittMonthMainVo();
|
|
|
+ po.setId(vo.getId());
|
|
|
+ po.setMonth(vo.getMonth());
|
|
|
+ po.setYear(vo.getYear());
|
|
|
+ po.setDeviationRate1(vo.getDeviationRate1());
|
|
|
+ po.setDeviationRate3(vo.getDeviationRate3());
|
|
|
+ po.setDeviationRate2(vo.getDeviationRate2());
|
|
|
+ po.setWindturbineId(vo.getWindturbineId());
|
|
|
+ po.setMonthDeviationRate(vo.getMonthDeviationRate());
|
|
|
+ po.setStandardDeviationRate(vo.getStandardDeviationRate());
|
|
|
+ po.setYearDeviationRate(vo.getYearDeviationRate());
|
|
|
+ if(CacheContext.wtmap.containsKey(vo.getWindturbineId()))
|
|
|
+ {
|
|
|
+ ProBasicEquipment wt=CacheContext.wtmap.get(vo.getWindturbineId());
|
|
|
+ po.setWtCode(wt.getNemCode());
|
|
|
+ }
|
|
|
+ ls.add(po);
|
|
|
+ }
|
|
|
+ return AjaxResult.successData(AjaxStatus.success.code, ls);
|
|
|
} else {
|
|
|
- return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
|
+ return AjaxResult.successData(AjaxStatus.success.code, new ProEconCurveFittMonthMainVo());
|
|
|
}
|
|
|
}
|
|
|
|