package com.ruoyi.safety.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.safety.pojo.SafetyLearningRecord; import com.ruoyi.safety.service.SafetyLearningRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * 安环管理-员工学习记录接口。 */ @RestController @Api(tags = "安环管理-员工学习记录") @RequestMapping("/safety/learning/record") public class SafetyLearningRecordController extends SafetyControllerSupport { @Autowired private SafetyLearningRecordService learningRecordService; /** * 分页查询员工学习记录。 */ @Log(title = "安环管理-员工学习记录-分页查询", businessType = BusinessType.OTHER) @ApiOperation("分页查询员工学习记录") @GetMapping("/list") public AjaxResult list(Page page, SafetyLearningRecord query, @RequestParam(value = "pageNum", required = false) Long pageNum, @RequestParam(value = "pageSize", required = false) Long pageSize) { return AjaxResult.success(learningRecordService.queryPage(buildPage(page, pageNum, pageSize), query)); } /** * 查询员工学习统计。 */ @Log(title = "安环管理-员工学习记录-统计", businessType = BusinessType.OTHER) @ApiOperation("查询员工学习统计") @GetMapping("/statistics") public AjaxResult statistics() { return AjaxResult.success(learningRecordService.getStatistics()); } }