From 25c03587246e6dd682376e0ad6c28099c2ee989c Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 28 Jul 2024 16:55:00 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 262 ++++++++++++++++++ 1 file changed, 262 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index dbc4d0f7..5561ceea 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1474,6 +1474,268 @@ public class AnnualCompetitionProjectRegistrationController { return Result.OK(map); } + /** + * 学生角色分析报告数据接口 + * + * @param req + * @return + */ + @ApiOperation(value="学生角色分析报告数据接口", notes="学生角色分析报告数据接口") + @GetMapping(value = "/xsfxbg") + public Result xsfxbg( HttpServletRequest req) { + //获取当前登录用户 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + queryWrappertm.eq("user_id",user.getId()); + List listtm = teamManagementService.list(queryWrappertm); + Map map = new HashMap<>(); + if(listtm.size()!=0){ + //学生参加比赛的所有报名编号 + List bmbhs = listtm.stream().map(TeamManagement::getEnrollCode).collect(Collectors.toList()); + //查询报名表报名编号对应的所有年度比赛项目id + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.in("enroll_code",bmbhs); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + //参加比赛项目数量 + map.put("cjbsxmsl",listbm.size()); + + if(listbm.size()!=0){ + //年度比赛项目ids + List ndbsxmids = listbm.stream().map(AnnualCompetitionProjectRegistration::getAnnualCompid).collect(Collectors.toList()); + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapperacp.in("id",ndbsxmids); + List listacp = annualCompPointService.list(queryWrapperacp); + //报名比赛项目 + List> xmListMap = new ArrayList<>(); + + if(listacp.size()>6){ + for (int k = 0 ; k < 6 ; k++){ + Map map2 = new HashMap<>(); + //年度比赛 + map2.put("ndbsname",annualCompService.getById(listacp.get(k).getAnnualCompId()).getName()); + //项目名称 + map2.put("xmname",listacp.get(k).getObjName()); + //参与形式 + map2.put("cyxs",listacp.get(k).getEntryForm().equals("N") ? "个人":"团队"); + //项目id + map2.put("xmid",listacp.get(k).getId()); + //状态 + Date date = new Date(); + if(listacp.get(k).getApplyStartTime()!=null&&listacp.get(k).getApplyEndTime()!=null){ + if(date.getTime()>=listacp.get(k).getApplyStartTime().getTime()&&date.getTime()<=listacp.get(k).getApplyEndTime().getTime()){ + map2.put("zt","报名"); + } + } + + if(listacp.get(k).getTopicStartTime()!=null&&listacp.get(k).getTopicEndTime()!=null){ + if(date.getTime()>=listacp.get(k).getTopicStartTime().getTime()&&date.getTime()<=listacp.get(k).getTopicEndTime().getTime()){ + map2.put("zt","选题"); + } + } + + if(listacp.get(k).getUploadStartTime()!=null&&listacp.get(k).getUploadEndTime()!=null){ + if(date.getTime()>=listacp.get(k).getUploadStartTime().getTime()&&date.getTime()<=listacp.get(k).getUploadEndTime().getTime()){ + map2.put("zt","上传作品"); + } + } + + if(listacp.get(k).getScoreStartTime()!=null&&listacp.get(k).getScoreEndTime()!=null){ + if(date.getTime()>=listacp.get(k).getScoreStartTime().getTime()&&date.getTime()<=listacp.get(k).getScoreEndTime().getTime()){ + map2.put("zt","评分"); + } + } + + if(listacp.get(k).getScoreEndTime()!=null){ + if(date.getTime()>listacp.get(k).getScoreEndTime().getTime()){ + map2.put("zt","已结束"); + } + } + + xmListMap.add(map2); + } + }else { + for (int o = 0 ; o < listacp.size() ; o++){ + Map map3 = new HashMap<>(); + //项目名称 + map3.put("xmname",listacp.get(o).getObjName()); + //参与形式 + map3.put("cyxs",listacp.get(o).getEntryForm().equals("N") ? "个人":"团队"); + //项目id + map3.put("xmid",listacp.get(o).getId()); + //状态 + Date date = new Date(); + if(listacp.get(o).getApplyStartTime()!=null&&listacp.get(o).getApplyEndTime()!=null){ + if(date.getTime()>=listacp.get(o).getApplyStartTime().getTime()&&date.getTime()<=listacp.get(o).getApplyEndTime().getTime()){ + map3.put("zt","报名"); + } + } + + if(listacp.get(o).getTopicStartTime()!=null&&listacp.get(o).getTopicEndTime()!=null){ + if(date.getTime()>=listacp.get(o).getTopicStartTime().getTime()&&date.getTime()<=listacp.get(o).getTopicEndTime().getTime()){ + map3.put("zt","选题"); + } + } + + if(listacp.get(o).getUploadStartTime()!=null&&listacp.get(o).getUploadEndTime()!=null){ + if(date.getTime()>=listacp.get(o).getUploadStartTime().getTime()&&date.getTime()<=listacp.get(o).getUploadEndTime().getTime()){ + map3.put("zt","上传作品"); + } + } + + if(listacp.get(o).getScoreStartTime()!=null&&listacp.get(o).getScoreEndTime()!=null){ + if(date.getTime()>=listacp.get(o).getScoreStartTime().getTime()&&date.getTime()<=listacp.get(o).getScoreEndTime().getTime()){ + map3.put("zt","评分"); + } + } + + if(listacp.get(o).getScoreEndTime()!=null){ + if(date.getTime()>listacp.get(o).getScoreEndTime().getTime()){ + map3.put("zt","已结束"); + } + } + xmListMap.add(map3); + } + } + map.put("bmbsxm",xmListMap); + int gjj = 0; + int shengj = 0; + int shij = 0; + int xj = 0; + for (int i = 0 ; i < listacp.size() ; i++){ + if(listacp.get(i).getObjLevel().equals("1809121223401168898")){ + //国家 + gjj = gjj+1; + } + if(listacp.get(i).getObjLevel().equals("1809121301201313793")){ + //省 + shengj = shengj+1; + } + if(listacp.get(i).getObjLevel().equals("1809121356582903809")){ + //市 + shij = shij+1; + } + if(listacp.get(i).getObjLevel().equals("1809121454654119937")){ + //校 + xj = xj+1; + } + } + map.put("gjj",gjj); + map.put("shengj",shengj); + map.put("shij",shij); + map.put("xj",xj); + + }else{ + map.put("gjj",0); + map.put("shengj",0); + map.put("shij",0); + map.put("xj",0); + } + //获奖数 + //一等奖数 + AwardPersion awardPersion1 = new AwardPersion(); + QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); + queryWrapperap1.eq("awardsort",1); + queryWrapperap1.eq("studentcode",user.getUsername()); + queryWrapperap1.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List list1 = awardPersionService.list(queryWrapperap1); + map.put("ydjNumber",list1.size()); + //二等奖数 + AwardPersion awardPersion2 = new AwardPersion(); + QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); + queryWrapperap2.eq("awardsort",2); + queryWrapperap2.eq("studentcode",user.getUsername()); + queryWrapperap2.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List list2 = awardPersionService.list(queryWrapperap2); + map.put("edjNumber",list2.size()); + //三等奖数 + AwardPersion awardPersion3 = new AwardPersion(); + QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); + queryWrapperap3.eq("awardsort",3); + queryWrapperap3.eq("studentcode",user.getUsername()); + queryWrapperap3.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List list3 = awardPersionService.list(queryWrapperap3); + map.put("sdjNumber",list3.size()); + //四等奖数 + AwardPersion awardPersion4 = new AwardPersion(); + QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); + queryWrapperap4.eq("awardsort",4); + queryWrapperap4.eq("studentcode",user.getUsername()); + queryWrapperap4.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List list4 = awardPersionService.list(queryWrapperap4); + map.put("sidjNumber",list4.size()); + //五等奖数 + AwardPersion awardPersion5 = new AwardPersion(); + QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); + queryWrapperap5.eq("awardsort",5); + queryWrapperap5.eq("studentcode",user.getUsername()); + queryWrapperap5.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List list5 = awardPersionService.list(queryWrapperap5); + map.put("wdjNumber",list5.size()); + //所有奖项(前六条) + AwardPersion awardPersionAll = new AwardPersion(); + QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); + queryWrapperapAll.eq("studentcode",user.getUsername()); + queryWrapperapAll.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List listAll = awardPersionService.list(queryWrapperapAll); + List> allApListMap = new ArrayList<>(); + if(listAll.size()>6){ + for (int y = 0 ; y < 6; y++){ + Map mapall1 = new HashMap<>(); + mapall1.put("jxname",listAll.get(y).getAwardname()); + mapall1.put("ndbs",annualCompService.getById(listAll.get(y).getAnnalComp()).getName()); + mapall1.put("ndbsxm",annualCompPointService.getById(listAll.get(y).getAnnualCompP()).getObjName()); + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); + queryWrapperpcs.eq("work_on",user.getUsername()); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall1.put("jf",0); + }else { + mapall1.put("jf",listpcs.get(0).getScore()); + } + allApListMap.add(mapall1); + + } + }else{ + for (int n = 0 ; n < listAll.size(); n++){ + Map mapall2 = new HashMap<>(); + mapall2.put("jxname",listAll.get(n).getAwardname()); + mapall2.put("ndbs",annualCompService.getById(listAll.get(n).getAnnalComp()).getName()); + mapall2.put("ndbsxm",annualCompPointService.getById(listAll.get(n).getAnnualCompP()).getObjName()); + + QueryWrapper queryWrapperlist = new QueryWrapper<>(); + queryWrapperlist.eq("enroll_code",listAll.get(n).getEnrollCode()); + List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); + if(listdw.size()>0){ + mapall2.put("dwname",listdw.get(0).getTeamName()); + }else { + mapall2.put("dwname","暂无数据"); + } + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); + queryWrapperpcs.eq("work_on",user.getUsername()); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall2.put("jf",0); + }else { + mapall2.put("jf",listpcs.get(0).getScore()); + } + allApListMap.add(mapall2); + } + } + map.put("allApList",allApListMap); + } + + + return Result.OK(map); + } + public List getZXAnnualComp(HttpServletRequest req) { From 1587fe208cebe17d71b92782eff6b46f6ac7f7fc Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 28 Jul 2024 17:04:17 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnnualCompetitionProjectRegistrationController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 5561ceea..60ec76e2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1560,6 +1560,8 @@ public class AnnualCompetitionProjectRegistrationController { }else { for (int o = 0 ; o < listacp.size() ; o++){ Map map3 = new HashMap<>(); + //年度比赛 + map3.put("ndbsname",annualCompService.getById(listacp.get(o).getAnnualCompId()).getName()); //项目名称 map3.put("xmname",listacp.get(o).getObjName()); //参与形式 From 901f1b7723e4c1c23c867b0f7e9725f72ff400d0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 28 Jul 2024 17:05:57 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnnualCompetitionProjectRegistrationController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 60ec76e2..dcd939bc 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1690,6 +1690,14 @@ public class AnnualCompetitionProjectRegistrationController { mapall1.put("jxname",listAll.get(y).getAwardname()); mapall1.put("ndbs",annualCompService.getById(listAll.get(y).getAnnalComp()).getName()); mapall1.put("ndbsxm",annualCompPointService.getById(listAll.get(y).getAnnualCompP()).getObjName()); + QueryWrapper queryWrapperlist = new QueryWrapper<>(); + queryWrapperlist.eq("enroll_code",listAll.get(y).getEnrollCode()); + List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); + if(listdw.size()>0){ + mapall1.put("dwname",listdw.get(0).getTeamName()); + }else { + mapall1.put("dwname","暂无数据"); + } QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); @@ -1709,7 +1717,6 @@ public class AnnualCompetitionProjectRegistrationController { mapall2.put("jxname",listAll.get(n).getAwardname()); mapall2.put("ndbs",annualCompService.getById(listAll.get(n).getAnnalComp()).getName()); mapall2.put("ndbsxm",annualCompPointService.getById(listAll.get(n).getAnnualCompP()).getObjName()); - QueryWrapper queryWrapperlist = new QueryWrapper<>(); queryWrapperlist.eq("enroll_code",listAll.get(n).getEnrollCode()); List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); From 8fea6528feebba033282d218858a61c3873a1307 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 28 Jul 2024 17:40:24 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...AnnualCompetitionProjectRegistrationController.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index dcd939bc..05725349 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1382,6 +1382,11 @@ public class AnnualCompetitionProjectRegistrationController { map.put("xj",0); } //获奖数 + QueryWrapper queryWrapperaphj = new QueryWrapper<>(); + queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List listhj = awardPersionService.list(queryWrapperaphj); + map.put("hjNumber",listhj.size()); //一等奖数 AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); @@ -1637,6 +1642,11 @@ public class AnnualCompetitionProjectRegistrationController { map.put("xj",0); } //获奖数 + QueryWrapper queryWrapperaphj = new QueryWrapper<>(); + queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); + List listhj = awardPersionService.list(queryWrapperaphj); + map.put("hjNumber",listhj.size()); //一等奖数 AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); From ceae62ff4aa3199016525b6c6e6b6d0187ecd473 Mon Sep 17 00:00:00 2001 From: significative <163999932+significative@users.noreply.github.com> Date: Sun, 28 Jul 2024 18:25:16 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comprehensiveEvaluation/individual.vue | 168 +++++++++++++++--- .../workbench/components/student/student.vue | 13 +- 2 files changed, 150 insertions(+), 31 deletions(-) diff --git a/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/individual.vue b/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/individual.vue index 8eed315c..32321a57 100644 --- a/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/individual.vue +++ b/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/individual.vue @@ -6,21 +6,72 @@ 我是比赛综述:全面落实立德树人根本任务,依据CDIO工程教育理念,培养德、智、体、美、劳全面发展,掌握软件工程专业所需的数学与自然科学基础知识、专业基础理论知识;在企业级软件开发和工业智能软件开发方向,能承担软件分析、设计、开发、项目管理等任务,具备解决复杂工程问题的能力;具有终身学习和创新创业意识、国际交流能力、团队合作精神等良好素养,能适应产业与社会变革的国际化应用型人。

- -
+ + +
+
+
参加比赛项目数量
+
+ +
+
+
{{ data.cjbsxmsl }}
+
+
国家级:{{ data.gjj }}
+
省级:{{ data.shengj }}
+
市级:{{ data.shij }}
+
校级:{{ data.xj }}
+
+
+
+ + +
+
+
获奖数
+
+ +
+
+
{{ data.hjNumber }}
+
+
一等:{{ data.ydjNumber }}
+
二等:{{ data.edjNumber }}
+
三等:{{ data.sdjNumber }}
+
四等:{{ data.sidjNumber }}
+
五等:{{ data.wdjNumber }}
+
@@ -49,34 +100,27 @@

我是比赛参赛情况综述:全面落实立德树人根本任务,依据CDIO工程教育理念,培养德、智、体、美、劳全面发展,掌握软件工程专业所需的数学与自然科学基础知识、专业基础理论知识;在企业级软件开发和工业智能软件开发方向,能承担软件分析、设计、开发、项目管理等任务,具备解决复杂工程问题的能力;具有终身学习和创新创业意识、国际交流能力、团队合作精神等良好素养,能适应产业与社会变革的国际化应用型人。

-
+
- - - - + + + + - - - - - - - - - - - - - + + + + + +
个人比赛获奖情况
获奖等级比赛名称项目名称所在小队奖项名称年度比赛年度比赛项目所在队伍名称 积分
一等奖全国计算机大赛项目一我是一个小队135
一等奖全国计算机大赛项目一我是一个小队135
{{ item.jxname }}{{ item.ndbs }}{{ item.ndbsxm }}{{ item.dwname }}{{ item.jf }}
@@ -88,6 +132,33 @@ diff --git a/jeecgboot-vue3-master/src/views/depart/workbench/components/student/student.vue b/jeecgboot-vue3-master/src/views/depart/workbench/components/student/student.vue index 1bac1d46..98b9a874 100644 --- a/jeecgboot-vue3-master/src/views/depart/workbench/components/student/student.vue +++ b/jeecgboot-vue3-master/src/views/depart/workbench/components/student/student.vue @@ -11,10 +11,10 @@
{{ data.cjbsxmsl }}
-
国家级::{{ data.gjj }}
-
省级::{{ data.shengj }}
-
市级::{{ data.shij }}
-
校级::{{ data.xj }}
+
国家级:{{ data.gjj }}
+
省级:{{ data.shengj }}
+
市级:{{ data.shij }}
+
校级:{{ data.xj }}
@@ -24,7 +24,7 @@
获奖数
-
1314
+
{{ data.hjNumber }}
一等:{{data.ydjNumber}}
二等:{{data.edjNumber}}
@@ -114,7 +114,8 @@ const router = useRouter() wdjNumber:0, allApList:[], ndbsxm:[], - bmbsxm:[] + bmbsxm:[], + hjNumber:0 }); const getStudentEvent = async () => { const res = await getStudent(); From 514f53c6066c0f6db8f66c3677174af302bc472a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Mon, 29 Jul 2024 09:17:24 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/UpfilePersion/UpfilePersionList.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue index 5db6dd33..b427a9e3 100644 --- a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue +++ b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue @@ -353,7 +353,13 @@ const fileUrl = `${globalSetting.domainUrl}${getDownWork}?id=${record.id}`; const extName = record.url.substring(record.url.lastIndexOf('.')); const previewUrl = `${fileUrl}&fullfilename=${new Date().getTime()}${extName}`; - window.open(previewServerUrl + encodeURIComponent(Base64.encode(previewUrl))); + window.open(previewServerUrl + encodeURIComponent(base64Encode(previewUrl))); + } + + function base64Encode(str: string): string { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode('0x' + p1); + })); } function handleDown(record) { From fa735ebd3c054d858b37888d38cfdf9db8fdc464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Mon, 29 Jul 2024 10:10:55 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/UpfilePersion/UpfilePersionList.vue | 2 +- .../src/views/expscore/ExpScoreList.vue | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue index b427a9e3..f42d8594 100644 --- a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue +++ b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue @@ -349,7 +349,7 @@ } function handlePreview(record) { - const previewServerUrl = 'http://127.0.0.1:8012/onlinePreview?url='; + const previewServerUrl = 'http://10.20.15.171:8012/onlinePreview?url='; const fileUrl = `${globalSetting.domainUrl}${getDownWork}?id=${record.id}`; const extName = record.url.substring(record.url.lastIndexOf('.')); const previewUrl = `${fileUrl}&fullfilename=${new Date().getTime()}${extName}`; diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue index 1c2cc453..4c79da7d 100644 --- a/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue @@ -43,6 +43,8 @@ @@ -62,6 +64,7 @@ import JSelectUserByDept from '/@/components/Form/src/jeecg/components/JSelectUserByDept.vue'; import { useRoute } from 'vue-router'; import {useMessage} from "../../hooks/web/useMessage"; + import {getDownWork} from "/@/views/UpfilePersion/UpfilePersion.api"; const { createMessage } = useMessage(); const route = useRoute(); @@ -105,6 +108,21 @@ sm: { span: 16 }, }); + function handlePreview(record) { + console.log("==========================================================="); + console.log(record); + console.log("==========================================================="); + const previewServerUrl = 'http://10.20.15.171:8012/onlinePreview?url='; + let url = 'http://10.20.15.171/jeecg-boot/sys/common/static/' + record; + window.open(previewServerUrl + encodeURIComponent(base64Encode(url))); + } + + function base64Encode(str: string): string { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode('0x' + p1); + })); + } + /** * 新增事件 */ From 0cbfd49e4db55ef6895f6d0bc0e740f8b8d3156e Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 10:22:38 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E7=BB=84=E5=A7=94=E4=BC=9A=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 20 +- ...petitionProjectRegistrationController.java | 369 +++++++++++++++++- 2 files changed, 377 insertions(+), 12 deletions(-) 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 75de9765..ee411b4e 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 @@ -538,7 +538,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); - awardPersion.setStudentcode(sysUser.getUsername()); + awardPersion.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion); } } @@ -561,7 +561,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); - awardPersion.setStudentcode(sysUser.getUsername()); + awardPersion.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion); } } @@ -585,7 +585,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); - awardPersion.setStudentcode(sysUser.getUsername()); + awardPersion.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion); } } @@ -610,7 +610,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); - awardPersion.setStudentcode(sysUser.getUsername()); + awardPersion.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion); } } @@ -636,7 +636,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion.setStudentname(sysUser.getRealname()); - awardPersion.setStudentcode(sysUser.getUsername()); + awardPersion.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion); } } @@ -698,7 +698,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion1.setStudentname(sysUser.getRealname()); - awardPersion1.setStudentcode(sysUser.getUsername()); + awardPersion1.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion1); } @@ -724,7 +724,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion1.setStudentname(sysUser.getRealname()); - awardPersion1.setStudentcode(sysUser.getUsername()); + awardPersion1.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion1); } } @@ -750,7 +750,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion1.setStudentname(sysUser.getRealname()); - awardPersion1.setStudentcode(sysUser.getUsername()); + awardPersion1.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion1); } } @@ -777,7 +777,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion1.setStudentname(sysUser.getRealname()); - awardPersion1.setStudentcode(sysUser.getUsername()); + awardPersion1.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion1); } } @@ -805,7 +805,7 @@ public class AnnualCompPointController extends JeecgController listtm = teamManagementService.list(queryWrappertm); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); awardPersion1.setStudentname(sysUser.getRealname()); - awardPersion1.setStudentcode(sysUser.getUsername()); + awardPersion1.setStudentcode(sysUser.getWorkNo()); awardPersionService.save(awardPersion1); } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 05725349..ef03d1a8 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1196,7 +1196,7 @@ public class AnnualCompetitionProjectRegistrationController { SysDepart depart = sysDepartService.query().eq("id", userDeparts.get(0).getDepId()).one(); Map map4 = new HashMap<>(); map4.put("name", sysUser.getRealname()); - map4.put("xh", sysUser.getUsername()); + map4.put("xh", sysUser.getWorkNo()); map4.put("szyx", depart.getDepartName()); bmxsxxListMap.add(map4); } @@ -1208,7 +1208,7 @@ public class AnnualCompetitionProjectRegistrationController { SysDepart depart = sysDepartService.query().eq("id", userDeparts.get(0).getDepId()).one(); Map map5 = new HashMap<>(); map5.put("name", sysUser.getRealname()); - map5.put("xh", sysUser.getUsername()); + map5.put("xh", sysUser.getWorkNo()); map5.put("szyx", depart.getDepartName()); bmxsxxListMap.add(map5); } @@ -1702,6 +1702,7 @@ public class AnnualCompetitionProjectRegistrationController { mapall1.put("ndbsxm",annualCompPointService.getById(listAll.get(y).getAnnualCompP()).getObjName()); QueryWrapper queryWrapperlist = new QueryWrapper<>(); queryWrapperlist.eq("enroll_code",listAll.get(y).getEnrollCode()); + queryWrapperlist.eq("enroll_static", "2"); List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); if(listdw.size()>0){ mapall1.put("dwname",listdw.get(0).getTeamName()); @@ -1729,6 +1730,7 @@ public class AnnualCompetitionProjectRegistrationController { mapall2.put("ndbsxm",annualCompPointService.getById(listAll.get(n).getAnnualCompP()).getObjName()); QueryWrapper queryWrapperlist = new QueryWrapper<>(); queryWrapperlist.eq("enroll_code",listAll.get(n).getEnrollCode()); + queryWrapperlist.eq("enroll_static", "2"); List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); if(listdw.size()>0){ mapall2.put("dwname",listdw.get(0).getTeamName()); @@ -1756,6 +1758,369 @@ public class AnnualCompetitionProjectRegistrationController { } + /** + * 组委会角色分析报告比赛数据接口 + * + * @param req + * @return + */ + @ApiOperation(value="组委会角色分析报告比赛数据接口", notes="组委会角色分析报告比赛数据接口") + @GetMapping(value = "/zwhfxbg") + public Result zwhfxbg( HttpServletRequest req) { + //获取当前登录用户 最新的年度比赛记录 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + Comp comp = new Comp(); + QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); + queryWrappercomp.like("comp_admin", user.getUsername()); + List list = compService.list(queryWrappercomp); + Map map = new HashMap<>(); + if (list.size() > 0) { + List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); + queryWrapperAnnual.in(ids.size() != 0, "compid", ids); + queryWrapperAnnual.orderByDesc("create_time"); + List annualCompList = annualCompService.list(queryWrapperAnnual); + if (annualCompList.size() > 0) { + //年度比赛名称 + map.put("annualCompName", annualCompList.get(0).getName()); + //共多少届以及当前第几届 + map.put("sum", annualCompList.size()); + + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapperacp.eq("annual_comp_id", annualCompList.get(0).getId()); + queryWrapperacp.eq("annual_comp_switch", "Y"); // 比赛必须是开启的 + //queryWrapperacp.orderByDesc("create_time"); + List listacp = annualCompPointService.list(queryWrapperacp); + //比赛项目数 + map.put("bsxmSum", listacp.size()); + //前五条项目名称数据以及对应的报名数 +/* List> xmListMap = new ArrayList<>(); + if (listacp.size() > 5) { + for (int i = 0; i < 5; i++) { + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.eq("annual_compid", listacp.get(i).getId()); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + Map map1 = new HashMap<>(); + map1.put("xmname", listacp.get(i).getObjName()); + map1.put("xmbmrs", listbm.size()); + xmListMap.add(map1); + } + } else { + for (int m = 0; m < listacp.size(); m++) { + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.eq("annual_compid", listacp.get(m).getId()); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + Map map1 = new HashMap<>(); + map1.put("xmname", listacp.get(m).getObjName()); + map1.put("xmbmrs", listbm.size()); + xmListMap.add(map1); + } + } + + + map.put("qwtxmList", xmListMap);*/ + //参加比赛队伍数(报名数) + if(listacp.size()>0){ + List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.in(acpIds.size() != 0, "annual_compid", acpIds); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + map.put("bmNumber", listbm.size()); + //参数人数 + if (listbm.size() == 0) { + map.put("csNumber", 0); + map.put("ydjNumber", 0); + map.put("edjNumber", 0); + map.put("sdjNumber", 0); + map.put("sidjNumber", 0); + map.put("wdjNumber", 0); + } else { + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + List bmbhs = listbm.stream().map(AnnualCompetitionProjectRegistration::getEnrollCode).collect(Collectors.toList()); + queryWrappertm.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List listtm = teamManagementService.list(queryWrappertm); + map.put("csNumber", listtm.size()); + /* //一等奖人数 + AwardPersion awardPersion1 = new AwardPersion(); + QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); + queryWrapperap1.eq("awardsort", 1); + queryWrapperap1.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List list1 = awardPersionService.list(queryWrapperap1); + map.put("ydjNumber", list1.size()); + //二等奖人数 + AwardPersion awardPersion2 = new AwardPersion(); + QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); + queryWrapperap2.eq("awardsort", 2); + queryWrapperap2.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List list2 = awardPersionService.list(queryWrapperap2); + map.put("edjNumber", list2.size()); + //三等奖人数 + AwardPersion awardPersion3 = new AwardPersion(); + QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); + queryWrapperap3.eq("awardsort", 3); + queryWrapperap3.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List list3 = awardPersionService.list(queryWrapperap3); + map.put("sdjNumber", list3.size()); + //四等奖人数 + AwardPersion awardPersion4 = new AwardPersion(); + QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); + queryWrapperap4.eq("awardsort", 4); + queryWrapperap4.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List list4 = awardPersionService.list(queryWrapperap4); + map.put("sidjNumber", list4.size()); + //五等奖人数 + AwardPersion awardPersion5 = new AwardPersion(); + QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); + queryWrapperap5.eq("awardsort", 5); + queryWrapperap5.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List list5 = awardPersionService.list(queryWrapperap5); + map.put("wdjNumber", list5.size());*/ + } + //参赛院系用到的list + List listcs = new ArrayList<>(); + //个人赛人数 + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration1 = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm1 = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration1, req.getParameterMap()); + queryWrapperbm1.in(acpIds.size() != 0, "annual_compid", acpIds); + queryWrapperbm1.eq("enroll_static", "2"); + queryWrapperbm1.eq("entry_format", "0"); + List listbm1 = annualCompetitionProjectRegistrationService.list(queryWrapperbm1); + if (listbm1.size() == 0) { + map.put("grsNumber", 0); + } else { + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + List bmbhs = listbm1.stream().map(AnnualCompetitionProjectRegistration::getEnrollCode).collect(Collectors.toList()); + queryWrappertm.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List listtm = teamManagementService.list(queryWrappertm); + map.put("grsNumber", listtm.size()); + listcs.addAll(listtm); + } + //团队赛人数 + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration2 = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm2 = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration2, req.getParameterMap()); + queryWrapperbm2.in(acpIds.size() != 0, "annual_compid", acpIds); + queryWrapperbm2.eq("enroll_static", "2"); + queryWrapperbm2.eq("entry_format", "1"); + List listbm2 = annualCompetitionProjectRegistrationService.list(queryWrapperbm2); + if (listbm2.size() == 0) { + map.put("tdsNumber", 0); + } else { + TeamManagement teamManagement = new TeamManagement(); + QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); + List bmbhs = listbm2.stream().map(AnnualCompetitionProjectRegistration::getEnrollCode).collect(Collectors.toList()); + queryWrappertm.in(bmbhs.size() != 0, "enroll_code", bmbhs); + List listtm = teamManagementService.list(queryWrappertm); + map.put("tdsNumber", listtm.size()); + //查只是队长的用户id + queryWrappertm.eq("captain", "1"); + List listdz = teamManagementService.list(queryWrappertm); + listcs.addAll(listdz); + } + //参赛院系人数排名(只取前六条) + if (listcs.size() == 0) { + map.put("csyxbmpm", new ArrayList<>()); + map.put("bmxsxxList", new ArrayList<>()); + } else { + //拿到所有的userid + List userIds = listcs.stream().map(TeamManagement::getUserId).collect(Collectors.toList()); + QueryWrapper queryWrappersud = new QueryWrapper<>(); + queryWrappersud.select("dep_id,COUNT(*) as user_id"); + queryWrappersud.in("user_id", userIds); + queryWrappersud.groupBy("dep_id"); + queryWrappersud.orderByDesc("COUNT(*)"); + List listsud = sysUserDepartService.list(queryWrappersud); + List> csyxpmListMap = new ArrayList<>(); + if (listsud.size() > 6) { + for (int o = 0; o < 6; o++) { + Map map2 = new HashMap<>(); + map2.put("pm", o + 1); + map2.put("csyxid", listsud.get(o).getDepId()); + SysDepart depart = sysDepartService.query().eq("id", listsud.get(o).getDepId()).one(); + map2.put("csyxname", depart.getDepartName()); + map2.put("bms", listsud.get(o).getUserId()); + csyxpmListMap.add(map2); + } + map.put("csyxbmpm", csyxpmListMap); + } else { + for (int u = 0; u < listsud.size(); u++) { + Map map3 = new HashMap<>(); + map3.put("pm", u + 1); + map3.put("csyxid", listsud.get(u).getDepId()); + SysDepart depart = sysDepartService.query().eq("id", listsud.get(u).getDepId()).one(); + map3.put("csyxname", depart.getDepartName()); + map3.put("bms", listsud.get(u).getUserId()); + csyxpmListMap.add(map3); + } + map.put("csyxbmpm", csyxpmListMap); + } + //报名学生列表(只取前六条) + //根据userIds查询出六个学生信息 +/* List> bmxsxxListMap = new ArrayList<>(); + if (userIds.size() > 6) { + for (int p = 0; p < 6; p++) { + List userDeparts = sysUserDepartService.query().eq("user_id", userIds.get(p)).list(); + SysUser sysUser = sysUserService.query().eq("id", userIds.get(p)).one(); + SysDepart depart = sysDepartService.query().eq("id", userDeparts.get(0).getDepId()).one(); + Map map4 = new HashMap<>(); + map4.put("name", sysUser.getRealname()); + map4.put("xh", sysUser.getUsername()); + map4.put("szyx", depart.getDepartName()); + bmxsxxListMap.add(map4); + } + map.put("bmxsxxList", bmxsxxListMap); + } else { + for (int a = 0; a < userIds.size(); a++) { + List userDeparts = sysUserDepartService.query().eq("user_id", userIds.get(a)).list(); + SysUser sysUser = sysUserService.query().eq("id", userIds.get(a)).one(); + SysDepart depart = sysDepartService.query().eq("id", userDeparts.get(0).getDepId()).one(); + Map map5 = new HashMap<>(); + map5.put("name", sysUser.getRealname()); + map5.put("xh", sysUser.getUsername()); + map5.put("szyx", depart.getDepartName()); + bmxsxxListMap.add(map5); + } + map.put("bmxsxxList", bmxsxxListMap); + }*/ + } + + AwardPersion awardPersionAll = new AwardPersion(); + QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); + queryWrapperapAll.in(acpIds.size()!=0,"annual_comp_p",acpIds); + List listAll = awardPersionService.list(queryWrapperapAll); + List> allApListMap = new ArrayList<>(); + if(listAll.size()>7){ + for (int y = 0 ; y < 7; y++){ + Map mapall1 = new HashMap<>(); + mapall1.put("jxname",listAll.get(y).getAwardname()); + mapall1.put("ndbs",annualCompService.getById(listAll.get(y).getAnnalComp()).getName()); + mapall1.put("ndbsxm",annualCompPointService.getById(listAll.get(y).getAnnualCompP()).getObjName()); + QueryWrapper queryWrapperlist = new QueryWrapper<>(); + queryWrapperlist.eq("enroll_code",listAll.get(y).getEnrollCode()); + queryWrapperlist.eq("enroll_static", "2"); + List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); + if(listdw.size()>0){ + mapall1.put("dwname",listdw.get(0).getTeamName()); + if(listdw.get(0).getEntryFormat().equals("0")){ + //个人 + QueryWrapper queryWrappertm1 = new QueryWrapper<>(); + queryWrappertm1.eq( "enroll_code", listAll.get(y).getEnrollCode()); + List listtm1 = teamManagementService.list(queryWrappertm1); + if(listtm1.size()>0){ + String wn = sysUserService.getById(listtm1.get(0).getUserId()).getWorkNo(); + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); + queryWrapperpcs.eq("work_on",wn); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall1.put("jf",0); + }else { + mapall1.put("jf",listpcs.get(0).getScore()); + } + } + }else { + //团队 积分这块只统计队长的积分 + QueryWrapper queryWrappertm2 = new QueryWrapper<>(); + queryWrappertm2.eq( "enroll_code", listAll.get(y).getEnrollCode()); + queryWrappertm2.eq("captain", "1"); + List listtm2 = teamManagementService.list(queryWrappertm2); + if(listtm2.size()>0){ + String wn2 = sysUserService.getById(listtm2.get(0).getUserId()).getWorkNo(); + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); + queryWrapperpcs.eq("work_on",wn2); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall1.put("jf",0); + }else { + mapall1.put("jf",listpcs.get(0).getScore()); + } + } + } + }else { + mapall1.put("jf",0); + mapall1.put("dwname","暂无数据"); + } + + allApListMap.add(mapall1); + + } + }else{ + for (int n = 0 ; n < listAll.size(); n++){ + Map mapall2 = new HashMap<>(); + mapall2.put("jxname",listAll.get(n).getAwardname()); + mapall2.put("ndbs",annualCompService.getById(listAll.get(n).getAnnalComp()).getName()); + mapall2.put("ndbsxm",annualCompPointService.getById(listAll.get(n).getAnnualCompP()).getObjName()); + QueryWrapper queryWrapperlist = new QueryWrapper<>(); + queryWrapperlist.eq("enroll_code",listAll.get(n).getEnrollCode()); + queryWrapperlist.eq("enroll_static", "2"); + List listdw = annualCompetitionProjectRegistrationService.list(queryWrapperlist); + if(listdw.size()>0){ + mapall2.put("dwname",listdw.get(0).getTeamName()); + if(listdw.get(0).getEntryFormat().equals("0")){ + //个人 + QueryWrapper queryWrappertm1 = new QueryWrapper<>(); + queryWrappertm1.eq( "enroll_code", listAll.get(n).getEnrollCode()); + List listtm1 = teamManagementService.list(queryWrappertm1); + if(listtm1.size()>0){ + String wn = sysUserService.getById(listtm1.get(0).getUserId()).getWorkNo(); + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); + queryWrapperpcs.eq("work_on",wn); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall2.put("jf",0); + }else { + mapall2.put("jf",listpcs.get(0).getScore()); + } + } + }else { + //团队 积分这块只统计队长的积分 + QueryWrapper queryWrappertm2 = new QueryWrapper<>(); + queryWrappertm2.eq( "enroll_code", listAll.get(n).getEnrollCode()); + queryWrappertm2.eq("captain", "1"); + List listtm2 = teamManagementService.list(queryWrappertm2); + if(listtm2.size()>0){ + String wn2 = sysUserService.getById(listtm2.get(0).getUserId()).getWorkNo(); + QueryWrapper queryWrapperpcs = new QueryWrapper<>(); + queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); + queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); + queryWrapperpcs.eq("work_on",wn2); + List listpcs = personalCompScoreService.list(queryWrapperpcs); + if(listpcs.size()==0){ + mapall2.put("jf",0); + }else { + mapall2.put("jf",listpcs.get(0).getScore()); + } + } + } + }else { + mapall2.put("jf",0); + mapall2.put("dwname","暂无数据"); + } + allApListMap.add(mapall2); + } + } + map.put("allApList",allApListMap); + } + } + } + + return Result.OK(map); + } + + public List getZXAnnualComp(HttpServletRequest req) { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); From ccf9a95bda40c41d4a46cc7af26bcfba06a9bac1 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 10:33:22 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E7=BB=84=E5=A7=94=E4=BC=9A=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index ef03d1a8..05841c76 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -1234,6 +1234,7 @@ public class AnnualCompetitionProjectRegistrationController { public Result xssybsjs( HttpServletRequest req) { //获取当前登录用户 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String wonk = sysUserService.getById(user.getId()).getWorkNo(); TeamManagement teamManagement = new TeamManagement(); QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); queryWrappertm.eq("user_id",user.getId()); @@ -1382,8 +1383,9 @@ public class AnnualCompetitionProjectRegistrationController { map.put("xj",0); } //获奖数 + QueryWrapper queryWrapperaphj = new QueryWrapper<>(); - queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.eq("studentcode",wonk); queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listhj = awardPersionService.list(queryWrapperaphj); map.put("hjNumber",listhj.size()); @@ -1391,7 +1393,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); queryWrapperap1.eq("awardsort",1); - queryWrapperap1.eq("studentcode",user.getUsername()); + queryWrapperap1.eq("studentcode",wonk); queryWrapperap1.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list1 = awardPersionService.list(queryWrapperap1); map.put("ydjNumber",list1.size()); @@ -1399,7 +1401,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion2 = new AwardPersion(); QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); queryWrapperap2.eq("awardsort",2); - queryWrapperap2.eq("studentcode",user.getUsername()); + queryWrapperap2.eq("studentcode",wonk); queryWrapperap2.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list2 = awardPersionService.list(queryWrapperap2); map.put("edjNumber",list2.size()); @@ -1407,7 +1409,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion3 = new AwardPersion(); QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); queryWrapperap3.eq("awardsort",3); - queryWrapperap3.eq("studentcode",user.getUsername()); + queryWrapperap3.eq("studentcode",wonk); queryWrapperap3.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list3 = awardPersionService.list(queryWrapperap3); map.put("sdjNumber",list3.size()); @@ -1415,7 +1417,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion4 = new AwardPersion(); QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); queryWrapperap4.eq("awardsort",4); - queryWrapperap4.eq("studentcode",user.getUsername()); + queryWrapperap4.eq("studentcode",wonk); queryWrapperap4.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list4 = awardPersionService.list(queryWrapperap4); map.put("sidjNumber",list4.size()); @@ -1423,14 +1425,14 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion5 = new AwardPersion(); QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); queryWrapperap5.eq("awardsort",5); - queryWrapperap5.eq("studentcode",user.getUsername()); + queryWrapperap5.eq("studentcode",wonk); queryWrapperap5.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list5 = awardPersionService.list(queryWrapperap5); map.put("wdjNumber",list5.size()); //所有奖项(前六条) AwardPersion awardPersionAll = new AwardPersion(); QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); - queryWrapperapAll.eq("studentcode",user.getUsername()); + queryWrapperapAll.eq("studentcode",wonk); queryWrapperapAll.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listAll = awardPersionService.list(queryWrapperapAll); List> allApListMap = new ArrayList<>(); @@ -1443,7 +1445,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall1.put("jf",0); @@ -1462,7 +1464,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall2.put("jf",0); @@ -1490,6 +1492,7 @@ public class AnnualCompetitionProjectRegistrationController { public Result xsfxbg( HttpServletRequest req) { //获取当前登录用户 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String wonk = sysUserService.getById(user.getId()).getWorkNo(); TeamManagement teamManagement = new TeamManagement(); QueryWrapper queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); queryWrappertm.eq("user_id",user.getId()); @@ -1643,7 +1646,7 @@ public class AnnualCompetitionProjectRegistrationController { } //获奖数 QueryWrapper queryWrapperaphj = new QueryWrapper<>(); - queryWrapperaphj.eq("studentcode",user.getUsername()); + queryWrapperaphj.eq("studentcode",wonk); queryWrapperaphj.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listhj = awardPersionService.list(queryWrapperaphj); map.put("hjNumber",listhj.size()); @@ -1651,7 +1654,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion1 = new AwardPersion(); QueryWrapper queryWrapperap1 = QueryGenerator.initQueryWrapper(awardPersion1, req.getParameterMap()); queryWrapperap1.eq("awardsort",1); - queryWrapperap1.eq("studentcode",user.getUsername()); + queryWrapperap1.eq("studentcode",wonk); queryWrapperap1.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list1 = awardPersionService.list(queryWrapperap1); map.put("ydjNumber",list1.size()); @@ -1659,7 +1662,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion2 = new AwardPersion(); QueryWrapper queryWrapperap2 = QueryGenerator.initQueryWrapper(awardPersion2, req.getParameterMap()); queryWrapperap2.eq("awardsort",2); - queryWrapperap2.eq("studentcode",user.getUsername()); + queryWrapperap2.eq("studentcode",wonk); queryWrapperap2.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list2 = awardPersionService.list(queryWrapperap2); map.put("edjNumber",list2.size()); @@ -1667,7 +1670,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion3 = new AwardPersion(); QueryWrapper queryWrapperap3 = QueryGenerator.initQueryWrapper(awardPersion3, req.getParameterMap()); queryWrapperap3.eq("awardsort",3); - queryWrapperap3.eq("studentcode",user.getUsername()); + queryWrapperap3.eq("studentcode",wonk); queryWrapperap3.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list3 = awardPersionService.list(queryWrapperap3); map.put("sdjNumber",list3.size()); @@ -1675,7 +1678,7 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion4 = new AwardPersion(); QueryWrapper queryWrapperap4 = QueryGenerator.initQueryWrapper(awardPersion4, req.getParameterMap()); queryWrapperap4.eq("awardsort",4); - queryWrapperap4.eq("studentcode",user.getUsername()); + queryWrapperap4.eq("studentcode",wonk); queryWrapperap4.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list4 = awardPersionService.list(queryWrapperap4); map.put("sidjNumber",list4.size()); @@ -1683,14 +1686,14 @@ public class AnnualCompetitionProjectRegistrationController { AwardPersion awardPersion5 = new AwardPersion(); QueryWrapper queryWrapperap5 = QueryGenerator.initQueryWrapper(awardPersion5, req.getParameterMap()); queryWrapperap5.eq("awardsort",5); - queryWrapperap5.eq("studentcode",user.getUsername()); + queryWrapperap5.eq("studentcode",wonk); queryWrapperap5.in(bmbhs.size()!=0,"enroll_code",bmbhs); List list5 = awardPersionService.list(queryWrapperap5); map.put("wdjNumber",list5.size()); //所有奖项(前六条) AwardPersion awardPersionAll = new AwardPersion(); QueryWrapper queryWrapperapAll = QueryGenerator.initQueryWrapper(awardPersionAll, req.getParameterMap()); - queryWrapperapAll.eq("studentcode",user.getUsername()); + queryWrapperapAll.eq("studentcode",wonk); queryWrapperapAll.in(bmbhs.size()!=0,"enroll_code",bmbhs); List listAll = awardPersionService.list(queryWrapperapAll); List> allApListMap = new ArrayList<>(); @@ -1712,7 +1715,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(y).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(y).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall1.put("jf",0); @@ -1740,7 +1743,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapperpcs = new QueryWrapper<>(); queryWrapperpcs.eq("annual_comp_id",listAll.get(n).getAnnalComp()); queryWrapperpcs.eq("annual_comp_p",listAll.get(n).getAnnualCompP()); - queryWrapperpcs.eq("work_on",user.getUsername()); + queryWrapperpcs.eq("work_on",wonk); List listpcs = personalCompScoreService.list(queryWrapperpcs); if(listpcs.size()==0){ mapall2.put("jf",0); From a59f622cb3b1f0547795deef0fa67cae75582aa5 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 11:06:22 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=9C=AA=E8=AE=BE=E7=BD=AE=E6=AF=94?= =?UTF-8?q?=E8=B5=9B=E5=A5=96=E9=A1=B9=E6=8A=A5NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 ee411b4e..34860de7 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 @@ -513,6 +513,9 @@ public class AnnualCompPointController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); queryWrapper.eq("annucompid",id); List list = annualCompAwardService.list(queryWrapper); + if(list.size()==0){ + return Result.error("未设置年度比赛奖项!"); + } QueryWrapper queryWrappersp = new QueryWrapper<>(); queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId()); @@ -656,6 +659,13 @@ public class AnnualCompPointController extends JeecgController cxhq(@RequestBody AwardPersion awardPersion,HttpServletRequest req) { + AnnualCompAward annualCompAward = new AnnualCompAward(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); + queryWrapper.eq("annucompid",awardPersion.getAnnualCompP()); + List list = annualCompAwardService.list(queryWrapper); + if(list.size()==0){ + return Result.error("未设置年度比赛奖项!"); + } AwardPersion awardPersionqw = new AwardPersion(); QueryWrapper queryWrapperap = QueryGenerator.initQueryWrapper(awardPersionqw, req.getParameterMap()); queryWrapperap.eq("annualid",awardPersion.getAnnualid()); @@ -668,10 +678,6 @@ public class AnnualCompPointController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); - queryWrapper.eq("annucompid",awardPersion.getAnnualCompP()); - List list = annualCompAwardService.list(queryWrapper); QueryWrapper queryWrappersp = new QueryWrapper<>(); queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId());