GST002精简

gst2base
Gitea 2 days ago
parent 19ec1dd34c
commit cead27ead6
  1. 31
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/controller/AnnconalCompZWHController.java
  2. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompZWHService.java
  3. 160
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompZWHServiceImpl.java
  4. 417
      jeecgboot-vue3-master/src/views/dashboard/Analysis/indexZWH.vue

@ -1,31 +0,0 @@
package org.jeecg.modules.demo.annualCompIntface.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.annualCompIntface.service.AnnconalCompZWHService;
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 java.util.Map;
@Api(tags = "组委会首页")
@RestController
@RequestMapping("/zwh/inde")
@Slf4j
public class AnnconalCompZWHController {
@Autowired
private AnnconalCompZWHService annconalCompZWHService;
@ApiOperation(value = "组委会首页", notes = "组委会首页")
@GetMapping(value = "/zwhindex")
public Result zwhindex(String ids) {
Map<String, Object> result = annconalCompZWHService.getzwhindex(ids);
return Result.ok(result);
}
}

@ -1,7 +0,0 @@
package org.jeecg.modules.demo.annualCompIntface.service;
import java.util.Map;
public interface AnnconalCompZWHService {
Map<String, Object> getzwhindex(String ids);
}

@ -1,160 +0,0 @@
package org.jeecg.modules.demo.annualCompIntface.service;
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.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.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.Year;
import java.util.*;
@Service
public class AnnconalCompZWHServiceImpl implements AnnconalCompZWHService{
@Autowired
private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService;
@Autowired
private ICompService compService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private IAnnualCompPointService annualCompPointService;
@Autowired
private IAnnualService annualService;
@Override
public Map<String, Object> getzwhindex(String ids) {
Map<String, Object> resultMap = new LinkedHashMap<>();
/*============================计算已经完成的项目开始============================================*/
List<String> complist =compService.findcompid(ids);
List<String> annualcomp = new ArrayList<>();
List<AnnualCompPoint> annualCompPointList = new ArrayList<>();
if (complist.size()>0) {
for (int i = 0; i < complist.size();i++) {
List<String> temp = new ArrayList<>();
temp =annualCompService.getannualcompid(complist.get(i));
annualcomp.addAll(temp);
}
if (annualcomp.size()>0){
List<AnnualCompPoint> temp1 = new ArrayList<>();
for(int j=0;j<annualcomp.size();j++) {
temp1 = annualCompPointService.getannualCompPointList(annualcomp.get(j));
annualCompPointList.addAll(temp1);
}
resultMap.put("num06",annualCompPointList.size());
}else{
resultMap.put("num06","暂无");
}
}else {
resultMap.put("num06","暂无");
}
/*============================计算已经完成的项目============结束================================*/
/*====================================开始======本年度的项目=========*/
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
String year = sdf.format(new Date());
String annualid =annualService.getannualthisid(year);
List<AnnualCompPoint> annualCompPointList1 = new ArrayList<>();
if(annualCompPointList.size()>0){
for (AnnualCompPoint point : annualCompPointList) {
// 获取endTime的年份
Calendar calendar = Calendar.getInstance();
calendar.setTime(point.getEndtime());
int year123 = calendar.get(Calendar.YEAR);
String yearAsString = Integer.toString(year123);
// 使用 Year 类获取年份
Year year1 = Year.now();
// 将 Year 对象转换为字符串
String yearAsString1 = year1.toString();
if (yearAsString.equals(yearAsString1)) {
annualCompPointList1.add(point);
}
}
resultMap.put("num05",annualCompPointList1.size());
}else {
resultMap.put("num05", "暂无");
}
/*====================================结束======本年度的项目=========*/
/*====================================开始======专家=========*/
if (complist.size()>0) {
List<CompExp> compExps = new ArrayList<>();
for (int i=0;i<complist.size();i++){
List<CompExp> temp= compExpService.gettempbycom(complist.get(i));
compExps.addAll(temp);
}
resultMap.put("num04", compExps.size());
}else {
resultMap.put("num04", "暂无");
}
/*====================================结束======专家=========*/
/*====================================开始======本年度报名=========*/
if (annualCompPointList1.size()>0){
List<AnnualCompetitionProjectRegistration> annualCompetitionProjectRegistrationlist = new ArrayList<>();
for(int i=0;i<annualCompPointList1.size();i++){
String acpid = annualCompPointList1.get(i).getId();
List<AnnualCompetitionProjectRegistration> temp =annualCompetitionProjectRegistrationService.getbyconoppid(acpid);
annualCompetitionProjectRegistrationlist.addAll(temp);
}
resultMap.put("num02", annualCompetitionProjectRegistrationlist.size());
}else {
resultMap.put("num02","暂无");
}
/*====================================结束======本年度报名=========*/
/*====================================开始======比赛=========*/
if (complist.size()>0) {
List<Comp> listcomp = new ArrayList<>();
for (int i=0;i<complist.size();i++){
Comp comp = compService.getById(complist.get(i));
listcomp.add(comp);
}
resultMap.put("data01",listcomp);
}
/*====================================结束======比赛=========*/
/*====================================开始======年度比赛=========*/
List<AnnualComp> listcompannual = new ArrayList<>();
if (complist.size()>0) {
for (int i=0;i<complist.size();i++){
List<AnnualComp> temo= annualCompService.getannualcompidlist(complist.get(i));
listcompannual.addAll(temo);
}
resultMap.put("data02",listcompannual);
}
/*====================================结束======年度比赛=========*/
/*====================================开始======年度比赛=========*/
if (listcompannual.size()>0) {
List<AnnualCompPoint> listcompannualPO = new ArrayList<>();
for (int i=0;i<listcompannual.size();i++){
List<AnnualCompPoint> temp= annualCompPointService.getannualCompPointList(listcompannual.get(i).getId());
listcompannualPO.addAll(temp);
}
resultMap.put("data03",listcompannualPO);
}
/*====================================结束======年度比赛=========*/
return resultMap;
}
}

