Merge remote-tracking branch 'origin/main'

main
王家东 4 months ago
commit 177ce5ec82
  1. 46
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  2. 8
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java
  3. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java
  4. 3
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java
  5. 21
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java
  6. 5
      jeecgboot-vue3-master/src/api/common/api.ts
  7. 12
      jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList.vue
  8. 16
      jeecgboot-vue3-master/src/views/comprehensiveEvaluation/comprehensiveReport.vue

@ -131,16 +131,25 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.eq("comp_admin",user.getUsername());
if(awardPersion.getComType()!=null){
queryWrappercomp.eq("comp_type_id",awardPersion.getComType());
}
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.OK(null);
/* if(awardPersion.getComType()==null){
return Result.error("未绑定比赛");
}else {
return Result.error("未绑定该比赛类型的比赛");
}*/
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
/*return Result.error("未创建年度比赛");*/
return Result.OK(null);
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
@ -150,9 +159,17 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
if(awardPersion.getObjLevel()!=null){
queryWrapperacp.eq("obj_level",awardPersion.getObjLevel());
}
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
/*if(awardPersion.getObjLevel()==null){
return Result.error("未创建年度比赛项目");
}else {
return Result.error("未创建该项目层次的年度比赛项目");
}*/
return Result.OK(null);
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in("annual_comp_p",acpIds);
@ -171,6 +188,33 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
//学校和超级管理员(全部都可以)(查全部数据)
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
if(awardPersion.getComType()!=null){
QueryWrapper<Comp> queryWrappercomp = new QueryWrapper<>();
queryWrappercomp.eq("comp_type_id",awardPersion.getComType());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.OK(null);
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.OK(null);
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
queryWrapper.in("annal_comp",annualIds);
}
if(awardPersion.getObjLevel()!=null){
QueryWrapper<AnnualCompPoint> queryWrapperacp = new QueryWrapper<>();
queryWrapperacp.eq("obj_level",awardPersion.getObjLevel());
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.OK(null);
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in("annual_comp_p",acpIds);
}
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
return Result.OK(pageList);
}

@ -123,4 +123,12 @@ public class AwardPersion implements Serializable {
@ApiModelProperty(value = "推荐")
private String tj;
@TableField(exist = false)
@ApiModelProperty(value = "比赛类型")
private String comType;
@TableField(exist = false)
@ApiModelProperty(value = "项目层次")
private String objLevel;
}

@ -48,8 +48,8 @@ public class UserHomePageController {
@AutoLog(value = "学校管理员-分析报告")
@ApiOperation(value = "河南机电-学校综合报告", notes = "河南机电-学校综合报告")
@GetMapping(value = "/report4School")
public Result report4School(HttpServletRequest req) {
Map<String, Object> result = homePageService.report4School();
public Result report4School(boolean recreateFlag) {
Object result = homePageService.report4School(recreateFlag);
return Result.ok(result);
}

@ -9,6 +9,7 @@ public interface UserHomePageService {
Map<String, Object> homePage4School();
Map<String, Object> report4School();
Object report4School(boolean recreateFlag);
Map<String, Object> report4Depart(String orgCode);
}

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.ComputeUtils;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect;
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService;
@ -108,6 +109,9 @@ public class UserHomePageServiceImpl implements UserHomePageService {
final String BASE_PARENT_ID = "1693446350597038081";
@Autowired
private RedisUtil redisUtil;
@Override
public Map<String, Object> homePage4Depart(String orgCode) {
@ -358,9 +362,12 @@ public class UserHomePageServiceImpl implements UserHomePageService {
}
@Override
public Map<String, Object> report4School() {
public Object report4School(boolean recreateFlag) {
final String REPORT4SCHOOL = "report4School";
Map<String, Object> resultMap = new LinkedHashMap<>();
if (recreateFlag) {
int currentYear = DateUtils.getCurrentYear();
//当前年度
Annual annual = iAnnualService.getOne(new LambdaQueryWrapper<Annual>().eq(Annual::getAnnualName, currentYear + ""));
@ -579,8 +586,16 @@ public class UserHomePageServiceImpl implements UserHomePageService {
});
scoreList4Point.stream().sorted(Comparator.comparing(HomePageCompVo::getTotalScore)).collect(Collectors.toList());
resultMap.put("比赛学生积分况分析", scoreList4Point);
redisUtil.set(REPORT4SCHOOL, resultMap.toString());
return resultMap;
} else {
boolean hasKey = redisUtil.hasKey(REPORT4SCHOOL);
if (hasKey) {
return redisUtil.get(REPORT4SCHOOL);
} else {
return this.report4School(true);
}
}
}
private List<AnnualCompPoint> convertPoint4Depart(SysDepart depart) {
@ -616,7 +631,7 @@ public class UserHomePageServiceImpl implements UserHomePageService {
List<AnnualComp> annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>()
.eq(AnnualComp::getAnnualid, annual.getId())
.in(!ObjectUtils.isEmpty(compIds),AnnualComp::getCompid, compIds));
.in(!ObjectUtils.isEmpty(compIds), AnnualComp::getCompid, compIds));
Set<String> annualCompIds = Optional.ofNullable(annualCompList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet());
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>().in(AnnualCompPoint::getAnnualCompId, annualCompIds));

@ -191,9 +191,10 @@ export const getOrganizingCommitteeReport = () => {
}
// /user/login/homepage/report4School
// 学校综合报告
export const getComprehensiveReport = () => {
export const getComprehensiveReport = (params={}) => {
return defHttp.get({
url:'/user/login/homepage/report4School'
url:'/user/login/homepage/report4School',
params
})
}
// 部门

@ -39,6 +39,18 @@
dictCode="sys_depart,depart_name,id" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="比赛类型" name="comType">
<j-dict-select-tag placeholder="请选择比赛类型" v-model:value="queryParam.comType"
dictCode="comp_type,type_name,id" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="项目层次" name="objLevel">
<j-dict-select-tag placeholder="请选择项目层次" v-model:value="queryParam.objLevel"
dictCode="projectlevel,name,id" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">

@ -1,6 +1,7 @@
<template>
<div class="container" v-if="isLoading">
<div class="title">河南机电学院比赛综合报告<div style="margin-left: 10px;cursor: pointer;"><SvgIcon name="log" @click="log"/></div></div>
<div class="rebuild" ><div @click="Rebuild">重新生成报告</div></div>
<p class="description"
>我是比赛综述:全面落实立德树人根本任务依据CDI0工程教育理念培养德劳全面发展掌握软件工程专业所需的数学与自然科学基础知识专业基础理论知识;在企业级软件开发和工业智能软件开发方向能承担软件分析设计开发项目管理等任务具备解决复杂工程问题的能力;具有终身学习和创新创业意识国际交流能力团队合作精神等良好案养能适应产业与社会变革的国际化应用型人才<br />本专业毕业生经过五年左右的实际工作能够达到以下目标:</p
>
@ -173,6 +174,14 @@
}
getComprehensiveReportEvent()
const Rebuild = async () => {
isLoading.value = false
const res = await getComprehensiveReport({recreateFlag:true})
data.value = res
console.log(res);
data12.value = JSON.stringify(res.学生能力平均值)
isLoading.value = true
}
const activeKey = ref('1');
var indicator = [
{
@ -307,6 +316,13 @@
align-items: center;
justify-content: center;
}
.rebuild{
display: flex;
justify-content: center;
div{
cursor: pointer;
}
}
.description {
text-indent: 2em;
margin: 30px 0;

Loading…
Cancel
Save