From 7022f6970f0affd3e32749be9f582dbe7e08b252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Sat, 9 Nov 2024 11:17:36 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expert/controller/ExpertController.java | 56 ++++++++++--------- .../workbench/components/WorkbenchHeader.vue | 4 +- .../src/views/dashboard/workbench/index.vue | 2 +- .../src/views/expert/admin/Expert.api.ts | 8 ++- .../src/views/expert/admin/Expert.data.ts | 6 +- .../src/views/expert/admin/ExpertList.vue | 8 +-- .../expert/admin/components/ExpertForm.vue | 19 ++++--- .../src/views/expert/adminback/Expert.data.ts | 6 +- .../src/views/expert/adminback/ExpertList.vue | 6 +- .../adminback/components/ExpertForm.vue | 5 +- .../src/views/expert/county/Expert.api.ts | 8 ++- .../src/views/expert/county/Expert.data.ts | 4 +- .../expert/county/components/ExpertForm.vue | 8 +-- .../src/views/expert/firm/Expert.api.ts | 8 ++- .../src/views/expert/firm/Expert.data.ts | 4 +- .../src/views/expert/firm/ExpertList.vue | 12 ++-- .../expert/firm/components/ExpertForm.vue | 10 ++-- .../src/views/expert/self/Expert.data.ts | 4 +- .../src/views/expert/self/ExpertList.vue | 4 +- .../expert/self/components/ExpertForm.vue | 10 ++-- .../src/views/expert/selfback/Expert.data.ts | 11 +--- .../src/views/expert/selfback/ExpertList.vue | 4 +- .../expert/selfback/components/ExpertForm.vue | 10 ++-- .../views/expproject/admin/Expproject.data.ts | 4 +- .../views/expproject/admin/ExpprojectList.vue | 10 ++++ .../views/expproject/self/Expproject.data.ts | 4 +- 26 files changed, 131 insertions(+), 104 deletions(-) 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 3d6cf8d..b20de69 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 @@ -174,30 +174,34 @@ public class ExpertController extends JeecgController { //开始对比两个List获取相同部分,获取的交叉id就是需要的id List commonElements = idlistss.stream().filter(userbyrole::contains).collect(Collectors.toList()); //根据查询的userid去获取username - List sysUserList = sysUserService.query().in("id",commonElements).list(); - //根据查询的结果获取username的list - List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); - //用于查看本公司下面的专家信息无论是否审核,无论哪个部门 - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); - queryWrapper.eq("isdone","Y"); - queryWrapper.in("seusername",usernames); - 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()); - }); - return Result.OK(pageList); + if (commonElements.isEmpty()){ + return Result.error("请添加专家"); + }else { + List sysUserList = sysUserService.query().in("id", commonElements).list(); + //根据查询的结果获取username的list + List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); + //用于查看本公司下面的专家信息无论是否审核,无论哪个部门 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + queryWrapper.eq("isdone", "Y"); + queryWrapper.in("seusername", usernames); + 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()); + }); + return Result.OK(pageList); + } } @ApiOperation(value="专家管理-分页列表查询/公司管理员角色", notes="专家管理-分页列表查询/公司管理员角色") @@ -623,8 +627,8 @@ public class ExpertController extends JeecgController { @GetMapping(value = "handleadminback") public Result handleadminback(@RequestParam(name="id",required=true) String id) { Expert expert =expertService.getById(id); - expert.setAdminopen("1"); - expert.setCompopen("1"); + expert.setAdminopen("3"); + expert.setCompopen("3"); expert.setIsdone("N"); expertService.updateById(expert); return Result.OK("驳回成功!请到编辑页面确定问题数据并填写驳回原因"); diff --git a/jeecgboot-vue3/src/views/dashboard/workbench/components/WorkbenchHeader.vue b/jeecgboot-vue3/src/views/dashboard/workbench/components/WorkbenchHeader.vue index b0eb7cc..8db47e3 100644 --- a/jeecgboot-vue3/src/views/dashboard/workbench/components/WorkbenchHeader.vue +++ b/jeecgboot-vue3/src/views/dashboard/workbench/components/WorkbenchHeader.vue @@ -1,8 +1,8 @@