|
@@ -53,20 +53,22 @@ public class WarningPersonService {
|
|
|
* @return
|
|
|
*/
|
|
|
public IPage<WarningPersonVO> listWarningPersonbyCommunity(String type, Long communityId, String nameOrCred, String populationType, Long crowdId, String beginDate, String endDate,String handleStatus, UserLoginedConvertVO loginUser, PageReqVO pageReqVo) {
|
|
|
- QueryWrapper<IdenPerson> queryWrapper0 = new QueryWrapper<>();
|
|
|
- queryWrapper0.lambda().eq(StrUtil.isNotEmpty(populationType),IdenPerson::getPopulationType,populationType)
|
|
|
- .and(StrUtil.isNotEmpty(nameOrCred),wrapper -> wrapper.like(IdenPerson::getName,nameOrCred)
|
|
|
- .or().like(IdenPerson::getCredentialsCode,nameOrCred));
|
|
|
- if (crowdId != null) {
|
|
|
- queryWrapper0.apply(" EXISTS ( select dev_code from iden_person_crowd_ref ipcr where ipcr.person_id = iden_person.id and ipcr.crowd_id = " + crowdId + ")");
|
|
|
- }
|
|
|
|
|
|
- List<IdenPerson> listIdenPerson = idenPersonService.list(queryWrapper0);
|
|
|
List<Long> listIdenPersonId = new ArrayList<>();
|
|
|
- if(CollUtil.isNotEmpty(listIdenPerson)){
|
|
|
- listIdenPerson.forEach(item->{
|
|
|
- listIdenPersonId.add(item.getId());
|
|
|
- });
|
|
|
+ if(StrUtil.isNotEmpty(populationType) || StrUtil.isNotEmpty(nameOrCred) || crowdId != null){
|
|
|
+ QueryWrapper<IdenPerson> queryWrapper0 = new QueryWrapper<>();
|
|
|
+ queryWrapper0.lambda().eq(StrUtil.isNotEmpty(populationType),IdenPerson::getPopulationType,populationType)
|
|
|
+ .and(StrUtil.isNotEmpty(nameOrCred),wrapper -> wrapper.like(IdenPerson::getName,nameOrCred)
|
|
|
+ .or().like(IdenPerson::getCredentialsCode,nameOrCred));
|
|
|
+ if (crowdId != null) {
|
|
|
+ queryWrapper0.apply(" EXISTS ( select 1 from iden_person_crowd_ref ipcr where ipcr.person_id = iden_person.id and ipcr.crowd_id = " + crowdId + ")");
|
|
|
+ }
|
|
|
+ List<IdenPerson> listIdenPerson = idenPersonService.list(queryWrapper0);
|
|
|
+ if(CollUtil.isNotEmpty(listIdenPerson)){
|
|
|
+ listIdenPerson.forEach(item->{
|
|
|
+ listIdenPersonId.add(item.getId());
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
IPage<IdenWarningPerson> page = new Page<>(pageReqVo.getCurrent(), pageReqVo.getPageSize());
|