From 497dde726d0f542ba6374dc5a40cfa4972987050 Mon Sep 17 00:00:00 2001 From: admin <417727563@qq.com> Date: Tue, 16 Jul 2024 18:27:31 +0800 Subject: [PATCH] 16-02 --- .../controller/AnnComGroTopController.java | 41 +++++++++++-------- .../expert/controller/ExpertController.java | 6 +-- .../service/impl/ExpertServiceImpl.java | 2 - 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotop/controller/AnnComGroTopController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotop/controller/AnnComGroTopController.java index f9d9a946..48614d2f 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotop/controller/AnnComGroTopController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotop/controller/AnnComGroTopController.java @@ -1,9 +1,6 @@ package org.jeecg.modules.demo.anncomgrotop.controller; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -115,20 +112,30 @@ public class AnnComGroTopController extends JeecgController queryWrapperep = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); queryWrapperep.eq("user_id",sysUser.getId()); List listep = expertService.list(queryWrapperep); - + List listeg=new ArrayList<>(); + if(listep.size()>0) + { + ExpGroup expGroup = new ExpGroup(); + QueryWrapper queryWrappereg = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap()); + queryWrappereg.eq("grouid",listep.get(0).getId()); + listeg = expGroupService.list(queryWrappereg); + } + if(listeg.size()>0) + { + AnnualCompGroup annualCompGroup = annualCompGroupService.getById(listeg.get(0).getAnnCompGroupid()); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); + queryWrapper.eq("ann_com_p_g",listeg.get(0).getAnnCompGroupid()); + queryWrapper.eq("annid",annualCompGroup.getAnnal()); + queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP()); + Page page = new Page(pageNo, pageSize); + IPage pageList = annComGroTopService.page(page, queryWrapper); + return Result.OK(pageList); + }else + { + return Result.OK(null); + + } - ExpGroup expGroup = new ExpGroup(); - QueryWrapper queryWrappereg = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap()); - queryWrappereg.eq("grouid",listep.get(0).getId()); - List listeg = expGroupService.list(queryWrappereg); - AnnualCompGroup annualCompGroup = annualCompGroupService.getById(listeg.get(0).getAnnCompGroupid()); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); - queryWrapper.eq("ann_com_p_g",listeg.get(0).getAnnCompGroupid()); - queryWrapper.eq("annid",annualCompGroup.getAnnal()); - queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP()); - Page page = new Page(pageNo, pageSize); - IPage pageList = annComGroTopService.page(page, queryWrapper); - return Result.OK(pageList); } /** diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java index 50b24aff..50f5bf2c 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -327,7 +327,7 @@ public class ExpertController extends JeecgController { //获取租户ids String relTenantIds = jsonObject.getString("relTenantIds"); sysUserService.saveUser(user, selectedRoles, selectedDeparts, relTenantIds); - baseCommonService.addLog("添加用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2); + baseCommonService.addLog("添加专家用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2); Expert expert = new Expert(); expert.setUserId(user.getId()); expert.setExpImg(user.getAvatar()); @@ -339,8 +339,8 @@ public class ExpertController extends JeecgController { expert.setExpZc(expZc);//职称 expert.setExpYjfx(expYjfx);//研究方向 expert.setExpCsgz(expCsgz);//从事工作 - - /* expertService.save(expert); + expertService.save(expert); + /* CompExp compExp = new CompExp(); compExp.setCompid(compid); compExp.setCompName(compName); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java index b6b63e71..e92bc741 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java @@ -49,9 +49,7 @@ public class ExpertServiceImpl extends ServiceImpl impleme if(oConvertUtils.isNotEmpty(compid)&&oConvertUtils.isNotEmpty(compName)){ compNames = compName.split(","); compids = compid.split(","); - stats = stat.split(","); } - stat=stats[0]; //根据user id查询专家 LambdaQueryWrapper query = new LambdaQueryWrapper() .like(Expert::getUserId, user_id);