package com.ambow.lyu.modules.eval.service.impl;
import com.ambow.lyu.common.exception.TeException;
import com.ambow.lyu.common.utils.PageUtils;
import com.ambow.lyu.common.utils.Query;
import com.ambow.lyu.modules.eval.dao.EvalTaskDao;
import com.ambow.lyu.modules.eval.entity.*;
import com.ambow.lyu.modules.eval.service.*;
import com.ambow.lyu.modules.sys.entity.SysDeptEntity;
import com.ambow.lyu.modules.sys.entity.SysUserEntity;
import com.ambow.lyu.modules.sys.service.SysDeptService;
import com.ambow.lyu.modules.sys.service.SysUserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.util.*;
@Service("evalTaskService")
public class EvalTaskServiceImpl extends ServiceImpl<EvalTaskDao, EvalTaskEntity> implements EvalTaskService {
@Autowired
private SysDeptService sysDeptService;
@Autowired
private SysUserService sysUserService;
@Autowired
private StudentEvalTaskService studentEvalTaskService;
@Autowired
private ColleagueEvalTaskItemService colleagueEvalTaskItemService;
@Autowired
private ColleagueEvalTaskService colleagueEvalTaskService;
@Autowired
private InspectorEvalTaskItemService inspectorEvalTaskItemService;
@Autowired
private InspectorEvalTaskService inspectorEvalTaskService;
@Autowired
private OtherEvalTaskService otherEvalTaskService;
@Autowired
private StudentEvalRecordService studentEvalRecordService;
@Autowired
private ColleagueEvalRecordService colleagueEvalRecordService;
@Autowired
private InspectorEvalRecordService inspectorEvalRecordService;
@Autowired
private OtherEvalRecordService otherEvalRecordService;
@Autowired
private EvalResultService evalResultService;
@Override
public PageUtils queryPage(Map<String, Object> params) {
Integer status = (Integer) params.get("task_status");
IPage<EvalTaskEntity> page = super.page(
new Query<EvalTaskEntity>().getPage(params),
new QueryWrapper<EvalTaskEntity>().eq(status != null,"status",status)
);
for (EvalTaskEntity evalTaskEntity : page.getRecords()) {
SysDeptEntity sysDeptEntity = sysDeptService.getById(evalTaskEntity.getDeptId());
evalTaskEntity.setDeptName(sysDeptEntity.getName());
}
return new PageUtils(page);
}
@Override
public void generateResult(Long taskId) {
EvalTaskEntity evalTask = super.getById(taskId);
//查找参评人数
int headcount = sysUserService.countByDept(evalTask.getDeptId());
//查看评价结果进度,如果没有全部完成则不能生成评价结果
//查询学生评价进度
StudentEvalTaskEntity studentEvalTaskEntity = studentEvalTaskService.getOne(
new QueryWrapper<StudentEvalTaskEntity>().eq("task_id", taskId));
int studentCount = studentEvalRecordService.count(
new QueryWrapper<StudentEvalRecordEntity>().eq("sub_task_id", studentEvalTaskEntity.getId()));
if(studentCount!=headcount){
throw new TeException("学生评价任务未完成,不能生成评价结果");
}
//查询同行评价进度
List<ColleagueEvalTaskEntity> colleagueEvalTasks = colleagueEvalTaskService.list(
new QueryWrapper<ColleagueEvalTaskEntity>().eq("task_id", taskId));
for (ColleagueEvalTaskEntity colleagueEvalTask : colleagueEvalTasks) {
//查询同行评价进度
int colleagueCount = colleagueEvalRecordService.count(
new QueryWrapper<ColleagueEvalRecordEntity>().eq("sub_task_id", colleagueEvalTask.getId()));
int colleagueHeadCount = sysUserService.countByDept(colleagueEvalTask.getDeptId());
if(colleagueCount!=colleagueHeadCount){
throw new TeException("同行评价任务未完成,不能生成评价结果");
}
}
//查询督导评价进度
List<InspectorEvalTaskEntity> inspectorEvalTasks = inspectorEvalTaskService.list(
new QueryWrapper<InspectorEvalTaskEntity>().eq("task_id", taskId));
for (InspectorEvalTaskEntity inspectorEvalTask : inspectorEvalTasks) {
int inspectorCount = inspectorEvalRecordService.count(
new QueryWrapper<InspectorEvalRecordEntity>().eq("sub_task_id", inspectorEvalTask.getId()));
if(inspectorCount!=headcount){
throw new TeException("督导评价任务未完成,不能生成评价结果");
}
}
//查询其他评价进度
OtherEvalTaskEntity otherEvalTaskEntity = otherEvalTaskService.getOne(
new QueryWrapper<OtherEvalTaskEntity>().eq("task_id", taskId));
int otherCount = otherEvalRecordService.count(
new QueryWrapper<OtherEvalRecordEntity>().eq("sub_task_id", otherEvalTaskEntity.getId()));
if(otherCount!=headcount){
throw new TeException("其他评价任务未完成,不能生成评价结果");
}
//Map<userId,评价结果>
Map<Long,EvalResultEntity> resultEntityMap = new HashMap<>(headcount);
//设置学生评价结果
List<StudentEvalRecordEntity> studentEvalRecordEntityList = studentEvalRecordService.list(
new QueryWrapper<StudentEvalRecordEntity>().eq("sub_task_id", studentEvalTaskEntity.getId()));
for(StudentEvalRecordEntity recordEntity : studentEvalRecordEntityList){
SysUserEntity userEntity = sysUserService.getById(recordEntity.getUserId());
SysDeptEntity deptEntity = sysDeptService.getById(userEntity.getDeptId());
EvalResultEntity evalResultEntity = new EvalResultEntity();
evalResultEntity.setTaskId(taskId);
evalResultEntity.setUsername(userEntity.getUsername());
evalResultEntity.setName(userEntity.getName());
evalResultEntity.setDeptName(deptEntity.getName());
evalResultEntity.setStudentEvalScore(recordEntity.getScore());
resultEntityMap.put(recordEntity.getUserId(),evalResultEntity);
}
//设置同行评价结果
for (ColleagueEvalTaskEntity colleagueEvalTask : colleagueEvalTasks) {
List<ColleagueEvalRecordEntity> colleagueEvalRecordEntityList = colleagueEvalRecordService.list(
new QueryWrapper<ColleagueEvalRecordEntity>().eq("sub_task_id", colleagueEvalTask.getId()));
for(ColleagueEvalRecordEntity recordEntity : colleagueEvalRecordEntityList){
EvalResultEntity evalResultEntity = resultEntityMap.get(recordEntity.getUserId());
evalResultEntity.setColleagueEvalScore(recordEntity.getScore());
evalResultEntity.setColleagueEvalDetail(recordEntity.getDetail());
}
}
//设置督导评价结果
for (InspectorEvalTaskEntity inspectorEvalTask : inspectorEvalTasks) {
List<InspectorEvalRecordEntity> inspectorEvalRecordEntityList = inspectorEvalRecordService.list(
new QueryWrapper<InspectorEvalRecordEntity>().eq("sub_task_id", inspectorEvalTask.getId())
);
for(InspectorEvalRecordEntity recordEntity : inspectorEvalRecordEntityList){
EvalResultEntity evalResultEntity = resultEntityMap.get(recordEntity.getUserId());
if(evalResultEntity.getInspectorEvalScore() != null){
Double score = (recordEntity.getScore() + evalResultEntity.getInspectorEvalScore()) / 2;
evalResultEntity.setInspecto
没有合适的资源?快使用搜索试试~ 我知道了~
基于Java SpringBoot框架的Vue+Layui+Bootstrap教师教学质量评价系统设计源码
共680个文件
java:167个
js:140个
png:112个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 39 浏览量
2024-10-04
14:41:45
上传
评论
收藏 21.97MB ZIP 举报
温馨提示
该系统是一款基于Java SpringBoot框架,融合Vue、Layui和Bootstrap前端技术的教师教学质量评价系统源码。项目包含682个文件,涵盖167个Java源文件、140个JavaScript文件、77个CSS文件、112个PNG图片文件、89个GIF图片文件以及26个HTML文件。系统依据《教师教学质量评价实施方案》设计,支持教师教学质量的全面评估。技术栈包括Java、Spring、SpringBoot、Mybatis、Mybatis-plus、Shiro,以及ES6、Vue、Layui和Bootstrap等。
资源推荐
资源详情
资源评论
收起资源包目录
基于Java SpringBoot框架的Vue+Layui+Bootstrap教师教学质量评价系统设计源码 (680个子文件)
bootstrap.min.css 118KB
AdminLTE.min.css 88KB
screen.css 43KB
print.css 41KB
all-skins.min.css 40KB
font-awesome.min.css 30KB
layui.css 27KB
_all.css 20KB
ui.jqgrid-bootstrap.css 18KB
ui.jqgrid.css 17KB
_all.css 14KB
layer.css 14KB
_all.css 14KB
layer.css 14KB
_all.css 12KB
laydate.css 8KB
awesome.css 8KB
fileinput.min.css 8KB
index1.css 6KB
metroStyle.css 6KB
zTreeStyle.css 6KB
bootstrap-table.min.css 6KB
layer.css 5KB
style.css 3KB
style.css 3KB
theme.min.css 3KB
theme.min.css 3KB
theme.min.css 3KB
purple.css 2KB
yellow.css 2KB
orange.css 2KB
green.css 2KB
pink.css 2KB
blue.css 2KB
grey.css 2KB
aero.css 2KB
red.css 2KB
main.css 2KB
line.css 2KB
fileinput-rtl.min.css 2KB
icheck.css 2KB
purple.css 1KB
orange.css 1KB
yellow.css 1KB
purple.css 1KB
orange.css 1KB
yellow.css 1KB
green.css 1KB
green.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
red.css 1KB
red.css 1KB
minimal.css 1KB
polaris.css 1KB
square.css 1KB
purple.css 1KB
orange.css 1KB
yellow.css 1KB
green.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
futurico.css 1KB
red.css 1KB
flat.css 1KB
jquery.treegrid.css 1KB
code.css 1KB
reset.css 773B
ui.jqgrid-bootstrap-ui.css 662B
typography.css 0B
fontawesome-webfont.eot 162KB
iconfont.eot 51KB
glyphicons-halflings-regular.eot 20KB
59.gif 10KB
22.gif 10KB
throbber.gif 9KB
24.gif 8KB
13.gif 7KB
16.gif 7KB
39.gif 6KB
64.gif 6KB
63.gif 6KB
50.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
4.gif 6KB
zTreeStandard.gif 5KB
1.gif 5KB
42.gif 5KB
71.gif 5KB
21.gif 5KB
20.gif 5KB
共 680 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
lly202406
- 粉丝: 2520
- 资源: 5428
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功