diff --git a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 6f79ff6b..28a62973 100644 --- a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -138,6 +138,7 @@ public class ShiroConfig { //filterChainDefinitionMap.put("/test/jeecgDemo/html", "anon"); //模板页面 //filterChainDefinitionMap.put("/test/jeecgDemo/redis/**", "anon"); //redis测试 filterChainDefinitionMap.put("/comp/bigScreen/**", "anon");//比赛大屏 + filterChainDefinitionMap.put("/admin/inde/**", "anon");//比赛大屏 //websocket排除 filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告 diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/mapper/AnnualMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/mapper/AnnualMapper.java index 026f8b18..da2d4b2d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/mapper/AnnualMapper.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/mapper/AnnualMapper.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.annual.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.annual.entity.Annual; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface AnnualMapper extends BaseMapper { + + @Select("select id from annual where annual_name = #{thisyear}") + String getannualthisid(String thisyear); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/IAnnualService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/IAnnualService.java index 596d77be..715f4d28 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/IAnnualService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/IAnnualService.java @@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface IAnnualService extends IService { + String getannualthisid(String thisyear); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/impl/AnnualServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/impl/AnnualServiceImpl.java index bd397d9f..13f32369 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/impl/AnnualServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annual/service/impl/AnnualServiceImpl.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.annual.service.impl; import org.jeecg.modules.demo.annual.entity.Annual; import org.jeecg.modules.demo.annual.mapper.AnnualMapper; import org.jeecg.modules.demo.annual.service.IAnnualService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class AnnualServiceImpl extends ServiceImpl implements IAnnualService { + @Autowired + private AnnualMapper annualMapper; + + @Override + public String getannualthisid(String thisyear) { + return annualMapper.getannualthisid(thisyear); + } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/controller/AnnconalCompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/controller/AnnconalCompController.java new file mode 100644 index 00000000..03117523 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/controller/AnnconalCompController.java @@ -0,0 +1,34 @@ +package org.jeecg.modules.demo.annualCompIntface.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.modules.demo.annualCompIntface.service.AnnconalCompService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + +@Api(tags = "组委会首页") +@RestController +@RequestMapping("/admin/inde") +@Slf4j +public class AnnconalCompController +{ + @Autowired + private AnnconalCompService annconalCompService; + + + @ApiOperation(value = "管理员首页", notes = "管理员首页") + @GetMapping(value = "/inde") + public Result adminind(HttpServletRequest req) { + Map result = annconalCompService.inde(); + return Result.ok(result); + } +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompService.java new file mode 100644 index 00000000..1e62e6c3 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompService.java @@ -0,0 +1,7 @@ +package org.jeecg.modules.demo.annualCompIntface.service; + +import java.util.Map; + +public interface AnnconalCompService { + Map inde(); +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java new file mode 100644 index 00000000..3f95f01e --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java @@ -0,0 +1,111 @@ +package org.jeecg.modules.demo.annualCompIntface.service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.modules.demo.annual.entity.Annual; +import org.jeecg.modules.demo.annual.service.IAnnualService; +import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; +import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; +import org.jeecg.modules.demo.annualcomp.entity.AnnualComp; +import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService; +import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration; +import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService; +import org.jeecg.modules.demo.awardpersion.entity.AwardPersion; +import org.jeecg.modules.demo.comp.entity.Comp; +import org.jeecg.modules.demo.comp.service.ICompService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.util.Calendar; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class AnnconalCompServiceImpl implements AnnconalCompService{ + @Autowired + private ICompService compService; + + @Autowired + private IAnnualCompService annualCompService; + + @Autowired + private IAnnualService annualService; + + @Autowired + private IAnnualCompPointService annualCompPointService; + + @Autowired + private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService; + + + + @Override + public Map inde() { + Map resultMap = new LinkedHashMap<>(); + LocalDate currentDate = LocalDate.now(); + Calendar calendar = Calendar.getInstance(); + int currentYear = calendar.get(Calendar.YEAR); + String thisyear =String.valueOf(currentYear); + //本年度已展开比赛数=============================开始==================== + String annualId = annualService.getannualthisid(thisyear); + List annualCompList = annualCompService.list(new LambdaQueryWrapper().eq(AnnualComp::getAnnualid,annualId)); + resultMap.put("num01",annualCompList.size()); + //本年度已展开比赛数=============================结束==================== + + //本年度参加比赛队伍数=============================开始==================== + List annualCompidsList = annualCompList.stream().map(AnnualComp::getId).collect(Collectors.toList()); + List annualCompPointList =annualCompPointService.list(new LambdaQueryWrapper().in(AnnualCompPoint::getAnnualCompId,annualCompidsList)); + List annualCompPointidsList = annualCompPointList.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + List annualCompetitionProjectRegistrationList = annualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper().in(AnnualCompetitionProjectRegistration::getAnnualCompid,annualCompPointidsList)); + resultMap.put("num02",annualCompetitionProjectRegistrationList.size()); + //本年度参加比赛队伍数=============================结束==================== + + + //管理比赛数=============================开始==================== + List compList = compService.list(); + resultMap.put("num03",compList.size()); + //管理比赛数=============================结束==================== + + //专家总数=============================开始==================== + int zjint = compService.getzjint(); + resultMap.put("num04",zjint); + //专家总数=============================结束==================== + + + //正在进行的项目=============================开始==================== + List annualCompPointList1 = annualCompPointService.getAnnualCompbet(currentDate); + resultMap.put("num05",annualCompPointList1.size()); + //正在进行的项目=============================结束==================== + + + //已完成的项目数=============================开始==================== + List annualCompPointList2 = annualCompPointService.getAnnualCompbet1(currentDate); + resultMap.put("num06",annualCompPointList2.size()); + //已完成的项目数=============================结束==================== + + + //比赛列表=============================开始==================== + List compList1 =compService.list(new LambdaQueryWrapper().last("limit 3")); + resultMap.put("data01",compList1); + //比赛列表=============================结束==================== + + + //年度比赛列表=============================开始==================== + List AnnualComplist1 =annualCompService.list(new LambdaQueryWrapper().last("limit 3")); + resultMap.put("data02",AnnualComplist1); + //年度比赛列表=============================结束==================== + + //年度比赛列表=============================开始==================== + List AnnualComppointlist1 =annualCompPointService.list(new LambdaQueryWrapper().last("limit 3")); + resultMap.put("data03",AnnualComppointlist1); + //年度比赛列表=============================结束==================== + + + return resultMap; + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/mapper/AnnualCompPointMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/mapper/AnnualCompPointMapper.java index 4aa47e1c..a4b9fa87 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/mapper/AnnualCompPointMapper.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/mapper/AnnualCompPointMapper.java @@ -1,8 +1,10 @@ package org.jeecg.modules.demo.annualCompPoint.mapper; +import java.time.LocalDate; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +16,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface AnnualCompPointMapper extends BaseMapper { + @Select("select * from annual_comp_point where starttime < #{currentDate} and endtime > #{currentDate}") + List getAnnualCompbet(LocalDate currentDate); + + @Select("select * from annual_comp_point where starttime > #{currentDate} or endtime < #{currentDate}") + List getAnnualCompbet1(LocalDate currentDate); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/IAnnualCompPointService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/IAnnualCompPointService.java index 31bc279a..78d8a181 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/IAnnualCompPointService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/IAnnualCompPointService.java @@ -6,6 +6,8 @@ import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import com.baomidou.mybatisplus.extension.service.IService; import javax.servlet.http.HttpServletRequest; +import java.time.LocalDate; +import java.util.List; /** * @Description: 年度比赛项目管理 @@ -20,4 +22,8 @@ public interface IAnnualCompPointService extends IService { Result> pageList(AnnualCompPoint annualCompPoint, Integer pageNo, Integer pageSize, HttpServletRequest req); Result updateApply(String id,String annualCompState); + + List getAnnualCompbet(LocalDate currentDate); + + List getAnnualCompbet1(LocalDate currentDate); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java index 76baae57..7805d86d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import javax.servlet.http.HttpServletRequest; +import java.time.LocalDate; import java.util.Date; import java.util.List; import java.util.function.Function; @@ -37,6 +38,8 @@ public class AnnualCompPointServiceImpl extends ServiceImpl getAnnualCompbet(LocalDate currentDate) { + return annualCompPointMapper.getAnnualCompbet(currentDate); + } + + @Override + public List getAnnualCompbet1(LocalDate currentDate) { + return annualCompPointMapper.getAnnualCompbet1(currentDate); + } + } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java index 71c9c75b..fc3ec3b1 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.comp.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.comp.entity.Comp; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +15,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface CompMapper extends BaseMapper { + @Select("select * from comp where comp_admin = #{username}") + List getbyAdmin(String username); + + @Select("SELECT COUNT(*) FROM sys_user_role WHERE role_id ='1731948288626339841'") + int getzjint(); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java index a9260f4e..abbfc5c7 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java @@ -3,6 +3,8 @@ package org.jeecg.modules.demo.comp.service; import org.jeecg.modules.demo.comp.entity.Comp; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @Description: 比赛 * @Author: jeecg-boot @@ -11,4 +13,7 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface ICompService extends IService { + List getbyAdmin(String username); + + int getzjint(); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java index 4a3bf1eb..0b77ef20 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java @@ -3,10 +3,13 @@ package org.jeecg.modules.demo.comp.service.impl; import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.mapper.CompMapper; import org.jeecg.modules.demo.comp.service.ICompService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.List; + /** * @Description: 比赛 * @Author: jeecg-boot @@ -16,4 +19,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class CompServiceImpl extends ServiceImpl implements ICompService { + @Autowired + private CompMapper compMapper; + + @Override + public List getbyAdmin(String username) { + return compMapper.getbyAdmin(username); + } + + @Override + public int getzjint() { + return compMapper.getzjint(); + } } diff --git a/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue b/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue index abbc986b..c56fa1ab 100644 --- a/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue +++ b/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue @@ -4,7 +4,7 @@
-

本年度已展开比赛数

+

本年度已展开年度比赛数

annual competitions

{{num01}} @@ -16,7 +16,7 @@

-

本年度参加比赛学校数

+

本年度参加比赛队伍数

Participating schools

{{num02}} @@ -40,7 +40,7 @@

-

管理学校数

+

专家总数

School management

{{num04}} @@ -52,7 +52,7 @@

-

正在进行数

+

正在进行的项目数

Ongoing competition

{{num05}} @@ -64,7 +64,7 @@

-

已完成数

+

已完成的项目数

Completed competitions

{{num06}} @@ -88,21 +88,21 @@

- - - - - - - - - - +
+
+
+
+
+
+
+ {{item.name}} +
+
-
+
@@ -135,12 +135,12 @@ 审核状态
暂无数据
- + {{index+1}} - {{item.compname}} - {{item.startTime}} - {{item.status_dictText}} + {{item.compName}} + {{item.createTime}} + 已审核
@@ -164,19 +164,19 @@ 审核状态
暂无数据
- + {{index+1}} - {{item.compname}} - {{item.startTime}} - {{item.status_dictText}} + {{item.name}} + {{item.starttime}} + 已审核
- 高校列表 + 年度比赛项目列表 More @@ -190,83 +190,41 @@ 审核状态
暂无数据
- + {{index+1}} - {{item.compname}} - {{item.startTime}} - {{item.status_dictText}} + {{item.objName}} + {{item.starttime}} + 已审核
-