Commit d5ad231b authored by 朱晨阳's avatar 朱晨阳

修改查询报警列表错误

parent b1cb7cf8
......@@ -33,10 +33,10 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
@UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName);
List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName);
@UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName);
int selectWarnListTotal(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName);
@Select("SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})")
TdHygfJpInverterWarn getInverTerWarnByparams(@Param("createdTime") long createdTime, @Param("sncode") String snCode, @Param("thirdStationId") String thirdStationId);
......
......@@ -71,8 +71,11 @@
handler_status as handlerStatus
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="state != null and state != ''">
AND `state` = #{state}
<if test="state != null and state.size>0">
AND `state` in
<foreach collection="state" item="item" open='(' close=')' separator=",">
#{item}
</foreach>
</if>
<!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}-->
......@@ -118,8 +121,11 @@
count (1)
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="state != null and state != ''">
AND `state` = #{state}
<if test="state != null and state.size>0">
AND `state` in
<foreach collection="state" item="item" open='(' close=')' separator=",">
#{item}
</foreach>
</if>
<!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}-->
......
......@@ -886,6 +886,7 @@ public class JpStationController extends BaseController {
JpStationDto reviewDto = new JpStationDto();
reviewDto.setRegionalCompaniesCode(regionalCompaniesCode);
reviewDto.setAmosCompanyCode(dealer.getOrgCode());
// 根据区域公司code获取场站个数
Map<String, Object> zs = jpStationServiceImpl.getcount(reviewDto);
......
......@@ -229,7 +229,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表列表全部数据查询", notes = "户用光伏监盘逆变器报警表列表全部数据查询")
@GetMapping(value = "/selectWarnList")
@UserLimits
public ResponseModel<Page<TdHygfJpInverterWarnDto>> selectWarnList(@RequestParam(required = false) String state,
public ResponseModel<Page<TdHygfJpInverterWarnDto>> selectWarnList(@RequestParam(required = false) List<String> state,
@RequestParam(required = false) String handlerStatus,
@RequestParam(required = false) String level,
@RequestParam(required = false) String stationName,
......
......@@ -172,7 +172,7 @@ public class TdHygfJpInverterWarnServiceImpl
return tdHygfJpInverterWarnDto;
}
public List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName) {
public List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName) {
List<TdHygfJpInverterWarnDto> list = tdHygfJpInverterWarnMapper.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, (current - 1) * size, size, handlerStatus, stationName);
list.forEach(i -> {
JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>()
......@@ -186,7 +186,7 @@ public class TdHygfJpInverterWarnServiceImpl
return list;
}
public int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName) {
public int selectWarnListTotal(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName) {
return tdHygfJpInverterWarnMapper.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName);
}
......
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