Commit bd9b0b9b authored by chenzhao's avatar chenzhao

修改sql问题

parent 64cf7b57
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
AND start_time >= #{startTime} AND start_time >= #{startTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND start_time [<![CDATA[<=]]>] #{endTime} AND start_time <![CDATA[<=]]> #{endTime}
</if> </if>
<if test="content != null and content != ''"> <if test="content != null and content != ''">
AND content like #{content} AND content like #{content}
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
AND start_time >= #{startTime} AND start_time >= #{startTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND start_time [<![CDATA[<=]]>] #{endTime} AND start_time <![CDATA[<=]]> #{endTime}
</if> </if>
<if test="content != null and content != ''"> <if test="content != null and content != ''">
AND content like #{content} AND content like #{content}
......
...@@ -244,8 +244,7 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -244,8 +244,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
@RequestParam(required = false) String maxValue, @RequestParam(required = false) String maxValue,
@RequestParam(required = false) String snCode, @RequestParam(required = false) String snCode,
@RequestParam(required = false) List<String> stationId, @RequestParam(required = false) List<String> stationId,
@RequestParam(required = false) String startTime, @RequestParam(required = false) List<String> time,
@RequestParam(required = false) String endTime,
@RequestParam(required = false) Integer current, @RequestParam(required = false) Integer current,
@RequestParam(required = false) Integer size, @RequestParam(required = false) Integer size,
@RequestParam(required = false) String content) { @RequestParam(required = false) String content) {
...@@ -262,6 +261,13 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -262,6 +261,13 @@ public class TdHygfJpInverterWarnController extends BaseController {
if (null == stationId ){ if (null == stationId ){
stationId = jpStation.stream().map(JpStation::getThirdStationId).collect(Collectors.toList()); stationId = jpStation.stream().map(JpStation::getThirdStationId).collect(Collectors.toList());
} }
String startTime ="";
String endTime = "";
if (null != time){
startTime = time.get(0);
endTime = time.get(1);
}
List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content,current,size); List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content,current,size);
for (TdHygfJpInverterWarnDto map : maps) { for (TdHygfJpInverterWarnDto map : maps) {
......
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