Commit abfd05fd authored by caotao's avatar caotao

小程序端权限报错问题修改。

parent a7804cc8
......@@ -131,32 +131,30 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表分页查询", notes = "户用光伏监盘逆变器报警表分页查询")
public ResponseModel<Page<TdHygfJpInverterWarnDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, TdHygfJpInverterWarnDto tdHygfJpInverterWarnDto) {
// List<JpPersonStation> pPersonStation =null;
// if(tdHygfJpInverterWarnDto.getName()!=null&&!"".equals(tdHygfJpInverterWarnDto.getName())){
// LambdaQueryWrapper<JpPersonStation> qug1=new LambdaQueryWrapper<>();
// qug1.like(JpPersonStation::getStationName,tdHygfJpInverterWarnDto.getName());
// pPersonStation=pPersonStationMapper.selectList(qug1);
// }else{
// LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
// qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
// pPersonStation = pPersonStationMapper.selectList(qug);
//
//
// }
// if (!pPersonStation.isEmpty()) {
List<JpPersonStation> pPersonStation =null;
if(tdHygfJpInverterWarnDto.getName()!=null&&!"".equals(tdHygfJpInverterWarnDto.getName())){
LambdaQueryWrapper<JpPersonStation> qug1=new LambdaQueryWrapper<>();
qug1.like(JpPersonStation::getStationName,tdHygfJpInverterWarnDto.getName());
pPersonStation=pPersonStationMapper.selectList(qug1);
}else{
LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
pPersonStation = pPersonStationMapper.selectList(qug);
}
if (!pPersonStation.isEmpty()) {
Page<TdHygfJpInverterWarnDto> page = new Page<TdHygfJpInverterWarnDto>();
page.setCurrent(current);
page.setSize(size);
// List<String> ids = pPersonStation.stream().map(i -> i.getStationId()).collect(Collectors.toList());
// tdHygfJpInverterWarnDto.setStationIds(ids);
List<String> ids = pPersonStation.stream().map(i -> i.getStationId()).collect(Collectors.toList());
tdHygfJpInverterWarnDto.setStationIds(ids);
return ResponseHelper.buildResponse(
tdHygfJpInverterWarnServiceImpl.queryForTdHygfJpInverterWarnPage(page, tdHygfJpInverterWarnDto));
// } else {
// return ResponseHelper.buildResponse(new Page<TdHygfJpInverterWarnDto>());
// }
} else {
return ResponseHelper.buildResponse(new 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