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

修改查询报警列表错误

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