Commit f5c7a501 authored by chenzhao's avatar chenzhao

修改代码

parent b960b069
......@@ -45,13 +45,13 @@
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode}
AND hjc.sn_code like #{dto.snCode}
</if>
<if test="dto.minValue != null and dto.minValue !=''">
capacity >= #{dto.type}
AND hjc.capacity >= #{dto.type}
</if>
<if test="dto.maxValue != null and dto.maxValue !=''">
capacity <![CDATA[<=]]> #{dto.maxValue}
AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</if>
</where>
limit #{current},#{size}
......@@ -65,13 +65,13 @@
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode}
AND hjc.sn_code like #{dto.snCode}
</if>
<if test="dto.minValue != null and dto.minValue !=''">
capacity >= #{dto.type}
AND hjc. capacity >= #{dto.type}
</if>
<if test="dto.maxValue != null and dto.maxValue !=''">
capacity <![CDATA[<=]]> #{dto.maxValue}
AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</if>
</where>
</select>
......
......@@ -191,6 +191,10 @@ public class JpInverterController extends BaseController {
Page<JpInverterDtoNew> page = new Page<JpInverterDtoNew>();
page.setCurrent(current);
page.setSize(size);
if (StringUtils.isNotEmpty(jpInverterDto.getSnCode())){
jpInverterDto.setSnCode("%"+jpInverterDto.getSnCode()+"%");
}
page.setTotal(jpInverterServiceImpl.selectPageDataTota(jpInverterDto));
page.setRecords(jpInverterServiceImpl.selectPageData(jpInverterDto, (current - 1) * size, size));
return ResponseHelper.buildResponse(page);
......
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