diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 470911be..a48736cb 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.apache.shiro.subject.Subject; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; @@ -40,6 +41,10 @@ import org.jeecg.modules.demo.awardpersion.entity.AwardPersionOptions; import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService; import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.service.ICompService; +import org.jeecg.modules.demo.compexp.entity.CompExp; +import org.jeecg.modules.demo.compexp.service.ICompExpService; +import org.jeecg.modules.demo.expert.entity.Expert; +import org.jeecg.modules.demo.expert.service.IExpertService; import org.jeecg.modules.demo.expscore.entity.ExpScore; import org.jeecg.modules.demo.expscore.service.IExpScoreService; import org.jeecg.modules.demo.score_management.entity.ScoreManagement; @@ -112,6 +117,12 @@ public class AnnualCompPointController extends JeecgController> + */ + @GetMapping(value = "/listZJ") + public Result> listZJ(AnnualCompPoint annualCompPoint, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + // 获取当前登录用户 + Subject subject = SecurityUtils.getSubject(); + LoginUser loginUser = (LoginUser) subject.getPrincipal(); + QueryWrapper exqueryWrapper = new QueryWrapper<>(); + exqueryWrapper.eq("user_id", loginUser.getId()); + Expert expert = expertService.getOne(exqueryWrapper); + //开始获取exp-comp + QueryWrapper coexqueryWrapper = new QueryWrapper<>(); + coexqueryWrapper.eq("expid", expert.getId()); + List compExpList = compExpService.list(coexqueryWrapper); + List compIdListss = new ArrayList<>(); + for (CompExp compExps : compExpList) { + compIdListss.add(compExps.getCompid()); + } + QueryWrapper coqueryWrapper = new QueryWrapper<>(); + coqueryWrapper.in("id",compIdListss); + List compList = compService.list(coqueryWrapper); + List needlist = new ArrayList<>(); + for (Comp comp : compList){ + needlist.add(comp.getId()); + } + QueryWrapper anncoqueryWrapper = new QueryWrapper<>(); + anncoqueryWrapper.in("compid",needlist); + List annualCompList = annualCompService.list(anncoqueryWrapper); + List stringList = new ArrayList<>(); + for (AnnualComp annualComp : annualCompList){ + stringList.add(annualComp.getId()); + } + queryWrapper.in("annual_comp_id",stringList); + + Page page = new Page(pageNo, pageSize); + IPage pageList = annualCompPointService.page(page, queryWrapper); + + return Result.OK(pageList); + } + /** * 学生端列表 * @param annualCompPoint diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java index f364fffa..e866d0ec 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java @@ -1,6 +1,7 @@ package org.jeecg.modules.demo.annualcomp.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; @@ -13,6 +14,7 @@ import org.apache.shiro.subject.Subject; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.demo.annual.entity.Annual; import org.jeecg.modules.demo.annual.service.IAnnualService; @@ -21,6 +23,10 @@ import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService; import org.jeecg.modules.demo.annualcomp.vo.AnnualCompVo; import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.service.ICompService; +import org.jeecg.modules.demo.compexp.entity.CompExp; +import org.jeecg.modules.demo.compexp.service.ICompExpService; +import org.jeecg.modules.demo.expert.entity.Expert; +import org.jeecg.modules.demo.expert.service.IExpertService; import org.jeecg.modules.system.entity.SysRole; import org.jeecg.modules.system.service.ISysUserRoleService; import org.jetbrains.annotations.NotNull; @@ -56,6 +62,59 @@ public class AnnualCompController extends JeecgController> listZJ(AnnualComp annualComp, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualComp, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + // 获取当前登录用户 + Subject subject = SecurityUtils.getSubject(); + LoginUser loginUser = (LoginUser) subject.getPrincipal(); + QueryWrapper exqueryWrapper = new QueryWrapper<>(); + exqueryWrapper.eq("user_id", loginUser.getId()); + Expert expert = expertService.getOne(exqueryWrapper); + //开始获取exp-comp + QueryWrapper coexqueryWrapper = new QueryWrapper<>(); + coexqueryWrapper.eq("expid", expert.getId()); + List compExpList = compExpService.list(coexqueryWrapper); + List compIdListss = new ArrayList<>(); + for (CompExp compExps : compExpList) { + compIdListss.add(compExps.getCompid()); + } + QueryWrapper coqueryWrapper = new QueryWrapper<>(); + coqueryWrapper.in("id",compIdListss); + List compList = compService.list(coqueryWrapper); + List needlist = new ArrayList<>(); + for (Comp comp : compList){ + needlist.add(comp.getId()); + } + queryWrapper.in("compid",needlist); + IPage pageList = annualCompService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** * 分页列表查询 * diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java index 9ebff3d1..daddfe2a 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java @@ -181,6 +181,7 @@ public class CompController extends JeecgController { for (CompExp compExps : compExpList) { compIdListss.add(compExps.getCompid()); } + queryWrapper.in("id",compIdListss); Page page = new Page(pageNo, pageSize); IPage pageList = compService.page(page, queryWrapper); diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListZJ.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListZJ.vue index e69de29b..3a6fad68 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListZJ.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListZJ.vue @@ -0,0 +1,339 @@ + + + + +