辅导员管理-添加请销假制度分数字段及通知任务材料功能

- 在SysTeacherKpiFillingBusinessWork实体类中添加stuLeaveRequestScoring字段
- 更新数据库映射文件中的查询、插入和更新语句以支持新字段
- 创建SysTeacherStuNoticeMaterials实体类用于通知任务材料管理
- 创建SysTeacherStuTestMaterials实体类用于职业测评材料管理
- 实现相关服务接口及控制器以支持通知任务材料的CRUD操作
- 实现相关服务接口及控制器以支持职业测评材料的CRUD操作
- 添加对应的数据访问层映射和XML配置文件
- 实现服务层业务逻辑及数据安全控制
This commit is contained in:
2026-03-16 16:56:54 +08:00
parent 3500b26ba6
commit e43637894b
14 changed files with 1097 additions and 6 deletions

View File

@@ -0,0 +1,115 @@
package com.srs.web.controller.teacher;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.srs.common.annotation.RepeatSubmit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import org.springframework.security.access.prepost.PreAuthorize;
import com.srs.teacher.domain.SysTeacherStuNoticeMaterials;
import com.srs.teacher.service.ISysTeacherStuNoticeMaterialsService;
import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.utils.poi.ExcelUtil;
import com.srs.common.enums.BusinessType;
import com.srs.common.annotation.Log;
import com.srs.common.core.page.TableDataInfo;
/**
* 通知任务材料Controller
*
* @author chc
* @date 2024-06-06
*/
@RestController
@RequestMapping("/teacher/stuNoticeMaterials")
@Api(value = "通知任务材料管理", tags = "通知任务材料管理")
public class SysTeacherStuNoticeMaterialsController extends BaseController {
@Autowired
private ISysTeacherStuNoticeMaterialsService sysTeacherStuNoticeMaterialsService;
/**
* 查询通知任务材料列表
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:list')")
@GetMapping("/list")
@ApiOperation("查询通知任务材料列表")
public TableDataInfo list(SysTeacherStuNoticeMaterials sysTeacherStuNoticeMaterials) {
startPage();
List<SysTeacherStuNoticeMaterials> list = sysTeacherStuNoticeMaterialsService.selectSysTeacherStuNoticeMaterialsList(sysTeacherStuNoticeMaterials);
return getDataTable(list);
}
/**
* 根据辅导员名称、年份 月份 查询详细信息
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:list')")
@GetMapping("/getByFdyNameAndYearAndMonth")
@ApiOperation("根据名称年月查询通知任务材料列表")
public TableDataInfo getByFdyNameAndYearAndMonth(@RequestParam String fdyName, @RequestParam String fillingYear, @RequestParam String fillingMonth) {
startPage();
List<SysTeacherStuNoticeMaterials> list = sysTeacherStuNoticeMaterialsService.selectSysTeacherStuNoticeMaterialsByFdyName(fdyName, fillingYear, fillingMonth);
return getDataTable(list);
}
/**
* 导出通知任务材料列表
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:export')")
@Log(title = "通知任务材料", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("导出通知任务材料列表")
public void export(HttpServletResponse response, SysTeacherStuNoticeMaterials sysTeacherStuNoticeMaterials) {
List<SysTeacherStuNoticeMaterials> list = sysTeacherStuNoticeMaterialsService.selectSysTeacherStuNoticeMaterialsList(sysTeacherStuNoticeMaterials);
ExcelUtil<SysTeacherStuNoticeMaterials> util = new ExcelUtil<SysTeacherStuNoticeMaterials>(SysTeacherStuNoticeMaterials.class);
util.exportExcel(response, list, "通知任务材料数据");
}
/**
* 获取通知任务材料详细信息
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取通知任务材料详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(sysTeacherStuNoticeMaterialsService.selectSysTeacherStuNoticeMaterialsById(id));
}
/**
* 新增通知任务材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:add')")
@Log(title = "通知任务材料", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增通知任务材料")
@RepeatSubmit(interval = 1000, message = "请求过于频繁")
public AjaxResult add(@RequestBody SysTeacherStuNoticeMaterials sysTeacherStuNoticeMaterials) {
return toAjax(sysTeacherStuNoticeMaterialsService.insertSysTeacherStuNoticeMaterials(sysTeacherStuNoticeMaterials));
}
/**
* 修改通知任务材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:edit')")
@Log(title = "通知任务材料", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ApiOperation("修改通知任务材料")
@RepeatSubmit(interval = 1000, message = "请求过于频繁")
public AjaxResult edit(@RequestBody SysTeacherStuNoticeMaterials sysTeacherStuNoticeMaterials) {
return toAjax(sysTeacherStuNoticeMaterialsService.updateSysTeacherStuNoticeMaterials(sysTeacherStuNoticeMaterials));
}
/**
* 删除通知任务材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:remove')")
@Log(title = "通知任务材料", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
@ApiOperation("删除通知任务材料")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(sysTeacherStuNoticeMaterialsService.deleteSysTeacherStuNoticeMaterialsByIds(ids));
}
}

View File

@@ -0,0 +1,115 @@
package com.srs.web.controller.teacher;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.srs.common.annotation.RepeatSubmit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import org.springframework.security.access.prepost.PreAuthorize;
import com.srs.teacher.domain.SysTeacherStuTestMaterials;
import com.srs.teacher.service.ISysTeacherStuTestMaterialsService;
import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.utils.poi.ExcelUtil;
import com.srs.common.enums.BusinessType;
import com.srs.common.annotation.Log;
import com.srs.common.core.page.TableDataInfo;
/**
* 职业测评材料Controller
*
* @author chc
* @date 2024-06-06
*/
@RestController
@RequestMapping("/teacher/stuTestMaterials")
@Api(value = "职业测评材料管理", tags = "职业测评材料管理")
public class SysTeacherStuTestMaterialsController extends BaseController {
@Autowired
private ISysTeacherStuTestMaterialsService sysTeacherStuTestMaterialsService;
/**
* 查询职业测评材料列表
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:list')")
@GetMapping("/list")
@ApiOperation("查询职业测评材料列表")
public TableDataInfo list(SysTeacherStuTestMaterials sysTeacherStuTestMaterials) {
startPage();
List<SysTeacherStuTestMaterials> list = sysTeacherStuTestMaterialsService.selectSysTeacherStuTestMaterialsList(sysTeacherStuTestMaterials);
return getDataTable(list);
}
/**
* 根据辅导员名称、年份 月份 查询详细信息
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:list')")
@GetMapping("/getByFdyNameAndYearAndMonth")
@ApiOperation("根据名称年月查询职业测评材料列表")
public TableDataInfo getByFdyNameAndYearAndMonth(@RequestParam String fdyName, @RequestParam String fillingYear, @RequestParam String fillingMonth) {
startPage();
List<SysTeacherStuTestMaterials> list = sysTeacherStuTestMaterialsService.selectSysTeacherStuTestMaterialsByFdyName(fdyName, fillingYear, fillingMonth);
return getDataTable(list);
}
/**
* 导出职业测评材料列表
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:export')")
@Log(title = "职业测评材料", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("导出职业测评材料列表")
public void export(HttpServletResponse response, SysTeacherStuTestMaterials sysTeacherStuTestMaterials) {
List<SysTeacherStuTestMaterials> list = sysTeacherStuTestMaterialsService.selectSysTeacherStuTestMaterialsList(sysTeacherStuTestMaterials);
ExcelUtil<SysTeacherStuTestMaterials> util = new ExcelUtil<SysTeacherStuTestMaterials>(SysTeacherStuTestMaterials.class);
util.exportExcel(response, list, "职业测评材料数据");
}
/**
* 获取职业测评材料详细信息
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取职业测评材料详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(sysTeacherStuTestMaterialsService.selectSysTeacherStuTestMaterialsById(id));
}
/**
* 新增职业测评材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:add')")
@Log(title = "职业测评材料", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增职业测评材料")
@RepeatSubmit(interval = 1000, message = "请求过于频繁")
public AjaxResult add(@RequestBody SysTeacherStuTestMaterials sysTeacherStuTestMaterials) {
return toAjax(sysTeacherStuTestMaterialsService.insertSysTeacherStuTestMaterials(sysTeacherStuTestMaterials));
}
/**
* 修改职业测评材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:edit')")
@Log(title = "职业测评材料", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ApiOperation("修改职业测评材料")
@RepeatSubmit(interval = 1000, message = "请求过于频繁")
public AjaxResult edit(@RequestBody SysTeacherStuTestMaterials sysTeacherStuTestMaterials) {
return toAjax(sysTeacherStuTestMaterialsService.updateSysTeacherStuTestMaterials(sysTeacherStuTestMaterials));
}
/**
* 删除职业测评材料
*/
@PreAuthorize("@ss.hasPermi('teacher:stuActivityMaterials:remove')")
@Log(title = "职业测评材料", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
@ApiOperation("删除职业测评材料")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(sysTeacherStuTestMaterialsService.deleteSysTeacherStuTestMaterialsByIds(ids));
}
}