@ -1,417 +0,0 @@
<template>
<div style="padding: 12px" class="index-container-ty">
<!-- <a-spin :spinning="loading">-->
<a-spin :spinning="false">
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="firstDiv">
<a-col :xs="12" :xl="4">
<div class="commonDiv">
<p class="title">本年度参加比赛队伍数</p>
<p class="subtitle">Participating schools</p>
<p class="num">
<span>{{num02}}</span>
<span class="iconDiv">
<!-- <img src="./images/icon2.png"/>-->
</span>
</p>
</div>
</a-col>
<a-col :xs="12" :xl="4">
<div class="commonDiv">
<p class="title">专家总数</p>
<p class="subtitle">School management</p>
<p class="num">
<span>{{num04}}</span>
<span class="iconDiv">
<!-- <img src="./images/icon4.png"/>-->
</span>
</p>
</div>
</a-col>
<a-col :xs="12" :xl="4">
<div class="commonDiv">
<p class="title">本年度项目数</p>
<p class="subtitle">Ongoing competition</p>
<p class="num">
<span>{{num05}}</span>
<span class="iconDiv">
<!-- <img src="./images/icon5.png"/>-->
</span>
</p>
</div>
</a-col>
<a-col :xs="12" :xl="4">
<div class="commonDiv">
<p class="title">已完成的项目数</p>
<p class="subtitle">Completed competitions</p>
<p class="num">
<span>{{num06}}</span>
<span class="iconDiv">
<!-- <img src="./images/icon6.png"/>-->
</span>
</p>
</div>
</a-col>
</a-row>
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="titleDiv titleDiv1">
<a-col :xs="24" :xl="8" >
<a-row type="flex" justify="space-between" class="titleDiv">
<a-col :span="12" >
<!-- <span class="name">综合评分排名{{list}}</span>-->
<span class="name">综合评分排名</span>
</a-col>
<a-col :span="12" class="more">
<span>More<a-icon type="right" /></span>
</a-col>
</a-row>
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="commonDiv" style="margin: 0">
<a-col :span="20">
<!-- <div id="histogram" style="width: 100%;height: 100%">
<div class="item" v-for="(item,index) in multipleScore" :key="index">
<div class="topDiv">
<div class="red color" :style="{height:item.target1*2+'px'}"></div>
<div class="yellow color" :style="{height:item.target2*2+'px'}"></div>
<div class="green color" :style="{height:item.target3*2+'px'}"></div>
</div>
<div class="bottomDiv">
{{item.name}}
</div>
</div>
</div>-->
</a-col>
<a-col :span="4">
<div class="colorDiv">
</div>
</a-col>
</a-row>
</a-col>
<a-col :xs="24" :xl="16">
<a-row type="flex" justify="space-between" class="titleDiv">
<a-col :span="12" >
<span class="name">比赛列表</span>
</a-col>
<a-col :span="12" class="more">
<span @click="goPage">More<a-icon type="right" /></span>
</a-col>
</a-row>
<div class="commonDiv">
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="tableTitle">
<a-col :span="2">序号</a-col>
<a-col :span="12">名称</a-col>
<a-col :span="6">开始时间</a-col>
<a-col :span="4">审核状态</a-col>
</a-row>
<div class="none" v-if="false">暂无数据</div>
<a-row :gutter="[32,16]" type="flex" justify="space-between" v-for="(item,index) in data01"
:key="index" class="tableCoin">
<a-col :span="2">{{index+1}}</a-col>
<a-col :span="12">{{item.compName}}</a-col>
<a-col :span="6">{{item.createTime}}</a-col>
<a-col :span="4">已审核</a-col>
</a-row>
</div>
</a-col>
</a-row>
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="titleDiv">
<a-col :xs="24" :xl="12" >
<a-row type="flex" justify="space-between" class="titleDiv">
<a-col :span="12" >
<span class="name">年度比赛列表</span>
</a-col>
<a-col :span="12" class="more">
<span>More<a-icon type="right" /></span>
</a-col>
</a-row>
<div class="commonDiv">
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="tableTitle">
<a-col :span="2">序号</a-col>
<a-col :span="12">名称</a-col>
<a-col :span="6">开始时间</a-col>
<a-col :span="4">审核状态</a-col>
</a-row>
<div class="none" v-if="false">暂无数据</div>
<a-row :gutter="[32,16]" type="flex" justify="space-between" v-for="(item,index) in data02"
:key="index" class="tableCoin">
<a-col :span="2">{{index+1}}</a-col>
<a-col :span="12">{{item.name}}</a-col>
<a-col :span="6">{{item.starttime}}</a-col>
<a-col :span="4">已审核</a-col>
</a-row>
</div>
</a-col>
<a-col :xs="24" :xl="12">
<a-row type="flex" justify="space-between" class="titleDiv">
<a-col :span="12" >
<span class="name">年度比赛项目列表</span>
</a-col>
<a-col :span="12" class="more">
<span>More<a-icon type="right" /></span>
</a-col>
</a-row>
<div class="commonDiv">
<a-row :gutter="[32,16]" type="flex" justify="space-between" class="tableTitle">
<a-col :span="2">序号</a-col>
<a-col :span="12">名称</a-col>
<a-col :span="6">开始时间</a-col>
<a-col :span="4">审核状态</a-col>
</a-row>
<div class="none" v-if="false">暂无数据</div>
<a-row :gutter="[32,16]" type="flex" justify="space-between" v-for="(item,index) in data03"
:key="index" class="tableCoin">
<a-col :span="2">{{index+1}}</a-col>
<a-col :span="12">{{item.objName}}</a-col>
<a-col :span="6">{{item.starttime}}</a-col>
<a-col :span="4">已审核</a-col>
</a-row>
</div>
</a-col>
</a-row>
</a-spin></div>
</template>
<script lang="ts" setup>
import { getVisitInfozwh } from './api.ts';
import { useUserStore } from '/@/store/modules/user';
import {ref} from "vue";
const userStore = useUserStore();
const ids= userStore.getUserInfo.username;
const num02 = ref("");
const num04 = ref("");
const num05 = ref("");
const num06 = ref("");
const data03= ref( []);
const data02= ref( []);
const data01 = ref( []);
function sayHi () {
console.log("用户信息", ids)
const userInfo = userStore.getUserInfo;
console.log("用户信息", userInfo)
}
function initLogInfo() {
getVisitInfozwh({ids:ids}).then((res) => {
if (res.success) {
num02.value = res.result.num02
num04.value = res.result.num04
num05.value = res.result.num05
num06.value = res.result.num06
data03.value = res.result.data03
data02.value = res.result.data02
data01.value = res.result.data01
console.log("==================================")
console.log(res)
console.log("==================================")
}
});
}
sayHi();
initLogInfo();
</script>
<style>
.my-index-table{height:270px}
.my-index-table table{font-size: 14px !important;}
.index-container-ty .ant-card-head-title{padding-top: 6px;padding-bottom: 6px;}
.index-container-ty .ant-card-extra{padding:0}
.index-container-ty .ant-card-extra a{color:#fff}
.index-container-ty .ant-card-extra a:hover{color:#152ede}
.index-container-ty .ant-card-head-wrapper,.index-container-ty .ant-card-head{
line-height:24px;
min-height:24px;
background: #7196fb;
}
.index-container-ty .ant-card-body{padding: 10px 12px 0px 12px}
.index-container-ty .ant-table-footer{text-align: right;padding:6px 12px 6px 6px;background: #fff;border-top: 2px solid #f7f1f1;}
.index-md-title{
postion:relative;
padding-left:24px;
width: 100%;
color: #fff;
font-size: 21px;
font-family: cursive;
}
.index-md-title img{
position: absolute;
height:32px;
top: 2px;
left:14px;
}
.index-container-ty .ant-table-thead > tr > th,
.index-container-ty .ant-table-tbody > tr > td{
border-bottom: 1px solid #90aeff;
}
.index-container-ty .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th,
.index-container-ty .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th{
border-bottom: 1px solid #90aeff;
}
.index-container-ty .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-thead > tr > th{
border-bottom: 1px solid #90aeff;
}
.index-container-ty .ant-table-small{
border: 1px solid #90aeff;
}
.index-container-ty .ant-table-placeholder {
padding: 0
}
</style>
<style lang="less" scoped>
.none{
text-align: center;
padding-top: 50px;
color: #A3A3A3;
}
.commonDiv{
width: 100%;
padding: 15px 25px;
margin: 0;
background: #FDFDFD;
box-shadow: 18px 25px 48px 0px rgba(83,153,247,0.12);
border-radius: 20px 20px 20px 20px;
opacity: 1;
.title{
font-size: 14px;
color: #464255;
font-weight: bold;
margin-bottom: 4px;
}
.subtitle{
font-size: 12px;
color: #BBBBBB;
}
.num{
display: flex;
justify-content: space-between;
span{
font-size: 32px;
font-weight: 600;
color: #464255;
}
.iconDiv{
width: 50px;
height: 50px;
font-size: 26px;
line-height: 50px;
border-radius: 40px 40px 40px 40px;
text-align: center;
img{
width: 50px;
height: 50px;
}
}
}
.tableTitle{
border-bottom: 1px solid #ECEAF3;
height: 68px;
line-height: 68px;
color: #A3A3A3;
font-size: 16px;
text-align: center;
}
.tableCoin{
border-bottom: 1px solid #ECEAF3;
height: 68px;
line-height: 68px;
font-weight: 500;
color: #464255;
font-size: 16px;
text-align: center;
}
}
.titleDiv{
margin-top: 20px;
margin-bottom: 20px;
.name{
font-size: 18px;
font-weight: 500;
color: #464255;
}
.more{
text-align: right;
cursor: pointer;
i{
margin-left: 6px;
}
}
}
.titleDiv1 .commonDiv{
height: 300px;
}
.histogram{
display: flex;
justify-content: center;
height: 260px;
.item{
width: 50px;
height: 260px;
margin-right: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.topDiv{
height: 200px;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
.color{
width: 14px;
}
.red{
height: 30px;
background-color: #91CC75;
border-radius: 6px 6px 6px 6px;
margin-bottom: -7px;
}
.yellow{
height: 30px;
background-color:#FAC858;
border-radius: 6px 6px 6px 6px;
margin-bottom: -7px;
}
.green{
height: 30px;
background-color: #5470C6;
border-radius: 6px 6px 6px 6px;
}
}
.bottomDiv{
height: 51px;
line-height: 17px;
overflow: hidden;display: -webkit-box;text-overflow: ellipsis;
-webkit-line-clamp:2;-webkit-box-orient: vertical;white-space:normal;
}
}
}
.colorDiv{
.color{
margin-bottom: 30px;
.green{
width: 12px;
height: 12px;
background-color: #5470C6;
}
.red{
width: 12px;
height: 12px;
background-color: #91CC75;
}
.yellow{
width: 12px;
height: 12px;
background-color: #FAC858;
}
}
}
</style>
Loading…
Cancel
Save