diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java index 5170cd5..e7456b8 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -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 { private ISysUserService sysUserService; @Autowired private ISysDepartService sysDepartService; + @Autowired + private IDisciplineFieidService disciplineFieidService; /** * 分页列表查询 @@ -681,4 +686,58 @@ public class ExpertController extends JeecgController { expertService.save(expert); return Result.OK("注册成功"); } + + //专家CMS列表 + @ApiOperation(value="专家CMS列表,参数为一个对象Expert,Expert里面就一个参数directioncal。directioncal就是研究方向", notes="专家CMS列表,Expert里面就一个参数directioncal。directioncal就是研究方向") + @GetMapping(value = "/listadminCMS") + public Result> listadminCMS(Expert expert, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + //用于查看所有信息无论是否审核,无论哪个部门 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + if(expert.getDirectioncal()!=null){ + queryWrapper.eq("directioncal",expert.getDirectioncal()); + } + Page page = new Page(pageNo, pageSize); + IPage 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> directioncalListCMS() { + List disciplineFieid =disciplineFieidService.list(); + return Result.OK(disciplineFieid); + } + + @ApiOperation(value="专家CMS详细信息需要的,参数为专家的id", notes="专家CMS详细信息需要的,参数为专家的id") + @GetMapping(value = "CMSexpinfo") + public Result 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); + } } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/ExpCmsVo.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/ExpCmsVo.java new file mode 100644 index 0000000..b54d0e3 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/ExpCmsVo.java @@ -0,0 +1,10 @@ +package org.jeecg.modules.demo.expert.entity; + +import lombok.Data; + +@Data +public class ExpCmsVo { + private String realname; + private String avatar; + private String userinfo; +}