Commit 62aae5d9 authored by chenzhao's avatar chenzhao

风电健康指数查询优化

parent 5bc24244
...@@ -173,7 +173,10 @@ public class TdInfoQueryController extends BaseController { ...@@ -173,7 +173,10 @@ public class TdInfoQueryController extends BaseController {
} }
List<FanHealthIndex> fanHealthIndexIPage = fanHealthIndexMapper.getInfoByPage(dto); List<FanHealthIndex> fanHealthIndexIPage = fanHealthIndexMapper.getInfoByPage(dto);
fanHealthIndexIPage.forEach(item -> item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())))); fanHealthIndexIPage.forEach(item -> {
item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())));
item.setAnalysisType(dto.getAnalysisType());
});
Integer infoByPageTotal = fanHealthIndexMapper.getInfoByPageTotal(dto); Integer infoByPageTotal = fanHealthIndexMapper.getInfoByPageTotal(dto);
resultPage.setRecords(fanHealthIndexIPage); resultPage.setRecords(fanHealthIndexIPage);
resultPage.setTotal(infoByPageTotal); resultPage.setTotal(infoByPageTotal);
...@@ -285,7 +288,10 @@ public class TdInfoQueryController extends BaseController { ...@@ -285,7 +288,10 @@ public class TdInfoQueryController extends BaseController {
String join = String.join(",", orderByList); String join = String.join(",", orderByList);
dto.setOrderColumns(join); dto.setOrderColumns(join);
List<PvHealthIndex> pvHealthIndexIPage = pvHealthIndexMapper.getInfoByPage(dto); List<PvHealthIndex> pvHealthIndexIPage = pvHealthIndexMapper.getInfoByPage(dto);
pvHealthIndexIPage.forEach(item -> item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())))); pvHealthIndexIPage.forEach(item -> {
item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())));
item.setAnalysisType(dto.getAnalysisType());
});
Integer infoByPageTotal = pvHealthIndexMapper.getInfoByPageTotal(dto); Integer infoByPageTotal = pvHealthIndexMapper.getInfoByPageTotal(dto);
resultPage.setRecords(pvHealthIndexIPage); resultPage.setRecords(pvHealthIndexIPage);
resultPage.setTotal(infoByPageTotal); resultPage.setTotal(infoByPageTotal);
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</select> </select>
<select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex"> <select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex">
SELECT * FROM fan_health_index_data SELECT * FROM ${dto.tableName}
<where> <where>
<if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if> <if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if>
<if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if> <if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment