Commit 83ed02a0 authored by tangwei's avatar tangwei

增加判断

parent a3b1d597
...@@ -133,7 +133,11 @@ public class JpStationController extends BaseController { ...@@ -133,7 +133,11 @@ public class JpStationController extends BaseController {
LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId()); qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId());
List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug); List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug);
if(pPersonStation!=null&&!pPersonStation.isEmpty()){
reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation); reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation);
}else{
ResponseHelper.buildResponse(null);
}
// } // }
Page<JpStationDto> page=jpStationServiceImpl.queryForJpStationPage(current,size,reviewDto); Page<JpStationDto> page=jpStationServiceImpl.queryForJpStationPage(current,size,reviewDto);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
...@@ -162,7 +166,12 @@ public class JpStationController extends BaseController { ...@@ -162,7 +166,12 @@ public class JpStationController extends BaseController {
LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId()); qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId());
List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug); List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug);
if(pPersonStation!=null&&!pPersonStation.isEmpty()){
reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation); reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation);
}else{
ResponseHelper.buildResponse(null);
}
List<Map<String,Object>> listCollector= jpCollectorMapper.queryCollectorCountStatus(reviewDto); List<Map<String,Object>> listCollector= jpCollectorMapper.queryCollectorCountStatus(reviewDto);
List<Map<String,Object>> listInverter= jpInverterMapper.queryInverterCountStatus(reviewDto); List<Map<String,Object>> listInverter= jpInverterMapper.queryInverterCountStatus(reviewDto);
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
...@@ -223,7 +232,11 @@ public class JpStationController extends BaseController { ...@@ -223,7 +232,11 @@ public class JpStationController extends BaseController {
LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpPersonStation> qug=new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId()); qug.eq(JpPersonStation::getPersonId,getUserInfo().getUserId());
List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug); List<JpPersonStation> pPersonStation=pPersonStationMapper.selectList(qug);
if(pPersonStation!=null&&!pPersonStation.isEmpty()){
reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation); reviewDto.setStatioId(pPersonStation.isEmpty()?null:pPersonStation);
}else{
ResponseHelper.buildResponse(null);
}
} }
return ResponseHelper.buildResponse(jpStationMapper.queryCount(reviewDto)); return ResponseHelper.buildResponse(jpStationMapper.queryCount(reviewDto));
} }
......
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