综合素质评价

This commit is contained in:
MDSMO
2025-08-29 19:47:15 +08:00
parent 896aea2b62
commit 20385e3084
6 changed files with 757 additions and 0 deletions

View File

@@ -0,0 +1,144 @@
package com.srs.comprehensive.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.srs.common.annotation.Log;
import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.enums.BusinessType;
import com.srs.comprehensive.domain.TeacherEvaluationStatus;
import com.srs.comprehensive.service.ITeacherEvaluationStatusService;
import com.srs.common.utils.poi.ExcelUtil;
import com.srs.common.core.page.TableDataInfo;
/**
* 辅导员综合评价状态Controller
*
* @author srs
* @date 2024-01-20
*/
@RestController
@RequestMapping("/comprehensive/teacherEvaluationStatus")
public class TeacherEvaluationStatusController extends BaseController {
@Autowired
private ITeacherEvaluationStatusService teacherEvaluationStatusService;
/**
* 查询辅导员综合评价状态列表
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:list')")
@GetMapping("/list")
public TableDataInfo list(TeacherEvaluationStatus teacherEvaluationStatus) {
startPage();
List<TeacherEvaluationStatus> list = teacherEvaluationStatusService.selectTeacherEvaluationStatusList(teacherEvaluationStatus);
return getDataTable(list);
}
/**
* 导出辅导员综合评价状态列表
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:export')")
@Log(title = "辅导员综合评价状态", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TeacherEvaluationStatus teacherEvaluationStatus) {
List<TeacherEvaluationStatus> list = teacherEvaluationStatusService.selectTeacherEvaluationStatusList(teacherEvaluationStatus);
ExcelUtil<TeacherEvaluationStatus> util = new ExcelUtil<TeacherEvaluationStatus>(TeacherEvaluationStatus.class);
util.exportExcel(response, list, "辅导员综合评价状态数据");
}
/**
* 获取辅导员综合评价状态详细信息
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(teacherEvaluationStatusService.selectTeacherEvaluationStatusById(id));
}
/**
* 新增辅导员综合评价状态
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:add')")
@Log(title = "辅导员综合评价状态", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TeacherEvaluationStatus teacherEvaluationStatus) {
return toAjax(teacherEvaluationStatusService.insertTeacherEvaluationStatus(teacherEvaluationStatus));
}
/**
* 修改辅导员综合评价状态
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:edit')")
@Log(title = "辅导员综合评价状态", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TeacherEvaluationStatus teacherEvaluationStatus) {
return toAjax(teacherEvaluationStatusService.updateTeacherEvaluationStatus(teacherEvaluationStatus));
}
/**
* 删除辅导员综合评价状态
*/
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:remove')")
@Log(title = "辅导员综合评价状态", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(teacherEvaluationStatusService.deleteTeacherEvaluationStatusByIds(ids));
}
/**
* 查询辅导员待办事项数量
*/
@GetMapping("/todoCount")
public AjaxResult getTodoCount(Long teacherId, Long stuYearId) {
Integer count = teacherEvaluationStatusService.selectTodoCountByTeacherAndYear(teacherId, stuYearId);
return success(count);
}
/**
* 查询综合评价成绩导入状态
*/
@GetMapping("/scoreImportStatus")
public AjaxResult getScoreImportStatus(Long teacherId, Long stuYearId) {
Boolean status = teacherEvaluationStatusService.selectScoreImportStatusByTeacherAndYear(teacherId, stuYearId);
return success(status);
}
/**
* 获取所有辅导员基本信息
*/
@GetMapping("/allTeachers")
public AjaxResult getAllTeachers() {
List<TeacherEvaluationStatus> list = teacherEvaluationStatusService.selectAllTeachers();
return success(list);
}
/**
* 根据条件查询辅导员综合评价状态
*/
@GetMapping("/condition")
public TableDataInfo getByCondition(Long deptId, String teacherName, String employeeId, Long stuYearId) {
startPage();
List<TeacherEvaluationStatus> list = teacherEvaluationStatusService.selectTeacherEvaluationStatusByCondition(
deptId, teacherName, employeeId, stuYearId);
return getDataTable(list);
}
/**
* 获取学院列表
*/
@GetMapping("/deptList")
public AjaxResult getDeptList() {
List<java.util.Map<String, Object>> list = teacherEvaluationStatusService.selectDeptNameList();
return success(list);
}
}

