From 81ad247aafb085b6a555b05dceed6324ca2553c6 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 17:31:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ChaoseTopicPersionController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java index 048e76e2..ee96092f 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java @@ -197,6 +197,15 @@ public class ChaoseTopicPersionController extends JeecgController bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid,HttpServletRequest req) { String strs[] = ids.split(","); + for (int o = 0 ; o < strs.length ; o++){ + UpfilePersion upfilePersion = upfilePersionService.getById(strs[o]); + QueryWrapper queryWrapperctp1 = new QueryWrapper<>(); + queryWrapperctp1.eq("bmcode",upfilePersion.getApplyCode()); + List listctp1 = chaoseTopicPersionService.list(queryWrapperctp1); + if(listctp1.size()==0){ + return Result.error(upfilePersion.getTopicName()+"未选题,绑定失败!"); + } + } AnnComGroTop annComGroTop = new AnnComGroTop(); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); queryWrapper.eq("ann_com_p_g",xmtmid); From c1402fc977945cfc919ce0a781dff7581c5bac04 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Mon, 29 Jul 2024 18:31:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=207.29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserHomePageController.java | 7 ++++ .../service/UserHomePageServiceImpl.java | 36 +++++-------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java index 8941f315..315dbc5f 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java @@ -48,4 +48,11 @@ public class UserHomePageController { Map result = homePageService.report4School(); return Result.ok(result); } + + @ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告") + @GetMapping(value = "/report4Depart") + public Result report4Depart(String orgCode) { + Map result = homePageService.report4Depart(orgCode); + return Result.ok(result); + } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java index 6a676b5b..25648040 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java @@ -392,12 +392,11 @@ public class UserHomePageServiceImpl implements UserHomePageService { } else { countMap.put("已完成比赛比率", 0); } + resultMap.putAll(countMap); List evaluationCollects = iPersonalAbilityEvaluationCollectService - .list(new LambdaQueryWrapper() - .orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) - .last(" limit 60")); - resultMap.put("前60名学生能力值", evaluationCollects); + .list(new LambdaQueryWrapper()); +// resultMap.put("前60名学生能力值", evaluationCollects); List vos = new LinkedList<>(); Map> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() @@ -416,7 +415,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vos.add(vo); }); - resultMap.put("前60名学生能力平均值", vos); + resultMap.put("学生能力平均值", vos); List> abilityList = new LinkedList<>(); List years = DateUtils.getLastxYear(2); @@ -635,13 +634,12 @@ public class UserHomePageServiceImpl implements UserHomePageService { } else { countMap.put("已完成比赛比率", 0); } + resultMap.putAll(countMap); List evaluationCollects = iPersonalAbilityEvaluationCollectService .list(new LambdaQueryWrapper() - .eq(PersonalAbilityEvaluationCollect::getDepetId, departId) - .orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) - .last(" limit 60")); - resultMap.put("前60名学生能力值", evaluationCollects); + .eq(PersonalAbilityEvaluationCollect::getDepetId, departId)); +// resultMap.put("学生综合能力值分析", evaluationCollects); List vos = new LinkedList<>(); Map> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() @@ -660,7 +658,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vos.add(vo); }); - resultMap.put("前60名学生能力平均值", vos); + resultMap.put("学生能力平均值", vos); List> abilityList = new LinkedList<>(); List years = DateUtils.getLastxYear(2); @@ -852,22 +850,4 @@ public class UserHomePageServiceImpl implements UserHomePageService { return map; } - List getCompList() { - List annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper() - .eq(AnnualCompPoint::getRequireApply, "Y")); - List compVoList = new LinkedList<>(); - Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().forEach(p -> { - CompVo compVo = new CompVo(); - BeanUtils.copyProperties(p, compVo); - List list = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper() - .eq(AnnualCompetitionProjectRegistration::getAnnualCompid, p.getId())); - if (!ObjectUtils.isEmpty(list)) { - Set entryFormats = list.stream().map(bo -> bo.getEnrollCode()).collect(Collectors.toSet()); - Long count = iTeamManagementService.count(new LambdaQueryWrapper().in(TeamManagement::getEnrollCode, entryFormats)); - compVo.setNumber(count.intValue()); - } - }); - return compVoList; - } - }