Commit 506eaa65 authored by wujiang's avatar wujiang

修改告警查询

parent 8d417b64
......@@ -54,5 +54,7 @@ public class TdHygfJpInverterWarnDto {
private Long time;
private List<String> stationIds;
private List<String> states;
}
......@@ -19,8 +19,11 @@
<select id="list" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto">
SELECT * FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="param.state!=null">
`state` = #{param.state}
<if test="param.states!=null">
AND `state` IN
<foreach collection="param.states" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.stationIds!=null">
AND third_station_id IN
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -38,6 +40,10 @@ public class TdHygfJpInverterWarnServiceImpl
int pageNum = (int) pageParam.getCurrent();
int pageSize = (int) pageParam.getSize();
PageHelper.startPage(pageNum, pageSize);
if (tdHygfJpInverterWarnDto.getState() != null) {
String[] s = tdHygfJpInverterWarnDto.getState().split(",");
tdHygfJpInverterWarnDto.setStates(Arrays.asList(s));
}
List<TdHygfJpInverterWarnDto> list = this.baseMapper.list(tdHygfJpInverterWarnDto);
PageInfo<TdHygfJpInverterWarnDto> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto>();
......
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