|
@@ -83,6 +83,11 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
|
|
|
@Override
|
|
@Override
|
|
|
public TableDataInfo<PtUserAccountVo> queryPageList(PtUserAccountBo bo, PageQuery pageQuery) {
|
|
public TableDataInfo<PtUserAccountVo> queryPageList(PtUserAccountBo bo, PageQuery pageQuery) {
|
|
|
LambdaQueryWrapper<PtUserAccount> lqw = buildQueryWrapper(bo);
|
|
LambdaQueryWrapper<PtUserAccount> lqw = buildQueryWrapper(bo);
|
|
|
|
|
+ Long deptId = bo.getDeptId();
|
|
|
|
|
+ if(deptId != null){
|
|
|
|
|
+ List<Long> ids = remoteDeptService.selectDeptAndChildrenDeptById(bo.getDeptId());
|
|
|
|
|
+ lqw.in(PtUserAccount::getDeptId, ids);
|
|
|
|
|
+ }
|
|
|
lqw.orderByAsc(PtUserAccount::getDeptId)
|
|
lqw.orderByAsc(PtUserAccount::getDeptId)
|
|
|
.orderByAsc(PtUserAccount::getRealName);
|
|
.orderByAsc(PtUserAccount::getRealName);
|
|
|
//Page<PtUserAccountVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
//Page<PtUserAccountVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
@@ -121,7 +126,7 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
|
|
|
Map<String, Object> params = bo.getParams();
|
|
Map<String, Object> params = bo.getParams();
|
|
|
LambdaQueryWrapper<PtUserAccount> lqw = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<PtUserAccount> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(bo.getPostId() != null, PtUserAccount::getPostId, bo.getPostId());
|
|
lqw.eq(bo.getPostId() != null, PtUserAccount::getPostId, bo.getPostId());
|
|
|
- lqw.eq(bo.getDeptId() != null, PtUserAccount::getDeptId, bo.getDeptId());
|
|
|
|
|
|
|
+// lqw.eq(bo.getDeptId() != null, PtUserAccount::getDeptId, bo.getDeptId());
|
|
|
lqw.like(StringUtils.isNotBlank(bo.getUserName()), PtUserAccount::getUserName, bo.getUserName());
|
|
lqw.like(StringUtils.isNotBlank(bo.getUserName()), PtUserAccount::getUserName, bo.getUserName());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getPassword()), PtUserAccount::getPassword, bo.getPassword());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getPassword()), PtUserAccount::getPassword, bo.getPassword());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getUserNumb()), PtUserAccount::getUserNumb, bo.getUserNumb());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getUserNumb()), PtUserAccount::getUserNumb, bo.getUserNumb());
|
|
@@ -397,7 +402,7 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
|
|
|
idCards.add(idCard);
|
|
idCards.add(idCard);
|
|
|
}
|
|
}
|
|
|
Map<String, Long> idCardMap = baseMapper.selectList(Wrappers.lambdaQuery(PtUserAccount.class)
|
|
Map<String, Long> idCardMap = baseMapper.selectList(Wrappers.lambdaQuery(PtUserAccount.class)
|
|
|
- .select(PtUserAccount::getIdNumber)
|
|
|
|
|
|
|
+ .select(PtUserAccount::getIdNumber, PtUserAccount::getUserId)
|
|
|
.in(PtUserAccount::getIdNumber,idCards)
|
|
.in(PtUserAccount::getIdNumber,idCards)
|
|
|
).stream().collect(Collectors.toMap(PtUserAccount::getIdNumber, PtUserAccount:: getUserId));
|
|
).stream().collect(Collectors.toMap(PtUserAccount::getIdNumber, PtUserAccount:: getUserId));
|
|
|
|
|
|
|
@@ -418,9 +423,10 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
|
|
|
//4.保存图片路径到数据库
|
|
//4.保存图片路径到数据库
|
|
|
String photoUrl = userPath + newFileName;
|
|
String photoUrl = userPath + newFileName;
|
|
|
updateByBo(PtUserAccountBo.builder().userId(idCardMap.get(idCard)).photo(photoUrl).build());
|
|
updateByBo(PtUserAccountBo.builder().userId(idCardMap.get(idCard)).photo(photoUrl).build());
|
|
|
|
|
+ okNum++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return 0;
|
|
|
|
|
|
|
+ return okNum;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|