View File

@@ -0,0 +1,180 @@
package com.srs.comprehensive.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.srs.common.annotation.Excel;
import com.srs.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 辅导员综合评价状态对象 teacher_evaluation_status
*
* @author srs
* @date 2024-01-20
*/
@Data
@TableName("teacher_evaluation_status")
public class TeacherEvaluationStatus extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 辅导员ID */
@Excel(name = "辅导员ID")
private Long teacherId;
/** 辅导员姓名 */
@Excel(name = "辅导员姓名")
@TableField(exist = false)
private String teacherName;
/** 工号 */
@Excel(name = "工号")
@TableField(exist = false)
private String employeeId;
/** 学院ID */
@Excel(name = "学院ID")
private Long deptId;
/** 学院名称 */
@Excel(name = "学院名称")
@TableField(exist = false)
private String deptName;
/** 学年ID */
@Excel(name = "学年ID")
private Long stuYearId;
/** 学年名称 */
@Excel(name = "学年名称")
@TableField(exist = false)
private String stuYearName;
/** 是否完成综合测评 */
@Excel(name = "是否完成综合测评")
private Boolean isCompleted;
/** 待办事项数量 */
@Excel(name = "待办事项数量")
@TableField(exist = false)
private Integer todoCount;
/** 成绩是否已导入 */
@Excel(name = "成绩是否已导入")
@TableField(exist = false)
private Boolean scoreImported;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/** 最后更新时间 */
@Excel(name = "最后更新时间")
private String lastUpdateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTeacherId() {
return teacherId;
}
public void setTeacherId(Long teacherId) {
this.teacherId = teacherId;
}
public String getTeacherName() {
return teacherName;
}
public void setTeacherName(String teacherName) {
this.teacherName = teacherName;
}
public String getEmployeeId() {
return employeeId;
}
public void setEmployeeId(String employeeId) {
this.employeeId = employeeId;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public Long getStuYearId() {
return stuYearId;
}
public void setStuYearId(Long stuYearId) {
this.stuYearId = stuYearId;
}
public String getStuYearName() {
return stuYearName;
}
public void setStuYearName(String stuYearName) {
this.stuYearName = stuYearName;
}
public Boolean getIsCompleted() {
return isCompleted;
}
public void setIsCompleted(Boolean isCompleted) {
this.isCompleted = isCompleted;
}
public Integer getTodoCount() {
return todoCount;
}
public void setTodoCount(Integer todoCount) {
this.todoCount = todoCount;
}
public Boolean getScoreImported() {
return scoreImported;
}
public void setScoreImported(Boolean scoreImported) {
this.scoreImported = scoreImported;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getLastUpdateTime() {
return lastUpdateTime;
}
public void setLastUpdateTime(String lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
}

View File

@@ -0,0 +1,92 @@
package com.srs.comprehensive.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.TeacherEvaluationStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 辅导员综合评价状态Mapper接口
*
* @author srs
* @date 2024-01-20
*/
@Mapper
public interface TeacherEvaluationStatusMapper extends BaseMapper<TeacherEvaluationStatus> {
/**
* 查询辅导员综合评价状态列表
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 辅导员综合评价状态集合
*/
List<TeacherEvaluationStatus> selectTeacherEvaluationStatusList(TeacherEvaluationStatus teacherEvaluationStatus);
/**
* 查询辅导员待办事项数量
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 待办事项数量
*/
@Select("SELECT COUNT(*) FROM cph_audit_details cad " +
"LEFT JOIN cph_teacher ct ON cad.reviewed_by_id = ct.teacher_id " +
"LEFT JOIN srs_stu_year ssy ON ssy.id = #{stuYearId} " +
"WHERE ct.teacher_id = #{teacherId} " +
"AND cad.status_code IN (1, 2) " +
"AND cad.create_time >= ssy.start_time " +
"AND cad.create_time <= ssy.end_time")
Integer selectTodoCountByTeacherAndYear(@Param("teacherId") Long teacherId, @Param("stuYearId") Long stuYearId);
/**
* 查询综合评价成绩导入状态
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 是否已导入成绩
*/
@Select("SELECT COUNT(*) > 0 FROM srs_ce_score scs " +
"LEFT JOIN srs_student ss ON scs.stu_id = ss.stu_id " +
"LEFT JOIN srs_class sc ON ss.class_id = sc.class_id " +
"LEFT JOIN cph_teacher ct ON sc.teacher_id = ct.teacher_id " +
"WHERE ct.teacher_id = #{teacherId} " +
"AND scs.stu_year_id = #{stuYearId}")
Boolean selectScoreImportStatusByTeacherAndYear(@Param("teacherId") Long teacherId, @Param("stuYearId") Long stuYearId);
/**
* 获取所有辅导员基本信息
*
* @return 辅导员列表
*/
@Select("SELECT ct.teacher_id, ct.name as teacher_name, ct.employee_id, " +
"ct.dept_id, sd.dept_name " +
"FROM cph_teacher ct " +
"LEFT JOIN sys_dept sd ON ct.dept_id = sd.dept_id ")
List<TeacherEvaluationStatus> selectAllTeachers();
/**
* 根据条件查询辅导员综合评价状态
*
* @param deptId 学院ID
* @param teacherName 辅导员姓名
* @param employeeId 工号
* @param stuYearId 学年ID
* @return 辅导员综合评价状态列表
*/
List<TeacherEvaluationStatus> selectTeacherEvaluationStatusByCondition(
@Param("deptId") Long deptId,
@Param("teacherName") String teacherName,
@Param("employeeId") String employeeId,
@Param("stuYearId") Long stuYearId
);
/**
* 查询学院名称列表
*
* @return 学院列表
*/
List<java.util.Map<String, Object>> selectDeptNameList();
}

View File

@@ -0,0 +1,104 @@
package com.srs.comprehensive.service;
import com.srs.comprehensive.domain.TeacherEvaluationStatus;
import java.util.List;
/**
* 辅导员综合评价状态Service接口
*
* @author srs
* @date 2024-01-20
*/
public interface ITeacherEvaluationStatusService {
/**
* 查询辅导员综合评价状态
*
* @param id 辅导员综合评价状态主键
* @return 辅导员综合评价状态
*/
public TeacherEvaluationStatus selectTeacherEvaluationStatusById(Long id);
/**
* 查询辅导员综合评价状态列表
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 辅导员综合评价状态集合
*/
public List<TeacherEvaluationStatus> selectTeacherEvaluationStatusList(TeacherEvaluationStatus teacherEvaluationStatus);
/**
* 新增辅导员综合评价状态
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 结果
*/
public int insertTeacherEvaluationStatus(TeacherEvaluationStatus teacherEvaluationStatus);
/**
* 修改辅导员综合评价状态
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 结果
*/
public int updateTeacherEvaluationStatus(TeacherEvaluationStatus teacherEvaluationStatus);
/**
* 批量删除辅导员综合评价状态
*
* @param ids 需要删除的辅导员综合评价状态主键集合
* @return 结果
*/
public int deleteTeacherEvaluationStatusByIds(Long[] ids);
/**
* 删除辅导员综合评价状态信息
*
* @param id 辅导员综合评价状态主键
* @return 结果
*/
public int deleteTeacherEvaluationStatusById(Long id);
/**
* 查询辅导员待办事项数量
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 待办事项数量
*/
public Integer selectTodoCountByTeacherAndYear(Long teacherId, Long stuYearId);
/**
* 查询综合评价成绩导入状态
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 是否已导入成绩
*/
public Boolean selectScoreImportStatusByTeacherAndYear(Long teacherId, Long stuYearId);
/**
* 获取所有辅导员基本信息
*
* @return 辅导员列表
*/
public List<TeacherEvaluationStatus> selectAllTeachers();
/**
* 根据条件查询辅导员综合评价状态
*
* @param deptId 学院ID
* @param teacherName 辅导员姓名
* @param employeeId 工号
* @param stuYearId 学年ID
* @return 辅导员综合评价状态列表
*/
public List<TeacherEvaluationStatus> selectTeacherEvaluationStatusByCondition(
Long deptId, String teacherName, String employeeId, Long stuYearId);
/**
* 查询学院名称列表
*
* @return 学院列表
*/
public List<java.util.Map<String, Object>> selectDeptNameList();
}

View File

@@ -0,0 +1,147 @@
package com.srs.comprehensive.service.impl;
import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.TeacherEvaluationStatusMapper;
import com.srs.comprehensive.domain.TeacherEvaluationStatus;
import com.srs.comprehensive.service.ITeacherEvaluationStatusService;
/**
* 辅导员综合评价状态Service业务层处理
*
* @author srs
* @date 2024-01-20
*/
@Service
public class TeacherEvaluationStatusServiceImpl implements ITeacherEvaluationStatusService {
@Autowired
private TeacherEvaluationStatusMapper teacherEvaluationStatusMapper;
/**
* 查询辅导员综合评价状态
*
* @param id 辅导员综合评价状态主键
* @return 辅导员综合评价状态
*/
@Override
public TeacherEvaluationStatus selectTeacherEvaluationStatusById(Long id) {
return teacherEvaluationStatusMapper.selectById(id);
}
/**
* 查询辅导员综合评价状态列表
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 辅导员综合评价状态
*/
@Override
public List<TeacherEvaluationStatus> selectTeacherEvaluationStatusList(TeacherEvaluationStatus teacherEvaluationStatus) {
return teacherEvaluationStatusMapper.selectTeacherEvaluationStatusList(teacherEvaluationStatus);
}
/**
* 新增辅导员综合评价状态
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 结果
*/
@Override
public int insertTeacherEvaluationStatus(TeacherEvaluationStatus teacherEvaluationStatus) {
return teacherEvaluationStatusMapper.insert(teacherEvaluationStatus);
}
/**
* 修改辅导员综合评价状态
*
* @param teacherEvaluationStatus 辅导员综合评价状态
* @return 结果
*/
@Override
public int updateTeacherEvaluationStatus(TeacherEvaluationStatus teacherEvaluationStatus) {
return teacherEvaluationStatusMapper.updateById(teacherEvaluationStatus);
}
/**
* 批量删除辅导员综合评价状态
*
* @param ids 需要删除的辅导员综合评价状态主键
* @return 结果
*/
@Override
public int deleteTeacherEvaluationStatusByIds(Long[] ids) {
return teacherEvaluationStatusMapper.deleteBatchIds(Arrays.asList(ids));
}
/**
* 删除辅导员综合评价状态信息
*
* @param id 辅导员综合评价状态主键
* @return 结果
*/
@Override
public int deleteTeacherEvaluationStatusById(Long id) {
return teacherEvaluationStatusMapper.deleteById(id);
}
/**
* 查询辅导员待办事项数量
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 待办事项数量
*/
@Override
public Integer selectTodoCountByTeacherAndYear(Long teacherId, Long stuYearId) {
return teacherEvaluationStatusMapper.selectTodoCountByTeacherAndYear(teacherId, stuYearId);
}
/**
* 查询综合评价成绩导入状态
*
* @param teacherId 辅导员ID
* @param stuYearId 学年ID
* @return 是否已导入成绩
*/
@Override
public Boolean selectScoreImportStatusByTeacherAndYear(Long teacherId, Long stuYearId) {
return teacherEvaluationStatusMapper.selectScoreImportStatusByTeacherAndYear(teacherId, stuYearId);
}
/**
* 获取所有辅导员基本信息
*
* @return 辅导员列表
*/
@Override
public List<TeacherEvaluationStatus> selectAllTeachers() {
return teacherEvaluationStatusMapper.selectAllTeachers();
}
/**
* 根据条件查询辅导员综合评价状态
*
* @param deptId 学院ID
* @param teacherName 辅导员姓名
* @param employeeId 工号
* @param stuYearId 学年ID
* @return 辅导员综合评价状态列表
*/
@Override
public List<TeacherEvaluationStatus> selectTeacherEvaluationStatusByCondition(
Long deptId, String teacherName, String employeeId, Long stuYearId) {
return teacherEvaluationStatusMapper.selectTeacherEvaluationStatusByCondition(
deptId, teacherName, employeeId, stuYearId);
}
/**
* 查询学院名称列表
*
* @return 学院列表
*/
@Override
public List<java.util.Map<String, Object>> selectDeptNameList() {
return teacherEvaluationStatusMapper.selectDeptNameList();
}
}

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.TeacherEvaluationStatusMapper">
<resultMap type="TeacherEvaluationStatus" id="TeacherEvaluationStatusResult">
<result property="id" column="id" />
<result property="teacherId" column="teacher_id" />
<result property="teacherName" column="teacher_name" />
<result property="employeeId" column="employee_id" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="stuYearId" column="stu_year_id" />
<result property="stuYearName" column="stu_year_name" />
<result property="isCompleted" column="is_completed" />
<result property="todoCount" column="todo_count" />
<result property="scoreImported" column="score_imported" />
<result property="remarks" column="remarks" />
<result property="lastUpdateTime" column="last_update_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTeacherEvaluationStatusVo">
select t.teacher_id, t.name as teacher_name, t.employee_id,
t.dept_id, d.dept_name,
y.id as stu_year_id, y.stu_year_name,
CASE
WHEN (COALESCE(todo_count.cnt, 0) = 0) AND (COALESCE(score_count.cnt, 0) > 0)
THEN 1
ELSE 0
END as is_completed,
COALESCE(todo_count.cnt, 0) as todo_count,
CASE WHEN COALESCE(score_count.cnt, 0) > 0 THEN 1 ELSE 0 END as score_imported
from cph_teacher t
left join sys_dept d on t.dept_id = d.dept_id
left join srs_stu_year y on 1=1
left join (
select c.teacher_id, COUNT(*) as cnt, ci.stu_year_id as year_id
from cph_audit_details cad
inner join cph_iam ci on cad.project_id = ci.id
inner join srs_student s on cad.submitter_id = s.stu_id
inner join srs_class c on s.class_id = c.class_id
where cad.status_code in (1, 2)
group by c.teacher_id, ci.stu_year_id
) todo_count on t.teacher_id = todo_count.teacher_id and y.id = todo_count.year_id
left join (
select c.teacher_id, sc.stu_year_id, COUNT(*) as cnt
from srs_class c
inner join srs_student s on c.class_id = s.class_id
inner join srs_ce_score sc on s.stu_id = sc.stu_id
group by c.teacher_id, sc.stu_year_id
) score_count on t.teacher_id = score_count.teacher_id and y.id = score_count.stu_year_id
</sql>
<select id="selectTeacherEvaluationStatusList" parameterType="TeacherEvaluationStatus" resultMap="TeacherEvaluationStatusResult">
<include refid="selectTeacherEvaluationStatusVo"/>
<where>
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
<if test="teacherName != null and teacherName != ''"> and t.name like concat('%', #{teacherName}, '%')</if>
<if test="employeeId != null and employeeId != ''"> and t.employee_id like concat('%', #{employeeId}, '%')</if>
<if test="stuYearId != null "> and y.id = #{stuYearId}</if>
</where>
order by d.dept_name, t.name, y.stu_year_name desc
</select>
<select id="selectTeacherEvaluationStatusByCondition" resultMap="TeacherEvaluationStatusResult">
<include refid="selectTeacherEvaluationStatusVo"/>
<where>
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
<if test="teacherName != null and teacherName != ''"> and t.name like concat('%', #{teacherName}, '%')</if>
<if test="employeeId != null and employeeId != ''"> and t.employee_id like concat('%', #{employeeId}, '%')</if>
<if test="stuYearId != null "> and y.id = #{stuYearId}</if>
</where>
order by d.dept_name, t.name, y.stu_year_name desc
</select>
<!-- 查询学院名称列表,用于下拉框 - 只查询学院级别的部门 -->
<select id="selectDeptNameList" resultType="java.util.Map">
select distinct d.dept_id as value, d.dept_name as label
from sys_dept d
inner join cph_teacher t on d.dept_id = t.dept_id
where d.del_flag = '0' and d.status = '0'
order by d.order_num
</select>
</mapper>