From 92043b33db6c36ea198e4791b2d5537cdfb5216f Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Fri, 30 Aug 2024 14:43:47 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E8=B5=9B=E9=98=9F?= =?UTF-8?q?=E5=91=98=E4=BD=8D=E6=AC=A1=E6=AF=94=E5=80=BC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserHomePageController.java | 8 ++--- .../homepage/service/UserHomePageService.java | 4 +-- .../service/UserHomePageServiceImpl.java | 34 +++++++++++++------ .../teamseq/controller/TeamSeqController.java | 15 ++++---- .../service/impl/TeamSeqServiceImpl.java | 17 ++++++---- 5 files changed, 47 insertions(+), 31 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 8d4a5fef..66e0b0bd 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,15 +48,15 @@ public class UserHomePageController { @AutoLog(value = "学校管理员-分析报告") @ApiOperation(value = "河南机电-学校综合报告", notes = "河南机电-学校综合报告") @GetMapping(value = "/report4School") - public Result report4School(boolean recreateFlag) { - Object result = homePageService.report4School(recreateFlag); + public Result report4School(String year, boolean recreateFlag) { + Object result = homePageService.report4School(year,recreateFlag); return Result.ok(result); } @AutoLog(value = "部门管理员-分析报告") @ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告") @GetMapping(value = "/report4Depart") - public Result report4Depart(String orgCode,boolean recreateFlag) { - return Result.ok(homePageService.report4Depart(orgCode, recreateFlag)); + public Result report4Depart(String year,String orgCode, boolean recreateFlag) { + return Result.ok(homePageService.report4Depart(year,orgCode, recreateFlag)); } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java index 05d7eaaa..b2cdd97f 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java @@ -8,7 +8,7 @@ public interface UserHomePageService { Map homePage4School(); - Object report4School(boolean recreateFlag); + Object report4School(String year,boolean recreateFlag); - Object report4Depart(String orgCode, boolean recreateFlag); + Object report4Depart(String year,String orgCode, boolean recreateFlag); } 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 752e17f5..72c22be9 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 @@ -2,6 +2,7 @@ package org.jeecg.modules.demo.homepage.service; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.apache.commons.lang3.StringUtils; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.util.ComputeUtils; import org.jeecg.common.util.DateUtils; @@ -362,16 +363,20 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4School(boolean recreateFlag) { - - final String REPORT4SCHOOL = "report4School"; + public Object report4School(String yearStr, boolean recreateFlag) { + String currentYear; + if (StringUtils.isNotBlank(yearStr)) { + currentYear = yearStr; + } else { + currentYear = DateUtils.getCurrentYear() + ""; + } + final String REPORT4SCHOOL = "report4School-" + currentYear; Map resultMap = new LinkedHashMap<>(); if (recreateFlag) { - int currentYear = DateUtils.getCurrentYear(); - //当前年度 + //年度 Annual annual = iAnnualService.getOne(new LambdaQueryWrapper().eq(Annual::getAnnualName, currentYear + "")); - + if(ObjectUtils.isEmpty(annual)) return resultMap; List annualCompList = iAnnualCompService.list(new LambdaQueryWrapper() .eq(AnnualComp::getAnnualid, annual.getId())); @@ -593,7 +598,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4SCHOOL); } else { - return this.report4School(true); + return this.report4School(yearStr, true); } } } @@ -613,11 +618,17 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4Depart(String orgCode, boolean recreateFlag) { + public Object report4Depart(String yearStr, String orgCode, boolean recreateFlag) { Assert.notNull(orgCode, "部门编号不能为空"); - final String REPORT4DEPART = "report4Depart"; Map resultMap = new LinkedHashMap<>(); + String currentYear; + if (StringUtils.isNotBlank(yearStr)) { + currentYear = yearStr; + } else { + currentYear = DateUtils.getCurrentYear() + ""; + } + final String REPORT4DEPART = "report4Depart-" + currentYear; if (recreateFlag) { SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode, orgCode)); if (ObjectUtil.isNull(sysDepart)) { @@ -625,9 +636,10 @@ public class UserHomePageServiceImpl implements UserHomePageService { } String departId = sysDepart.getParentId(); - int currentYear = DateUtils.getCurrentYear(); //当前年度 Annual annual = iAnnualService.getOne(new LambdaQueryWrapper().eq(Annual::getAnnualName, currentYear + "")); + if(ObjectUtils.isEmpty(annual)) return resultMap; + List compList = iCompService.list(new LambdaQueryWrapper().eq(Comp::getCompOrgan, departId)); Set compIds = Optional.ofNullable(compList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); @@ -813,7 +825,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4DEPART); } else { - return this.report4Depart(orgCode, true); + return this.report4Depart(orgCode, yearStr, true); } } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java index ca8b49ae..5fea5817 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java @@ -1,5 +1,6 @@ package org.jeecg.modules.demo.teamseq.controller; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -20,10 +21,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @Description: 团队赛队员积分计算配置 @@ -64,9 +62,12 @@ public class TeamSeqController extends JeecgController @ApiOperation(value = "团队赛队员积分计算配置-分页列表查询", notes = "团队赛队员积分计算配置-分页列表查询") @GetMapping(value = "/listByPointId") public Result queryPageList(String pointId) { - List list = teamSeqService.list(new LambdaQueryWrapper().eq(TeamSeq::getPointId, pointId)); - Map map = new LinkedHashMap<>(); - map.put("records",list); + Map map = new LinkedHashMap<>(); + List list =new LinkedList<>(); + if (StrUtil.isNotEmpty(pointId)) { + list = teamSeqService.list(new LambdaQueryWrapper().eq(TeamSeq::getPointId, pointId)); + } + map.put("records", list); return Result.OK(map); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java index 5bcd0ae5..7a5c6575 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java @@ -1,12 +1,13 @@ package org.jeecg.modules.demo.teamseq.service.impl; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.common.exception.JeecgBootException; import org.jeecg.modules.demo.teamseq.entity.TeamSeq; import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper; import org.jeecg.modules.demo.teamseq.service.ITeamSeqService; -import org.jeecg.modules.demo.teamseq.vo.TeamSeqVo; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.util.List; @@ -22,13 +23,15 @@ public class TeamSeqServiceImpl extends ServiceImpl impl @Override public void saveOrUpdate4TeamSeq(List list) { + if (ObjectUtil.isEmpty(list)) { + throw new JeecgBootException("配置对象不能为空!"); + } String pointId = list.get(0).getPointId(); + if (StrUtil.isEmpty(pointId)) { + throw new JeecgBootException("比赛项目不能为空!"); + } + this.remove(new LambdaQueryWrapper().eq(TeamSeq::getPointId, pointId)); -// TeamSeqVo vo = new TeamSeqVo(); -// BeanUtils.copyProperties(point, vo); -// vo.setPointId(point.getId()); -// TeamSeq teamSeq = new TeamSeq(); -// BeanUtils.copyProperties(vo, teamSeq); this.saveBatch(list); } } From 06fdd0c6e0dfd83bf81244532e33e707fd041e03 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Fri, 30 Aug 2024 14:53:47 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E8=B5=9B=E9=98=9F?= =?UTF-8?q?=E5=91=98=E4=BD=8D=E6=AC=A1=E6=AF=94=E5=80=BC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/homepage/service/UserHomePageServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 72c22be9..040a7918 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 @@ -376,7 +376,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (recreateFlag) { //年度 Annual annual = iAnnualService.getOne(new LambdaQueryWrapper().eq(Annual::getAnnualName, currentYear + "")); - if(ObjectUtils.isEmpty(annual)) return resultMap; + if (ObjectUtils.isEmpty(annual)) return resultMap; List annualCompList = iAnnualCompService.list(new LambdaQueryWrapper() .eq(AnnualComp::getAnnualid, annual.getId())); @@ -638,7 +638,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { String departId = sysDepart.getParentId(); //当前年度 Annual annual = iAnnualService.getOne(new LambdaQueryWrapper().eq(Annual::getAnnualName, currentYear + "")); - if(ObjectUtils.isEmpty(annual)) return resultMap; + if (ObjectUtils.isEmpty(annual)) return resultMap; List compList = iCompService.list(new LambdaQueryWrapper().eq(Comp::getCompOrgan, departId)); Set compIds = Optional.ofNullable(compList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); @@ -825,7 +825,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4DEPART); } else { - return this.report4Depart(orgCode, yearStr, true); + return this.report4Depart(yearStr, orgCode, true); } } } From 5f9b025178e7e9d6d474399f28c38791616734cd Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Fri, 30 Aug 2024 17:10:08 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E8=B5=9B=E9=98=9F?= =?UTF-8?q?=E5=91=98=E4=BD=8D=E6=AC=A1=E6=AF=94=E5=80=BC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserHomePageController.java | 8 ++++---- .../homepage/service/UserHomePageService.java | 4 ++-- .../service/UserHomePageServiceImpl.java | 20 ++++++++++--------- 3 files changed, 17 insertions(+), 15 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 66e0b0bd..8b6cc28a 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,15 +48,15 @@ public class UserHomePageController { @AutoLog(value = "学校管理员-分析报告") @ApiOperation(value = "河南机电-学校综合报告", notes = "河南机电-学校综合报告") @GetMapping(value = "/report4School") - public Result report4School(String year, boolean recreateFlag) { - Object result = homePageService.report4School(year,recreateFlag); + public Result report4School(String annualId, boolean recreateFlag) { + Object result = homePageService.report4School(annualId,recreateFlag); return Result.ok(result); } @AutoLog(value = "部门管理员-分析报告") @ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告") @GetMapping(value = "/report4Depart") - public Result report4Depart(String year,String orgCode, boolean recreateFlag) { - return Result.ok(homePageService.report4Depart(year,orgCode, recreateFlag)); + public Result report4Depart(String annualId,String orgCode, boolean recreateFlag) { + return Result.ok(homePageService.report4Depart(annualId,orgCode, recreateFlag)); } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java index b2cdd97f..62815f20 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java @@ -8,7 +8,7 @@ public interface UserHomePageService { Map homePage4School(); - Object report4School(String year,boolean recreateFlag); + Object report4School(String annualId,boolean recreateFlag); - Object report4Depart(String year,String orgCode, boolean recreateFlag); + Object report4Depart(String annualId,String orgCode, boolean recreateFlag); } 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 040a7918..fcaad6d1 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 @@ -363,12 +363,13 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4School(String yearStr, boolean recreateFlag) { + public Object report4School(String annualId, boolean recreateFlag) { String currentYear; - if (StringUtils.isNotBlank(yearStr)) { - currentYear = yearStr; - } else { + if (StringUtils.isNotBlank(annualId)) { + Annual annual = iAnnualService.getById(annualId); + currentYear = annual.getAnnualName(); + }else { currentYear = DateUtils.getCurrentYear() + ""; } final String REPORT4SCHOOL = "report4School-" + currentYear; @@ -598,7 +599,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4SCHOOL); } else { - return this.report4School(yearStr, true); + return this.report4School(annualId, true); } } } @@ -618,13 +619,14 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4Depart(String yearStr, String orgCode, boolean recreateFlag) { + public Object report4Depart(String annualId, String orgCode, boolean recreateFlag) { Assert.notNull(orgCode, "部门编号不能为空"); Map resultMap = new LinkedHashMap<>(); String currentYear; - if (StringUtils.isNotBlank(yearStr)) { - currentYear = yearStr; + if (StringUtils.isNotBlank(annualId)) { + Annual annual = iAnnualService.getById(annualId); + currentYear = annual.getAnnualName(); } else { currentYear = DateUtils.getCurrentYear() + ""; } @@ -825,7 +827,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4DEPART); } else { - return this.report4Depart(yearStr, orgCode, true); + return this.report4Depart(annualId, orgCode, true); } } } From d0f9445c49d393d9e2f19d942cdb1b49faba06ee Mon Sep 17 00:00:00 2001 From: JayChou <2064936853@qq.com> Date: Fri, 30 Aug 2024 17:54:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=A6=E6=A0=A1=20?= =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E7=AE=A1=E7=90=86=E5=91=98=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=B9=B4=E5=BA=A6=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comprehensiveReport.vue | 107 ++++++++++-------- .../comprehensiveEvaluation/department.vue | 17 ++- 2 files changed, 75 insertions(+), 49 deletions(-) diff --git a/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/comprehensiveReport.vue b/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/comprehensiveReport.vue index 287f93bb..035e9637 100644 --- a/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/comprehensiveReport.vue +++ b/jeecgboot-vue3-master/src/views/comprehensiveEvaluation/comprehensiveReport.vue @@ -1,7 +1,13 @@