|
|
@ -174,30 +174,34 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
//开始对比两个List获取相同部分,获取的交叉id就是需要的id
|
|
|
|
//开始对比两个List获取相同部分,获取的交叉id就是需要的id
|
|
|
|
List<String> commonElements = idlistss.stream().filter(userbyrole::contains).collect(Collectors.toList()); |
|
|
|
List<String> commonElements = idlistss.stream().filter(userbyrole::contains).collect(Collectors.toList()); |
|
|
|
//根据查询的userid去获取username
|
|
|
|
//根据查询的userid去获取username
|
|
|
|
List<SysUser> sysUserList = sysUserService.query().in("id",commonElements).list(); |
|
|
|
if (commonElements.isEmpty()){ |
|
|
|
//根据查询的结果获取username的list
|
|
|
|
return Result.error("请添加专家"); |
|
|
|
List<String> usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); |
|
|
|
}else { |
|
|
|
//用于查看本公司下面的专家信息无论是否审核,无论哪个部门
|
|
|
|
List<SysUser> sysUserList = sysUserService.query().in("id", commonElements).list(); |
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
//根据查询的结果获取username的list
|
|
|
|
queryWrapper.eq("isdone","Y"); |
|
|
|
List<String> usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); |
|
|
|
queryWrapper.in("seusername",usernames); |
|
|
|
//用于查看本公司下面的专家信息无论是否审核,无论哪个部门
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
queryWrapper.eq("isdone", "Y"); |
|
|
|
pageList.getRecords().forEach(experttemp -> { |
|
|
|
queryWrapper.in("seusername", usernames); |
|
|
|
//开始用于修改数据
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); |
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
String depid = expertService.getdeps(sysUser.getId()); |
|
|
|
pageList.getRecords().forEach(experttemp -> { |
|
|
|
SysDepart sysDepart = sysDepartService.getById(depid); |
|
|
|
//开始用于修改数据
|
|
|
|
experttemp.setRealname(sysUser.getRealname()); |
|
|
|
SysUser sysUser = sysUserService.query().eq("username", experttemp.getSeusername()).one(); |
|
|
|
experttemp.setWorkon(sysUser.getWorkNo()); |
|
|
|
String depid = expertService.getdeps(sysUser.getId()); |
|
|
|
experttemp.setSex(sysUser.getSex()); |
|
|
|
SysDepart sysDepart = sysDepartService.getById(depid); |
|
|
|
experttemp.setTopPic(sysUser.getAvatar()); |
|
|
|
experttemp.setRealname(sysUser.getRealname()); |
|
|
|
experttemp.setPhone(sysUser.getPhone()); |
|
|
|
experttemp.setWorkon(sysUser.getWorkNo()); |
|
|
|
experttemp.setEmails(sysUser.getEmail()); |
|
|
|
experttemp.setSex(sysUser.getSex()); |
|
|
|
experttemp.setSsdep(sysDepart.getDepartName()); |
|
|
|
experttemp.setTopPic(sysUser.getAvatar()); |
|
|
|
experttemp.setPsd(sysUser.getPassword()); |
|
|
|
experttemp.setPhone(sysUser.getPhone()); |
|
|
|
}); |
|
|
|
experttemp.setEmails(sysUser.getEmail()); |
|
|
|
return Result.OK(pageList); |
|
|
|
experttemp.setSsdep(sysDepart.getDepartName()); |
|
|
|
|
|
|
|
experttemp.setPsd(sysUser.getPassword()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value="专家管理-分页列表查询/公司管理员角色", notes="专家管理-分页列表查询/公司管理员角色") |
|
|
|
@ApiOperation(value="专家管理-分页列表查询/公司管理员角色", notes="专家管理-分页列表查询/公司管理员角色") |
|
|
@ -623,8 +627,8 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
@GetMapping(value = "handleadminback") |
|
|
|
@GetMapping(value = "handleadminback") |
|
|
|
public Result<String> handleadminback(@RequestParam(name="id",required=true) String id) { |
|
|
|
public Result<String> handleadminback(@RequestParam(name="id",required=true) String id) { |
|
|
|
Expert expert =expertService.getById(id); |
|
|
|
Expert expert =expertService.getById(id); |
|
|
|
expert.setAdminopen("1"); |
|
|
|
expert.setAdminopen("3"); |
|
|
|
expert.setCompopen("1"); |
|
|
|
expert.setCompopen("3"); |
|
|
|
expert.setIsdone("N"); |
|
|
|
expert.setIsdone("N"); |
|
|
|
expertService.updateById(expert); |
|
|
|
expertService.updateById(expert); |
|
|
|
return Result.OK("驳回成功!请到编辑页面确定问题数据并填写驳回原因"); |
|
|
|
return Result.OK("驳回成功!请到编辑页面确定问题数据并填写驳回原因"); |
|
|
|