|
|
|
@ -17,6 +17,9 @@ import org.jeecg.common.system.query.QueryRuleEnum; |
|
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
|
import org.jeecg.common.util.PasswordUtil; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
|
import org.jeecg.modules.demo.disciplinefieid.entity.DisciplineFieid; |
|
|
|
|
import org.jeecg.modules.demo.disciplinefieid.service.IDisciplineFieidService; |
|
|
|
|
import org.jeecg.modules.demo.expert.entity.ExpCmsVo; |
|
|
|
|
import org.jeecg.modules.demo.expert.entity.Expert; |
|
|
|
|
import org.jeecg.modules.demo.expert.service.IExpertService; |
|
|
|
|
|
|
|
|
@ -63,6 +66,8 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
private ISysUserService sysUserService; |
|
|
|
|
@Autowired |
|
|
|
|
private ISysDepartService sysDepartService; |
|
|
|
|
@Autowired |
|
|
|
|
private IDisciplineFieidService disciplineFieidService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
@ -681,4 +686,58 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
expertService.save(expert); |
|
|
|
|
return Result.OK("注册成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//专家CMS列表
|
|
|
|
|
@ApiOperation(value="专家CMS列表,参数为一个对象Expert,Expert里面就一个参数directioncal。directioncal就是研究方向", notes="专家CMS列表,Expert里面就一个参数directioncal。directioncal就是研究方向") |
|
|
|
|
@GetMapping(value = "/listadminCMS") |
|
|
|
|
public Result<IPage<Expert>> listadminCMS(Expert expert, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
//用于查看所有信息无论是否审核,无论哪个部门
|
|
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
|
if(expert.getDirectioncal()!=null){ |
|
|
|
|
queryWrapper.eq("directioncal",expert.getDirectioncal()); |
|
|
|
|
} |
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
|
pageList.getRecords().forEach(experttemp -> { |
|
|
|
|
//开始用于修改数据
|
|
|
|
|
SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); |
|
|
|
|
String depid = expertService.getdeps(sysUser.getId()); |
|
|
|
|
SysDepart sysDepart = sysDepartService.getById(depid); |
|
|
|
|
experttemp.setRealname(sysUser.getRealname()); |
|
|
|
|
experttemp.setWorkon(sysUser.getWorkNo()); |
|
|
|
|
experttemp.setSex(sysUser.getSex()); |
|
|
|
|
experttemp.setTopPic(sysUser.getAvatar()); |
|
|
|
|
experttemp.setPhone(sysUser.getPhone()); |
|
|
|
|
experttemp.setEmails(sysUser.getEmail()); |
|
|
|
|
experttemp.setSsdep(sysDepart.getDepartName()); |
|
|
|
|
experttemp.setPsd(sysUser.getPassword()); |
|
|
|
|
experttemp.setSepsd(sysUser.getPassword()); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value="专家列表研究方向CMS列表", notes="专家列表研究方向CMS列表") |
|
|
|
|
@GetMapping(value = "directioncalListCMS") |
|
|
|
|
public Result<List<DisciplineFieid>> directioncalListCMS() { |
|
|
|
|
List<DisciplineFieid> disciplineFieid =disciplineFieidService.list(); |
|
|
|
|
return Result.OK(disciplineFieid); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value="专家CMS详细信息需要的,参数为专家的id", notes="专家CMS详细信息需要的,参数为专家的id") |
|
|
|
|
@GetMapping(value = "CMSexpinfo") |
|
|
|
|
public Result<ExpCmsVo> CMSexpinfo(@RequestParam(name="id",required=true) String id, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) { |
|
|
|
|
Expert expert = expertService.getById(id); |
|
|
|
|
SysUser sysUser=sysUserService.query().eq("username",expert.getSeusername()).one(); |
|
|
|
|
ExpCmsVo expCmsVo = new ExpCmsVo(); |
|
|
|
|
expCmsVo.setUserinfo(expert.getExpinfo()); |
|
|
|
|
expCmsVo.setAvatar(sysUser.getAvatar()); |
|
|
|
|
expCmsVo.setRealname(sysUser.getRealname()); |
|
|
|
|
return Result.OK(expCmsVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|