删除老版的学工
This commit is contained in:
1 parent
97575a8793
commit
ba52f7983f
123 files changed
+5
-38097
No files matched your search
+2
-2
@@ -383,11 +383,11 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- 学工管理信息系统模块 -->
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-xg-xx</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
<!-- 招生就业管理模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
|
||||
@@ -113,11 +113,11 @@
|
||||
<artifactId>ruoyi-xg</artifactId>
|
||||
</dependency>
|
||||
<!-- 学工管理-学生信息管理模块 -->
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-xg-xx</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
<!-- 招生就业管理模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<module>ruoyi-demo</module>
|
||||
<module>ruoyi-workflow</module>
|
||||
<module>ruoyi-xg</module>
|
||||
<module>ruoyi-xg-xx</module>
|
||||
<!-- <module>ruoyi-xg-xx</module> -->
|
||||
<module>ruoyi-zsjy</module>
|
||||
<module>ruoyi-hq</module>
|
||||
<module>ruoyi-aqbw</module>
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-xg-xx</artifactId>
|
||||
<description>
|
||||
学工管理信息系统模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-doc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-idempotent</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-social</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-ratelimiter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- demo模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-demo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工作流模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-workflow</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
-268
@@ -1,268 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||
import org.dromara.xg.service.IXgClassInfoService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
|
||||
/**
|
||||
* 班级信息管理
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/classInfo")
|
||||
public class XgClassInfoController extends BaseController {
|
||||
|
||||
private final IXgClassInfoService xgClassInfoService;
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgClassInfoVo> list(XgClassInfoBo bo, PageQuery pageQuery) {
|
||||
return xgClassInfoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:export")
|
||||
@Log(title = "班级信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgClassInfoBo bo, HttpServletResponse response) {
|
||||
List<XgClassInfoVo> list = xgClassInfoService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "班级信息", XgClassInfoVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级信息详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgClassInfoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xgClassInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:add")
|
||||
@Log(title = "班级信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassInfoBo bo) {
|
||||
return toAjax(xgClassInfoService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:edit")
|
||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassInfoBo bo) {
|
||||
return toAjax(xgClassInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:remove")
|
||||
@Log(title = "班级信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xgClassInfoService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByClassCode/{classCode}")
|
||||
public R<XgClassInfoVo> getByClassCode(@NotBlank(message = "班级代码不能为空")
|
||||
@PathVariable String classCode) {
|
||||
return R.ok(xgClassInfoService.queryByClassCode(classCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据年级查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByGrade/{grade}")
|
||||
public R<List<XgClassInfoVo>> getByGrade(@NotBlank(message = "年级不能为空")
|
||||
@PathVariable String grade) {
|
||||
return R.ok(xgClassInfoService.queryByGrade(grade));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学院代码查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByCollegeCode/{collegeCode}")
|
||||
public R<List<XgClassInfoVo>> getByCollegeCode(@NotBlank(message = "学院代码不能为空")
|
||||
@PathVariable String collegeCode) {
|
||||
return R.ok(xgClassInfoService.queryByCollegeCode(collegeCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据专业代码查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByMajorCode/{majorCode}")
|
||||
public R<List<XgClassInfoVo>> getByMajorCode(@NotBlank(message = "专业代码不能为空")
|
||||
@PathVariable String majorCode) {
|
||||
return R.ok(xgClassInfoService.queryByMajorCode(majorCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据辅导员ID查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByCounselorId/{counselorId}")
|
||||
public R<List<XgClassInfoVo>> getByCounselorId(@NotNull(message = "辅导员ID不能为空")
|
||||
@PathVariable Long counselorId) {
|
||||
return R.ok(xgClassInfoService.queryByCounselorId(counselorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班主任ID查询班级信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:query")
|
||||
@GetMapping("/getByClassTeacherId/{classTeacherId}")
|
||||
public R<List<XgClassInfoVo>> getByClassTeacherId(@NotNull(message = "班主任ID不能为空")
|
||||
@PathVariable Long classTeacherId) {
|
||||
return R.ok(xgClassInfoService.queryByClassTeacherId(classTeacherId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级可用选项列表(用于下拉框)
|
||||
*/
|
||||
@SaCheckPermission("xg:class:list")
|
||||
@GetMapping("/options")
|
||||
public R<List<XgClassInfoVo>> getOptions() {
|
||||
return R.ok(xgClassInfoService.getClassOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任用户列表(用于下拉框)
|
||||
*/
|
||||
@SaCheckPermission("xg:class:list")
|
||||
@GetMapping("/teacherOptions")
|
||||
public R<List<Map<String, Object>>> getTeacherOptions() {
|
||||
List<SysUserVo> userList = xgClassInfoService.getClassTeacherOptions();
|
||||
|
||||
// 将SysUserVo对象转换为前端需要的格式:{value: userId, label: nickName}
|
||||
List<Map<String, Object>> options = new ArrayList<>();
|
||||
if (userList != null && !userList.isEmpty()) {
|
||||
for (SysUserVo user : userList) {
|
||||
Map<String, Object> option = new HashMap<>();
|
||||
option.put("value", user.getUserId());
|
||||
option.put("label", user.getNickName());
|
||||
options.add(option);
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(options);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用班级
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:edit")
|
||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/enable/{id}")
|
||||
public R<Void> enable(@NotNull(message = "班级ID不能为空")
|
||||
@PathVariable Long id) {
|
||||
return toAjax(xgClassInfoService.enableClass(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用班级
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:edit")
|
||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/disable/{id}")
|
||||
public R<Void> disable(@NotNull(message = "班级ID不能为空")
|
||||
@PathVariable Long id) {
|
||||
return toAjax(xgClassInfoService.disableClass(id));
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 统计数据接口 - 新增
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取班级信息统计概览
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:statistics")
|
||||
@GetMapping("/statistics")
|
||||
public R<Map<String, Object>> getStatistics() {
|
||||
return R.ok(xgClassInfoService.getStatistics());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:statistics")
|
||||
@GetMapping("/statistics/college")
|
||||
public R<List<Map<String, Object>>> countByCollege() {
|
||||
return R.ok(xgClassInfoService.countByCollege());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:statistics")
|
||||
@GetMapping("/statistics/grade")
|
||||
public R<List<Map<String, Object>>> countByGrade() {
|
||||
return R.ok(xgClassInfoService.countByGrade());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:statistics")
|
||||
@GetMapping("/statistics/major")
|
||||
public R<List<Map<String, Object>>> countByMajor() {
|
||||
return R.ok(xgClassInfoService.countByMajor());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*/
|
||||
@SaCheckPermission("xg:classInfo:statistics")
|
||||
@GetMapping("/statistics/status")
|
||||
public R<List<Map<String, Object>>> countByStatus() {
|
||||
return R.ok(xgClassInfoService.countByStatus());
|
||||
}
|
||||
|
||||
}
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 班级班主任关系Controller
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/classTeacherRelation")
|
||||
public class XgClassTeacherRelationController extends BaseController {
|
||||
|
||||
private final IXgClassTeacherRelationService classTeacherRelationService;
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgClassTeacherRelationVo> list(XgClassTeacherRelationBo bo, PageQuery pageQuery) {
|
||||
return classTeacherRelationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班级班主任关系列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:export")
|
||||
@Log(title = "班级班主任关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgClassTeacherRelationBo bo, HttpServletResponse response) {
|
||||
List<XgClassTeacherRelationVo> list = classTeacherRelationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "班级班主任关系", XgClassTeacherRelationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级班主任关系详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgClassTeacherRelationVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(classTeacherRelationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级班主任关系
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:add")
|
||||
@Log(title = "班级班主任关系", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassTeacherRelationBo bo) {
|
||||
return toAjax(classTeacherRelationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级班主任关系
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:edit")
|
||||
@Log(title = "班级班主任关系", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassTeacherRelationBo bo) {
|
||||
return toAjax(classTeacherRelationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级班主任关系
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xg:classTeacherRelation:remove")
|
||||
@Log(title = "班级班主任关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(classTeacherRelationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
-304
@@ -1,304 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
import org.dromara.xg.service.IXgCollectionBatchService;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次Controller
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/collectionBatch")
|
||||
public class XgCollectionBatchController extends BaseController {
|
||||
|
||||
private final IXgCollectionBatchService collectionBatchService;
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgCollectionBatchVo> list(XgCollectionBatchBo bo, PageQuery pageQuery) {
|
||||
return collectionBatchService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出信息采集批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:export")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgCollectionBatchBo bo, HttpServletResponse response) {
|
||||
List<XgCollectionBatchVo> list = collectionBatchService.exportBatchData(bo);
|
||||
ExcelUtil.exportExcel(list, "信息采集批次", XgCollectionBatchVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息采集批次详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:query")
|
||||
@GetMapping("/{batchId}")
|
||||
public R<XgCollectionBatchVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long batchId) {
|
||||
return R.ok(collectionBatchService.queryById(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:add")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgCollectionBatchBo bo) {
|
||||
return toAjax(collectionBatchService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改信息采集批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:edit")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgCollectionBatchBo bo) {
|
||||
return toAjax(collectionBatchService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除信息采集批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:remove")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{batchIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] batchIds) {
|
||||
return toAjax(collectionBatchService.deleteWithValidByIds(Arrays.asList(batchIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编码查询批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:query")
|
||||
@GetMapping("/code/{batchCode}")
|
||||
public R<XgCollectionBatchVo> getByCode(@PathVariable String batchCode) {
|
||||
return R.ok(collectionBatchService.queryByCode(batchCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户有权限的批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/userPermission")
|
||||
public R<List<XgCollectionBatchVo>> getUserPermissionBatches(@RequestParam Long userId) {
|
||||
return R.ok(collectionBatchService.queryUserPermissionBatches(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前进行中的批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/active")
|
||||
public R<List<XgCollectionBatchVo>> getActiveBatches() {
|
||||
return R.ok(collectionBatchService.queryActiveBatches());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询即将开始的批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/upcoming")
|
||||
public R<List<XgCollectionBatchVo>> getUpcomingBatches() {
|
||||
return R.ok(collectionBatchService.queryUpcomingBatches());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询即将结束的批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/endingSoon")
|
||||
public R<List<XgCollectionBatchVo>> getEndingSoonBatches() {
|
||||
return R.ok(collectionBatchService.queryEndingSoonBatches());
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:start")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/start/{batchId}")
|
||||
public R<Void> startBatch(@PathVariable Long batchId) {
|
||||
return toAjax(collectionBatchService.startBatch(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:pause")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pause/{batchId}")
|
||||
public R<Void> pauseBatch(@PathVariable Long batchId) {
|
||||
return toAjax(collectionBatchService.pauseBatch(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:resume")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/resume/{batchId}")
|
||||
public R<Void> resumeBatch(@PathVariable Long batchId) {
|
||||
return toAjax(collectionBatchService.resumeBatch(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:end")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/end/{batchId}")
|
||||
public R<Void> endBatch(@PathVariable Long batchId) {
|
||||
return toAjax(collectionBatchService.endBatch(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:copy")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/copy/{batchId}")
|
||||
public R<Void> copyBatch(@PathVariable Long batchId,
|
||||
@RequestParam String newBatchCode,
|
||||
@RequestParam String newBatchName) {
|
||||
return toAjax(collectionBatchService.copyBatch(batchId, newBatchCode, newBatchName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次统计
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@GetMapping("/statistics/{batchId}")
|
||||
public R<Map<String, Object>> getBatchStatistics(@PathVariable Long batchId) {
|
||||
return R.ok(collectionBatchService.getBatchStatistics(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次整体统计
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@GetMapping("/statistics/overall")
|
||||
public R<Map<String, Object>> getBatchOverallStatistics() {
|
||||
return R.ok(collectionBatchService.getBatchOverallStatistics());
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次完成率统计
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@GetMapping("/statistics/completion/{batchId}")
|
||||
public R<Map<String, Object>> getBatchCompletionStatistics(@PathVariable Long batchId) {
|
||||
return R.ok(collectionBatchService.getBatchCompletionStatistics(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次各维度统计
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@GetMapping("/statistics/dimension/{batchId}")
|
||||
public R<List<Map<String, Object>>> getBatchDimensionStatistics(@PathVariable Long batchId,
|
||||
@RequestParam String dimension) {
|
||||
return R.ok(collectionBatchService.getBatchDimensionStatistics(batchId, dimension));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新批次状态
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:batchUpdate")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/batchUpdateStatus")
|
||||
public R<Void> batchUpdateStatus(@RequestBody List<Long> batchIds, @RequestParam String status) {
|
||||
return toAjax(collectionBatchService.batchUpdateStatus(batchIds, status));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查批次是否可以编辑
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:query")
|
||||
@GetMapping("/checkEditable/{batchId}")
|
||||
public R<Boolean> checkBatchEditable(@PathVariable Long batchId) {
|
||||
return R.ok(collectionBatchService.checkBatchEditable(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查批次是否可以删除
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:query")
|
||||
@GetMapping("/checkDeletable/{batchId}")
|
||||
public R<Boolean> checkBatchDeletable(@PathVariable Long batchId) {
|
||||
return R.ok(collectionBatchService.checkBatchDeletable(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次可用选项
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/available")
|
||||
public R<List<XgCollectionBatchVo>> getAvailableBatches() {
|
||||
return R.ok(collectionBatchService.getAvailableBatches());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入批次数据
|
||||
*
|
||||
* @param file 导入文件
|
||||
* @return 结果
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:import")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.IMPORT)
|
||||
@PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importBatchData(@RequestPart("file") MultipartFile file) throws Exception {
|
||||
List<XgCollectionBatchBo> batchList = ExcelUtil.importExcel(file.getInputStream(), XgCollectionBatchBo.class);
|
||||
collectionBatchService.importBatchData(batchList);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次数据导入模板
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(null, "信息采集批次数据导入模板", XgCollectionBatchBo.class, response);
|
||||
}
|
||||
}
|
||||
-450
@@ -1,450 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.xg.domain.bo.XgStatisticsQueryBo;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
import org.dromara.xg.service.IXgStatisticsAnalysisService;
|
||||
import org.dromara.xg.service.IXgStatisticsExportService;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计分析Controller
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/statisticsAnalysis")
|
||||
public class XgStatisticsAnalysisController extends BaseController {
|
||||
|
||||
private final IXgStatisticsAnalysisService statisticsAnalysisService;
|
||||
private final IXgStatisticsExportService statisticsExportService;
|
||||
|
||||
/**
|
||||
* 获取统计概览
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:overview")
|
||||
@GetMapping("/overview")
|
||||
public R<Map<String, Object>> getStatisticsOverview() {
|
||||
Map<String, Object> result = statisticsAnalysisService.getStatisticsOverview();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计维度选项
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:dimension")
|
||||
@GetMapping("/dimensionOptions")
|
||||
public R<List<Map<String, Object>>> getStatisticsDimensionOptions() {
|
||||
List<Map<String, Object>> result = statisticsAnalysisService.getStatisticsDimensionOptions();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:college")
|
||||
@GetMapping("/collegeOptions")
|
||||
public R<List<Map<String, Object>>> getCollegeOptions() {
|
||||
List<Map<String, Object>> result = statisticsAnalysisService.getCollegeOptions();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:major")
|
||||
@GetMapping("/majorOptions")
|
||||
public R<List<Map<String, Object>>> getMajorOptions(@RequestParam(required = false) String collegeCode) {
|
||||
List<Map<String, Object>> result = statisticsAnalysisService.getMajorOptions(collegeCode);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:class")
|
||||
@GetMapping("/classOptions")
|
||||
public R<List<Map<String, Object>>> getClassOptions(@RequestParam(required = false) String collegeCode,
|
||||
@RequestParam(required = false) String majorCode) {
|
||||
List<Map<String, Object>> result = statisticsAnalysisService.getClassOptions(collegeCode, majorCode);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图表类型选项
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:chart")
|
||||
@GetMapping("/chartTypeOptions")
|
||||
public R<List<Map<String, Object>>> getChartTypeOptions() {
|
||||
List<Map<String, Object>> result = statisticsAnalysisService.getChartTypeOptions();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行统计分析
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:execute")
|
||||
@Log(title = "统计分析", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/execute")
|
||||
public R<XgStatisticsResultVo> executeStatistics(@Validated @RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.executeStatistics(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按学院统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:college")
|
||||
@Log(title = "按学院统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/college")
|
||||
public R<XgStatisticsResultVo> statisticsByCollege(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByCollege(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按专业统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:major")
|
||||
@Log(title = "按专业统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/major")
|
||||
public R<XgStatisticsResultVo> statisticsByMajor(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByMajor(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按班级统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:class")
|
||||
@Log(title = "按班级统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/class")
|
||||
public R<XgStatisticsResultVo> statisticsByClass(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByClass(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按年级统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:grade")
|
||||
@Log(title = "按年级统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/grade")
|
||||
public R<XgStatisticsResultVo> statisticsByGrade(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByGrade(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按性别统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:gender")
|
||||
@Log(title = "按性别统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/gender")
|
||||
public R<XgStatisticsResultVo> statisticsByGender(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByGender(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按年龄段统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:age")
|
||||
@Log(title = "按年龄段统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/age")
|
||||
public R<XgStatisticsResultVo> statisticsByAge(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByAge(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按政治面貌统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:political")
|
||||
@Log(title = "按政治面貌统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/political")
|
||||
public R<XgStatisticsResultVo> statisticsByPoliticalStatus(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByPoliticalStatus(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按民族统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:nationality")
|
||||
@Log(title = "按民族统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/nation")
|
||||
public R<XgStatisticsResultVo> statisticsByNationality(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByNationality(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按生源地统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:source")
|
||||
@Log(title = "按生源地统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/sourceRegion")
|
||||
public R<XgStatisticsResultVo> statisticsBySourceRegion(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsBySourceRegion(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按血型统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:blood")
|
||||
@Log(title = "按血型统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/bloodType")
|
||||
public R<XgStatisticsResultVo> statisticsByBloodType(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByBloodType(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按宗教信仰统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:religion")
|
||||
@Log(title = "按宗教信仰统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/religion")
|
||||
public R<XgStatisticsResultVo> statisticsByReligion(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByReligion(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按学籍状态统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:status")
|
||||
@Log(title = "按学籍状态统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/status")
|
||||
public R<XgStatisticsResultVo> statisticsByStudentStatus(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByStudentStatus(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按培养方式统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:training")
|
||||
@Log(title = "按培养方式统计", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/trainingType")
|
||||
public R<XgStatisticsResultVo> statisticsByTrainingType(XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByTrainingType(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按身高范围统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:height")
|
||||
@Log(title = "按身高范围统计", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/height")
|
||||
public R<XgStatisticsResultVo> statisticsByHeight(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByHeight(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按体重范围统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:weight")
|
||||
@Log(title = "按体重范围统计", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/weight")
|
||||
public R<XgStatisticsResultVo> statisticsByWeight(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByWeight(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 多维度组合统计
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:multi")
|
||||
@Log(title = "多维度组合统计", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/multi")
|
||||
public R<XgStatisticsResultVo> statisticsByMultiDimensions(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByMultiDimensions(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间趋势统计学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:trend")
|
||||
@Log(title = "按时间趋势统计", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/trend")
|
||||
public R<XgStatisticsResultVo> statisticsByTimeTrend(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.statisticsByTimeTrend(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生信息汇总报表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:report:student")
|
||||
@Log(title = "学生信息汇总报表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/report/student")
|
||||
public R<XgStatisticsResultVo> getStudentSummaryReport(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.getStudentSummaryReport(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级统计报表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:report:class")
|
||||
@Log(title = "班级统计报表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/report/class")
|
||||
public R<XgStatisticsResultVo> getClassStatisticsReport(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.getClassStatisticsReport(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院统计报表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:report:college")
|
||||
@Log(title = "学院统计报表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/report/college")
|
||||
public R<XgStatisticsResultVo> getCollegeStatisticsReport(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.getCollegeStatisticsReport(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取困难学生统计报表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:report:poor")
|
||||
@Log(title = "困难学生统计报表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/report/poor")
|
||||
public R<XgStatisticsResultVo> getPoorStudentReport(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.getPoorStudentReport(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特殊群体统计报表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:report:special")
|
||||
@Log(title = "特殊群体统计报表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/report/special")
|
||||
public R<XgStatisticsResultVo> getSpecialGroupReport(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.getSpecialGroupReport(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计摘要信息
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:summary")
|
||||
@Log(title = "统计摘要信息", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/summary")
|
||||
public R<Map<String, Object>> getStatisticsSummary(@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
Map<String, Object> result = statisticsAnalysisService.getStatisticsSummary(queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置执行统计
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:config")
|
||||
@Log(title = "根据配置执行统计", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/config/{configCode}")
|
||||
public R<XgStatisticsResultVo> executeStatisticsByConfig(@NotBlank(message = "配置编码不能为空") @PathVariable String configCode,
|
||||
@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.executeStatisticsByConfig(configCode, queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成图表数据
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:chart:generate")
|
||||
@Log(title = "生成图表数据", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/chart/{chartType}")
|
||||
public R<XgStatisticsResultVo> generateChartData(@NotBlank(message = "图表类型不能为空") @PathVariable String chartType,
|
||||
@RequestBody XgStatisticsQueryBo queryBo) {
|
||||
XgStatisticsResultVo result = statisticsAnalysisService.generateChartData(chartType, queryBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计结果
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:analysis:export")
|
||||
@Log(title = "导出统计结果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export/{format}")
|
||||
public ResponseEntity<byte[]> exportStatisticsResult(@NotBlank(message = "导出格式不能为空") @PathVariable String format,
|
||||
@RequestBody XgStatisticsResultVo resultVo) {
|
||||
byte[] data = statisticsAnalysisService.exportStatisticsResult(resultVo, format);
|
||||
|
||||
String filename = statisticsExportService.getFileName(resultVo, format);
|
||||
String contentType = statisticsExportService.getContentType(format);
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename)
|
||||
.contentType(MediaType.parseMediaType(contentType))
|
||||
.body(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除统计缓存
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:cache:clear")
|
||||
@Log(title = "清除统计缓存", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/cache/{cacheKey}")
|
||||
public R<Void> clearStatisticsCache(@NotBlank(message = "缓存键不能为空") @PathVariable String cacheKey) {
|
||||
return toAjax(statisticsAnalysisService.clearStatisticsCache(cacheKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有统计缓存
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:cache:clear")
|
||||
@Log(title = "清除所有统计缓存", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/cache/all")
|
||||
public R<Void> clearAllStatisticsCache() {
|
||||
return toAjax(statisticsAnalysisService.clearAllStatisticsCache());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存统计信息
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:cache:info")
|
||||
@GetMapping("/cache/info")
|
||||
public R<Map<String, Object>> getCacheStatistics() {
|
||||
Map<String, Object> result = statisticsAnalysisService.getCacheStatistics();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预热统计缓存
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:cache:warmup")
|
||||
@Log(title = "预热统计缓存", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/cache/warmup")
|
||||
public R<Void> warmUpStatisticsCache() {
|
||||
return toAjax(statisticsAnalysisService.warmUpStatisticsCache());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-270
@@ -1,270 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.xg.domain.bo.XgStatisticsConfigBo;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsConfigVo;
|
||||
import org.dromara.xg.service.IXgStatisticsConfigService;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计分析配置Controller
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/statistics/config")
|
||||
public class XgStatisticsConfigController extends BaseController {
|
||||
|
||||
private final IXgStatisticsConfigService statisticsConfigService;
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgStatisticsConfigVo> list(XgStatisticsConfigBo bo, PageQuery pageQuery) {
|
||||
return statisticsConfigService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表(不分页)
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:list")
|
||||
@GetMapping("/listAll")
|
||||
public R<List<XgStatisticsConfigVo>> listAll(XgStatisticsConfigBo bo) {
|
||||
List<XgStatisticsConfigVo> list = statisticsConfigService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计分析配置列表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:export")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgStatisticsConfigBo bo, HttpServletResponse response) {
|
||||
List<XgStatisticsConfigVo> list = statisticsConfigService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "统计分析配置", XgStatisticsConfigVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计分析配置详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/{configId}")
|
||||
public R<XgStatisticsConfigVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long configId) {
|
||||
return R.ok(statisticsConfigService.queryById(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置编码获取配置信息
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/code/{configCode}")
|
||||
public R<XgStatisticsConfigVo> getInfoByCode(@NotNull(message = "配置编码不能为空") @PathVariable String configCode) {
|
||||
return R.ok(statisticsConfigService.queryByConfigCode(configCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置的JSON内容
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/{configId}/content")
|
||||
public R<String> getConfigContent(@NotNull(message = "主键不能为空") @PathVariable Long configId) {
|
||||
return R.ok(statisticsConfigService.getConfigContent(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定类型的配置列表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/type/{configType}")
|
||||
public R<List<XgStatisticsConfigVo>> getConfigsByType(@NotNull(message = "配置类型不能为空") @PathVariable String configType) {
|
||||
return R.ok(statisticsConfigService.queryByConfigType(configType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询启用的配置列表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/enabled")
|
||||
public R<List<XgStatisticsConfigVo>> getEnabledConfigs(@RequestParam(required = false) String configType) {
|
||||
return R.ok(statisticsConfigService.queryEnabledConfigs(configType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:query")
|
||||
@GetMapping("/system")
|
||||
public R<List<XgStatisticsConfigVo>> getSystemConfigs() {
|
||||
return R.ok(statisticsConfigService.querySystemConfigs());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增统计分析配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:add")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgStatisticsConfigBo bo) {
|
||||
return toAjax(statisticsConfigService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改统计分析配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgStatisticsConfigBo bo) {
|
||||
return toAjax(statisticsConfigService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置的JSON内容
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/{configId}/content")
|
||||
public R<Void> updateConfigContent(@NotNull(message = "主键不能为空") @PathVariable Long configId,
|
||||
@RequestBody String configContent) {
|
||||
return toAjax(statisticsConfigService.updateConfigContent(configId, configContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除统计分析配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:remove")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{configIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] configIds) {
|
||||
return toAjax(statisticsConfigService.deleteWithValidByIds(Arrays.asList(configIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:add")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/{configId}/copy")
|
||||
public R<Void> copyConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId,
|
||||
@RequestParam String newConfigName,
|
||||
@RequestParam String newConfigCode) {
|
||||
return toAjax(statisticsConfigService.copyConfig(configId, newConfigName, newConfigCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{configId}/enable")
|
||||
public R<Void> enableConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId) {
|
||||
return toAjax(statisticsConfigService.enableConfig(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{configId}/disable")
|
||||
public R<Void> disableConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId) {
|
||||
return toAjax(statisticsConfigService.disableConfig(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置排序
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{configId}/sort")
|
||||
public R<Void> updateSortOrder(@NotNull(message = "主键不能为空") @PathVariable Long configId,
|
||||
@RequestParam Integer sortOrder) {
|
||||
return toAjax(statisticsConfigService.updateSortOrder(configId, sortOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新配置状态
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:edit")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/batch/status")
|
||||
public R<Void> batchUpdateStatus(@RequestBody List<Long> configIds,
|
||||
@RequestParam Integer isEnabled) {
|
||||
return toAjax(statisticsConfigService.batchUpdateStatus(configIds, isEnabled));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查配置编码是否存在
|
||||
*/
|
||||
@GetMapping("/checkConfigCode")
|
||||
public R<Boolean> checkConfigCodeExists(@RequestParam String configCode,
|
||||
@RequestParam(required = false) Long excludeId) {
|
||||
return R.ok(statisticsConfigService.checkConfigCodeExists(configCode, excludeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入统计分析配置
|
||||
*/
|
||||
@SaCheckPermission("xg:statistics:config:import")
|
||||
@Log(title = "统计分析配置", businessType = BusinessType.IMPORT)
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<XgStatisticsConfigVo> result = ExcelUtil.importExcel(file.getInputStream(), XgStatisticsConfigVo.class, false);
|
||||
List<XgStatisticsConfigVo> voList = result.getList();
|
||||
List<XgStatisticsConfigBo> boList = MapstructUtils.convert(voList, XgStatisticsConfigBo.class);
|
||||
for (XgStatisticsConfigBo bo : boList) {
|
||||
try {
|
||||
statisticsConfigService.insertByBo(bo);
|
||||
} catch (Exception e) {
|
||||
log.error("导入统计分析配置失败:{}", e.getMessage());
|
||||
if (!updateSupport) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计分析配置导入模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(null, "统计分析配置", XgStatisticsConfigVo.class, response);
|
||||
}
|
||||
}
|
||||
-492
@@ -1,492 +0,0 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoVo;
|
||||
import org.dromara.xg.domain.bo.XgStudentInfoBo;
|
||||
import org.dromara.xg.service.IXgStudentInfoService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 学生信息Controller
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/studentInfo")
|
||||
public class XgStudentInfoController extends BaseController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(XgStudentInfoController.class);
|
||||
|
||||
private final IXgStudentInfoService studentInfoService;
|
||||
|
||||
/**
|
||||
* 查询学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgStudentInfoVo> list(XgStudentInfoBo bo, PageQuery pageQuery) {
|
||||
log.info("=== 学生信息分页查询开始 ===");
|
||||
log.info("查询条件: {}", bo);
|
||||
log.info("分页参数: {}", pageQuery);
|
||||
|
||||
// 执行分页查询
|
||||
TableDataInfo<XgStudentInfoVo> result = studentInfoService.queryPageList(bo, pageQuery);
|
||||
log.info("查询结果总数: {}", result.getTotal());
|
||||
log.info("查询结果行数: {}", result.getRows() != null ? result.getRows().size() : 0);
|
||||
|
||||
if (result.getRows() != null && !result.getRows().isEmpty()) {
|
||||
log.info("第一条数据示例: {}", result.getRows().get(0));
|
||||
} else {
|
||||
log.warn("查询结果为空!");
|
||||
}
|
||||
|
||||
log.info("=== 学生信息分页查询结束 ===");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:export")
|
||||
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgStudentInfoBo bo, HttpServletResponse response) {
|
||||
List<XgStudentInfoVo> list = studentInfoService.exportStudentInfo(bo);
|
||||
ExcelUtil.exportExcel(list, "学生信息", XgStudentInfoVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生信息详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgStudentInfoVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(studentInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:add")
|
||||
@Log(title = "学生信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody XgStudentInfoBo bo) {
|
||||
boolean success = studentInfoService.insertByBo(bo);
|
||||
if (success) {
|
||||
return R.ok("新增成功", bo.getId());
|
||||
}
|
||||
return R.fail("新增失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:edit")
|
||||
@Log(title = "学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgStudentInfoBo bo) {
|
||||
return toAjax(studentInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:remove")
|
||||
@Log(title = "学生信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(studentInfoService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学号查询学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/studentNo/{studentNo}")
|
||||
public R<XgStudentInfoVo> getByStudentNo(@NotBlank(message = "学号不能为空") @PathVariable String studentNo) {
|
||||
return R.ok(studentInfoService.queryByStudentNo(studentNo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证号查询学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/idCard/{idCard}")
|
||||
public R<XgStudentInfoVo> getByIdCard(@NotBlank(message = "身份证号不能为空") @PathVariable String idCard) {
|
||||
return R.ok(studentInfoService.queryByIdCard(idCard));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定班级的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/class/{classCode}")
|
||||
public R<List<XgStudentInfoVo>> getByClassCode(@NotBlank(message = "班级代码不能为空") @PathVariable String classCode) {
|
||||
return R.ok(studentInfoService.queryByClassCode(classCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定学院的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/college/{collegeCode}")
|
||||
public R<List<XgStudentInfoVo>> getByCollegeCode(@NotBlank(message = "学院代码不能为空") @PathVariable String collegeCode) {
|
||||
return R.ok(studentInfoService.queryByCollegeCode(collegeCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定辅导员的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/counselor/{counselorId}")
|
||||
public R<List<XgStudentInfoVo>> getByCounselorId(@NotNull(message = "辅导员ID不能为空") @PathVariable Long counselorId) {
|
||||
return R.ok(studentInfoService.queryByCounselorId(counselorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定班主任的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/classTeacher/{classTeacherId}")
|
||||
public R<List<XgStudentInfoVo>> getByClassTeacherId(@NotNull(message = "班主任ID不能为空") @PathVariable Long classTeacherId) {
|
||||
return R.ok(studentInfoService.queryByClassTeacherId(classTeacherId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各学院学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/college")
|
||||
public R<List<Map<String, Object>>> countByCollege() {
|
||||
return R.ok(studentInfoService.countByCollege());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各年级学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/grade")
|
||||
public R<List<Map<String, Object>>> countByGrade() {
|
||||
return R.ok(studentInfoService.countByGrade());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各专业学生数量
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/major")
|
||||
public R<List<Map<String, Object>>> countByMajor() {
|
||||
return R.ok(studentInfoService.countByMajor());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计学籍状态分布
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/studentStatus")
|
||||
public R<List<Map<String, Object>>> countByStudentStatus() {
|
||||
return R.ok(studentInfoService.countByStudentStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计信息完整度分布
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/completionRate")
|
||||
public R<List<Map<String, Object>>> countByCompletionRate() {
|
||||
return R.ok(studentInfoService.countByCompletionRate());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询信息不完整的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/incomplete")
|
||||
public R<List<XgStudentInfoVo>> getIncompleteStudents() {
|
||||
return R.ok(studentInfoService.queryIncompleteStudents());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待审核的学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:audit")
|
||||
@GetMapping("/pendingAudit")
|
||||
public R<List<XgStudentInfoVo>> getPendingAuditStudents() {
|
||||
return R.ok(studentInfoService.queryPendingAuditStudents());
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新学生信息状态
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:edit")
|
||||
@Log(title = "批量更新信息状态", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/batchUpdateInfoStatus")
|
||||
public R<Void> batchUpdateInfoStatus(@RequestBody Map<String, Object> params) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Long> studentIds = (List<Long>) params.get("studentIds");
|
||||
String infoStatus = (String) params.get("infoStatus");
|
||||
|
||||
if (studentIds == null || studentIds.isEmpty()) {
|
||||
return R.fail("学生ID列表不能为空");
|
||||
}
|
||||
if (infoStatus == null || infoStatus.trim().isEmpty()) {
|
||||
return R.fail("信息状态不能为空");
|
||||
}
|
||||
|
||||
return toAjax(studentInfoService.batchUpdateInfoStatus(studentIds, infoStatus));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新学生学籍状态
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:edit")
|
||||
@Log(title = "批量更新学籍状态", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/batchUpdateStudentStatus")
|
||||
public R<Void> batchUpdateStudentStatus(@RequestBody Map<String, Object> params) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Long> studentIds = (List<Long>) params.get("studentIds");
|
||||
String studentStatus = (String) params.get("studentStatus");
|
||||
|
||||
if (studentIds == null || studentIds.isEmpty()) {
|
||||
return R.fail("学生ID列表不能为空");
|
||||
}
|
||||
if (studentStatus == null || studentStatus.trim().isEmpty()) {
|
||||
return R.fail("学籍状态不能为空");
|
||||
}
|
||||
|
||||
return toAjax(studentInfoService.batchUpdateStudentStatus(studentIds, studentStatus));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重复学号的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/duplicateStudentNo")
|
||||
public R<List<Map<String, Object>>> getDuplicateStudentNo() {
|
||||
return R.ok(studentInfoService.queryDuplicateStudentNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重复身份证号的学生列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/duplicateIdCard")
|
||||
public R<List<Map<String, Object>>> getDuplicateIdCard() {
|
||||
return R.ok(studentInfoService.queryDuplicateIdCard());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新学生信息完整度
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:edit")
|
||||
@Log(title = "更新信息完整度", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/{studentId}/updateCompletionRate")
|
||||
public R<Void> updateCompletionRate(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId) {
|
||||
return toAjax(studentInfoService.updateCompletionRate(studentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:import")
|
||||
@Log(title = "批量导入学生信息", businessType = BusinessType.IMPORT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/import")
|
||||
public R<String> importStudentInfo(@RequestBody Map<String, Object> params) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<XgStudentInfoVo> studentInfoList = (List<XgStudentInfoVo>) params.get("studentInfoList");
|
||||
Boolean isUpdateSupport = (Boolean) params.get("isUpdateSupport");
|
||||
String operName = (String) params.get("operName");
|
||||
|
||||
if (studentInfoList == null || studentInfoList.isEmpty()) {
|
||||
return R.fail("导入数据不能为空");
|
||||
}
|
||||
|
||||
String result = studentInfoService.importStudentInfo(studentInfoList, isUpdateSupport, operName);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:audit")
|
||||
@Log(title = "审核学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/{studentId}/audit")
|
||||
public R<Void> auditStudentInfo(
|
||||
@NotNull(message = "学生ID不能为空") @PathVariable Long studentId,
|
||||
@NotBlank(message = "审核状态不能为空") @RequestParam String auditStatus,
|
||||
@RequestParam(required = false) String auditRemark) {
|
||||
return toAjax(studentInfoService.auditStudentInfo(studentId, auditStatus, auditRemark));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量审核学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:audit")
|
||||
@Log(title = "批量审核学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/batchAudit")
|
||||
public R<Void> batchAuditStudentInfo(@RequestBody Map<String, Object> params) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Long> studentIds = (List<Long>) params.get("studentIds");
|
||||
String auditStatus = (String) params.get("auditStatus");
|
||||
String auditRemark = (String) params.get("auditRemark");
|
||||
|
||||
if (studentIds == null || studentIds.isEmpty()) {
|
||||
return R.fail("学生ID列表不能为空");
|
||||
}
|
||||
if (auditStatus == null || auditStatus.trim().isEmpty()) {
|
||||
return R.fail("审核状态不能为空");
|
||||
}
|
||||
|
||||
return toAjax(studentInfoService.batchAuditStudentInfo(studentIds, auditStatus, auditRemark));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生信息统计概览
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/statistics/overview")
|
||||
public R<Map<String, Object>> getStatisticsOverview() {
|
||||
return R.ok(studentInfoService.getStatisticsOverview());
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成学生信息报表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/report/{reportType}")
|
||||
public R<Map<String, Object>> generateReport(
|
||||
@NotBlank(message = "报表类型不能为空") @PathVariable String reportType,
|
||||
@RequestParam(required = false) Map<String, Object> params) {
|
||||
if (params == null) {
|
||||
params = Map.of();
|
||||
}
|
||||
return R.ok(studentInfoService.generateReport(reportType, params));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我的学生信息(学生端)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:myInfo")
|
||||
@GetMapping("/myInfo")
|
||||
public R<XgStudentInfoVo> getMyInfo() {
|
||||
// TODO: 根据当前登录用户获取对应的学生信息
|
||||
// Long currentUserId = LoginHelper.getUserId();
|
||||
// 需要建立用户与学生的关联关系
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新我的学生信息(学生端)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:updateMyInfo")
|
||||
@Log(title = "更新我的学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/myInfo")
|
||||
public R<Void> updateMyInfo(@Validated(EditGroup.class) @RequestBody XgStudentInfoBo bo) {
|
||||
// TODO: 校验当前用户是否有权限修改该学生信息
|
||||
return toAjax(studentInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 选项数据接口
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/options/colleges")
|
||||
public R<List<Map<String, Object>>> getCollegeOptions() {
|
||||
return R.ok(studentInfoService.getCollegeOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
* @param collegeCode 学院代码(可选)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/options/majors")
|
||||
public R<List<Map<String, Object>>> getMajorOptions(@RequestParam(required = false) String collegeCode) {
|
||||
return R.ok(studentInfoService.getMajorOptions(collegeCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
* @param majorCode 专业代码(可选)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/options/classes")
|
||||
public R<List<Map<String, Object>>> getClassOptions(@RequestParam(required = false) String majorCode) {
|
||||
return R.ok(studentInfoService.getClassOptions(majorCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员选项
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/options/counselors")
|
||||
public R<List<Map<String, Object>>> getCounselorOptions() {
|
||||
return R.ok(studentInfoService.getCounselorOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任选项
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/options/classTeachers")
|
||||
public R<List<Map<String, Object>>> getClassTeacherOptions() {
|
||||
return R.ok(studentInfoService.getClassTeacherOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学号是否存在
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/checkStudentNo")
|
||||
public R<Boolean> checkStudentNo(@RequestParam String studentNo, @RequestParam(required = false) Long studentId) {
|
||||
return R.ok(studentInfoService.checkStudentNo(studentNo, studentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查身份证号是否存在
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/checkIdCard")
|
||||
public R<Boolean> checkIdCard(@RequestParam String idCard, @RequestParam(required = false) Long studentId) {
|
||||
return R.ok(studentInfoService.checkIdCard(idCard, studentId));
|
||||
}
|
||||
|
||||
}
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 信息采集批次定时任务对象 xg_batch_scheduled_task
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_batch_scheduled_task")
|
||||
public class XgBatchScheduledTask extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 任务类型(REMIND_START,REMIND_END,AUTO_CLOSE)
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 执行时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date taskTime;
|
||||
|
||||
/**
|
||||
* 任务状态(PENDING,EXECUTED,FAILED)
|
||||
*/
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 实际执行时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date executeTime;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
||||
-346
@@ -1,346 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级信息对象 xg_class_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_class_info")
|
||||
public class XgClassInfo extends BaseEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@TableField("tenant_id")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
@TableField("class_code")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@TableField("class_name")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级
|
||||
*/
|
||||
@TableField("class_type")
|
||||
private String classType;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@TableField("grade")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@TableField("enrollment_year")
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
@TableField("graduation_year")
|
||||
private Integer graduationYear;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
@TableField("major_code")
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@TableField("major_name")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
@TableField("training_type")
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 学位类型:本科、专科、研究生等
|
||||
*/
|
||||
@TableField("degree_type")
|
||||
private String degreeType;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
@TableField("college_code")
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@TableField("college_name")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
@TableField("counselor_id")
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
@TableField("counselor_name")
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
@TableField("class_teacher_id")
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
@TableField("class_teacher_name")
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
@TableField("class_advisor_id")
|
||||
private Long classAdvisorId;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
@TableField("class_advisor_name")
|
||||
private String classAdvisorName;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
@TableField("class_monitor_id")
|
||||
private Long classMonitorId;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
@TableField("class_monitor_name")
|
||||
private String classMonitorName;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
@TableField("deputy_monitor_id")
|
||||
private Long deputyMonitorId;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
@TableField("deputy_monitor_name")
|
||||
private String deputyMonitorName;
|
||||
|
||||
/**
|
||||
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||
*/
|
||||
@TableField("class_status")
|
||||
private String classStatus;
|
||||
|
||||
/**
|
||||
* 是否毕业:0-未毕业,1-已毕业
|
||||
*/
|
||||
@TableField("is_graduation")
|
||||
private Integer isGraduation;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
@TableField("graduation_date")
|
||||
private LocalDate graduationDate;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
@TableField("planned_capacity")
|
||||
private Integer plannedCapacity;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
@TableField("current_student_count")
|
||||
private Integer currentStudentCount;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
@TableField("max_student_count")
|
||||
private Integer maxStudentCount;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
@TableField("male_count")
|
||||
private Integer maleCount;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
@TableField("female_count")
|
||||
private Integer femaleCount;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
@TableField("active_count")
|
||||
private Integer activeCount;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
@TableField("transfer_in_count")
|
||||
private Integer transferInCount;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
@TableField("transfer_out_count")
|
||||
private Integer transferOutCount;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
@TableField("dropout_count")
|
||||
private Integer dropoutCount;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
@TableField("graduate_count")
|
||||
private Integer graduateCount;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
@TableField("office_location")
|
||||
private String officeLocation;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
@TableField("class_location")
|
||||
private String classLocation;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@TableField("contact_phone")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
@TableField("qq_group")
|
||||
private String qqGroup;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
@TableField("wechat_group")
|
||||
private String wechatGroup;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
@TableField("class_schedule")
|
||||
private String classSchedule;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
@TableField("class_culture")
|
||||
private String classCulture;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
@TableField("class_rules")
|
||||
private String classRules;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
@TableField("class_description")
|
||||
private String classDescription;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
@TableField("last_count_update")
|
||||
private LocalDateTime lastCountUpdate;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
@TableField("ext_field1")
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
@TableField("ext_field2")
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
@TableField("ext_field3")
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableField("deleted")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级班主任关系对象 xg_class_teacher_relation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_class_teacher_relation")
|
||||
public class XgClassTeacherRelation extends BaseEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@TableField("class_id")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班主任用户ID
|
||||
*/
|
||||
@TableField("teacher_id")
|
||||
private Long teacherId;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 生效开始日期
|
||||
*/
|
||||
@TableField("start_date")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
/**
|
||||
* 生效结束日期
|
||||
*/
|
||||
@TableField("end_date")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField("tenant_id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableField("deleted")
|
||||
@TableLogic
|
||||
private String deleted;
|
||||
|
||||
}
|
||||
-187
@@ -1,187 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 信息采集批次对象 xg_collection_batch
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_collection_batch")
|
||||
public class XgCollectionBatch extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义
|
||||
*/
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 学年,如2024-2025
|
||||
*/
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期:spring-春季,autumn-秋季
|
||||
*/
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档
|
||||
*/
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date publishTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date archiveTime;
|
||||
|
||||
/**
|
||||
* 目标学院(JSON格式)
|
||||
*/
|
||||
private String targetColleges;
|
||||
|
||||
/**
|
||||
* 目标年级(JSON格式)
|
||||
*/
|
||||
private String targetGrades;
|
||||
|
||||
/**
|
||||
* 目标专业(JSON格式)
|
||||
*/
|
||||
private String targetMajors;
|
||||
|
||||
/**
|
||||
* 必填字段(JSON格式)
|
||||
*/
|
||||
private String requiredFields;
|
||||
|
||||
/**
|
||||
* 可选字段(JSON格式)
|
||||
*/
|
||||
private String optionalFields;
|
||||
|
||||
/**
|
||||
* 审核级别配置(JSON格式)
|
||||
*/
|
||||
private String auditLevels;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交数
|
||||
*/
|
||||
private Integer submittedCount;
|
||||
|
||||
/**
|
||||
* 已审核数
|
||||
*/
|
||||
private Integer approvedCount;
|
||||
|
||||
/**
|
||||
* 已驳回数
|
||||
*/
|
||||
private Integer rejectedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 审核权限(JSON格式)
|
||||
*/
|
||||
private String auditPermissions;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 自动提醒:0-关闭,1-开启
|
||||
*/
|
||||
private Integer autoReminder;
|
||||
|
||||
/**
|
||||
* 提醒频率(天)
|
||||
*/
|
||||
private Integer reminderFrequency;
|
||||
|
||||
/**
|
||||
* 提交后允许修改:0-不允许,1-允许
|
||||
*/
|
||||
private Integer allowModifyAfterSubmit;
|
||||
|
||||
/**
|
||||
* 批次描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
}
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 信息采集批次操作日志对象 xg_collection_batch_log
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@TableName("xg_collection_batch_log")
|
||||
public class XgCollectionBatchLog implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 操作类型(CREATE,UPDATE,SUBMIT,ADMIN_MODIFY,BATCH_PUBLISH,BATCH_CLOSE)
|
||||
*/
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 操作描述
|
||||
*/
|
||||
private String operationDesc;
|
||||
|
||||
/**
|
||||
* 修改前数据(JSON格式)
|
||||
*/
|
||||
private String oldData;
|
||||
|
||||
/**
|
||||
* 修改后数据(JSON格式)
|
||||
*/
|
||||
private String newData;
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作人类型(STUDENT,ADMIN,SYSTEM)
|
||||
*/
|
||||
private String operatorType;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 信息采集批次权限配置对象 xg_collection_batch_permission
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_collection_batch_permission")
|
||||
public class XgCollectionBatchPermission extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 权限类型(EDIT,VIEW,SUBMIT,ADMIN)
|
||||
*/
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 是否授权:0-否,1-是
|
||||
*/
|
||||
private Integer isGranted;
|
||||
|
||||
/**
|
||||
* 授权时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date grantTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
}
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 信息采集批次统计对象 xg_collection_batch_statistics
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_collection_batch_statistics")
|
||||
public class XgCollectionBatchStatistics extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交学生数
|
||||
*/
|
||||
private Integer submittedStudents;
|
||||
|
||||
/**
|
||||
* 待提交学生数
|
||||
*/
|
||||
private Integer pendingStudents;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 学院ID(按学院统计时使用)
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID(按专业统计时使用)
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID(按班级统计时使用)
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 届别
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 统计类型(TOTAL,COLLEGE,MAJOR,CLASS,GRADE)
|
||||
*/
|
||||
private String statisticsType;
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastUpdated;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
||||
-124
@@ -1,124 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 信息采集批次学生关联对象 xg_collection_batch_student
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_collection_batch_student")
|
||||
public class XgCollectionBatchStudent extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentCode;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 届别
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 是否可编辑:0-否,1-是
|
||||
*/
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 是否已提交:0-否,1-是
|
||||
*/
|
||||
private Integer hasSubmitted;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTime;
|
||||
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastEditTime;
|
||||
|
||||
/**
|
||||
* 编辑次数
|
||||
*/
|
||||
private Integer editCount;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
}
|
||||
-114
@@ -1,114 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据权限配置对象 xg_data_permission
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_data_permission")
|
||||
public class XgDataPermission extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限范围
|
||||
*/
|
||||
private String permissionScope;
|
||||
|
||||
/**
|
||||
* 范围值(JSON格式)
|
||||
*/
|
||||
private String scopeValues;
|
||||
|
||||
/**
|
||||
* 权限级别
|
||||
*/
|
||||
private Integer permissionLevel;
|
||||
|
||||
/**
|
||||
* 是否启用:0-否,1-是
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveTime;
|
||||
|
||||
/**
|
||||
* 失效时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
}
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统计结果缓存对象 xg_statistics_cache
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_statistics_cache")
|
||||
public class XgStatisticsCache extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 缓存键
|
||||
*/
|
||||
private String cacheKey;
|
||||
|
||||
/**
|
||||
* 缓存类型:dimension-维度统计,report-报表,chart-图表
|
||||
*/
|
||||
private String cacheType;
|
||||
|
||||
/**
|
||||
* 缓存内容(JSON格式)
|
||||
*/
|
||||
private String cacheContent;
|
||||
|
||||
/**
|
||||
* 缓存时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cacheTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expireTime;
|
||||
|
||||
/**
|
||||
* 是否过期:0-否,1-是
|
||||
*/
|
||||
private Integer isExpired;
|
||||
|
||||
/**
|
||||
* 命中次数
|
||||
*/
|
||||
private Integer hitCount;
|
||||
|
||||
/**
|
||||
* 最后命中时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastHitTime;
|
||||
|
||||
/**
|
||||
* 数据大小(字节)
|
||||
*/
|
||||
private Integer dataSize;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
}
|
||||
-112
@@ -1,112 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统计分析配置对象 xg_statistics_config
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_statistics_config")
|
||||
public class XgStatisticsConfig extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置编码
|
||||
*/
|
||||
private String configCode;
|
||||
|
||||
/**
|
||||
* 配置类型:dimension-维度,report-报表,chart-图表
|
||||
*/
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置内容(JSON格式)
|
||||
*/
|
||||
private String configContent;
|
||||
|
||||
/**
|
||||
* 是否系统配置:0-否,1-是
|
||||
*/
|
||||
private Integer isSystem;
|
||||
|
||||
/**
|
||||
* 是否启用:0-否,1-是
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
}
|
||||
-471
@@ -1,471 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 学生信息对象 xg_student_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_student_info")
|
||||
public class XgStudentInfo extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 英文姓名
|
||||
*/
|
||||
@TableField(value = "name_english", exist = false)
|
||||
private String nameEnglish;
|
||||
|
||||
/**
|
||||
* 曾用名
|
||||
*/
|
||||
@TableField(value = "former_name", exist = false)
|
||||
private String formerName;
|
||||
|
||||
/**
|
||||
* 姓名拼音
|
||||
*/
|
||||
@TableField(value = "name_pinyin", exist = false)
|
||||
private String namePinyin;
|
||||
|
||||
/**
|
||||
* 性别:0-男,1-女
|
||||
*/
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 婚姻状况:未婚、已婚、离异、丧偶
|
||||
*/
|
||||
@TableField(value = "marital_status", exist = false)
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String religion;
|
||||
|
||||
/**
|
||||
* 照片URL
|
||||
*/
|
||||
@TableField(value = "photo_url", exist = false)
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 学生照片存储路径
|
||||
*/
|
||||
@TableField(value = "photo_path", exist = false)
|
||||
private String photoPath;
|
||||
|
||||
/**
|
||||
* 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业
|
||||
*/
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date enrollmentDate;
|
||||
|
||||
/**
|
||||
* 学制(年)
|
||||
*/
|
||||
@TableField(value = "school_system", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer schoolSystem;
|
||||
|
||||
/**
|
||||
* 学历层次
|
||||
*/
|
||||
@TableField(value = "education_level", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String educationLevel;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
@TableField(value = "training_type", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 录取类别:统招、自主招生、专项计划等
|
||||
*/
|
||||
@TableField("admission_category")
|
||||
private String admissionCategory;
|
||||
|
||||
/**
|
||||
* 生源地区(省市县)
|
||||
*/
|
||||
@TableField("source_region")
|
||||
private String sourceRegion;
|
||||
|
||||
/**
|
||||
* 毕业中学
|
||||
*/
|
||||
@TableField("middle_school")
|
||||
private String middleSchool;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号码
|
||||
*/
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* 家庭地址
|
||||
*/
|
||||
private String homeAddress;
|
||||
|
||||
/**
|
||||
* 现住址
|
||||
*/
|
||||
@TableField("current_address")
|
||||
private String currentAddress;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@TableField("postal_code")
|
||||
private String postalCode;
|
||||
|
||||
/**
|
||||
* 户口类型:农业、非农业
|
||||
*/
|
||||
@TableField("household_register_type")
|
||||
private String householdRegisterType;
|
||||
|
||||
/**
|
||||
* 户籍所在地
|
||||
*/
|
||||
@TableField("hukou_location")
|
||||
private String hukouLocation;
|
||||
|
||||
/**
|
||||
* 宿舍楼栋
|
||||
*/
|
||||
@TableField("dormitory_building")
|
||||
private String dormitoryBuilding;
|
||||
|
||||
/**
|
||||
* 宿舍房间号
|
||||
*/
|
||||
@TableField("dormitory_room")
|
||||
private String dormitoryRoom;
|
||||
|
||||
/**
|
||||
* 身高(cm)
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 体重(kg)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
@TableField("blood_type")
|
||||
private String bloodType;
|
||||
|
||||
// 紧急联系人信息字段
|
||||
@TableField(value = "emergency_contact_name", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String emergencyContactName;
|
||||
|
||||
@TableField(value = "emergency_contact_phone", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String emergencyContactPhone;
|
||||
|
||||
@TableField(value = "emergency_contact_relation", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String emergencyContactRelation;
|
||||
|
||||
// 家庭信息字段
|
||||
@TableField(value = "father_name", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String fatherName;
|
||||
|
||||
@TableField(value = "father_phone", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String fatherPhone;
|
||||
|
||||
@TableField(value = "father_work_unit", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String fatherWorkUnit;
|
||||
|
||||
@TableField(value = "mother_name", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String motherName;
|
||||
|
||||
@TableField(value = "mother_phone", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String motherPhone;
|
||||
|
||||
@TableField(value = "mother_work_unit", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String motherWorkUnit;
|
||||
|
||||
private String guardianName;
|
||||
private String guardianPhone;
|
||||
private String guardianRelation;
|
||||
|
||||
@TableField(value = "family_income", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String familyIncome;
|
||||
|
||||
@TableField(value = "family_economic_status", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String familyEconomicStatus;
|
||||
|
||||
@TableField(value = "family_members", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer familyMembers;
|
||||
|
||||
// 健康信息字段
|
||||
@TableField(value = "health_status", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String healthStatus;
|
||||
|
||||
@TableField(value = "special_condition", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String specialCondition;
|
||||
|
||||
@TableField(value = "medical_history", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String medicalHistory;
|
||||
|
||||
@TableField(value = "allergies", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String allergies;
|
||||
|
||||
private String disabilityType;
|
||||
private String disabilityLevel;
|
||||
|
||||
// 银行信息字段
|
||||
@TableField(value = "bank_card_no", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String bankCardNo;
|
||||
|
||||
@TableField(value = "bank_name", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String bankName;
|
||||
|
||||
@TableField(value = "bank_branch", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String bankBranch;
|
||||
|
||||
@TableField(value = "card_holder_name", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String cardHolderName;
|
||||
|
||||
// 特殊标识字段
|
||||
@TableField(value = "is_poor_student", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isPoorStudent;
|
||||
|
||||
@TableField(value = "is_minority", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isMinority;
|
||||
|
||||
@TableField(value = "is_disabled", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isDisabled;
|
||||
|
||||
@TableField(value = "is_orphan", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isOrphan;
|
||||
|
||||
@TableField(value = "is_left_behind_child", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isLeftBehindChild;
|
||||
|
||||
@TableField(value = "is_single_child", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private Integer isSingleChild;
|
||||
|
||||
@TableField("has_loan")
|
||||
private Integer hasLoan;
|
||||
|
||||
@TableField("loan_amount")
|
||||
private BigDecimal loanAmount;
|
||||
|
||||
// 扩展信息字段
|
||||
@TableField(value = "specialties", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String specialties;
|
||||
|
||||
@TableField(value = "awards", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String awards;
|
||||
|
||||
@TableField(value = "violations", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String violations;
|
||||
|
||||
@TableField(value = "social_activities", updateStrategy = FieldStrategy.NOT_EMPTY)
|
||||
private String socialActivities;
|
||||
|
||||
// 状态管理字段
|
||||
/**
|
||||
* 信息状态:1-正常,2-待审核,3-已审核,4-已驳回,5-已删除
|
||||
*/
|
||||
@TableField("info_status")
|
||||
private String infoStatus;
|
||||
|
||||
/**
|
||||
* 数据来源:manual-手工录入,import-批量导入,sync-同步
|
||||
*/
|
||||
@TableField("data_source")
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 最后批次ID
|
||||
*/
|
||||
@TableField("last_batch_id")
|
||||
private Long lastBatchId;
|
||||
|
||||
/**
|
||||
* 最后审核时间
|
||||
*/
|
||||
@TableField("last_audit_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastAuditTime;
|
||||
|
||||
/**
|
||||
* 信息是否完整:0-不完整,1-完整
|
||||
*/
|
||||
@TableField("is_complete")
|
||||
private Integer isComplete;
|
||||
|
||||
/**
|
||||
* 信息完整度百分比
|
||||
*/
|
||||
@TableField("completion_rate")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
// 扩展字段
|
||||
@TableField("ext_field1")
|
||||
private String extField1;
|
||||
|
||||
@TableField("ext_field2")
|
||||
private String extField2;
|
||||
|
||||
@TableField("ext_field3")
|
||||
private String extField3;
|
||||
|
||||
@TableField("ext_field4")
|
||||
private String extField4;
|
||||
|
||||
@TableField("ext_field5")
|
||||
private String extField5;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
-274
@@ -1,274 +0,0 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 学生信息对象(简化版 - 只包含数据库中确实存在的字段)
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_student_info")
|
||||
public class XgStudentInfoSimple extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别:0-男,1-女
|
||||
*/
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业
|
||||
*/
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date enrollmentDate;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号码
|
||||
*/
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* 家庭地址
|
||||
*/
|
||||
private String homeAddress;
|
||||
|
||||
/**
|
||||
* 身高(厘米)
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 体重(公斤)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
private String bloodType;
|
||||
|
||||
/**
|
||||
* 健康状况
|
||||
*/
|
||||
private String healthStatus;
|
||||
|
||||
/**
|
||||
* 过敏史
|
||||
*/
|
||||
private String allergies;
|
||||
|
||||
/**
|
||||
* 病史
|
||||
*/
|
||||
private String medicalHistory;
|
||||
|
||||
/**
|
||||
* 父亲姓名
|
||||
*/
|
||||
private String fatherName;
|
||||
|
||||
/**
|
||||
* 父亲电话
|
||||
*/
|
||||
private String fatherPhone;
|
||||
|
||||
/**
|
||||
* 父亲工作单位
|
||||
*/
|
||||
private String fatherWorkUnit;
|
||||
|
||||
/**
|
||||
* 母亲姓名
|
||||
*/
|
||||
private String motherName;
|
||||
|
||||
/**
|
||||
* 母亲电话
|
||||
*/
|
||||
private String motherPhone;
|
||||
|
||||
/**
|
||||
* 母亲工作单位
|
||||
*/
|
||||
private String motherWorkUnit;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
private String emergencyContactName;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
private String emergencyContactPhone;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
*/
|
||||
private String emergencyContactRelation;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
*/
|
||||
private String bankBranch;
|
||||
|
||||
/**
|
||||
* 持卡人姓名
|
||||
*/
|
||||
private String cardHolderName;
|
||||
|
||||
/**
|
||||
* 是否贫困生:0-否,1-是
|
||||
*/
|
||||
private Integer isPoorStudent;
|
||||
|
||||
/**
|
||||
* 是否少数民族:0-否,1-是
|
||||
*/
|
||||
private Integer isMinority;
|
||||
|
||||
/**
|
||||
* 是否残疾:0-否,1-是
|
||||
*/
|
||||
private Integer isDisabled;
|
||||
|
||||
/**
|
||||
* 是否孤儿:0-否,1-是
|
||||
*/
|
||||
private Integer isOrphan;
|
||||
|
||||
/**
|
||||
* 是否留守儿童:0-否,1-是
|
||||
*/
|
||||
private Integer isLeftBehindChild;
|
||||
|
||||
/**
|
||||
* 是否独生子女:0-否,1-是
|
||||
*/
|
||||
private Integer isSingleChild;
|
||||
|
||||
/**
|
||||
* 特长爱好
|
||||
*/
|
||||
private String specialties;
|
||||
|
||||
/**
|
||||
* 家庭年收入
|
||||
*/
|
||||
private String familyIncome;
|
||||
|
||||
/**
|
||||
* 社会活动
|
||||
*/
|
||||
private String socialActivities;
|
||||
|
||||
/**
|
||||
* 获奖情况
|
||||
*/
|
||||
private String awards;
|
||||
|
||||
/**
|
||||
* 违纪记录
|
||||
*/
|
||||
private String violations;
|
||||
|
||||
/**
|
||||
* 宿舍楼栋
|
||||
*/
|
||||
private String dormitoryBuilding;
|
||||
|
||||
/**
|
||||
* 宿舍房间号
|
||||
*/
|
||||
private String dormitoryRoom;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
-207
@@ -1,207 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchScheduledTask;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 批次定时任务业务对象 XgBatchScheduledTaskBo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgBatchScheduledTask.class, reverseConvertGenerate = false)
|
||||
public class XgBatchScheduledTaskBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
@NotNull(message = "任务ID不能为空", groups = { EditGroup.class })
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@NotBlank(message = "任务类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "任务类型长度不能超过50个字符")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 200, message = "任务名称长度不能超过200个字符")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 任务描述
|
||||
*/
|
||||
@Size(max = 500, message = "任务描述长度不能超过500个字符")
|
||||
private String taskDescription;
|
||||
|
||||
/**
|
||||
* 计划执行时间
|
||||
*/
|
||||
@NotNull(message = "计划执行时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date scheduledTime;
|
||||
|
||||
/**
|
||||
* 实际执行时间
|
||||
*/
|
||||
private Date actualExecutionTime;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@NotBlank(message = "任务状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "任务状态长度不能超过20个字符")
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 执行结果
|
||||
*/
|
||||
@Size(max = 20, message = "执行结果长度不能超过20个字符")
|
||||
private String executionResult;
|
||||
|
||||
/**
|
||||
* 执行次数
|
||||
*/
|
||||
@Min(value = 0, message = "执行次数不能小于0")
|
||||
private Integer executionCount;
|
||||
|
||||
/**
|
||||
* 最大重试次数
|
||||
*/
|
||||
@Min(value = 0, message = "最大重试次数不能小于0")
|
||||
@Max(value = 10, message = "最大重试次数不能大于10")
|
||||
private Integer maxRetryCount;
|
||||
|
||||
/**
|
||||
* 重试间隔(分钟)
|
||||
*/
|
||||
@Min(value = 1, message = "重试间隔不能小于1分钟")
|
||||
@Max(value = 1440, message = "重试间隔不能大于1440分钟")
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@Size(max = 1000, message = "错误信息长度不能超过1000个字符")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 执行参数
|
||||
*/
|
||||
@Size(max = 2000, message = "执行参数长度不能超过2000个字符")
|
||||
private String executionParams;
|
||||
|
||||
/**
|
||||
* 执行结果详情
|
||||
*/
|
||||
@Size(max = 2000, message = "执行结果详情长度不能超过2000个字符")
|
||||
private String executionResultDetail;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@NotNull(message = "是否启用不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isEnabled;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "租户ID长度不能超过20个字符")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
// 查询条件字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 任务类型列表
|
||||
*/
|
||||
private String[] taskTypes;
|
||||
|
||||
/**
|
||||
* 任务状态列表
|
||||
*/
|
||||
private String[] taskStatuses;
|
||||
|
||||
/**
|
||||
* 执行结果列表
|
||||
*/
|
||||
private String[] executionResults;
|
||||
|
||||
/**
|
||||
* 计划执行开始时间
|
||||
*/
|
||||
private Date scheduledStartTime;
|
||||
|
||||
/**
|
||||
* 计划执行结束时间
|
||||
*/
|
||||
private Date scheduledEndTime;
|
||||
|
||||
/**
|
||||
* 实际执行开始时间
|
||||
*/
|
||||
private Date actualStartTime;
|
||||
|
||||
/**
|
||||
* 实际执行结束时间
|
||||
*/
|
||||
private Date actualEndTime;
|
||||
|
||||
/**
|
||||
* 是否需要重试
|
||||
*/
|
||||
private Boolean needRetry;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
private Boolean isTimeout;
|
||||
}
|
||||
-378
@@ -1,378 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassInfo;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级信息业务对象 xg_class_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgClassInfo.class, reverseConvertGenerate = false)
|
||||
public class XgClassInfoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
@NotBlank(message = "班级代码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 32, message = "班级代码长度不能超过32个字符")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@NotBlank(message = "班级名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "班级名称长度不能超过100个字符")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级
|
||||
*/
|
||||
private String classType;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@NotBlank(message = "年级不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "年级长度不能超过10个字符")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@NotNull(message = "入学年份不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 1900, message = "入学年份不能小于1900")
|
||||
@Max(value = 2100, message = "入学年份不能大于2100")
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
@Min(value = 1900, message = "毕业年份不能小于1900")
|
||||
@Max(value = 2100, message = "毕业年份不能大于2100")
|
||||
private Integer graduationYear;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
@Size(max = 20, message = "专业代码长度不能超过20个字符")
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@Size(max = 100, message = "专业名称长度不能超过100个字符")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
@Size(max = 20, message = "培养方式长度不能超过20个字符")
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 学位类型:本科、专科、研究生等
|
||||
*/
|
||||
@Size(max = 20, message = "学位类型长度不能超过20个字符")
|
||||
private String degreeType;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
@Size(max = 20, message = "学院代码长度不能超过20个字符")
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@Size(max = 100, message = "学院名称长度不能超过100个字符")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
@Size(max = 50, message = "辅导员姓名长度不能超过50个字符")
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
@Size(max = 50, message = "班主任姓名长度不能超过50个字符")
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
private Long classAdvisorId;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
@Size(max = 50, message = "班级导师姓名长度不能超过50个字符")
|
||||
private String classAdvisorName;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
private Long classMonitorId;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
@Size(max = 50, message = "班长姓名长度不能超过50个字符")
|
||||
private String classMonitorName;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
private Long deputyMonitorId;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
@Size(max = 50, message = "副班长姓名长度不能超过50个字符")
|
||||
private String deputyMonitorName;
|
||||
|
||||
/**
|
||||
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||
*/
|
||||
private String classStatus;
|
||||
|
||||
/**
|
||||
* 是否毕业:0-未毕业,1-已毕业
|
||||
*/
|
||||
private Integer isGraduation;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
private LocalDate graduationDate;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
@Min(value = 1, message = "计划容量不能小于1")
|
||||
@Max(value = 200, message = "计划容量不能大于200")
|
||||
private Integer plannedCapacity;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
private Integer currentStudentCount;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
@Min(value = 1, message = "最大学生数量不能小于1")
|
||||
@Max(value = 200, message = "最大学生数量不能大于200")
|
||||
private Integer maxStudentCount;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
private Integer maleCount;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
private Integer femaleCount;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
private Integer activeCount;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
private Integer transferInCount;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
private Integer transferOutCount;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
private Integer dropoutCount;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
private Integer graduateCount;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
@Size(max = 200, message = "办公室位置长度不能超过200个字符")
|
||||
private String officeLocation;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
@Size(max = 100, message = "教室位置长度不能超过100个字符")
|
||||
private String classLocation;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Size(max = 20, message = "联系电话长度不能超过20个字符")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
@Size(max = 20, message = "QQ群号长度不能超过20个字符")
|
||||
private String qqGroup;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
@Size(max = 100, message = "微信群长度不能超过100个字符")
|
||||
private String wechatGroup;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(max = 100, message = "邮箱长度不能超过100个字符")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
private String classSchedule;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
private String classCulture;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
private String classRules;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
@Size(max = 500, message = "班级描述长度不能超过500个字符")
|
||||
private String classDescription;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
private LocalDateTime lastCountUpdate;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
@Size(max = 200, message = "扩展字段1长度不能超过200个字符")
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
@Size(max = 200, message = "扩展字段2长度不能超过200个字符")
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
@Size(max = 200, message = "扩展字段3长度不能超过200个字符")
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ========== 查询条件字段 ==========
|
||||
|
||||
/**
|
||||
* 入学年份开始
|
||||
*/
|
||||
private Integer enrollmentYearStart;
|
||||
|
||||
/**
|
||||
* 入学年份结束
|
||||
*/
|
||||
private Integer enrollmentYearEnd;
|
||||
|
||||
/**
|
||||
* 班级代码列表(用于批量查询)
|
||||
*/
|
||||
private List<String> classCodeList;
|
||||
|
||||
/**
|
||||
* 班级状态列表(用于批量查询)
|
||||
*/
|
||||
private List<String> classStatusList;
|
||||
|
||||
/**
|
||||
* 学院代码列表(用于批量查询)
|
||||
*/
|
||||
private List<String> collegeCodeList;
|
||||
|
||||
/**
|
||||
* 专业代码列表(用于批量查询)
|
||||
*/
|
||||
private List<String> majorCodeList;
|
||||
|
||||
/**
|
||||
* 年级列表(用于批量查询)
|
||||
*/
|
||||
private List<String> gradeList;
|
||||
|
||||
/**
|
||||
* 辅导员ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> counselorIdList;
|
||||
|
||||
/**
|
||||
* 班主任ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> classTeacherIdList;
|
||||
|
||||
/**
|
||||
* 创建时间开始
|
||||
*/
|
||||
private String createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间结束
|
||||
*/
|
||||
private String createTimeEnd;
|
||||
|
||||
}
|
||||
-112
@@ -1,112 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级班主任关系业务对象 xg_class_teacher_relation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgClassTeacherRelation.class, reverseConvertGenerate = false)
|
||||
public class XgClassTeacherRelationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班主任用户ID
|
||||
*/
|
||||
@NotNull(message = "班主任用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long teacherId;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 生效开始日期
|
||||
*/
|
||||
private LocalDateTime startDate;
|
||||
|
||||
/**
|
||||
* 生效结束日期
|
||||
*/
|
||||
private LocalDateTime endDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ========== 查询条件字段 ==========
|
||||
|
||||
/**
|
||||
* 班级ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> classIdList;
|
||||
|
||||
/**
|
||||
* 班主任ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> teacherIdList;
|
||||
|
||||
/**
|
||||
* 状态列表(用于批量查询)
|
||||
*/
|
||||
private List<String> statusList;
|
||||
|
||||
/**
|
||||
* 创建时间开始
|
||||
*/
|
||||
private String createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间结束
|
||||
*/
|
||||
private String createTimeEnd;
|
||||
|
||||
/**
|
||||
* 生效开始日期开始
|
||||
*/
|
||||
private String startDateStart;
|
||||
|
||||
/**
|
||||
* 生效开始日期结束
|
||||
*/
|
||||
private String startDateEnd;
|
||||
|
||||
/**
|
||||
* 生效结束日期开始
|
||||
*/
|
||||
private String endDateStart;
|
||||
|
||||
/**
|
||||
* 生效结束日期结束
|
||||
*/
|
||||
private String endDateEnd;
|
||||
|
||||
}
|
||||
-280
@@ -1,280 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 信息采集批次业务对象 xg_collection_batch
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgCollectionBatch.class, reverseConvertGenerate = false)
|
||||
public class XgCollectionBatchBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@NotBlank(message = "批次编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 32, message = "批次编码长度不能超过32个字符")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@NotBlank(message = "批次名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "批次名称长度不能超过100个字符")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义
|
||||
*/
|
||||
@Size(max = 20, message = "批次类型长度不能超过20个字符")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 学年,如2024-2025
|
||||
*/
|
||||
@NotBlank(message = "学年不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "学年长度不能超过20个字符")
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期:spring-春季,autumn-秋季
|
||||
*/
|
||||
@Size(max = 10, message = "学期长度不能超过10个字符")
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档
|
||||
*/
|
||||
@Pattern(regexp = "^[1-5]$", message = "批次状态只能为1-5")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date publishTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date archiveTime;
|
||||
|
||||
/**
|
||||
* 目标学院(JSON格式)
|
||||
*/
|
||||
private String targetColleges;
|
||||
|
||||
/**
|
||||
* 目标年级(JSON格式)
|
||||
*/
|
||||
private String targetGrades;
|
||||
|
||||
/**
|
||||
* 目标专业(JSON格式)
|
||||
*/
|
||||
private String targetMajors;
|
||||
|
||||
/**
|
||||
* 必填字段(JSON格式)
|
||||
*/
|
||||
private String requiredFields;
|
||||
|
||||
/**
|
||||
* 可选字段(JSON格式)
|
||||
*/
|
||||
private String optionalFields;
|
||||
|
||||
/**
|
||||
* 审核级别配置(JSON格式)
|
||||
*/
|
||||
private String auditLevels;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
@Min(value = 0, message = "总学生数不能小于0")
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交数
|
||||
*/
|
||||
@Min(value = 0, message = "已提交数不能小于0")
|
||||
private Integer submittedCount;
|
||||
|
||||
/**
|
||||
* 已审核数
|
||||
*/
|
||||
@Min(value = 0, message = "已审核数不能小于0")
|
||||
private Integer approvedCount;
|
||||
|
||||
/**
|
||||
* 已驳回数
|
||||
*/
|
||||
@Min(value = 0, message = "已驳回数不能小于0")
|
||||
private Integer rejectedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
@DecimalMin(value = "0.0", message = "完成率不能小于0")
|
||||
@DecimalMax(value = "100.0", message = "完成率不能大于100")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 审核权限(JSON格式)
|
||||
*/
|
||||
private String auditPermissions;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 自动提醒:0-关闭,1-开启
|
||||
*/
|
||||
@Pattern(regexp = "^[01]$", message = "自动提醒只能为0或1")
|
||||
private Integer autoReminder;
|
||||
|
||||
/**
|
||||
* 提醒频率(天)
|
||||
*/
|
||||
@Min(value = 1, message = "提醒频率不能小于1天")
|
||||
@Max(value = 365, message = "提醒频率不能大于365天")
|
||||
private Integer reminderFrequency;
|
||||
|
||||
/**
|
||||
* 提交后允许修改:0-不允许,1-允许
|
||||
*/
|
||||
@Pattern(regexp = "^[01]$", message = "提交后允许修改只能为0或1")
|
||||
private Integer allowModifyAfterSubmit;
|
||||
|
||||
/**
|
||||
* 批次描述
|
||||
*/
|
||||
@Size(max = 500, message = "批次描述长度不能超过500个字符")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ========== 查询条件字段 ==========
|
||||
|
||||
/**
|
||||
* 批次状态列表(用于批量查询)
|
||||
*/
|
||||
private List<String> batchStatusList;
|
||||
|
||||
/**
|
||||
* 学年列表(用于批量查询)
|
||||
*/
|
||||
private List<String> academicYearList;
|
||||
|
||||
/**
|
||||
* 批次类型列表(用于批量查询)
|
||||
*/
|
||||
private List<String> batchTypeList;
|
||||
|
||||
/**
|
||||
* 开始时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTimeBegin;
|
||||
|
||||
/**
|
||||
* 开始时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTimeEnd;
|
||||
|
||||
/**
|
||||
* 结束时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTimeBegin;
|
||||
|
||||
/**
|
||||
* 结束时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
-150
@@ -1,150 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchLog;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次操作日志业务对象 XgCollectionBatchLogBo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgCollectionBatchLog.class, reverseConvertGenerate = false)
|
||||
public class XgCollectionBatchLogBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 日志ID
|
||||
*/
|
||||
@NotNull(message = "日志ID不能为空", groups = { EditGroup.class })
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@NotBlank(message = "操作类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "操作类型长度不能超过50个字符")
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 操作描述
|
||||
*/
|
||||
@Size(max = 500, message = "操作描述长度不能超过500个字符")
|
||||
private String operationDescription;
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
@NotNull(message = "操作人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@NotBlank(message = "操作人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "操作人姓名长度不能超过100个字符")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@NotNull(message = "操作时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date operationTime;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@Size(max = 50, message = "IP地址长度不能超过50个字符")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@Size(max = 500, message = "用户代理长度不能超过500个字符")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 操作结果
|
||||
*/
|
||||
@Size(max = 20, message = "操作结果长度不能超过20个字符")
|
||||
private String operationResult;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@Size(max = 1000, message = "错误信息长度不能超过1000个字符")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "租户ID长度不能超过20个字符")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
// 查询条件字段
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
}
|
||||
-173
@@ -1,173 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchPermission;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次权限配置业务对象 XgCollectionBatchPermissionBo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgCollectionBatchPermission.class, reverseConvertGenerate = false)
|
||||
public class XgCollectionBatchPermissionBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 权限ID
|
||||
*/
|
||||
@NotNull(message = "权限ID不能为空", groups = { EditGroup.class })
|
||||
private Long permissionId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@NotBlank(message = "权限类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "权限类型长度不能超过20个字符")
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限对象ID
|
||||
*/
|
||||
@NotNull(message = "权限对象ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long permissionObjectId;
|
||||
|
||||
/**
|
||||
* 权限对象类型
|
||||
*/
|
||||
@NotBlank(message = "权限对象类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "权限对象类型长度不能超过20个字符")
|
||||
private String permissionObjectType;
|
||||
|
||||
/**
|
||||
* 权限对象名称
|
||||
*/
|
||||
@NotBlank(message = "权限对象名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "权限对象名称长度不能超过100个字符")
|
||||
private String permissionObjectName;
|
||||
|
||||
/**
|
||||
* 权限范围
|
||||
*/
|
||||
@Size(max = 100, message = "权限范围长度不能超过100个字符")
|
||||
private String permissionScope;
|
||||
|
||||
/**
|
||||
* 权限级别
|
||||
*/
|
||||
@Min(value = 1, message = "权限级别不能小于1")
|
||||
@Max(value = 10, message = "权限级别不能大于10")
|
||||
private Integer permissionLevel;
|
||||
|
||||
/**
|
||||
* 是否有效
|
||||
*/
|
||||
@NotNull(message = "是否有效不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isActive;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
private Date effectiveTime;
|
||||
|
||||
/**
|
||||
* 失效时间
|
||||
*/
|
||||
private Date expirationTime;
|
||||
|
||||
/**
|
||||
* 授权人ID
|
||||
*/
|
||||
@NotNull(message = "授权人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long grantedBy;
|
||||
|
||||
/**
|
||||
* 授权时间
|
||||
*/
|
||||
@NotNull(message = "授权时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date grantedTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "租户ID长度不能超过20个字符")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
// 查询条件字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 权限类型列表
|
||||
*/
|
||||
private String[] permissionTypes;
|
||||
|
||||
/**
|
||||
* 权限对象类型列表
|
||||
*/
|
||||
private String[] permissionObjectTypes;
|
||||
|
||||
/**
|
||||
* 授权人姓名
|
||||
*/
|
||||
private String grantedByName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
}
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStatistics;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次统计业务对象 XgCollectionBatchStatisticsBo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgCollectionBatchStatistics.class, reverseConvertGenerate = false)
|
||||
public class XgCollectionBatchStatisticsBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 统计ID
|
||||
*/
|
||||
@NotNull(message = "统计ID不能为空", groups = { EditGroup.class })
|
||||
private Long statisticsId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 统计维度
|
||||
*/
|
||||
@NotBlank(message = "统计维度不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "统计维度长度不能超过50个字符")
|
||||
private String statisticsDimension;
|
||||
|
||||
/**
|
||||
* 维度值
|
||||
*/
|
||||
@NotBlank(message = "维度值不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "维度值长度不能超过100个字符")
|
||||
private String dimensionValue;
|
||||
|
||||
/**
|
||||
* 维度名称
|
||||
*/
|
||||
@Size(max = 200, message = "维度名称长度不能超过200个字符")
|
||||
private String dimensionName;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
@NotNull(message = "总学生数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 0, message = "总学生数不能小于0")
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交数
|
||||
*/
|
||||
@NotNull(message = "已提交数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 0, message = "已提交数不能小于0")
|
||||
private Integer submittedCount;
|
||||
|
||||
/**
|
||||
* 未提交数
|
||||
*/
|
||||
@NotNull(message = "未提交数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 0, message = "未提交数不能小于0")
|
||||
private Integer notSubmittedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
@NotNull(message = "完成率不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@DecimalMin(value = "0.00", message = "完成率不能小于0")
|
||||
@DecimalMax(value = "100.00", message = "完成率不能大于100")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
@Min(value = 1, message = "排名不能小于1")
|
||||
private Integer ranking;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@NotNull(message = "统计时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date statisticsTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "租户ID长度不能超过20个字符")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
// 查询条件字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 统计维度列表
|
||||
*/
|
||||
private String[] statisticsDimensions;
|
||||
|
||||
/**
|
||||
* 维度值列表
|
||||
*/
|
||||
private String[] dimensionValues;
|
||||
|
||||
/**
|
||||
* 最小完成率
|
||||
*/
|
||||
private BigDecimal minCompletionRate;
|
||||
|
||||
/**
|
||||
* 最大完成率
|
||||
*/
|
||||
private BigDecimal maxCompletionRate;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private String orderBy;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*/
|
||||
private String sortDirection;
|
||||
}
|
||||
-210
@@ -1,210 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStudent;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 信息采集批次学生关联业务对象 xg_collection_batch_student
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgCollectionBatchStudent.class, reverseConvertGenerate = false)
|
||||
public class XgCollectionBatchStudentBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "学号长度不能超过50个字符")
|
||||
private String studentCode;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@NotBlank(message = "学生姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "学生姓名长度不能超过100个字符")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@Size(max = 100, message = "学院名称长度不能超过100个字符")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@Size(max = 100, message = "专业名称长度不能超过100个字符")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@Size(max = 100, message = "班级名称长度不能超过100个字符")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 届别
|
||||
*/
|
||||
@Size(max = 50, message = "届别长度不能超过50个字符")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 是否可编辑:0-否,1-是
|
||||
*/
|
||||
@Pattern(regexp = "^[01]$", message = "是否可编辑只能为0或1")
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 是否已提交:0-否,1-是
|
||||
*/
|
||||
@Pattern(regexp = "^[01]$", message = "是否已提交只能为0或1")
|
||||
private Integer hasSubmitted;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTime;
|
||||
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastEditTime;
|
||||
|
||||
/**
|
||||
* 编辑次数
|
||||
*/
|
||||
@Min(value = 0, message = "编辑次数不能小于0")
|
||||
private Integer editCount;
|
||||
|
||||
// ========== 查询条件字段 ==========
|
||||
|
||||
/**
|
||||
* 批次ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> batchIdList;
|
||||
|
||||
/**
|
||||
* 学生ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> studentIdList;
|
||||
|
||||
/**
|
||||
* 学院ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> collegeIdList;
|
||||
|
||||
/**
|
||||
* 专业ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> majorIdList;
|
||||
|
||||
/**
|
||||
* 班级ID列表(用于批量查询)
|
||||
*/
|
||||
private List<Long> classIdList;
|
||||
|
||||
/**
|
||||
* 届别列表(用于批量查询)
|
||||
*/
|
||||
private List<String> gradeList;
|
||||
|
||||
/**
|
||||
* 是否已提交列表(用于批量查询)
|
||||
*/
|
||||
private List<Integer> hasSubmittedList;
|
||||
|
||||
/**
|
||||
* 提交时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTimeBegin;
|
||||
|
||||
/**
|
||||
* 提交时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgStatisticsConfig;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 统计分析配置业务对象 xg_statistics_config
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgStatisticsConfig.class, reverseConvertGenerate = false)
|
||||
public class XgStatisticsConfigBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@NotBlank(message = "配置名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "配置名称长度不能超过100个字符")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置编码
|
||||
*/
|
||||
@NotBlank(message = "配置编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "配置编码长度不能超过50个字符")
|
||||
private String configCode;
|
||||
|
||||
/**
|
||||
* 配置类型:dimension-维度,report-报表,chart-图表
|
||||
*/
|
||||
@NotBlank(message = "配置类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "配置类型长度不能超过20个字符")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置内容(JSON格式)
|
||||
*/
|
||||
@NotBlank(message = "配置内容不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configContent;
|
||||
|
||||
/**
|
||||
* 是否系统配置:0-否,1-是
|
||||
*/
|
||||
private Integer isSystem;
|
||||
|
||||
/**
|
||||
* 是否启用:0-否,1-是
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
}
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 统计查询业务对象
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgStatisticsQueryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 统计类型:dimension-维度统计,report-报表,chart-图表
|
||||
*/
|
||||
@NotBlank(message = "统计类型不能为空")
|
||||
private String statisticsType;
|
||||
|
||||
/**
|
||||
* 统计维度
|
||||
*/
|
||||
private String dimension;
|
||||
|
||||
/**
|
||||
* 统计字段
|
||||
*/
|
||||
private String field;
|
||||
|
||||
/**
|
||||
* 分组字段
|
||||
*/
|
||||
private String groupBy;
|
||||
|
||||
/**
|
||||
* 统计条件
|
||||
*/
|
||||
private Map<String, Object> conditions;
|
||||
|
||||
/**
|
||||
* 时间范围 - 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 时间范围 - 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 学院ID列表
|
||||
*/
|
||||
private List<Long> collegeIds;
|
||||
|
||||
/**
|
||||
* 专业ID列表
|
||||
*/
|
||||
private List<Long> majorIds;
|
||||
|
||||
/**
|
||||
* 班级ID列表
|
||||
*/
|
||||
private List<Long> classIds;
|
||||
|
||||
/**
|
||||
* 年级列表
|
||||
*/
|
||||
private List<String> grades;
|
||||
|
||||
/**
|
||||
* 性别列表
|
||||
*/
|
||||
private List<String> genders;
|
||||
|
||||
/**
|
||||
* 政治面貌列表
|
||||
*/
|
||||
private List<String> politicalStatuses;
|
||||
|
||||
/**
|
||||
* 民族列表
|
||||
*/
|
||||
private List<String> nationalities;
|
||||
|
||||
/**
|
||||
* 学籍状态列表
|
||||
*/
|
||||
private List<String> studentStatuses;
|
||||
|
||||
/**
|
||||
* 培养方式列表
|
||||
*/
|
||||
private List<String> trainingTypes;
|
||||
|
||||
/**
|
||||
* 是否使用缓存
|
||||
*/
|
||||
private Boolean useCache;
|
||||
|
||||
/**
|
||||
* 缓存过期时间(分钟)
|
||||
*/
|
||||
private Integer cacheExpireMinutes;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private String orderBy;
|
||||
|
||||
/**
|
||||
* 排序方式:asc-升序,desc-降序
|
||||
*/
|
||||
private String orderDirection;
|
||||
|
||||
/**
|
||||
* 限制结果数量
|
||||
*/
|
||||
private Integer limit;
|
||||
|
||||
/**
|
||||
* 是否需要详细数据
|
||||
*/
|
||||
private Boolean needDetail;
|
||||
|
||||
/**
|
||||
* 是否需要汇总数据
|
||||
*/
|
||||
private Boolean needSummary;
|
||||
|
||||
/**
|
||||
* 扩展参数
|
||||
*/
|
||||
private Map<String, Object> extra;
|
||||
}
|
||||
-645
@@ -1,645 +0,0 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 学生信息业务对象 xg_student_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgStudentInfo.class, reverseConvertGenerate = false)
|
||||
public class XgStudentInfoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 32, message = "学号长度不能超过32个字符")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Size(max = 18, message = "身份证号长度不能超过18个字符")
|
||||
@Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "身份证号格式不正确")
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "姓名长度不能超过50个字符")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 英文姓名
|
||||
*/
|
||||
@Size(max = 100, message = "英文姓名长度不能超过100个字符")
|
||||
private String nameEnglish;
|
||||
|
||||
/**
|
||||
* 曾用名
|
||||
*/
|
||||
@Size(max = 50, message = "曾用名长度不能超过50个字符")
|
||||
private String formerName;
|
||||
|
||||
/**
|
||||
* 姓名拼音
|
||||
*/
|
||||
@Size(max = 200, message = "姓名拼音长度不能超过200个字符")
|
||||
private String namePinyin;
|
||||
|
||||
/**
|
||||
* 性别:0-男,1-女
|
||||
*/
|
||||
@NotBlank(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Pattern(regexp = "^[MF]$", message = "性别只能为M或F")
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Size(max = 20, message = "民族长度不能超过20个字符")
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@Size(max = 20, message = "政治面貌长度不能超过20个字符")
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@Size(max = 10, message = "婚姻状况长度不能超过10个字符")
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
@Size(max = 20, message = "宗教信仰长度不能超过20个字符")
|
||||
private String religion;
|
||||
|
||||
/**
|
||||
* 照片URL
|
||||
*/
|
||||
@Size(max = 500, message = "照片URL长度不能超过500个字符")
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 学生照片存储路径
|
||||
*/
|
||||
@Size(max = 500, message = "照片路径长度不能超过500个字符")
|
||||
private String photoPath;
|
||||
|
||||
/**
|
||||
* 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业
|
||||
*/
|
||||
@Pattern(regexp = "^[1-5]$", message = "学籍状态只能为1-5")
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@Min(value = 1900, message = "入学年份不能小于1900")
|
||||
@Max(value = 2100, message = "入学年份不能大于2100")
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date enrollmentDate;
|
||||
|
||||
/**
|
||||
* 学制(年)
|
||||
*/
|
||||
@Min(value = 1, message = "学制不能小于1年")
|
||||
@Max(value = 10, message = "学制不能大于10年")
|
||||
private Integer schoolSystem;
|
||||
|
||||
/**
|
||||
* 学历层次
|
||||
*/
|
||||
|
||||
@Size(max = 20, message = "学历层次长度不能超过20个字符")
|
||||
private String educationLevel;
|
||||
|
||||
/**
|
||||
* 培养方式
|
||||
*/
|
||||
@Size(max = 20, message = "培养方式长度不能超过20个字符")
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 录取类别
|
||||
*/
|
||||
@Size(max = 20, message = "录取类别长度不能超过20个字符")
|
||||
private String admissionCategory;
|
||||
|
||||
/**
|
||||
* 生源地区
|
||||
*/
|
||||
@Size(max = 100, message = "生源地区长度不能超过100个字符")
|
||||
private String sourceRegion;
|
||||
|
||||
/**
|
||||
* 毕业中学
|
||||
*/
|
||||
@Size(max = 100, message = "毕业中学长度不能超过100个字符")
|
||||
private String middleSchool;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
@Size(max = 20, message = "专业代码长度不能超过20个字符")
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@Size(max = 100, message = "专业名称长度不能超过100个字符")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
@Size(max = 32, message = "班级代码长度不能超过32个字符")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@Size(max = 100, message = "班级名称长度不能超过100个字符")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@Size(max = 10, message = "年级长度不能超过10个字符")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
@Size(max = 20, message = "学院代码长度不能超过20个字符")
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@Size(max = 100, message = "学院名称长度不能超过100个字符")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
@Size(max = 50, message = "辅导员姓名长度不能超过50个字符")
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
@Size(max = 50, message = "班主任姓名长度不能超过50个字符")
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
@Email(message = "电子邮箱格式不正确")
|
||||
@Size(max = 100, message = "电子邮箱长度不能超过100个字符")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号码
|
||||
*/
|
||||
@Size(max = 20, message = "QQ号码长度不能超过20个字符")
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
@Size(max = 50, message = "微信号长度不能超过50个字符")
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* 家庭地址
|
||||
*/
|
||||
@Size(max = 200, message = "家庭地址长度不能超过200个字符")
|
||||
private String homeAddress;
|
||||
|
||||
/**
|
||||
* 现住址
|
||||
*/
|
||||
@Size(max = 200, message = "现住址长度不能超过200个字符")
|
||||
private String currentAddress;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@Pattern(regexp = "^\\d{6}$", message = "邮政编码格式不正确")
|
||||
private String postalCode;
|
||||
|
||||
/**
|
||||
* 户口类型
|
||||
*/
|
||||
@Size(max = 20, message = "户口类型长度不能超过20个字符")
|
||||
private String householdRegisterType;
|
||||
|
||||
/**
|
||||
* 户籍所在地
|
||||
*/
|
||||
@Size(max = 100, message = "户籍所在地长度不能超过100个字符")
|
||||
private String hukouLocation;
|
||||
|
||||
/**
|
||||
* 宿舍楼栋
|
||||
*/
|
||||
@Size(max = 50, message = "宿舍楼栋长度不能超过50个字符")
|
||||
private String dormitoryBuilding;
|
||||
|
||||
/**
|
||||
* 宿舍房间号
|
||||
*/
|
||||
@Size(max = 20, message = "宿舍房间号长度不能超过20个字符")
|
||||
private String dormitoryRoom;
|
||||
|
||||
/**
|
||||
* 身高(cm)
|
||||
*/
|
||||
@DecimalMin(value = "50.0", message = "身高不能小于50cm")
|
||||
@DecimalMax(value = "250.0", message = "身高不能大于250cm")
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 体重(kg)
|
||||
*/
|
||||
@DecimalMin(value = "20.0", message = "体重不能小于20kg")
|
||||
@DecimalMax(value = "200.0", message = "体重不能大于200kg")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
@Size(max = 10, message = "血型长度不能超过10个字符")
|
||||
private String bloodType;
|
||||
|
||||
// ===== 紧急联系人信息字段 =====
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "紧急联系人姓名长度不能超过50个字符")
|
||||
private String emergencyContactName;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "紧急联系人电话格式不正确")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
*/
|
||||
@Size(max = 20, message = "紧急联系人关系长度不能超过20个字符")
|
||||
private String emergencyContactRelation;
|
||||
|
||||
// ===== 家庭信息字段 =====
|
||||
|
||||
/**
|
||||
* 父亲姓名
|
||||
*/
|
||||
@Size(max = 50, message = "父亲姓名长度不能超过50个字符")
|
||||
private String fatherName;
|
||||
|
||||
/**
|
||||
* 父亲电话
|
||||
*/
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "父亲电话格式不正确")
|
||||
private String fatherPhone;
|
||||
|
||||
/**
|
||||
* 父亲工作单位
|
||||
*/
|
||||
@Size(max = 100, message = "父亲工作单位长度不能超过100个字符")
|
||||
private String fatherWorkUnit;
|
||||
|
||||
/**
|
||||
* 母亲姓名
|
||||
*/
|
||||
@Size(max = 50, message = "母亲姓名长度不能超过50个字符")
|
||||
private String motherName;
|
||||
|
||||
/**
|
||||
* 母亲电话
|
||||
*/
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "母亲电话格式不正确")
|
||||
private String motherPhone;
|
||||
|
||||
/**
|
||||
* 母亲工作单位
|
||||
*/
|
||||
@Size(max = 100, message = "母亲工作单位长度不能超过100个字符")
|
||||
private String motherWorkUnit;
|
||||
|
||||
/**
|
||||
* 家庭年收入
|
||||
*/
|
||||
@Size(max = 20, message = "家庭年收入长度不能超过20个字符")
|
||||
private String familyIncome;
|
||||
|
||||
/**
|
||||
* 家庭经济状况
|
||||
*/
|
||||
@Size(max = 20, message = "家庭经济状况长度不能超过20个字符")
|
||||
private String familyEconomicStatus;
|
||||
|
||||
/**
|
||||
* 家庭成员数量
|
||||
*/
|
||||
@Min(value = 1, message = "家庭成员数量不能小于1")
|
||||
@Max(value = 20, message = "家庭成员数量不能大于20")
|
||||
private Integer familyMembers;
|
||||
|
||||
// ===== 健康信息字段 =====
|
||||
|
||||
/**
|
||||
* 健康状况
|
||||
*/
|
||||
@Size(max = 20, message = "健康状况长度不能超过20个字符")
|
||||
private String healthStatus;
|
||||
|
||||
/**
|
||||
* 特殊体质或疾病
|
||||
*/
|
||||
@Size(max = 200, message = "特殊体质或疾病长度不能超过200个字符")
|
||||
private String specialCondition;
|
||||
|
||||
/**
|
||||
* 病史
|
||||
*/
|
||||
@Size(max = 500, message = "病史长度不能超过500个字符")
|
||||
private String medicalHistory;
|
||||
|
||||
/**
|
||||
* 过敏史
|
||||
*/
|
||||
@Size(max = 200, message = "过敏史长度不能超过200个字符")
|
||||
private String allergies;
|
||||
|
||||
// ===== 银行信息字段 =====
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@Size(max = 30, message = "银行卡号长度不能超过30个字符")
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@Size(max = 100, message = "开户银行长度不能超过100个字符")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
*/
|
||||
@Size(max = 100, message = "开户支行长度不能超过100个字符")
|
||||
private String bankBranch;
|
||||
|
||||
/**
|
||||
* 持卡人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "持卡人姓名长度不能超过50个字符")
|
||||
private String cardHolderName;
|
||||
|
||||
// ===== 特殊标识字段 =====
|
||||
|
||||
/**
|
||||
* 是否贫困生:0-否,1-是
|
||||
*/
|
||||
private Integer isPoorStudent;
|
||||
|
||||
/**
|
||||
* 是否少数民族:0-否,1-是
|
||||
*/
|
||||
private Integer isMinority;
|
||||
|
||||
/**
|
||||
* 是否残疾:0-否,1-是
|
||||
*/
|
||||
private Integer isDisabled;
|
||||
|
||||
/**
|
||||
* 是否孤儿:0-否,1-是
|
||||
*/
|
||||
private Integer isOrphan;
|
||||
|
||||
/**
|
||||
* 是否留守儿童:0-否,1-是
|
||||
*/
|
||||
private Integer isLeftBehindChild;
|
||||
|
||||
/**
|
||||
* 是否独生子女:0-否,1-是
|
||||
*/
|
||||
private Integer isSingleChild;
|
||||
|
||||
// ===== 扩展信息字段 =====
|
||||
|
||||
/**
|
||||
* 特长爱好
|
||||
*/
|
||||
@Size(max = 1000, message = "特长爱好长度不能超过1000个字符")
|
||||
private String specialties;
|
||||
|
||||
/**
|
||||
* 获奖情况
|
||||
*/
|
||||
@Size(max = 1000, message = "获奖情况长度不能超过1000个字符")
|
||||
private String awards;
|
||||
|
||||
/**
|
||||
* 违纪记录
|
||||
*/
|
||||
@Size(max = 1000, message = "违纪记录长度不能超过1000个字符")
|
||||
private String violations;
|
||||
|
||||
/**
|
||||
* 社会活动
|
||||
*/
|
||||
@Size(max = 1000, message = "社会活动长度不能超过1000个字符")
|
||||
private String socialActivities;
|
||||
|
||||
// 状态字段
|
||||
/**
|
||||
* 信息状态:1-正常,2-待审核,3-已审核,4-已驳回,5-已删除
|
||||
*/
|
||||
@Pattern(regexp = "^[1-5]$", message = "信息状态只能为1-5")
|
||||
private String infoStatus;
|
||||
|
||||
/**
|
||||
* 数据来源:manual-手工录入,import-批量导入,sync-同步
|
||||
*/
|
||||
@Size(max = 20, message = "数据来源长度不能超过20个字符")
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 最后批次ID
|
||||
*/
|
||||
private Long lastBatchId;
|
||||
|
||||
/**
|
||||
* 最后审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastAuditTime;
|
||||
|
||||
/**
|
||||
* 信息是否完整:0-不完整,1-完整
|
||||
*/
|
||||
@Pattern(regexp = "^[01]$", message = "信息是否完整只能为0或1")
|
||||
private Integer isComplete;
|
||||
|
||||
/**
|
||||
* 信息完整度百分比
|
||||
*/
|
||||
@DecimalMin(value = "0.0", message = "完整度百分比不能小于0")
|
||||
@DecimalMax(value = "100.0", message = "完整度百分比不能大于100")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ========== 查询条件字段 ==========
|
||||
|
||||
/**
|
||||
* 学号列表(批量查询)
|
||||
*/
|
||||
private List<String> studentNoIn;
|
||||
|
||||
/**
|
||||
* 学籍状态列表(批量查询)
|
||||
*/
|
||||
private List<String> studentStatusIn;
|
||||
|
||||
/**
|
||||
* 信息状态列表(批量查询)
|
||||
*/
|
||||
private List<String> infoStatusIn;
|
||||
|
||||
/**
|
||||
* 学院代码列表(批量查询)
|
||||
*/
|
||||
private List<String> collegeCodeIn;
|
||||
|
||||
/**
|
||||
* 班级代码列表(批量查询)
|
||||
*/
|
||||
private List<String> classCodeIn;
|
||||
|
||||
/**
|
||||
* 年级列表(批量查询)
|
||||
*/
|
||||
private List<String> gradeIn;
|
||||
|
||||
/**
|
||||
* 辅导员ID列表(批量查询)
|
||||
*/
|
||||
private List<Long> counselorIdIn;
|
||||
|
||||
/**
|
||||
* 班主任ID列表(批量查询)
|
||||
*/
|
||||
private List<Long> classTeacherIdIn;
|
||||
|
||||
/**
|
||||
* 入学年份范围查询-开始
|
||||
*/
|
||||
private Integer enrollmentYearStart;
|
||||
|
||||
/**
|
||||
* 入学年份范围查询-结束
|
||||
*/
|
||||
private Integer enrollmentYearEnd;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-开始
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间范围查询-结束
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
-230
@@ -1,230 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchScheduledTask;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 批次定时任务视图对象 XgBatchScheduledTaskVo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgBatchScheduledTask.class)
|
||||
public class XgBatchScheduledTaskVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
@ExcelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@ExcelProperty(value = "任务类型")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@ExcelProperty(value = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 任务描述
|
||||
*/
|
||||
@ExcelProperty(value = "任务描述")
|
||||
private String taskDescription;
|
||||
|
||||
/**
|
||||
* 计划执行时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划执行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scheduledTime;
|
||||
|
||||
/**
|
||||
* 实际执行时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际执行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actualExecutionTime;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@ExcelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 执行结果
|
||||
*/
|
||||
@ExcelProperty(value = "执行结果")
|
||||
private String executionResult;
|
||||
|
||||
/**
|
||||
* 执行次数
|
||||
*/
|
||||
@ExcelProperty(value = "执行次数")
|
||||
private Integer executionCount;
|
||||
|
||||
/**
|
||||
* 最大重试次数
|
||||
*/
|
||||
@ExcelProperty(value = "最大重试次数")
|
||||
private Integer maxRetryCount;
|
||||
|
||||
/**
|
||||
* 重试间隔(分钟)
|
||||
*/
|
||||
@ExcelProperty(value = "重试间隔(分钟)")
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@ExcelProperty(value = "错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 执行参数
|
||||
*/
|
||||
@ExcelProperty(value = "执行参数")
|
||||
private String executionParams;
|
||||
|
||||
/**
|
||||
* 执行结果详情
|
||||
*/
|
||||
@ExcelProperty(value = "执行结果详情")
|
||||
private String executionResultDetail;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isEnabled;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ExcelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 关联字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@ExcelProperty(value = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型
|
||||
*/
|
||||
@ExcelProperty(value = "批次类型")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 批次状态
|
||||
*/
|
||||
@ExcelProperty(value = "批次状态")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 学年
|
||||
*/
|
||||
@ExcelProperty(value = "学年")
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期
|
||||
*/
|
||||
@ExcelProperty(value = "学期")
|
||||
private String semester;
|
||||
|
||||
// 计算字段
|
||||
/**
|
||||
* 执行状态描述
|
||||
*/
|
||||
public String getExecutionStatusDescription() {
|
||||
if ("pending".equals(taskStatus)) {
|
||||
return "待执行";
|
||||
} else if ("running".equals(taskStatus)) {
|
||||
return "执行中";
|
||||
} else if ("completed".equals(taskStatus)) {
|
||||
return "已完成";
|
||||
} else if ("failed".equals(taskStatus)) {
|
||||
return "执行失败";
|
||||
} else if ("cancelled".equals(taskStatus)) {
|
||||
return "已取消";
|
||||
}
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要重试
|
||||
*/
|
||||
public boolean isNeedRetry() {
|
||||
return "failed".equals(taskStatus) &&
|
||||
executionCount != null &&
|
||||
maxRetryCount != null &&
|
||||
executionCount < maxRetryCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 剩余重试次数
|
||||
*/
|
||||
public int getRemainingRetryCount() {
|
||||
if (executionCount == null || maxRetryCount == null) {
|
||||
return 0;
|
||||
}
|
||||
return Math.max(0, maxRetryCount - executionCount);
|
||||
}
|
||||
}
|
||||
-355
@@ -1,355 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassInfo;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级信息视图对象 xg_class_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgClassInfo.class)
|
||||
public class XgClassInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@ExcelProperty(value = "班级ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
@ExcelProperty(value = "班级代码")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级
|
||||
*/
|
||||
@ExcelProperty(value = "班级类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_class_type")
|
||||
private String classType;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@ExcelProperty(value = "年级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@ExcelProperty(value = "入学年份")
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
@ExcelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
@ExcelProperty(value = "专业代码")
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业名称")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
@ExcelProperty(value = "培养方式")
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 学位类型:本科、专科、研究生等
|
||||
*/
|
||||
@ExcelProperty(value = "学位类型")
|
||||
private String degreeType;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
@ExcelProperty(value = "学院代码")
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院名称")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "辅导员姓名")
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
@ExcelProperty(value = "班主任姓名")
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
private Long classAdvisorId;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
@ExcelProperty(value = "班级导师姓名")
|
||||
private String classAdvisorName;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
private Long classMonitorId;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
@ExcelProperty(value = "班长姓名")
|
||||
private String classMonitorName;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
private Long deputyMonitorId;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
@ExcelProperty(value = "副班长姓名")
|
||||
private String deputyMonitorName;
|
||||
|
||||
/**
|
||||
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||
*/
|
||||
@ExcelProperty(value = "班级状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_class_status")
|
||||
private String classStatus;
|
||||
|
||||
/**
|
||||
* 是否毕业:0-未毕业,1-已毕业
|
||||
*/
|
||||
@ExcelProperty(value = "是否毕业", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=未毕业,1=已毕业")
|
||||
private Integer isGraduation;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
@ExcelProperty(value = "毕业日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate graduationDate;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
@ExcelProperty(value = "计划容量")
|
||||
private Integer plannedCapacity;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "当前学生数量")
|
||||
private Integer currentStudentCount;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "最大学生数量")
|
||||
private Integer maxStudentCount;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
@ExcelProperty(value = "男生数量")
|
||||
private Integer maleCount;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
@ExcelProperty(value = "女生数量")
|
||||
private Integer femaleCount;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "在籍学生数量")
|
||||
private Integer activeCount;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "转入学生数量")
|
||||
private Integer transferInCount;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "转出学生数量")
|
||||
private Integer transferOutCount;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "退学学生数量")
|
||||
private Integer dropoutCount;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
@ExcelProperty(value = "毕业学生数量")
|
||||
private Integer graduateCount;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
@ExcelProperty(value = "办公室位置")
|
||||
private String officeLocation;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
@ExcelProperty(value = "教室位置")
|
||||
private String classLocation;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
@ExcelProperty(value = "QQ群号")
|
||||
private String qqGroup;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
@ExcelProperty(value = "微信群")
|
||||
private String wechatGroup;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
private String classSchedule;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
private String classCulture;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
private String classRules;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
@ExcelProperty(value = "班级描述")
|
||||
private String classDescription;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后统计更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastCountUpdate;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
-117
@@ -1,117 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级班主任关系视图对象 xg_class_teacher_relation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgClassTeacherRelation.class)
|
||||
public class XgClassTeacherRelationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@ExcelProperty(value = "班级ID")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称(非数据库字段)
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 班级代码(非数据库字段)
|
||||
*/
|
||||
@ExcelProperty(value = "班级代码")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班主任用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "班主任用户ID")
|
||||
private Long teacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名(非数据库字段)
|
||||
*/
|
||||
@ExcelProperty(value = "班主任姓名")
|
||||
private String teacherName;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 生效开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "生效开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
/**
|
||||
* 生效结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "生效结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
-171
@@ -1,171 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchLog;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次操作日志视图对象 XgCollectionBatchLogVo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatchLog.class)
|
||||
public class XgCollectionBatchLogVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志ID
|
||||
*/
|
||||
@ExcelProperty(value = "日志ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@ExcelProperty(value = "操作类型")
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 操作描述
|
||||
*/
|
||||
@ExcelProperty(value = "操作描述")
|
||||
private String operationDescription;
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
@ExcelProperty(value = "操作人ID")
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "操作人姓名")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ExcelProperty(value = "操作时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date operationTime;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@ExcelProperty(value = "IP地址")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@ExcelProperty(value = "用户代理")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 操作结果
|
||||
*/
|
||||
@ExcelProperty(value = "操作结果")
|
||||
private String operationResult;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@ExcelProperty(value = "错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ExcelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 关联字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@ExcelProperty(value = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
@ExcelProperty(value = "学生学号")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院名称")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业名称")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
}
|
||||
-180
@@ -1,180 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchPermission;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次权限配置视图对象 XgCollectionBatchPermissionVo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatchPermission.class)
|
||||
public class XgCollectionBatchPermissionVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 权限ID
|
||||
*/
|
||||
@ExcelProperty(value = "权限ID")
|
||||
private Long permissionId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@ExcelProperty(value = "权限类型")
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限对象ID
|
||||
*/
|
||||
@ExcelProperty(value = "权限对象ID")
|
||||
private Long permissionObjectId;
|
||||
|
||||
/**
|
||||
* 权限对象类型
|
||||
*/
|
||||
@ExcelProperty(value = "权限对象类型")
|
||||
private String permissionObjectType;
|
||||
|
||||
/**
|
||||
* 权限对象名称
|
||||
*/
|
||||
@ExcelProperty(value = "权限对象名称")
|
||||
private String permissionObjectName;
|
||||
|
||||
/**
|
||||
* 权限范围
|
||||
*/
|
||||
@ExcelProperty(value = "权限范围")
|
||||
private String permissionScope;
|
||||
|
||||
/**
|
||||
* 权限级别
|
||||
*/
|
||||
@ExcelProperty(value = "权限级别")
|
||||
private Integer permissionLevel;
|
||||
|
||||
/**
|
||||
* 是否有效
|
||||
*/
|
||||
@ExcelProperty(value = "是否有效", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isActive;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@ExcelProperty(value = "生效时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveTime;
|
||||
|
||||
/**
|
||||
* 失效时间
|
||||
*/
|
||||
@ExcelProperty(value = "失效时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expirationTime;
|
||||
|
||||
/**
|
||||
* 授权人ID
|
||||
*/
|
||||
@ExcelProperty(value = "授权人ID")
|
||||
private Long grantedBy;
|
||||
|
||||
/**
|
||||
* 授权时间
|
||||
*/
|
||||
@ExcelProperty(value = "授权时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date grantedTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ExcelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 关联字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@ExcelProperty(value = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型
|
||||
*/
|
||||
@ExcelProperty(value = "批次类型")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 批次状态
|
||||
*/
|
||||
@ExcelProperty(value = "批次状态")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 授权人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "授权人姓名")
|
||||
private String grantedByName;
|
||||
|
||||
/**
|
||||
* 授权人部门
|
||||
*/
|
||||
@ExcelProperty(value = "授权人部门")
|
||||
private String grantedByDept;
|
||||
}
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStatistics;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次统计视图对象 XgCollectionBatchStatisticsVo
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatchStatistics.class)
|
||||
public class XgCollectionBatchStatisticsVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 统计ID
|
||||
*/
|
||||
@ExcelProperty(value = "统计ID")
|
||||
private Long statisticsId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 统计维度
|
||||
*/
|
||||
@ExcelProperty(value = "统计维度")
|
||||
private String statisticsDimension;
|
||||
|
||||
/**
|
||||
* 维度值
|
||||
*/
|
||||
@ExcelProperty(value = "维度值")
|
||||
private String dimensionValue;
|
||||
|
||||
/**
|
||||
* 维度名称
|
||||
*/
|
||||
@ExcelProperty(value = "维度名称")
|
||||
private String dimensionName;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
@ExcelProperty(value = "总学生数")
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交数
|
||||
*/
|
||||
@ExcelProperty(value = "已提交数")
|
||||
private Integer submittedCount;
|
||||
|
||||
/**
|
||||
* 未提交数
|
||||
*/
|
||||
@ExcelProperty(value = "未提交数")
|
||||
private Integer notSubmittedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
@ExcelProperty(value = "完成率(%)")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
@ExcelProperty(value = "排名")
|
||||
private Integer ranking;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@ExcelProperty(value = "统计时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date statisticsTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ExcelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 关联字段
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@ExcelProperty(value = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型
|
||||
*/
|
||||
@ExcelProperty(value = "批次类型")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 批次状态
|
||||
*/
|
||||
@ExcelProperty(value = "批次状态")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 学年
|
||||
*/
|
||||
@ExcelProperty(value = "学年")
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期
|
||||
*/
|
||||
@ExcelProperty(value = "学期")
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
// 统计计算字段
|
||||
/**
|
||||
* 完成率百分比显示
|
||||
*/
|
||||
public String getCompletionRateDisplay() {
|
||||
if (completionRate == null) {
|
||||
return "0.00%";
|
||||
}
|
||||
return completionRate.toString() + "%";
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交进度描述
|
||||
*/
|
||||
public String getProgressDescription() {
|
||||
if (totalStudents == null || totalStudents == 0) {
|
||||
return "无数据";
|
||||
}
|
||||
return String.format("%d/%d", submittedCount != null ? submittedCount : 0, totalStudents);
|
||||
}
|
||||
}
|
||||
-156
@@ -1,156 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStudent;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次学生关联视图对象 xg_collection_batch_student
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatchStudent.class)
|
||||
public class XgCollectionBatchStudentVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentCode;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 届别
|
||||
*/
|
||||
@ExcelProperty(value = "届别")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 是否可编辑:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否可编辑", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=否,1=是")
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 是否已提交:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否已提交", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=否,1=是")
|
||||
private Integer hasSubmitted;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@ExcelProperty(value = "提交时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTime;
|
||||
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后编辑时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastEditTime;
|
||||
|
||||
/**
|
||||
* 编辑次数
|
||||
*/
|
||||
@ExcelProperty(value = "编辑次数")
|
||||
private Integer editCount;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
-234
@@ -1,234 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 信息采集批次视图对象 xg_collection_batch
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatch.class)
|
||||
public class XgCollectionBatchVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@ExcelProperty(value = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义
|
||||
*/
|
||||
@ExcelProperty(value = "批次类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_batch_type")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 学年,如2024-2025
|
||||
*/
|
||||
@ExcelProperty(value = "学年")
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期:spring-春季,autumn-秋季
|
||||
*/
|
||||
@ExcelProperty(value = "学期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_semester")
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档
|
||||
*/
|
||||
@ExcelProperty(value = "批次状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_batch_status")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@ExcelProperty(value = "发布时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date publishTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
@ExcelProperty(value = "归档时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date archiveTime;
|
||||
|
||||
/**
|
||||
* 目标学院(JSON格式)
|
||||
*/
|
||||
private String targetColleges;
|
||||
|
||||
/**
|
||||
* 目标年级(JSON格式)
|
||||
*/
|
||||
private String targetGrades;
|
||||
|
||||
/**
|
||||
* 目标专业(JSON格式)
|
||||
*/
|
||||
private String targetMajors;
|
||||
|
||||
/**
|
||||
* 必填字段(JSON格式)
|
||||
*/
|
||||
private String requiredFields;
|
||||
|
||||
/**
|
||||
* 可选字段(JSON格式)
|
||||
*/
|
||||
private String optionalFields;
|
||||
|
||||
/**
|
||||
* 审核级别配置(JSON格式)
|
||||
*/
|
||||
private String auditLevels;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
@ExcelProperty(value = "总学生数")
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交数
|
||||
*/
|
||||
@ExcelProperty(value = "已提交数")
|
||||
private Integer submittedCount;
|
||||
|
||||
/**
|
||||
* 已审核数
|
||||
*/
|
||||
@ExcelProperty(value = "已审核数")
|
||||
private Integer approvedCount;
|
||||
|
||||
/**
|
||||
* 已驳回数
|
||||
*/
|
||||
@ExcelProperty(value = "已驳回数")
|
||||
private Integer rejectedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
@ExcelProperty(value = "完成率")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 审核权限(JSON格式)
|
||||
*/
|
||||
private String auditPermissions;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 自动提醒:0-关闭,1-开启
|
||||
*/
|
||||
@ExcelProperty(value = "自动提醒", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=关闭,1=开启")
|
||||
private Integer autoReminder;
|
||||
|
||||
/**
|
||||
* 提醒频率(天)
|
||||
*/
|
||||
@ExcelProperty(value = "提醒频率(天)")
|
||||
private Integer reminderFrequency;
|
||||
|
||||
/**
|
||||
* 提交后允许修改:0-不允许,1-允许
|
||||
*/
|
||||
@ExcelProperty(value = "提交后允许修改", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=不允许,1=允许")
|
||||
private Integer allowModifyAfterSubmit;
|
||||
|
||||
/**
|
||||
* 批次描述
|
||||
*/
|
||||
@ExcelProperty(value = "批次描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgStatisticsConfig;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统计分析配置视图对象 xg_statistics_config
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgStatisticsConfig.class)
|
||||
public class XgStatisticsConfigVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "配置ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ExcelProperty(value = "配置名称")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置编码
|
||||
*/
|
||||
@ExcelProperty(value = "配置编码")
|
||||
private String configCode;
|
||||
|
||||
/**
|
||||
* 配置类型:dimension-维度,report-报表,chart-图表
|
||||
*/
|
||||
@ExcelProperty(value = "配置类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_statistics_config_type")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置内容(JSON格式)
|
||||
*/
|
||||
@ExcelProperty(value = "配置内容")
|
||||
private String configContent;
|
||||
|
||||
/**
|
||||
* 是否系统配置:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统配置", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isSystem;
|
||||
|
||||
/**
|
||||
* 是否启用:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
@ExcelProperty(value = "排序顺序")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 查看权限(JSON格式)
|
||||
*/
|
||||
private String viewPermissions;
|
||||
|
||||
/**
|
||||
* 编辑权限(JSON格式)
|
||||
*/
|
||||
private String editPermissions;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
}
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计结果视图对象
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Data
|
||||
public class XgStatisticsResultVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 统计标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 统计类型:dimension-维度统计,report-报表,chart-图表
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 统计维度
|
||||
*/
|
||||
private String dimension;
|
||||
|
||||
/**
|
||||
* 统计数据
|
||||
*/
|
||||
private List<Map<String, Object>> data;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Long total;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date statisticsTime;
|
||||
|
||||
/**
|
||||
* 是否来自缓存
|
||||
*/
|
||||
private Boolean fromCache;
|
||||
|
||||
/**
|
||||
* 缓存键
|
||||
*/
|
||||
private String cacheKey;
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
private Map<String, Object> extra;
|
||||
|
||||
/**
|
||||
* 图表配置
|
||||
*/
|
||||
private Map<String, Object> chartConfig;
|
||||
|
||||
/**
|
||||
* 分组统计数据
|
||||
*/
|
||||
private Map<String, List<Map<String, Object>>> groupData;
|
||||
|
||||
/**
|
||||
* 统计摘要
|
||||
*/
|
||||
private Map<String, Object> summary;
|
||||
}
|
||||
-662
@@ -1,662 +0,0 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 学生信息视图对象 xg_student_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgStudentInfo.class)
|
||||
public class XgStudentInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 英文姓名
|
||||
*/
|
||||
@ExcelProperty(value = "英文姓名")
|
||||
private String nameEnglish;
|
||||
|
||||
/**
|
||||
* 曾用名
|
||||
*/
|
||||
@ExcelProperty(value = "曾用名")
|
||||
private String formerName;
|
||||
|
||||
/**
|
||||
* 姓名拼音
|
||||
*/
|
||||
@ExcelProperty(value = "姓名拼音")
|
||||
private String namePinyin;
|
||||
|
||||
/**
|
||||
* 性别:0-男,1-女
|
||||
*/
|
||||
@ExcelProperty(value = "性别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_user_sex")
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@ExcelProperty(value = "出生日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ExcelProperty(value = "民族", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_nation")
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@ExcelProperty(value = "政治面貌", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_political_status")
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@ExcelProperty(value = "婚姻状况")
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
@ExcelProperty(value = "宗教信仰")
|
||||
private String religion;
|
||||
|
||||
/**
|
||||
* 照片URL
|
||||
*/
|
||||
@ExcelProperty(value = "照片URL")
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 学生照片存储路径
|
||||
*/
|
||||
@ExcelProperty(value = "照片路径")
|
||||
private String photoPath;
|
||||
|
||||
/**
|
||||
* 学籍状态
|
||||
*/
|
||||
@ExcelProperty(value = "学籍状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_student_status")
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
@ExcelProperty(value = "入学年份")
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@ExcelProperty(value = "入学日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date enrollmentDate;
|
||||
|
||||
/**
|
||||
* 学制(年)
|
||||
*/
|
||||
@ExcelProperty(value = "学制(年)")
|
||||
private Integer schoolSystem;
|
||||
|
||||
/**
|
||||
* 学历层次
|
||||
*/
|
||||
@ExcelProperty(value = "学历层次")
|
||||
private String educationLevel;
|
||||
|
||||
/**
|
||||
* 培养方式
|
||||
*/
|
||||
@ExcelProperty(value = "培养方式", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_training_mode")
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 录取类别
|
||||
*/
|
||||
@ExcelProperty(value = "录取类别")
|
||||
private String admissionCategory;
|
||||
|
||||
/**
|
||||
* 生源地区
|
||||
*/
|
||||
@ExcelProperty(value = "生源地区")
|
||||
private String sourceRegion;
|
||||
|
||||
/**
|
||||
* 毕业中学
|
||||
*/
|
||||
@ExcelProperty(value = "毕业中学")
|
||||
private String middleSchool;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
@ExcelProperty(value = "专业代码")
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业名称")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
@ExcelProperty(value = "班级代码")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@ExcelProperty(value = "年级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
@ExcelProperty(value = "学院代码")
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院名称")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
@ExcelProperty(value = "辅导员ID")
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "辅导员")
|
||||
private String counselorName;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
@ExcelProperty(value = "班主任ID")
|
||||
private Long classTeacherId;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
@ExcelProperty(value = "班主任")
|
||||
private String classTeacherName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ExcelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号码
|
||||
*/
|
||||
@ExcelProperty(value = "QQ号码")
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
@ExcelProperty(value = "微信号")
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* 家庭地址
|
||||
*/
|
||||
@ExcelProperty(value = "家庭地址")
|
||||
private String homeAddress;
|
||||
|
||||
/**
|
||||
* 现住址
|
||||
*/
|
||||
@ExcelProperty(value = "现住址")
|
||||
private String currentAddress;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@ExcelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/**
|
||||
* 户口类型
|
||||
*/
|
||||
@ExcelProperty(value = "户口类型")
|
||||
private String householdRegisterType;
|
||||
|
||||
/**
|
||||
* 户口所在地
|
||||
*/
|
||||
@ExcelProperty(value = "户口所在地")
|
||||
private String hukouLocation;
|
||||
|
||||
/**
|
||||
* 宿舍楼栋
|
||||
*/
|
||||
@ExcelProperty(value = "宿舍楼栋")
|
||||
private String dormitoryBuilding;
|
||||
|
||||
/**
|
||||
* 宿舍房间号
|
||||
*/
|
||||
@ExcelProperty(value = "宿舍房间号")
|
||||
private String dormitoryRoom;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "紧急联系人")
|
||||
private String emergencyContactName;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
@ExcelProperty(value = "紧急联系人电话")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
*/
|
||||
@ExcelProperty(value = "紧急联系人关系")
|
||||
private String emergencyContactRelation;
|
||||
|
||||
/**
|
||||
* 父亲姓名
|
||||
*/
|
||||
@ExcelProperty(value = "父亲姓名")
|
||||
private String fatherName;
|
||||
|
||||
/**
|
||||
* 父亲电话
|
||||
*/
|
||||
@ExcelProperty(value = "父亲电话")
|
||||
private String fatherPhone;
|
||||
|
||||
/**
|
||||
* 父亲工作单位
|
||||
*/
|
||||
@ExcelProperty(value = "父亲工作单位")
|
||||
private String fatherWorkUnit;
|
||||
|
||||
/**
|
||||
* 母亲姓名
|
||||
*/
|
||||
@ExcelProperty(value = "母亲姓名")
|
||||
private String motherName;
|
||||
|
||||
/**
|
||||
* 母亲电话
|
||||
*/
|
||||
@ExcelProperty(value = "母亲电话")
|
||||
private String motherPhone;
|
||||
|
||||
/**
|
||||
* 母亲工作单位
|
||||
*/
|
||||
@ExcelProperty(value = "母亲工作单位")
|
||||
private String motherWorkUnit;
|
||||
|
||||
/**
|
||||
* 监护人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "监护人姓名")
|
||||
private String guardianName;
|
||||
|
||||
/**
|
||||
* 监护人电话
|
||||
*/
|
||||
@ExcelProperty(value = "监护人电话")
|
||||
private String guardianPhone;
|
||||
|
||||
/**
|
||||
* 监护人关系
|
||||
*/
|
||||
@ExcelProperty(value = "监护人关系")
|
||||
private String guardianRelation;
|
||||
|
||||
/**
|
||||
* 家庭年收入
|
||||
*/
|
||||
@ExcelProperty(value = "家庭年收入")
|
||||
private String familyIncome;
|
||||
|
||||
/**
|
||||
* 家庭经济状况
|
||||
*/
|
||||
@ExcelProperty(value = "家庭经济状况", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_family_economic")
|
||||
private String familyEconomicStatus;
|
||||
|
||||
/**
|
||||
* 家庭成员数量
|
||||
*/
|
||||
@ExcelProperty(value = "家庭成员数量")
|
||||
private Integer familyMembers;
|
||||
|
||||
/**
|
||||
* 身高(cm)
|
||||
*/
|
||||
@ExcelProperty(value = "身高(cm)")
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 体重(kg)
|
||||
*/
|
||||
@ExcelProperty(value = "体重(kg)")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
@ExcelProperty(value = "血型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_blood_type")
|
||||
private String bloodType;
|
||||
|
||||
/**
|
||||
* 健康状况
|
||||
*/
|
||||
@ExcelProperty(value = "健康状况")
|
||||
private String healthStatus;
|
||||
|
||||
/**
|
||||
* 特殊体质或疾病
|
||||
*/
|
||||
@ExcelProperty(value = "特殊体质或疾病")
|
||||
private String specialCondition;
|
||||
|
||||
/**
|
||||
* 病史
|
||||
*/
|
||||
@ExcelProperty(value = "病史")
|
||||
private String medicalHistory;
|
||||
|
||||
/**
|
||||
* 过敏史
|
||||
*/
|
||||
@ExcelProperty(value = "过敏史")
|
||||
private String allergies;
|
||||
|
||||
/**
|
||||
* 残疾类型
|
||||
*/
|
||||
@ExcelProperty(value = "残疾类型")
|
||||
private String disabilityType;
|
||||
|
||||
/**
|
||||
* 残疾等级
|
||||
*/
|
||||
@ExcelProperty(value = "残疾等级")
|
||||
private String disabilityLevel;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@ExcelProperty(value = "开户银行")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
*/
|
||||
@ExcelProperty(value = "开户支行")
|
||||
private String bankBranch;
|
||||
|
||||
/**
|
||||
* 持卡人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "持卡人姓名")
|
||||
private String cardHolderName;
|
||||
|
||||
/**
|
||||
* 是否贫困生
|
||||
*/
|
||||
@ExcelProperty(value = "是否贫困生", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isPoorStudent;
|
||||
|
||||
/**
|
||||
* 是否少数民族
|
||||
*/
|
||||
@ExcelProperty(value = "是否少数民族", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isMinority;
|
||||
|
||||
/**
|
||||
* 是否残疾
|
||||
*/
|
||||
@ExcelProperty(value = "是否残疾", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isDisabled;
|
||||
|
||||
/**
|
||||
* 是否孤儿
|
||||
*/
|
||||
@ExcelProperty(value = "是否孤儿", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isOrphan;
|
||||
|
||||
/**
|
||||
* 是否留守儿童
|
||||
*/
|
||||
@ExcelProperty(value = "是否留守儿童", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isLeftBehindChild;
|
||||
|
||||
/**
|
||||
* 是否独生子女
|
||||
*/
|
||||
@ExcelProperty(value = "是否独生子女", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isSingleChild;
|
||||
|
||||
/**
|
||||
* 是否有助学贷款
|
||||
*/
|
||||
@ExcelProperty(value = "是否有助学贷款", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer hasLoan;
|
||||
|
||||
/**
|
||||
* 助学贷款金额
|
||||
*/
|
||||
@ExcelProperty(value = "助学贷款金额")
|
||||
private BigDecimal loanAmount;
|
||||
|
||||
/**
|
||||
* 特长爱好
|
||||
*/
|
||||
@ExcelProperty(value = "特长")
|
||||
private String specialties;
|
||||
|
||||
/**
|
||||
* 获奖情况
|
||||
*/
|
||||
@ExcelProperty(value = "获奖情况")
|
||||
private String awards;
|
||||
|
||||
/**
|
||||
* 违纪情况
|
||||
*/
|
||||
@ExcelProperty(value = "违纪情况")
|
||||
private String violations;
|
||||
|
||||
/**
|
||||
* 社会活动
|
||||
*/
|
||||
@ExcelProperty(value = "社会活动")
|
||||
private String socialActivities;
|
||||
|
||||
/**
|
||||
* 信息状态
|
||||
*/
|
||||
@ExcelProperty(value = "信息状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_info_status")
|
||||
private String infoStatus;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@ExcelProperty(value = "数据来源")
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 最后修改批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "最后修改批次ID")
|
||||
private Long lastBatchId;
|
||||
|
||||
/**
|
||||
* 最后审核时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastAuditTime;
|
||||
|
||||
/**
|
||||
* 信息是否完整
|
||||
*/
|
||||
@ExcelProperty(value = "信息是否完整", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isComplete;
|
||||
|
||||
/**
|
||||
* 完整度百分比
|
||||
*/
|
||||
@ExcelProperty(value = "完整度百分比")
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
@ExcelProperty(value = "扩展字段1")
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
@ExcelProperty(value = "扩展字段2")
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
@ExcelProperty(value = "扩展字段3")
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 扩展字段4
|
||||
*/
|
||||
@ExcelProperty(value = "扩展字段4")
|
||||
private String extField4;
|
||||
|
||||
/**
|
||||
* 扩展字段5
|
||||
*/
|
||||
@ExcelProperty(value = "扩展字段5")
|
||||
private String extField5;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者(VO类基础字段)
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者(VO类基础字段)
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间(VO类基础字段)
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
-278
@@ -1,278 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchScheduledTask;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次定时任务Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgBatchScheduledTaskMapper extends BaseMapperPlus<XgBatchScheduledTask, XgBatchScheduledTask> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgBatchScheduledTask>> P selectVoPage(IPage<XgBatchScheduledTask> page, @Param("ew") Wrapper<XgBatchScheduledTask> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询定时任务
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据任务类型查询定时任务
|
||||
*
|
||||
* @param taskType 任务类型
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectByTaskType(String taskType);
|
||||
|
||||
/**
|
||||
* 根据任务状态查询定时任务
|
||||
*
|
||||
* @param taskStatus 任务状态
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectByTaskStatus(String taskStatus);
|
||||
|
||||
/**
|
||||
* 根据批次ID和任务类型查询定时任务
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param taskType 任务类型
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectByBatchAndType(@Param("batchId") Long batchId, @Param("taskType") String taskType);
|
||||
|
||||
/**
|
||||
* 查询待执行的定时任务
|
||||
*
|
||||
* @return 待执行的定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectPendingTasks();
|
||||
|
||||
/**
|
||||
* 查询即将执行的定时任务(指定时间内)
|
||||
*
|
||||
* @param minutes 分钟数
|
||||
* @return 即将执行的定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectUpcomingTasks(Integer minutes);
|
||||
|
||||
/**
|
||||
* 查询已过期但未执行的定时任务
|
||||
*
|
||||
* @return 已过期的定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectOverdueTasks();
|
||||
|
||||
/**
|
||||
* 查询执行失败的定时任务
|
||||
*
|
||||
* @return 执行失败的定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectFailedTasks();
|
||||
|
||||
/**
|
||||
* 查询指定时间范围内的定时任务
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
/**
|
||||
* 查询指定批次的最新定时任务
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param limit 限制条数
|
||||
* @return 最新定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectLatestByBatchId(@Param("batchId") Long batchId, @Param("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* 批量插入定时任务
|
||||
*
|
||||
* @param tasks 定时任务列表
|
||||
* @return 插入结果
|
||||
*/
|
||||
int batchInsert(@Param("tasks") List<XgBatchScheduledTask> tasks);
|
||||
|
||||
/**
|
||||
* 批量更新任务状态
|
||||
*
|
||||
* @param ids 任务ID列表
|
||||
* @param taskStatus 任务状态
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateStatus(@Param("ids") List<Long> ids, @Param("taskStatus") String taskStatus);
|
||||
|
||||
/**
|
||||
* 更新任务执行结果
|
||||
*
|
||||
* @param id 任务ID
|
||||
* @param taskStatus 任务状态
|
||||
* @param executeTime 执行时间
|
||||
* @param errorMessage 错误信息
|
||||
* @return 更新结果
|
||||
*/
|
||||
int updateExecuteResult(@Param("id") Long id, @Param("taskStatus") String taskStatus, @Param("executeTime") Date executeTime, @Param("errorMessage") String errorMessage);
|
||||
|
||||
/**
|
||||
* 根据批次ID删除定时任务
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 删除指定状态的定时任务
|
||||
*
|
||||
* @param taskStatus 任务状态
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByTaskStatus(String taskStatus);
|
||||
|
||||
/**
|
||||
* 删除指定时间之前的定时任务
|
||||
*
|
||||
* @param beforeTime 时间点
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteBeforeTime(Date beforeTime);
|
||||
|
||||
/**
|
||||
* 统计指定批次的定时任务数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 定时任务数量
|
||||
*/
|
||||
int countByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定任务类型的数量
|
||||
*
|
||||
* @param taskType 任务类型
|
||||
* @return 任务数量
|
||||
*/
|
||||
int countByTaskType(String taskType);
|
||||
|
||||
/**
|
||||
* 统计指定任务状态的数量
|
||||
*
|
||||
* @param taskStatus 任务状态
|
||||
* @return 任务数量
|
||||
*/
|
||||
int countByTaskStatus(String taskStatus);
|
||||
|
||||
/**
|
||||
* 统计待执行的任务数量
|
||||
*
|
||||
* @return 待执行任务数量
|
||||
*/
|
||||
int countPendingTasks();
|
||||
|
||||
/**
|
||||
* 统计执行失败的任务数量
|
||||
*
|
||||
* @return 失败任务数量
|
||||
*/
|
||||
int countFailedTasks();
|
||||
|
||||
/**
|
||||
* 查询任务类型统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 任务类型统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectTaskTypeStatistics(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 查询任务状态统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 任务状态统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectTaskStatusStatistics(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 查询每日任务执行统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 每日任务执行统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectDailyTaskStatistics(
|
||||
@Param("batchId") Long batchId,
|
||||
@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询任务执行成功率统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 任务执行成功率统计
|
||||
*/
|
||||
Map<String, Object> selectTaskSuccessRateStatistics(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 检查指定批次和任务类型的任务是否存在
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param taskType 任务类型
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean existsByBatchAndType(@Param("batchId") Long batchId, @Param("taskType") String taskType);
|
||||
|
||||
/**
|
||||
* 查询需要重新执行的失败任务
|
||||
*
|
||||
* @param retryCount 重试次数限制
|
||||
* @return 需要重新执行的任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTask> selectRetryableTasks(Integer retryCount);
|
||||
|
||||
/**
|
||||
* 查询任务执行时间分布统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 任务执行时间分布统计
|
||||
*/
|
||||
List<Map<String, Object>> selectTaskExecutionTimeDistribution(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 清理已完成的历史任务
|
||||
*
|
||||
* @param beforeTime 时间点
|
||||
* @return 清理结果
|
||||
*/
|
||||
int cleanCompletedTasks(Date beforeTime);
|
||||
|
||||
/**
|
||||
* 重置失败任务状态为待执行
|
||||
*
|
||||
* @param taskIds 任务ID列表
|
||||
* @return 重置结果
|
||||
*/
|
||||
int resetFailedTasks(@Param("taskIds") List<Long> taskIds);
|
||||
}
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgClassInfo;
|
||||
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 班级信息Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
public interface XgClassInfoMapper extends BaseMapperPlus<XgClassInfo, XgClassInfoVo> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法,使用自定义ResultMap
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgClassInfoVo>> P selectVoPage(IPage<XgClassInfo> page, @Param("ew") Wrapper<XgClassInfo> wrapper);
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*
|
||||
* @param classCode 班级代码
|
||||
* @return 班级信息
|
||||
*/
|
||||
XgClassInfoVo selectByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 查询指定年级的班级列表
|
||||
*
|
||||
* @param grade 年级
|
||||
* @return 班级列表
|
||||
*/
|
||||
List<XgClassInfoVo> selectByGrade(String grade);
|
||||
|
||||
/**
|
||||
* 查询指定学院的班级列表
|
||||
*
|
||||
* @param collegeCode 学院代码
|
||||
* @return 班级列表
|
||||
*/
|
||||
List<XgClassInfoVo> selectByCollegeCode(String collegeCode);
|
||||
|
||||
/**
|
||||
* 查询指定专业的班级列表
|
||||
*
|
||||
* @param majorCode 专业代码
|
||||
* @return 班级列表
|
||||
*/
|
||||
List<XgClassInfoVo> selectByMajorCode(String majorCode);
|
||||
|
||||
/**
|
||||
* 查询指定辅导员的班级列表
|
||||
*
|
||||
* @param counselorId 辅导员ID
|
||||
* @return 班级列表
|
||||
*/
|
||||
List<XgClassInfoVo> selectByCounselorId(Long counselorId);
|
||||
|
||||
/**
|
||||
* 查询指定班主任的班级列表
|
||||
*
|
||||
* @param classTeacherId 班主任ID
|
||||
* @return 班级列表
|
||||
*/
|
||||
List<XgClassInfoVo> selectByClassTeacherId(Long classTeacherId);
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*
|
||||
* @return 学院班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCollege();
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*
|
||||
* @return 年级班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByGrade();
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*
|
||||
* @return 专业班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByMajor();
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*
|
||||
* @return 班级状态统计
|
||||
*/
|
||||
List<Map<String, Object>> countByClassStatus();
|
||||
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 班级班主任关系Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
public interface XgClassTeacherRelationMapper extends BaseMapperPlus<XgClassTeacherRelation, XgClassTeacherRelationVo> {
|
||||
|
||||
/**
|
||||
* 查询班级当前有效的班主任关系
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
XgClassTeacherRelation selectActiveRelationByClassId(@Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 将班级的所有班主任关系设置为失效
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param updateBy 更新者
|
||||
* @return 影响行数
|
||||
*/
|
||||
int invalidateRelationsByClassId(@Param("classId") Long classId, @Param("updateBy") Long updateBy);
|
||||
|
||||
}
|
||||
-225
@@ -1,225 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchLog;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信息采集批次操作日志Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgCollectionBatchLogMapper extends BaseMapperPlus<XgCollectionBatchLog, XgCollectionBatchLog> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgCollectionBatchLog>> P selectVoPage(IPage<XgCollectionBatchLog> page, @Param("ew") Wrapper<XgCollectionBatchLog> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询操作日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询操作日志
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 根据批次ID和学生ID查询操作日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 根据操作类型查询操作日志
|
||||
*
|
||||
* @param operationType 操作类型
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByOperationType(String operationType);
|
||||
|
||||
/**
|
||||
* 根据操作人查询操作日志
|
||||
*
|
||||
* @param operatorId 操作人ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByOperator(Long operatorId);
|
||||
|
||||
/**
|
||||
* 根据操作人类型查询操作日志
|
||||
*
|
||||
* @param operatorType 操作人类型
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByOperatorType(String operatorType);
|
||||
|
||||
/**
|
||||
* 查询指定时间范围内的操作日志
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
/**
|
||||
* 查询指定批次的最新操作日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param limit 限制条数
|
||||
* @return 最新操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectLatestByBatchId(@Param("batchId") Long batchId, @Param("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* 查询指定学生的最新操作日志
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param limit 限制条数
|
||||
* @return 最新操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectLatestByStudentId(@Param("studentId") Long studentId, @Param("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* 统计指定批次的操作次数
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 操作次数
|
||||
*/
|
||||
int countByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定学生的操作次数
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 操作次数
|
||||
*/
|
||||
int countByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 统计指定操作类型的次数
|
||||
*
|
||||
* @param operationType 操作类型
|
||||
* @return 操作次数
|
||||
*/
|
||||
int countByOperationType(String operationType);
|
||||
|
||||
/**
|
||||
* 统计指定时间范围内的操作次数
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 操作次数
|
||||
*/
|
||||
int countByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
/**
|
||||
* 查询操作类型统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 操作类型统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectOperationTypeStatistics(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 查询操作人统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 操作人统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectOperatorStatistics(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 查询每日操作统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 每日操作统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectDailyOperationStatistics(
|
||||
@Param("batchId") Long batchId,
|
||||
@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime
|
||||
);
|
||||
|
||||
/**
|
||||
* 批量插入操作日志
|
||||
*
|
||||
* @param logs 操作日志列表
|
||||
* @return 插入结果
|
||||
*/
|
||||
int batchInsert(@Param("logs") List<XgCollectionBatchLog> logs);
|
||||
|
||||
/**
|
||||
* 删除指定时间之前的操作日志
|
||||
*
|
||||
* @param beforeTime 时间点
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteBeforeTime(Date beforeTime);
|
||||
|
||||
/**
|
||||
* 根据批次ID删除操作日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID删除操作日志
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 查询异常操作日志(如频繁操作、异常IP等)
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 异常操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectAbnormalOperations(@Param("batchId") Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定IP的操作日志
|
||||
*
|
||||
* @param ipAddress IP地址
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLog> selectByIpAddress(String ipAddress);
|
||||
|
||||
/**
|
||||
* 查询操作活跃度统计(按小时)
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @param date 日期
|
||||
* @return 小时活跃度统计
|
||||
*/
|
||||
List<Map<String, Object>> selectHourlyActivityStatistics(@Param("batchId") Long batchId, @Param("date") Date date);
|
||||
}
|
||||
-184
@@ -1,184 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgCollectionBatchMapper extends BaseMapperPlus<XgCollectionBatch, XgCollectionBatchVo> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法,使用自定义ResultMap
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgCollectionBatchVo>> P selectVoPage(IPage<XgCollectionBatch> page, @Param("ew") Wrapper<XgCollectionBatch> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次编码查询批次信息
|
||||
*
|
||||
* @param batchCode 批次编码
|
||||
* @return 批次信息
|
||||
*/
|
||||
XgCollectionBatchVo selectByBatchCode(String batchCode);
|
||||
|
||||
/**
|
||||
* 查询指定学年的批次列表
|
||||
*
|
||||
* @param academicYear 学年
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectByAcademicYear(String academicYear);
|
||||
|
||||
/**
|
||||
* 查询指定状态的批次列表
|
||||
*
|
||||
* @param batchStatus 批次状态
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectByStatus(String batchStatus);
|
||||
|
||||
/**
|
||||
* 查询当前进行中的批次列表
|
||||
*
|
||||
* @return 进行中的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectActiveBatches();
|
||||
|
||||
/**
|
||||
* 查询即将开始的批次列表(未来7天内开始)
|
||||
*
|
||||
* @return 即将开始的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectUpcomingBatches();
|
||||
|
||||
/**
|
||||
* 查询即将结束的批次列表(未来7天内结束)
|
||||
*
|
||||
* @return 即将结束的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectEndingSoonBatches();
|
||||
|
||||
/**
|
||||
* 根据批次类型查询批次列表
|
||||
*
|
||||
* @param batchType 批次类型
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectByBatchType(String batchType);
|
||||
|
||||
/**
|
||||
* 查询批次统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 统计信息
|
||||
*/
|
||||
Map<String, Object> selectBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次完成率统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 完成率统计
|
||||
*/
|
||||
Map<String, Object> selectCompletionRateStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次学院统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学院统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectCollegeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次专业统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 专业统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectMajorStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次班级统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 班级统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectClassStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次届别统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 届别统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectGradeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 更新批次统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int updateBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 批量更新批次状态
|
||||
*
|
||||
* @param batchIds 批次ID列表
|
||||
* @param batchStatus 批次状态
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateStatus(@Param("batchIds") List<Long> batchIds, @Param("batchStatus") String batchStatus);
|
||||
|
||||
/**
|
||||
* 检查批次编码是否存在
|
||||
*
|
||||
* @param batchCode 批次编码
|
||||
* @param excludeId 排除的批次ID(用于修改时检查)
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean existsBatchCode(@Param("batchCode") String batchCode, @Param("excludeId") Long excludeId);
|
||||
|
||||
/**
|
||||
* 查询用户有权限的批次列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param roleIds 角色ID列表
|
||||
* @param collegeIds 学院ID列表
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectUserAuthorizedBatches(
|
||||
@Param("userId") Long userId,
|
||||
@Param("roleIds") List<Long> roleIds,
|
||||
@Param("collegeIds") List<Long> collegeIds
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询需要自动提醒的批次列表
|
||||
*
|
||||
* @return 需要提醒的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectBatchesNeedReminder();
|
||||
|
||||
/**
|
||||
* 查询需要自动关闭的批次列表
|
||||
*
|
||||
* @return 需要关闭的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectBatchesNeedAutoClose();
|
||||
}
|
||||
-281
@@ -1,281 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchPermission;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次权限配置Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgCollectionBatchPermissionMapper extends BaseMapperPlus<XgCollectionBatchPermission, XgCollectionBatchPermission> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgCollectionBatchPermission>> P selectVoPage(IPage<XgCollectionBatchPermission> page, @Param("ew") Wrapper<XgCollectionBatchPermission> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询权限配置
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询权限配置
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 根据学院ID查询权限配置
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByCollegeId(Long collegeId);
|
||||
|
||||
/**
|
||||
* 根据权限类型查询权限配置
|
||||
*
|
||||
* @param permissionType 权限类型
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByPermissionType(String permissionType);
|
||||
|
||||
/**
|
||||
* 查询指定批次和权限类型的权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectByBatchAndPermissionType(@Param("batchId") Long batchId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 检查用户是否有指定批次的权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 是否有权限
|
||||
*/
|
||||
boolean hasUserPermission(@Param("batchId") Long batchId, @Param("userId") Long userId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 检查角色是否有指定批次的权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param roleId 角色ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 是否有权限
|
||||
*/
|
||||
boolean hasRolePermission(@Param("batchId") Long batchId, @Param("roleId") Long roleId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 检查学院是否有指定批次的权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param collegeId 学院ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 是否有权限
|
||||
*/
|
||||
boolean hasCollegePermission(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 查询用户在指定批次的所有权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @return 权限类型列表
|
||||
*/
|
||||
List<String> selectUserPermissions(@Param("batchId") Long batchId, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询角色在指定批次的所有权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param roleId 角色ID
|
||||
* @return 权限类型列表
|
||||
*/
|
||||
List<String> selectRolePermissions(@Param("batchId") Long batchId, @Param("roleId") Long roleId);
|
||||
|
||||
/**
|
||||
* 查询学院在指定批次的所有权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param collegeId 学院ID
|
||||
* @return 权限类型列表
|
||||
*/
|
||||
List<String> selectCollegePermissions(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId);
|
||||
|
||||
/**
|
||||
* 查询用户有权限的批次列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 批次ID列表
|
||||
*/
|
||||
List<Long> selectUserAuthorizedBatches(@Param("userId") Long userId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 查询角色有权限的批次列表
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 批次ID列表
|
||||
*/
|
||||
List<Long> selectRoleAuthorizedBatches(@Param("roleId") Long roleId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 查询学院有权限的批次列表
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 批次ID列表
|
||||
*/
|
||||
List<Long> selectCollegeAuthorizedBatches(@Param("collegeId") Long collegeId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 批量插入权限配置
|
||||
*
|
||||
* @param permissions 权限配置列表
|
||||
* @return 插入结果
|
||||
*/
|
||||
int batchInsert(@Param("permissions") List<XgCollectionBatchPermission> permissions);
|
||||
|
||||
/**
|
||||
* 批量更新权限状态
|
||||
*
|
||||
* @param ids 权限配置ID列表
|
||||
* @param isGranted 是否授权
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateGrantStatus(@Param("ids") List<Long> ids, @Param("isGranted") Integer isGranted);
|
||||
|
||||
/**
|
||||
* 根据批次ID删除权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据用户ID删除权限配置
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据角色ID删除权限配置
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 根据学院ID删除权限配置
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByCollegeId(Long collegeId);
|
||||
|
||||
/**
|
||||
* 删除指定批次和权限类型的权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param permissionType 权限类型
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchAndPermissionType(@Param("batchId") Long batchId, @Param("permissionType") String permissionType);
|
||||
|
||||
/**
|
||||
* 查询即将过期的权限配置
|
||||
*
|
||||
* @param days 天数
|
||||
* @return 即将过期的权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectExpiringPermissions(Integer days);
|
||||
|
||||
/**
|
||||
* 查询已过期的权限配置
|
||||
*
|
||||
* @return 已过期的权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermission> selectExpiredPermissions();
|
||||
|
||||
/**
|
||||
* 清理过期的权限配置
|
||||
*
|
||||
* @return 清理结果
|
||||
*/
|
||||
int cleanExpiredPermissions();
|
||||
|
||||
/**
|
||||
* 统计指定批次的权限配置数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 权限配置数量
|
||||
*/
|
||||
int countByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定用户的权限配置数量
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 权限配置数量
|
||||
*/
|
||||
int countByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 统计指定角色的权限配置数量
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 权限配置数量
|
||||
*/
|
||||
int countByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 统计指定学院的权限配置数量
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @return 权限配置数量
|
||||
*/
|
||||
int countByCollegeId(Long collegeId);
|
||||
|
||||
/**
|
||||
* 查询权限配置统计
|
||||
*
|
||||
* @param batchId 批次ID(可选)
|
||||
* @return 权限配置统计列表
|
||||
*/
|
||||
List<Map<String, Object>> selectPermissionStatistics(@Param("batchId") Long batchId);
|
||||
}
|
||||
-301
@@ -1,301 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStatistics;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次统计Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgCollectionBatchStatisticsMapper extends BaseMapperPlus<XgCollectionBatchStatistics, XgCollectionBatchStatistics> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgCollectionBatchStatistics>> P selectVoPage(IPage<XgCollectionBatchStatistics> page, @Param("ew") Wrapper<XgCollectionBatchStatistics> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据批次ID和统计类型查询统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param statisticsType 统计类型
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByBatchAndType(@Param("batchId") Long batchId, @Param("statisticsType") String statisticsType);
|
||||
|
||||
/**
|
||||
* 根据学院ID查询统计信息
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByCollegeId(Long collegeId);
|
||||
|
||||
/**
|
||||
* 根据专业ID查询统计信息
|
||||
*
|
||||
* @param majorId 专业ID
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByMajorId(Long majorId);
|
||||
|
||||
/**
|
||||
* 根据班级ID查询统计信息
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByClassId(Long classId);
|
||||
|
||||
/**
|
||||
* 根据届别查询统计信息
|
||||
*
|
||||
* @param grade 届别
|
||||
* @return 统计信息列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectByGrade(String grade);
|
||||
|
||||
/**
|
||||
* 查询指定批次的总体统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 总体统计信息
|
||||
*/
|
||||
XgCollectionBatchStatistics selectTotalStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定批次的学院统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学院统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectCollegeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定批次的专业统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 专业统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectMajorStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定批次的班级统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 班级统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectClassStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定批次的届别统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 届别统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectGradeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定学院在指定批次的统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param collegeId 学院ID
|
||||
* @return 学院统计信息
|
||||
*/
|
||||
XgCollectionBatchStatistics selectCollegeStatisticsInBatch(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId);
|
||||
|
||||
/**
|
||||
* 查询指定专业在指定批次的统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param majorId 专业ID
|
||||
* @return 专业统计信息
|
||||
*/
|
||||
XgCollectionBatchStatistics selectMajorStatisticsInBatch(@Param("batchId") Long batchId, @Param("majorId") Long majorId);
|
||||
|
||||
/**
|
||||
* 查询指定班级在指定批次的统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param classId 班级ID
|
||||
* @return 班级统计信息
|
||||
*/
|
||||
XgCollectionBatchStatistics selectClassStatisticsInBatch(@Param("batchId") Long batchId, @Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 查询指定届别在指定批次的统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param grade 届别
|
||||
* @return 届别统计信息
|
||||
*/
|
||||
XgCollectionBatchStatistics selectGradeStatisticsInBatch(@Param("batchId") Long batchId, @Param("grade") String grade);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的统计数据
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的总体统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshTotalStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的学院统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshCollegeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的专业统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshMajorStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的班级统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshClassStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新指定批次的届别统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int refreshGradeStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 批量插入统计数据
|
||||
*
|
||||
* @param statistics 统计数据列表
|
||||
* @return 插入结果
|
||||
*/
|
||||
int batchInsert(@Param("statistics") List<XgCollectionBatchStatistics> statistics);
|
||||
|
||||
/**
|
||||
* 批量更新统计数据
|
||||
*
|
||||
* @param statistics 统计数据列表
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdate(@Param("statistics") List<XgCollectionBatchStatistics> statistics);
|
||||
|
||||
/**
|
||||
* 根据批次ID删除统计数据
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学院ID删除统计数据
|
||||
*
|
||||
* @param collegeId 学院ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByCollegeId(Long collegeId);
|
||||
|
||||
/**
|
||||
* 根据专业ID删除统计数据
|
||||
*
|
||||
* @param majorId 专业ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByMajorId(Long majorId);
|
||||
|
||||
/**
|
||||
* 根据班级ID删除统计数据
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByClassId(Long classId);
|
||||
|
||||
/**
|
||||
* 查询完成率排名
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param type 排名类型(COLLEGE,MAJOR,CLASS,GRADE)
|
||||
* @param limit 限制条数
|
||||
* @return 排名列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectCompletionRateRanking(@Param("batchId") Long batchId, @Param("type") String type, @Param("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* 查询完成率低于指定值的统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param completionRate 完成率阈值
|
||||
* @return 统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectLowCompletionRateStatistics(@Param("batchId") Long batchId, @Param("completionRate") Double completionRate);
|
||||
|
||||
/**
|
||||
* 查询需要重新计算的统计记录
|
||||
*
|
||||
* @return 需要重新计算的统计记录列表
|
||||
*/
|
||||
List<XgCollectionBatchStatistics> selectNeedRecalculateStatistics();
|
||||
|
||||
/**
|
||||
* 统计指定批次的统计记录数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 统计记录数量
|
||||
*/
|
||||
int countByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 检查统计数据是否存在
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param statisticsType 统计类型
|
||||
* @param targetId 目标ID(学院ID、专业ID、班级ID等)
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean existsStatistics(@Param("batchId") Long batchId, @Param("statisticsType") String statisticsType, @Param("targetId") Long targetId);
|
||||
|
||||
/**
|
||||
* 查询统计数据概览
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 统计数据概览
|
||||
*/
|
||||
Map<String, Object> selectStatisticsOverview(Long batchId);
|
||||
}
|
||||
-235
@@ -1,235 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgCollectionBatchStudent;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchStudentVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次学生关联Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgCollectionBatchStudentMapper extends BaseMapperPlus<XgCollectionBatchStudent, XgCollectionBatchStudentVo> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法,使用自定义ResultMap
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgCollectionBatchStudentVo>> P selectVoPage(IPage<XgCollectionBatchStudent> page, @Param("ew") Wrapper<XgCollectionBatchStudent> wrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID和学生ID查询关联信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 关联信息
|
||||
*/
|
||||
XgCollectionBatchStudentVo selectByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 查询指定批次的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定学生参与的批次列表
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 批次学生关联列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 查询指定批次已提交的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 已提交的学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectSubmittedByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定批次未提交的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 未提交的学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectNotSubmittedByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询指定学院在指定批次的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param collegeId 学院ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByBatchAndCollege(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId);
|
||||
|
||||
/**
|
||||
* 查询指定专业在指定批次的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param majorId 专业ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByBatchAndMajor(@Param("batchId") Long batchId, @Param("majorId") Long majorId);
|
||||
|
||||
/**
|
||||
* 查询指定班级在指定批次的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param classId 班级ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByBatchAndClass(@Param("batchId") Long batchId, @Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 查询指定届别在指定批次的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param grade 届别
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectByBatchAndGrade(@Param("batchId") Long batchId, @Param("grade") String grade);
|
||||
|
||||
/**
|
||||
* 批量插入批次学生关联
|
||||
*
|
||||
* @param batchStudents 批次学生关联列表
|
||||
* @return 插入结果
|
||||
*/
|
||||
int batchInsert(@Param("batchStudents") List<XgCollectionBatchStudent> batchStudents);
|
||||
|
||||
/**
|
||||
* 批量更新学生提交状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentIds 学生ID列表
|
||||
* @param hasSubmitted 是否已提交
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateSubmitStatus(@Param("batchId") Long batchId, @Param("studentIds") List<Long> studentIds, @Param("hasSubmitted") Integer hasSubmitted);
|
||||
|
||||
/**
|
||||
* 批量更新学生编辑权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentIds 学生ID列表
|
||||
* @param canEdit 是否可编辑
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateEditPermission(@Param("batchId") Long batchId, @Param("studentIds") List<Long> studentIds, @Param("canEdit") Integer canEdit);
|
||||
|
||||
/**
|
||||
* 统计指定批次的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学生数量
|
||||
*/
|
||||
int countByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定批次已提交的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 已提交学生数量
|
||||
*/
|
||||
int countSubmittedByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定批次未提交的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 未提交学生数量
|
||||
*/
|
||||
int countNotSubmittedByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计指定学院在指定批次的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param collegeId 学院ID
|
||||
* @return 学生数量
|
||||
*/
|
||||
int countByBatchAndCollege(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId);
|
||||
|
||||
/**
|
||||
* 统计指定专业在指定批次的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param majorId 专业ID
|
||||
* @return 学生数量
|
||||
*/
|
||||
int countByBatchAndMajor(@Param("batchId") Long batchId, @Param("majorId") Long majorId);
|
||||
|
||||
/**
|
||||
* 统计指定班级在指定批次的学生数量
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param classId 班级ID
|
||||
* @return 学生数量
|
||||
*/
|
||||
int countByBatchAndClass(@Param("batchId") Long batchId, @Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 根据批次ID删除所有学生关联
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID删除所有批次关联
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 检查学生是否已在指定批次中
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean existsByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 查询学生在指定批次的提交状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 提交状态
|
||||
*/
|
||||
Integer getSubmitStatusByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 查询需要提醒的学生列表(未提交且在提醒范围内)
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 需要提醒的学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectStudentsNeedReminder(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询超时未提交的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 超时未提交的学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> selectOverdueStudents(Long batchId);
|
||||
}
|
||||
-249
@@ -1,249 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统计分析Mapper接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgStatisticsAnalysisMapper extends BaseMapperPlus<XgStudentInfo, XgStudentInfo> {
|
||||
|
||||
/**
|
||||
* 统计学生总数
|
||||
*/
|
||||
Long countTotalStudents();
|
||||
|
||||
/**
|
||||
* 统计学院总数
|
||||
*/
|
||||
Long countTotalColleges();
|
||||
|
||||
/**
|
||||
* 统计专业总数
|
||||
*/
|
||||
Long countTotalMajors();
|
||||
|
||||
/**
|
||||
* 统计班级总数
|
||||
*/
|
||||
Long countTotalClasses();
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
List<Map<String, Object>> getCollegeOptions();
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
*/
|
||||
List<Map<String, Object>> getMajorOptions(@Param("collegeCode") String collegeCode);
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
*/
|
||||
List<Map<String, Object>> getClassOptions(@Param("collegeCode") String collegeCode, @Param("majorCode") String majorCode);
|
||||
|
||||
/**
|
||||
* 按学院统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByCollege(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按专业统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByMajor(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按班级统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByClass(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按年级统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByGrade(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按性别统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByGender(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按年龄段统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByAge(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按政治面貌统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByPoliticalStatus(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按民族统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByNationality(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按生源地统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsBySourceRegion(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按血型统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByBloodType(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按宗教信仰统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByReligion(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按学籍状态统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByStudentStatus(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按培养方式统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByTrainingType(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按身高范围统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByHeight(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按体重范围统计学生数量
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByWeight(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 多维度组合统计
|
||||
*
|
||||
* @param dimensions 统计维度列表
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByMultiDimensions(@Param("dimensions") List<String> dimensions, @Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 按时间趋势统计学生数量
|
||||
*
|
||||
* @param timeField 时间字段
|
||||
* @param timeFormat 时间格式
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> statisticsByTimeTrend(@Param("timeField") String timeField, @Param("timeFormat") String timeFormat, @Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取学生信息汇总报表
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 汇总报表数据
|
||||
*/
|
||||
List<Map<String, Object>> getStudentSummaryReport(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取班级统计报表
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 班级统计报表数据
|
||||
*/
|
||||
List<Map<String, Object>> getClassStatisticsReport(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取学院统计报表
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 学院统计报表数据
|
||||
*/
|
||||
List<Map<String, Object>> getCollegeStatisticsReport(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取困难学生统计报表
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 困难学生统计报表数据
|
||||
*/
|
||||
List<Map<String, Object>> getPoorStudentReport(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取特殊群体统计报表
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 特殊群体统计报表数据
|
||||
*/
|
||||
List<Map<String, Object>> getSpecialGroupReport(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 获取统计摘要信息
|
||||
*
|
||||
* @param conditions 查询条件
|
||||
* @return 统计摘要信息
|
||||
*/
|
||||
Map<String, Object> getStatisticsSummary(@Param("conditions") Map<String, Object> conditions);
|
||||
|
||||
/**
|
||||
* 自定义SQL统计查询
|
||||
*
|
||||
* @param sqlTemplate SQL模板
|
||||
* @param conditions 查询条件
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<Map<String, Object>> customStatisticsQuery(@Param("sqlTemplate") String sqlTemplate, @Param("conditions") Map<String, Object> conditions);
|
||||
}
|
||||
-94
@@ -1,94 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgStatisticsConfig;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsConfigVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计分析配置Mapper接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface XgStatisticsConfigMapper extends BaseMapperPlus<XgStatisticsConfig, XgStatisticsConfigVo> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法,使用自定义ResultMap
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgStatisticsConfigVo>> P selectVoPage(IPage<XgStatisticsConfig> page, @Param("ew") Wrapper<XgStatisticsConfig> wrapper);
|
||||
|
||||
/**
|
||||
* 根据配置编码查询配置信息
|
||||
*
|
||||
* @param configCode 配置编码
|
||||
* @return 配置信息
|
||||
*/
|
||||
XgStatisticsConfigVo selectByConfigCode(String configCode);
|
||||
|
||||
/**
|
||||
* 查询指定类型的配置列表
|
||||
*
|
||||
* @param configType 配置类型
|
||||
* @return 配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> selectByConfigType(String configType);
|
||||
|
||||
/**
|
||||
* 查询启用的配置列表
|
||||
*
|
||||
* @param configType 配置类型(可选)
|
||||
* @return 配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> selectEnabledConfigs(@Param("configType") String configType);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @return 系统配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> selectSystemConfigs();
|
||||
|
||||
/**
|
||||
* 查询用户自定义配置列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户自定义配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> selectUserConfigs(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 根据权限查询可访问的配置列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param roles 用户角色列表
|
||||
* @return 可访问的配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> selectAccessibleConfigs(@Param("userId") Long userId, @Param("roles") List<String> roles);
|
||||
|
||||
/**
|
||||
* 更新配置排序
|
||||
*
|
||||
* @param configId 配置ID
|
||||
* @param sortOrder 排序值
|
||||
* @return 更新结果
|
||||
*/
|
||||
int updateSortOrder(@Param("configId") Long configId, @Param("sortOrder") Integer sortOrder);
|
||||
|
||||
/**
|
||||
* 批量更新配置状态
|
||||
*
|
||||
* @param configIds 配置ID列表
|
||||
* @param isEnabled 是否启用
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateStatus(@Param("configIds") List<Long> configIds, @Param("isEnabled") Integer isEnabled);
|
||||
}
|
||||
-202
@@ -1,202 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生信息Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface XgStudentInfoMapper extends BaseMapperPlus<XgStudentInfo, XgStudentInfoVo> {
|
||||
|
||||
/**
|
||||
* 重写分页查询方法,使用自定义ResultMap
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
<P extends IPage<XgStudentInfoVo>> P selectVoPage(IPage<XgStudentInfo> page, @Param("ew") Wrapper<XgStudentInfo> wrapper);
|
||||
|
||||
/**
|
||||
* 根据学号查询学生信息
|
||||
*
|
||||
* @param studentNo 学号
|
||||
* @return 学生信息
|
||||
*/
|
||||
XgStudentInfoVo selectByStudentNo(String studentNo);
|
||||
|
||||
/**
|
||||
* 根据身份证号查询学生信息
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 学生信息
|
||||
*/
|
||||
XgStudentInfoVo selectByIdCard(String idCard);
|
||||
|
||||
/**
|
||||
* 查询指定班级的学生列表
|
||||
*
|
||||
* @param classCode 班级代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 查询指定学院的学生列表
|
||||
*
|
||||
* @param collegeCode 学院代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByCollegeCode(String collegeCode);
|
||||
|
||||
/**
|
||||
* 查询指定辅导员的学生列表
|
||||
*
|
||||
* @param counselorId 辅导员ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByCounselorId(Long counselorId);
|
||||
|
||||
/**
|
||||
* 查询指定班主任的学生列表
|
||||
*
|
||||
* @param classTeacherId 班主任ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByClassTeacherId(Long classTeacherId);
|
||||
|
||||
/**
|
||||
* 统计各学院学生数量
|
||||
*
|
||||
* @return 学院学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCollege();
|
||||
|
||||
/**
|
||||
* 统计各年级学生数量
|
||||
*
|
||||
* @return 年级学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByGrade();
|
||||
|
||||
/**
|
||||
* 统计各专业学生数量
|
||||
*
|
||||
* @return 专业学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByMajor();
|
||||
|
||||
/**
|
||||
* 统计学籍状态分布
|
||||
*
|
||||
* @return 学籍状态统计
|
||||
*/
|
||||
List<Map<String, Object>> countByStudentStatus();
|
||||
|
||||
/**
|
||||
* 统计信息完整度分布
|
||||
*
|
||||
* @return 信息完整度统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCompletionRate();
|
||||
|
||||
/**
|
||||
* 查询信息不完整的学生列表
|
||||
*
|
||||
* @return 信息不完整的学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectIncompleteStudents();
|
||||
|
||||
/**
|
||||
* 查询待审核的学生信息列表
|
||||
*
|
||||
* @return 待审核的学生信息列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectPendingAuditStudents();
|
||||
|
||||
/**
|
||||
* 批量更新学生信息状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param infoStatus 信息状态
|
||||
* @param updateBy 更新者
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdateInfoStatus(List<Long> studentIds, String infoStatus, Long updateBy);
|
||||
|
||||
/**
|
||||
* 批量更新学生学籍状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param studentStatus 学籍状态
|
||||
* @param updateBy 更新者
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdateStudentStatus(List<Long> studentIds, String studentStatus, Long updateBy);
|
||||
|
||||
/**
|
||||
* 查询重复学号的学生列表
|
||||
*
|
||||
* @return 重复学号的学生列表
|
||||
*/
|
||||
List<Map<String, Object>> selectDuplicateStudentNo();
|
||||
|
||||
/**
|
||||
* 查询重复身份证号的学生列表
|
||||
*
|
||||
* @return 重复身份证号的学生列表
|
||||
*/
|
||||
List<Map<String, Object>> selectDuplicateIdCard();
|
||||
|
||||
// ================================
|
||||
// 选项数据查询方法
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 查询学院选项
|
||||
*
|
||||
* @return 学院选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectCollegeOptions();
|
||||
|
||||
/**
|
||||
* 查询专业选项
|
||||
*
|
||||
* @param collegeCode 学院代码(可选)
|
||||
* @return 专业选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectMajorOptions(@Param("collegeCode") String collegeCode);
|
||||
|
||||
/**
|
||||
* 查询班级选项
|
||||
*
|
||||
* @param majorCode 专业代码(可选)
|
||||
* @return 班级选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectClassOptions(@Param("majorCode") String majorCode);
|
||||
|
||||
/**
|
||||
* 查询辅导员选项
|
||||
*
|
||||
* @return 辅导员选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectCounselorOptions();
|
||||
|
||||
/**
|
||||
* 查询班主任选项
|
||||
*
|
||||
* @return 班主任选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectClassTeacherOptions();
|
||||
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统用户Mapper接口扩展
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
public interface XgSysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||
|
||||
/**
|
||||
* 查询班主任角色的用户列表
|
||||
*
|
||||
* @param roleKey 角色标识
|
||||
* @return 用户列表
|
||||
*/
|
||||
List<SysUserVo> selectUsersByRoleKey(@Param("roleKey") String roleKey);
|
||||
|
||||
}
|
||||
-109
@@ -1,109 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgBatchScheduledTaskBo;
|
||||
import org.dromara.xg.domain.vo.XgBatchScheduledTaskVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 批次定时任务Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgBatchScheduledTaskService {
|
||||
|
||||
/**
|
||||
* 查询批次定时任务
|
||||
*/
|
||||
XgBatchScheduledTaskVo queryById(Long taskId);
|
||||
|
||||
/**
|
||||
* 查询批次定时任务列表
|
||||
*/
|
||||
TableDataInfo<XgBatchScheduledTaskVo> queryPageList(XgBatchScheduledTaskBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次定时任务列表
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> queryList(XgBatchScheduledTaskBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次定时任务
|
||||
*/
|
||||
Boolean insertByBo(XgBatchScheduledTaskBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次定时任务
|
||||
*/
|
||||
Boolean updateByBo(XgBatchScheduledTaskBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次定时任务信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 查询待执行的任务
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> queryPendingTasks();
|
||||
|
||||
/**
|
||||
* 查询正在执行的任务
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> queryRunningTasks();
|
||||
|
||||
/**
|
||||
* 查询已完成的任务
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> queryCompletedTasks();
|
||||
|
||||
/**
|
||||
* 查询失败的任务
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> queryFailedTasks();
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
*/
|
||||
Boolean executeTask(Long taskId);
|
||||
|
||||
/**
|
||||
* 重试任务
|
||||
*/
|
||||
Boolean retryTask(Long taskId);
|
||||
|
||||
/**
|
||||
* 停止任务
|
||||
*/
|
||||
Boolean stopTask(Long taskId);
|
||||
|
||||
/**
|
||||
* 批量执行任务
|
||||
*/
|
||||
Boolean batchExecuteTasks(List<Long> taskIds);
|
||||
|
||||
/**
|
||||
* 更新任务执行结果
|
||||
*/
|
||||
Boolean updateTaskResult(Long taskId, String status, String result);
|
||||
|
||||
/**
|
||||
* 统计任务执行情况
|
||||
*/
|
||||
Map<String, Object> getTaskStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 清理历史任务
|
||||
*/
|
||||
Boolean cleanHistoryTasks(Integer keepDays);
|
||||
|
||||
/**
|
||||
* 导出任务数据
|
||||
*/
|
||||
List<XgBatchScheduledTaskVo> exportTaskData(XgBatchScheduledTaskBo bo);
|
||||
}
|
||||
-204
@@ -1,204 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 班级信息Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
public interface IXgClassInfoService {
|
||||
|
||||
/**
|
||||
* 查询班级信息
|
||||
*
|
||||
* @param id 班级信息主键
|
||||
* @return 班级信息
|
||||
*/
|
||||
XgClassInfoVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*
|
||||
* @param bo 班级信息
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
TableDataInfo<XgClassInfoVo> queryPageList(XgClassInfoBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*
|
||||
* @param bo 班级信息
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryList(XgClassInfoBo bo);
|
||||
|
||||
/**
|
||||
* 新增班级信息
|
||||
*
|
||||
* @param bo 班级信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgClassInfoBo bo);
|
||||
|
||||
/**
|
||||
* 修改班级信息
|
||||
*
|
||||
* @param bo 班级信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgClassInfoBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除班级信息信息
|
||||
*
|
||||
* @param ids 需要删除的班级信息主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*
|
||||
* @param classCode 班级代码
|
||||
* @return 班级信息
|
||||
*/
|
||||
XgClassInfoVo queryByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 根据年级查询班级信息列表
|
||||
*
|
||||
* @param grade 年级
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryByGrade(String grade);
|
||||
|
||||
/**
|
||||
* 根据学院代码查询班级信息列表
|
||||
*
|
||||
* @param collegeCode 学院代码
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryByCollegeCode(String collegeCode);
|
||||
|
||||
/**
|
||||
* 根据专业代码查询班级信息列表
|
||||
*
|
||||
* @param majorCode 专业代码
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryByMajorCode(String majorCode);
|
||||
|
||||
/**
|
||||
* 根据辅导员ID查询班级信息列表
|
||||
*
|
||||
* @param counselorId 辅导员ID
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryByCounselorId(Long counselorId);
|
||||
|
||||
/**
|
||||
* 根据班主任ID查询班级信息列表
|
||||
*
|
||||
* @param classTeacherId 班主任ID
|
||||
* @return 班级信息集合
|
||||
*/
|
||||
List<XgClassInfoVo> queryByClassTeacherId(Long classTeacherId);
|
||||
|
||||
/**
|
||||
* 获取班级可用选项列表(用于下拉框)
|
||||
*
|
||||
* @return 班级选项集合
|
||||
*/
|
||||
List<XgClassInfoVo> getClassOptions();
|
||||
|
||||
/**
|
||||
* 更新班级学生统计数据
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateStudentCount(Long classId);
|
||||
|
||||
/**
|
||||
* 批量更新班级学生统计数据
|
||||
*
|
||||
* @param classIds 班级ID集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean batchUpdateStudentCount(Collection<Long> classIds);
|
||||
|
||||
/**
|
||||
* 启用班级
|
||||
*
|
||||
* @param id 班级ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean enableClass(Long id);
|
||||
|
||||
/**
|
||||
* 禁用班级
|
||||
*
|
||||
* @param id 班级ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean disableClass(Long id);
|
||||
|
||||
/**
|
||||
* 获取班主任用户列表
|
||||
*
|
||||
* @return 班主任用户列表
|
||||
*/
|
||||
List<SysUserVo> getClassTeacherOptions();
|
||||
|
||||
// ================================
|
||||
// 统计数据接口 - 新增
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取班级信息统计概览
|
||||
*
|
||||
* @return 统计概览数据
|
||||
*/
|
||||
Map<String, Object> getStatistics();
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*
|
||||
* @return 学院班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCollege();
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*
|
||||
* @return 年级班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByGrade();
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*
|
||||
* @return 专业班级数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByMajor();
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*
|
||||
* @return 班级状态统计
|
||||
*/
|
||||
List<Map<String, Object>> countByStatus();
|
||||
|
||||
}
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级班主任关系Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
public interface IXgClassTeacherRelationService {
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系
|
||||
*
|
||||
* @param id 班级班主任关系主键
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
XgClassTeacherRelationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系列表
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 班级班主任关系集合
|
||||
*/
|
||||
TableDataInfo<XgClassTeacherRelationVo> queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系列表
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 班级班主任关系集合
|
||||
*/
|
||||
List<XgClassTeacherRelationVo> queryList(XgClassTeacherRelationBo bo);
|
||||
|
||||
/**
|
||||
* 新增班级班主任关系
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgClassTeacherRelationBo bo);
|
||||
|
||||
/**
|
||||
* 修改班级班主任关系
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgClassTeacherRelationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除班级班主任关系信息
|
||||
*
|
||||
* @param ids 需要删除的班级班主任关系主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 创建班级班主任关系
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param teacherId 班主任ID
|
||||
* @return 结果
|
||||
*/
|
||||
boolean createClassTeacherRelation(Long classId, Long teacherId);
|
||||
|
||||
/**
|
||||
* 更新班级班主任关系
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param teacherId 班主任ID
|
||||
* @return 结果
|
||||
*/
|
||||
boolean updateClassTeacherRelation(Long classId, Long teacherId);
|
||||
|
||||
/**
|
||||
* 获取班级当前班主任
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
XgClassTeacherRelation getActiveTeacherByClassId(Long classId);
|
||||
|
||||
}
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchLogBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchLogVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 批次操作日志Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgCollectionBatchLogService {
|
||||
|
||||
/**
|
||||
* 查询批次操作日志
|
||||
*/
|
||||
XgCollectionBatchLogVo queryById(Long logId);
|
||||
|
||||
/**
|
||||
* 查询批次操作日志列表
|
||||
*/
|
||||
TableDataInfo<XgCollectionBatchLogVo> queryPageList(XgCollectionBatchLogBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次操作日志列表
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryList(XgCollectionBatchLogBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次操作日志
|
||||
*/
|
||||
Boolean insertByBo(XgCollectionBatchLogBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次操作日志
|
||||
*/
|
||||
Boolean updateByBo(XgCollectionBatchLogBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次操作日志信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询操作日志
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryLogsByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询操作日志
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryLogsByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 根据操作类型查询操作日志
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryLogsByOperationType(String operationType);
|
||||
|
||||
/**
|
||||
* 根据操作人查询操作日志
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryLogsByOperator(Long operatorId);
|
||||
|
||||
/**
|
||||
* 查询指定时间范围内的操作日志
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> queryLogsByTimeRange(Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 记录批次操作日志
|
||||
*/
|
||||
Boolean recordBatchLog(Long batchId, String operationType, String operationContent, String operationResult);
|
||||
|
||||
/**
|
||||
* 记录学生操作日志
|
||||
*/
|
||||
Boolean recordStudentLog(Long batchId, Long studentId, String operationType, String operationContent, String operationResult);
|
||||
|
||||
/**
|
||||
* 批量记录操作日志
|
||||
*/
|
||||
Boolean batchRecordLogs(List<XgCollectionBatchLogBo> logList);
|
||||
|
||||
/**
|
||||
* 统计操作次数(按操作类型)
|
||||
*/
|
||||
List<Map<String, Object>> countOperationsByType(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计操作次数(按操作人)
|
||||
*/
|
||||
List<Map<String, Object>> countOperationsByOperator(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计操作次数(按时间)
|
||||
*/
|
||||
List<Map<String, Object>> countOperationsByTime(Long batchId, String timeType);
|
||||
|
||||
/**
|
||||
* 清理历史日志
|
||||
*/
|
||||
Boolean cleanHistoryLogs(Date beforeTime);
|
||||
|
||||
/**
|
||||
* 导出日志数据
|
||||
*/
|
||||
List<XgCollectionBatchLogVo> exportLogData(XgCollectionBatchLogBo bo);
|
||||
}
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchPermissionBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchPermissionVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批次权限配置Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgCollectionBatchPermissionService {
|
||||
|
||||
/**
|
||||
* 查询批次权限配置
|
||||
*/
|
||||
XgCollectionBatchPermissionVo queryById(Long permissionId);
|
||||
|
||||
/**
|
||||
* 查询批次权限配置列表
|
||||
*/
|
||||
TableDataInfo<XgCollectionBatchPermissionVo> queryPageList(XgCollectionBatchPermissionBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次权限配置列表
|
||||
*/
|
||||
List<XgCollectionBatchPermissionVo> queryList(XgCollectionBatchPermissionBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次权限配置
|
||||
*/
|
||||
Boolean insertByBo(XgCollectionBatchPermissionBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次权限配置
|
||||
*/
|
||||
Boolean updateByBo(XgCollectionBatchPermissionBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次权限配置信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 检查用户是否有批次权限
|
||||
*/
|
||||
Boolean checkUserPermission(Long batchId, Long userId, String permissionType);
|
||||
|
||||
/**
|
||||
* 检查角色是否有批次权限
|
||||
*/
|
||||
Boolean checkRolePermission(Long batchId, Long roleId, String permissionType);
|
||||
|
||||
/**
|
||||
* 检查学院是否有批次权限
|
||||
*/
|
||||
Boolean checkCollegePermission(Long batchId, String collegeCode, String permissionType);
|
||||
|
||||
/**
|
||||
* 批量配置用户权限
|
||||
*/
|
||||
Boolean batchConfigUserPermission(Long batchId, List<Long> userIds, String permissionType, String status);
|
||||
|
||||
/**
|
||||
* 批量配置角色权限
|
||||
*/
|
||||
Boolean batchConfigRolePermission(Long batchId, List<Long> roleIds, String permissionType, String status);
|
||||
|
||||
/**
|
||||
* 批量配置学院权限
|
||||
*/
|
||||
Boolean batchConfigCollegePermission(Long batchId, List<String> collegeCodes, String permissionType, String status);
|
||||
|
||||
/**
|
||||
* 清理过期权限
|
||||
*/
|
||||
Boolean cleanExpiredPermissions();
|
||||
}
|
||||
-159
@@ -1,159 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgCollectionBatchService {
|
||||
|
||||
/**
|
||||
* 查询信息采集批次
|
||||
*/
|
||||
XgCollectionBatchVo queryById(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
TableDataInfo<XgCollectionBatchVo> queryPageList(XgCollectionBatchBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryList(XgCollectionBatchBo bo);
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
Boolean insertByBo(XgCollectionBatchBo bo);
|
||||
|
||||
/**
|
||||
* 修改信息采集批次
|
||||
*/
|
||||
Boolean updateByBo(XgCollectionBatchBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除信息采集批次信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据编码查询批次
|
||||
*/
|
||||
XgCollectionBatchVo queryByCode(String batchCode);
|
||||
|
||||
/**
|
||||
* 查询当前用户有权限的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryUserPermissionBatches(Long userId);
|
||||
|
||||
/**
|
||||
* 查询当前进行中的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryActiveBatches();
|
||||
|
||||
/**
|
||||
* 查询即将开始的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryUpcomingBatches();
|
||||
|
||||
/**
|
||||
* 查询即将结束的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryEndingSoonBatches();
|
||||
|
||||
/**
|
||||
* 查询需要提醒的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryBatchesNeedReminder();
|
||||
|
||||
/**
|
||||
* 查询需要自动关闭的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> queryBatchesNeedAutoClose();
|
||||
|
||||
/**
|
||||
* 启动批次
|
||||
*/
|
||||
Boolean startBatch(Long batchId);
|
||||
|
||||
/**
|
||||
* 暂停批次
|
||||
*/
|
||||
Boolean pauseBatch(Long batchId);
|
||||
|
||||
/**
|
||||
* 恢复批次
|
||||
*/
|
||||
Boolean resumeBatch(Long batchId);
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
Boolean endBatch(Long batchId);
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
Boolean copyBatch(Long batchId, String newBatchCode, String newBatchName);
|
||||
|
||||
/**
|
||||
* 批次统计
|
||||
*/
|
||||
Map<String, Object> getBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 批次整体统计
|
||||
*/
|
||||
Map<String, Object> getBatchOverallStatistics();
|
||||
|
||||
/**
|
||||
* 批次完成率统计
|
||||
*/
|
||||
Map<String, Object> getBatchCompletionStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 批次各维度统计
|
||||
*/
|
||||
List<Map<String, Object>> getBatchDimensionStatistics(Long batchId, String dimension);
|
||||
|
||||
/**
|
||||
* 批量更新批次状态
|
||||
*/
|
||||
Boolean batchUpdateStatus(List<Long> batchIds, String status);
|
||||
|
||||
/**
|
||||
* 检查批次是否可以编辑
|
||||
*/
|
||||
Boolean checkBatchEditable(Long batchId);
|
||||
|
||||
/**
|
||||
* 检查批次是否可以删除
|
||||
*/
|
||||
Boolean checkBatchDeletable(Long batchId);
|
||||
|
||||
/**
|
||||
* 获取批次可用选项
|
||||
*/
|
||||
List<XgCollectionBatchVo> getAvailableBatches();
|
||||
|
||||
/**
|
||||
* 导出批次数据
|
||||
*/
|
||||
List<XgCollectionBatchVo> exportBatchData(XgCollectionBatchBo bo);
|
||||
|
||||
/**
|
||||
* 批次数据导入
|
||||
*/
|
||||
Boolean importBatchData(List<XgCollectionBatchBo> batchList);
|
||||
}
|
||||
-94
@@ -1,94 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchStatisticsBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchStatisticsVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 批次统计Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgCollectionBatchStatisticsService {
|
||||
|
||||
/**
|
||||
* 查询批次统计
|
||||
*/
|
||||
XgCollectionBatchStatisticsVo queryById(Long statisticsId);
|
||||
|
||||
/**
|
||||
* 查询批次统计列表
|
||||
*/
|
||||
TableDataInfo<XgCollectionBatchStatisticsVo> queryPageList(XgCollectionBatchStatisticsBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次统计列表
|
||||
*/
|
||||
List<XgCollectionBatchStatisticsVo> queryList(XgCollectionBatchStatisticsBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次统计
|
||||
*/
|
||||
Boolean insertByBo(XgCollectionBatchStatisticsBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次统计
|
||||
*/
|
||||
Boolean updateByBo(XgCollectionBatchStatisticsBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次统计信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 刷新批次统计(按批次)
|
||||
*/
|
||||
Boolean refreshBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 刷新批次统计(按学院)
|
||||
*/
|
||||
Boolean refreshCollegeStatistics(Long batchId, String collegeCode);
|
||||
|
||||
/**
|
||||
* 刷新批次统计(按专业)
|
||||
*/
|
||||
Boolean refreshMajorStatistics(Long batchId, String majorCode);
|
||||
|
||||
/**
|
||||
* 刷新批次统计(按班级)
|
||||
*/
|
||||
Boolean refreshClassStatistics(Long batchId, String classCode);
|
||||
|
||||
/**
|
||||
* 刷新批次统计(按届别)
|
||||
*/
|
||||
Boolean refreshGradeStatistics(Long batchId, String grade);
|
||||
|
||||
/**
|
||||
* 获取完成率排名
|
||||
*/
|
||||
List<XgCollectionBatchStatisticsVo> getCompletionRanking(Long batchId, String dimension, Integer limit);
|
||||
|
||||
/**
|
||||
* 获取低完成率统计
|
||||
*/
|
||||
List<XgCollectionBatchStatisticsVo> getLowCompletionStatistics(Long batchId, String dimension, Double threshold);
|
||||
|
||||
/**
|
||||
* 批量刷新统计
|
||||
*/
|
||||
Boolean batchRefreshStatistics(List<Long> batchIds);
|
||||
|
||||
/**
|
||||
* 导出统计数据
|
||||
*/
|
||||
List<XgCollectionBatchStatisticsVo> exportStatisticsData(XgCollectionBatchStatisticsBo bo);
|
||||
}
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchStudentBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchStudentVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 批次学生关联Service接口
|
||||
*
|
||||
* @author hzdyjs
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgCollectionBatchStudentService {
|
||||
|
||||
/**
|
||||
* 查询批次学生关联
|
||||
*/
|
||||
XgCollectionBatchStudentVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批次学生关联列表
|
||||
*/
|
||||
TableDataInfo<XgCollectionBatchStudentVo> queryPageList(XgCollectionBatchStudentBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次学生关联列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryList(XgCollectionBatchStudentBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次学生关联
|
||||
*/
|
||||
Boolean insertByBo(XgCollectionBatchStudentBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次学生关联
|
||||
*/
|
||||
Boolean updateByBo(XgCollectionBatchStudentBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次学生关联信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryStudentsByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询批次列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryBatchesByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 查询批次已提交学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> querySubmittedStudents(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次未提交学生列表
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryUnsubmittedStudents(Long batchId);
|
||||
|
||||
/**
|
||||
* 按学院查询批次学生
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryStudentsByCollege(Long batchId, String collegeCode);
|
||||
|
||||
/**
|
||||
* 按专业查询批次学生
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryStudentsByMajor(Long batchId, String majorCode);
|
||||
|
||||
/**
|
||||
* 按班级查询批次学生
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryStudentsByClass(Long batchId, String classCode);
|
||||
|
||||
/**
|
||||
* 按届别查询批次学生
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> queryStudentsByGrade(Long batchId, String grade);
|
||||
|
||||
/**
|
||||
* 批量添加学生到批次
|
||||
*/
|
||||
Boolean batchAddStudents(Long batchId, List<Long> studentIds);
|
||||
|
||||
/**
|
||||
* 批量从批次移除学生
|
||||
*/
|
||||
Boolean batchRemoveStudents(Long batchId, List<Long> studentIds);
|
||||
|
||||
/**
|
||||
* 批量更新提交状态
|
||||
*/
|
||||
Boolean batchUpdateSubmitStatus(List<Long> ids, String submitStatus);
|
||||
|
||||
/**
|
||||
* 批量更新编辑权限
|
||||
*/
|
||||
Boolean batchUpdateEditPermission(List<Long> ids, String editPermission);
|
||||
|
||||
/**
|
||||
* 学生提交信息
|
||||
*/
|
||||
Boolean submitStudentInfo(Long batchId, Long studentId, String submitData);
|
||||
|
||||
/**
|
||||
* 学生撤销提交
|
||||
*/
|
||||
Boolean revokeSubmit(Long batchId, Long studentId);
|
||||
|
||||
/**
|
||||
* 统计批次学生数量(按学院)
|
||||
*/
|
||||
List<Map<String, Object>> countStudentsByCollege(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计批次学生数量(按专业)
|
||||
*/
|
||||
List<Map<String, Object>> countStudentsByMajor(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计批次学生数量(按班级)
|
||||
*/
|
||||
List<Map<String, Object>> countStudentsByClass(Long batchId);
|
||||
|
||||
/**
|
||||
* 统计批次学生数量(按届别)
|
||||
*/
|
||||
List<Map<String, Object>> countStudentsByGrade(Long batchId);
|
||||
|
||||
/**
|
||||
* 导出批次学生数据
|
||||
*/
|
||||
List<XgCollectionBatchStudentVo> exportStudentData(XgCollectionBatchStudentBo bo);
|
||||
|
||||
/**
|
||||
* 批次学生数据导入
|
||||
*/
|
||||
Boolean importStudentData(List<XgCollectionBatchStudentBo> studentList);
|
||||
}
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.bo.XgStatisticsQueryBo;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计分析Service接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgStatisticsAnalysisService {
|
||||
|
||||
/**
|
||||
* 获取统计概览
|
||||
*/
|
||||
Map<String, Object> getStatisticsOverview();
|
||||
|
||||
/**
|
||||
* 获取统计维度选项
|
||||
*/
|
||||
List<Map<String, Object>> getStatisticsDimensionOptions();
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
List<Map<String, Object>> getCollegeOptions();
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
*/
|
||||
List<Map<String, Object>> getMajorOptions(String collegeCode);
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
*/
|
||||
List<Map<String, Object>> getClassOptions(String collegeCode, String majorCode);
|
||||
|
||||
/**
|
||||
* 获取图表类型选项
|
||||
*/
|
||||
List<Map<String, Object>> getChartTypeOptions();
|
||||
|
||||
/**
|
||||
* 执行统计分析
|
||||
*/
|
||||
XgStatisticsResultVo executeStatistics(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按学院统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByCollege(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按专业统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByMajor(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按班级统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByClass(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按年级统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByGrade(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按性别统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByGender(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按年龄段统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByAge(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按政治面貌统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByPoliticalStatus(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按民族统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByNationality(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按生源地统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsBySourceRegion(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按血型统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByBloodType(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按宗教信仰统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByReligion(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按学籍状态统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByStudentStatus(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按培养方式统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByTrainingType(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按身高范围统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByHeight(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按体重范围统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByWeight(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 多维度组合统计
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByMultiDimensions(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 按时间趋势统计学生数量
|
||||
*/
|
||||
XgStatisticsResultVo statisticsByTimeTrend(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取学生信息汇总报表
|
||||
*/
|
||||
XgStatisticsResultVo getStudentSummaryReport(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取班级统计报表
|
||||
*/
|
||||
XgStatisticsResultVo getClassStatisticsReport(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取学院统计报表
|
||||
*/
|
||||
XgStatisticsResultVo getCollegeStatisticsReport(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取困难学生统计报表
|
||||
*/
|
||||
XgStatisticsResultVo getPoorStudentReport(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取特殊群体统计报表
|
||||
*/
|
||||
XgStatisticsResultVo getSpecialGroupReport(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 获取统计摘要信息
|
||||
*/
|
||||
Map<String, Object> getStatisticsSummary(XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 根据配置执行统计
|
||||
*/
|
||||
XgStatisticsResultVo executeStatisticsByConfig(String configCode, XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 生成图表数据
|
||||
*/
|
||||
XgStatisticsResultVo generateChartData(String chartType, XgStatisticsQueryBo queryBo);
|
||||
|
||||
/**
|
||||
* 导出统计结果
|
||||
*/
|
||||
byte[] exportStatisticsResult(XgStatisticsResultVo resultVo, String exportFormat);
|
||||
|
||||
/**
|
||||
* 清除统计缓存
|
||||
*/
|
||||
Boolean clearStatisticsCache(String cacheKey);
|
||||
|
||||
/**
|
||||
* 清除所有统计缓存
|
||||
*/
|
||||
Boolean clearAllStatisticsCache();
|
||||
|
||||
/**
|
||||
* 获取缓存统计信息
|
||||
*/
|
||||
Map<String, Object> getCacheStatistics();
|
||||
|
||||
/**
|
||||
* 预热统计缓存
|
||||
*/
|
||||
Boolean warmUpStatisticsCache();
|
||||
}
|
||||
-117
@@ -1,117 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计缓存Service接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgStatisticsCacheService {
|
||||
|
||||
/**
|
||||
* 获取缓存的统计结果
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @return 统计结果,如果不存在则返回null
|
||||
*/
|
||||
XgStatisticsResultVo getCachedResult(String cacheKey);
|
||||
|
||||
/**
|
||||
* 缓存统计结果
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @param result 统计结果
|
||||
* @param expireMinutes 过期时间(分钟)
|
||||
*/
|
||||
void cacheResult(String cacheKey, XgStatisticsResultVo result, Integer expireMinutes);
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteCache(String cacheKey);
|
||||
|
||||
/**
|
||||
* 清除所有统计缓存
|
||||
*
|
||||
* @return 是否清除成功
|
||||
*/
|
||||
Boolean clearAllCache();
|
||||
|
||||
/**
|
||||
* 获取缓存统计信息
|
||||
*
|
||||
* @return 缓存统计信息
|
||||
*/
|
||||
Map<String, Object> getCacheStatistics();
|
||||
|
||||
/**
|
||||
* 检查缓存是否存在
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @return 是否存在
|
||||
*/
|
||||
Boolean existsCache(String cacheKey);
|
||||
|
||||
/**
|
||||
* 设置缓存过期时间
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @param expireMinutes 过期时间(分钟)
|
||||
* @return 是否设置成功
|
||||
*/
|
||||
Boolean expireCache(String cacheKey, Integer expireMinutes);
|
||||
|
||||
/**
|
||||
* 获取缓存剩余过期时间
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
* @return 剩余过期时间(秒),-1表示永不过期,-2表示不存在
|
||||
*/
|
||||
Long getCacheExpire(String cacheKey);
|
||||
|
||||
/**
|
||||
* 批量删除缓存
|
||||
*
|
||||
* @param pattern 缓存键模式(支持通配符)
|
||||
* @return 删除的缓存数量
|
||||
*/
|
||||
Long deleteCacheByPattern(String pattern);
|
||||
|
||||
/**
|
||||
* 预热缓存
|
||||
*
|
||||
* @return 是否预热成功
|
||||
*/
|
||||
Boolean warmUpCache();
|
||||
|
||||
/**
|
||||
* 生成缓存键
|
||||
*
|
||||
* @param statisticsType 统计类型
|
||||
* @param dimension 统计维度
|
||||
* @param conditionsHash 条件哈希值
|
||||
* @return 缓存键
|
||||
*/
|
||||
String generateCacheKey(String statisticsType, String dimension, String conditionsHash);
|
||||
|
||||
/**
|
||||
* 更新缓存命中统计
|
||||
*
|
||||
* @param cacheKey 缓存键
|
||||
*/
|
||||
void updateCacheHitStats(String cacheKey);
|
||||
|
||||
/**
|
||||
* 获取缓存命中率
|
||||
*
|
||||
* @return 缓存命中率(百分比)
|
||||
*/
|
||||
Double getCacheHitRate();
|
||||
}
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.bo.XgStatisticsConfigBo;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsConfigVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计分析配置Service接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgStatisticsConfigService {
|
||||
|
||||
/**
|
||||
* 查询统计分析配置
|
||||
*/
|
||||
XgStatisticsConfigVo queryById(Long configId);
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表
|
||||
*/
|
||||
TableDataInfo<XgStatisticsConfigVo> queryPageList(XgStatisticsConfigBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> queryList(XgStatisticsConfigBo bo);
|
||||
|
||||
/**
|
||||
* 新增统计分析配置
|
||||
*/
|
||||
Boolean insertByBo(XgStatisticsConfigBo bo);
|
||||
|
||||
/**
|
||||
* 修改统计分析配置
|
||||
*/
|
||||
Boolean updateByBo(XgStatisticsConfigBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除统计分析配置信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据配置编码查询配置信息
|
||||
*/
|
||||
XgStatisticsConfigVo queryByConfigCode(String configCode);
|
||||
|
||||
/**
|
||||
* 查询指定类型的配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> queryByConfigType(String configType);
|
||||
|
||||
/**
|
||||
* 查询启用的配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> queryEnabledConfigs(String configType);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> querySystemConfigs();
|
||||
|
||||
/**
|
||||
* 查询用户自定义配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> queryUserConfigs(Long userId);
|
||||
|
||||
/**
|
||||
* 根据权限查询可访问的配置列表
|
||||
*/
|
||||
List<XgStatisticsConfigVo> queryAccessibleConfigs(Long userId, List<String> roles);
|
||||
|
||||
/**
|
||||
* 更新配置排序
|
||||
*/
|
||||
Boolean updateSortOrder(Long configId, Integer sortOrder);
|
||||
|
||||
/**
|
||||
* 批量更新配置状态
|
||||
*/
|
||||
Boolean batchUpdateStatus(List<Long> configIds, Integer isEnabled);
|
||||
|
||||
/**
|
||||
* 复制配置
|
||||
*/
|
||||
Boolean copyConfig(Long configId, String newConfigName, String newConfigCode);
|
||||
|
||||
/**
|
||||
* 启用配置
|
||||
*/
|
||||
Boolean enableConfig(Long configId);
|
||||
|
||||
/**
|
||||
* 禁用配置
|
||||
*/
|
||||
Boolean disableConfig(Long configId);
|
||||
|
||||
/**
|
||||
* 检查配置编码是否存在
|
||||
*/
|
||||
Boolean checkConfigCodeExists(String configCode, Long excludeId);
|
||||
|
||||
/**
|
||||
* 获取配置的JSON内容
|
||||
*/
|
||||
String getConfigContent(Long configId);
|
||||
|
||||
/**
|
||||
* 更新配置的JSON内容
|
||||
*/
|
||||
Boolean updateConfigContent(Long configId, String configContent);
|
||||
}
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
|
||||
/**
|
||||
* 统计导出Service接口
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
public interface IXgStatisticsExportService {
|
||||
|
||||
/**
|
||||
* 导出统计结果到Excel
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @return Excel文件字节数组
|
||||
*/
|
||||
byte[] exportToExcel(XgStatisticsResultVo resultVo);
|
||||
|
||||
/**
|
||||
* 导出统计结果到PDF
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @return PDF文件字节数组
|
||||
*/
|
||||
byte[] exportToPdf(XgStatisticsResultVo resultVo);
|
||||
|
||||
/**
|
||||
* 导出统计结果到CSV
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @return CSV文件字节数组
|
||||
*/
|
||||
byte[] exportToCsv(XgStatisticsResultVo resultVo);
|
||||
|
||||
/**
|
||||
* 导出统计结果到Word
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @return Word文件字节数组
|
||||
*/
|
||||
byte[] exportToWord(XgStatisticsResultVo resultVo);
|
||||
|
||||
/**
|
||||
* 导出统计结果到指定格式
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @param format 导出格式(excel、pdf、csv、word)
|
||||
* @return 文件字节数组
|
||||
*/
|
||||
byte[] exportToFormat(XgStatisticsResultVo resultVo, String format);
|
||||
|
||||
/**
|
||||
* 获取导出文件的Content-Type
|
||||
*
|
||||
* @param format 导出格式
|
||||
* @return Content-Type
|
||||
*/
|
||||
String getContentType(String format);
|
||||
|
||||
/**
|
||||
* 获取导出文件的文件名
|
||||
*
|
||||
* @param resultVo 统计结果
|
||||
* @param format 导出格式
|
||||
* @return 文件名
|
||||
*/
|
||||
String getFileName(XgStatisticsResultVo resultVo, String format);
|
||||
|
||||
/**
|
||||
* 检查导出格式是否支持
|
||||
*
|
||||
* @param format 导出格式
|
||||
* @return 是否支持
|
||||
*/
|
||||
Boolean isSupportedFormat(String format);
|
||||
}
|
||||
-328
@@ -1,328 +0,0 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoVo;
|
||||
import org.dromara.xg.domain.bo.XgStudentInfoBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生信息Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface IXgStudentInfoService {
|
||||
|
||||
/**
|
||||
* 查询学生信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生信息
|
||||
*/
|
||||
XgStudentInfoVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生信息分页列表
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoVo> queryPageList(XgStudentInfoBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生信息列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryList(XgStudentInfoBo bo);
|
||||
|
||||
/**
|
||||
* 新增学生信息
|
||||
*
|
||||
* @param bo 学生信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XgStudentInfoBo bo);
|
||||
|
||||
/**
|
||||
* 修改学生信息
|
||||
*
|
||||
* @param bo 学生信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XgStudentInfoBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据学号查询学生信息
|
||||
*
|
||||
* @param studentNo 学号
|
||||
* @return 学生信息
|
||||
*/
|
||||
XgStudentInfoVo queryByStudentNo(String studentNo);
|
||||
|
||||
/**
|
||||
* 根据身份证号查询学生信息
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 学生信息
|
||||
*/
|
||||
XgStudentInfoVo queryByIdCard(String idCard);
|
||||
|
||||
/**
|
||||
* 查询指定班级的学生列表
|
||||
*
|
||||
* @param classCode 班级代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 查询指定学院的学生列表
|
||||
*
|
||||
* @param collegeCode 学院代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByCollegeCode(String collegeCode);
|
||||
|
||||
/**
|
||||
* 查询指定辅导员的学生列表
|
||||
*
|
||||
* @param counselorId 辅导员ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByCounselorId(Long counselorId);
|
||||
|
||||
/**
|
||||
* 查询指定班主任的学生列表
|
||||
*
|
||||
* @param classTeacherId 班主任ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByClassTeacherId(Long classTeacherId);
|
||||
|
||||
/**
|
||||
* 统计各学院学生数量
|
||||
*
|
||||
* @return 学院学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCollege();
|
||||
|
||||
/**
|
||||
* 统计各年级学生数量
|
||||
*
|
||||
* @return 年级学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByGrade();
|
||||
|
||||
/**
|
||||
* 统计各专业学生数量
|
||||
*
|
||||
* @return 专业学生数量统计
|
||||
*/
|
||||
List<Map<String, Object>> countByMajor();
|
||||
|
||||
/**
|
||||
* 统计学籍状态分布
|
||||
*
|
||||
* @return 学籍状态统计
|
||||
*/
|
||||
List<Map<String, Object>> countByStudentStatus();
|
||||
|
||||
/**
|
||||
* 统计信息完整度分布
|
||||
*
|
||||
* @return 信息完整度统计
|
||||
*/
|
||||
List<Map<String, Object>> countByCompletionRate();
|
||||
|
||||
/**
|
||||
* 查询信息不完整的学生列表
|
||||
*
|
||||
* @return 信息不完整的学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryIncompleteStudents();
|
||||
|
||||
/**
|
||||
* 查询待审核的学生信息列表
|
||||
*
|
||||
* @return 待审核的学生信息列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryPendingAuditStudents();
|
||||
|
||||
// ================================
|
||||
// 选项数据接口
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*
|
||||
* @return 学院选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getCollegeOptions();
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
*
|
||||
* @param collegeCode 学院代码(可选)
|
||||
* @return 专业选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getMajorOptions(String collegeCode);
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
*
|
||||
* @param majorCode 专业代码(可选)
|
||||
* @return 班级选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getClassOptions(String majorCode);
|
||||
|
||||
/**
|
||||
* 获取辅导员选项
|
||||
*
|
||||
* @return 辅导员选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getCounselorOptions();
|
||||
|
||||
/**
|
||||
* 获取班主任选项
|
||||
*
|
||||
* @return 班主任选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getClassTeacherOptions();
|
||||
|
||||
/**
|
||||
* 检查学号是否存在
|
||||
*
|
||||
* @param studentNo 学号
|
||||
* @param studentId 学生ID(编辑时排除自己)
|
||||
* @return 是否存在
|
||||
*/
|
||||
Boolean checkStudentNo(String studentNo, Long studentId);
|
||||
|
||||
/**
|
||||
* 检查身份证号是否存在
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @param studentId 学生ID(编辑时排除自己)
|
||||
* @return 是否存在
|
||||
*/
|
||||
Boolean checkIdCard(String idCard, Long studentId);
|
||||
|
||||
/**
|
||||
* 批量更新学生信息状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param infoStatus 信息状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean batchUpdateInfoStatus(List<Long> studentIds, String infoStatus);
|
||||
|
||||
/**
|
||||
* 批量更新学生学籍状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param studentStatus 学籍状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean batchUpdateStudentStatus(List<Long> studentIds, String studentStatus);
|
||||
|
||||
/**
|
||||
* 查询重复学号的学生列表
|
||||
*
|
||||
* @return 重复学号的学生列表
|
||||
*/
|
||||
List<Map<String, Object>> queryDuplicateStudentNo();
|
||||
|
||||
/**
|
||||
* 查询重复身份证号的学生列表
|
||||
*
|
||||
* @return 重复身份证号的学生列表
|
||||
*/
|
||||
List<Map<String, Object>> queryDuplicateIdCard();
|
||||
|
||||
/**
|
||||
* 计算学生信息完整度
|
||||
*
|
||||
* @param studentInfo 学生信息
|
||||
* @return 完整度百分比
|
||||
*/
|
||||
Double calculateCompletionRate(XgStudentInfoVo studentInfo);
|
||||
|
||||
/**
|
||||
* 更新学生信息完整度
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean updateCompletionRate(Long studentId);
|
||||
|
||||
/**
|
||||
* 批量导入学生信息
|
||||
*
|
||||
* @param studentInfoList 学生信息列表
|
||||
* @param isUpdateSupport 是否支持更新
|
||||
* @param operName 操作人员名称
|
||||
* @return 导入结果
|
||||
*/
|
||||
String importStudentInfo(List<XgStudentInfoVo> studentInfoList, Boolean isUpdateSupport, String operName);
|
||||
|
||||
/**
|
||||
* 导出学生信息
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生信息列表
|
||||
*/
|
||||
List<XgStudentInfoVo> exportStudentInfo(XgStudentInfoBo bo);
|
||||
|
||||
/**
|
||||
* 审核学生信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param auditStatus 审核状态
|
||||
* @param auditRemark 审核备注
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean auditStudentInfo(Long studentId, String auditStatus, String auditRemark);
|
||||
|
||||
/**
|
||||
* 批量审核学生信息
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param auditStatus 审核状态
|
||||
* @param auditRemark 审核备注
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean batchAuditStudentInfo(List<Long> studentIds, String auditStatus, String auditRemark);
|
||||
|
||||
/**
|
||||
* 获取学生信息统计概览
|
||||
*
|
||||
* @return 统计概览数据
|
||||
*/
|
||||
Map<String, Object> getStatisticsOverview();
|
||||
|
||||
/**
|
||||
* 生成学生信息报表
|
||||
*
|
||||
* @param reportType 报表类型
|
||||
* @param params 报表参数
|
||||
* @return 报表数据
|
||||
*/
|
||||
Map<String, Object> generateReport(String reportType, Map<String, Object> params);
|
||||
|
||||
}
|
||||
-606
@@ -1,606 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
||||
import org.dromara.xg.domain.XgClassInfo;
|
||||
import org.dromara.xg.mapper.XgClassInfoMapper;
|
||||
import org.dromara.xg.mapper.XgSysUserMapper;
|
||||
import org.dromara.xg.service.IXgClassInfoService;
|
||||
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级信息Service业务层处理
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(XgClassInfoServiceImpl.class);
|
||||
|
||||
private final XgClassInfoMapper baseMapper;
|
||||
private final XgSysUserMapper sysUserMapper;
|
||||
private final IXgClassTeacherRelationService classTeacherRelationService;
|
||||
|
||||
/**
|
||||
* 查询班级信息
|
||||
*/
|
||||
@Override
|
||||
public XgClassInfoVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgClassInfoVo> queryPageList(XgClassInfoBo bo, PageQuery pageQuery) {
|
||||
log.info("=== 班级信息分页查询开始 ===");
|
||||
log.info("查询条件: {}", bo);
|
||||
log.info("分页参数: {}", pageQuery);
|
||||
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = buildQueryWrapper(bo);
|
||||
log.info("Service构建的Lambda查询条件: {}", lqw.getTargetSql());
|
||||
|
||||
// 执行分页查询
|
||||
Page<XgClassInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
log.info("Mapper查询结果 - 总数: {}, 当前页记录数: {}", result.getTotal(), result.getRecords().size());
|
||||
|
||||
if (!result.getRecords().isEmpty()) {
|
||||
log.info("第一条记录详情: {}", result.getRecords().get(0));
|
||||
} else {
|
||||
log.warn("Mapper查询结果为空!");
|
||||
}
|
||||
|
||||
TableDataInfo<XgClassInfoVo> tableDataInfo = TableDataInfo.build(result);
|
||||
log.info("最终返回结果 - 总数: {}, 行数: {}", tableDataInfo.getTotal(), tableDataInfo.getRows().size());
|
||||
log.info("=== 班级信息分页查询结束 ===");
|
||||
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryList(XgClassInfoBo bo) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XgClassInfo> buildQueryWrapper(XgClassInfoBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getClassCode()), XgClassInfo::getClassCode, bo.getClassCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getClassName()), XgClassInfo::getClassName, bo.getClassName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getClassType()), XgClassInfo::getClassType, bo.getClassType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getGrade()), XgClassInfo::getGrade, bo.getGrade());
|
||||
lqw.eq(bo.getEnrollmentYear() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYear());
|
||||
lqw.ge(bo.getEnrollmentYearStart() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYearStart());
|
||||
lqw.le(bo.getEnrollmentYearEnd() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYearEnd());
|
||||
lqw.eq(bo.getGraduationYear() != null, XgClassInfo::getGraduationYear, bo.getGraduationYear());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMajorCode()), XgClassInfo::getMajorCode, bo.getMajorCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XgClassInfo::getMajorName, bo.getMajorName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCollegeCode()), XgClassInfo::getCollegeCode, bo.getCollegeCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XgClassInfo::getCollegeName, bo.getCollegeName());
|
||||
lqw.eq(bo.getCounselorId() != null, XgClassInfo::getCounselorId, bo.getCounselorId());
|
||||
lqw.eq(bo.getClassTeacherId() != null, XgClassInfo::getClassTeacherId, bo.getClassTeacherId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getClassStatus()), XgClassInfo::getClassStatus, bo.getClassStatus());
|
||||
lqw.eq(bo.getIsGraduation() != null, XgClassInfo::getIsGraduation, bo.getIsGraduation());
|
||||
|
||||
if (bo.getClassCodeList() != null && !bo.getClassCodeList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getClassCode, bo.getClassCodeList());
|
||||
}
|
||||
if (bo.getClassStatusList() != null && !bo.getClassStatusList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getClassStatus, bo.getClassStatusList());
|
||||
}
|
||||
if (bo.getCollegeCodeList() != null && !bo.getCollegeCodeList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getCollegeCode, bo.getCollegeCodeList());
|
||||
}
|
||||
if (bo.getMajorCodeList() != null && !bo.getMajorCodeList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getMajorCode, bo.getMajorCodeList());
|
||||
}
|
||||
if (bo.getGradeList() != null && !bo.getGradeList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getGrade, bo.getGradeList());
|
||||
}
|
||||
if (bo.getCounselorIdList() != null && !bo.getCounselorIdList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getCounselorId, bo.getCounselorIdList());
|
||||
}
|
||||
if (bo.getClassTeacherIdList() != null && !bo.getClassTeacherIdList().isEmpty()) {
|
||||
lqw.in(XgClassInfo::getClassTeacherId, bo.getClassTeacherIdList());
|
||||
}
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(XgClassInfoBo bo) {
|
||||
XgClassInfo add = MapstructUtils.convert(bo, XgClassInfo.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
|
||||
// 如果指定了班主任,创建班级班主任关系
|
||||
if (add.getClassTeacherId() != null) {
|
||||
classTeacherRelationService.createClassTeacherRelation(add.getId(), add.getClassTeacherId());
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(XgClassInfoBo bo) {
|
||||
// 获取原班级信息
|
||||
XgClassInfo oldClass = baseMapper.selectById(bo.getId());
|
||||
|
||||
// 转换更新数据
|
||||
XgClassInfo update = MapstructUtils.convert(bo, XgClassInfo.class);
|
||||
validEntityBeforeSave(update);
|
||||
boolean flag = baseMapper.updateById(update) > 0;
|
||||
|
||||
// 处理班主任关系变更
|
||||
if (flag && update.getClassTeacherId() != null) {
|
||||
// 如果班主任发生变化,更新班级班主任关系
|
||||
if (oldClass == null || !update.getClassTeacherId().equals(oldClass.getClassTeacherId())) {
|
||||
classTeacherRelationService.updateClassTeacherRelation(update.getId(), update.getClassTeacherId());
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XgClassInfo entity) {
|
||||
// 校验班级代码唯一性
|
||||
if (StringUtils.isNotBlank(entity.getClassCode())) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getClassCode, entity.getClassCode());
|
||||
lqw.ne(entity.getId() != null, XgClassInfo::getId, entity.getId());
|
||||
XgClassInfo existEntity = baseMapper.selectOne(lqw);
|
||||
if (existEntity != null) {
|
||||
throw new RuntimeException("班级代码已存在,请重新输入");
|
||||
}
|
||||
}
|
||||
|
||||
// 设置默认值
|
||||
if (entity.getClassType() == null) {
|
||||
entity.setClassType("regular");
|
||||
}
|
||||
if (entity.getClassStatus() == null) {
|
||||
entity.setClassStatus("1");
|
||||
}
|
||||
if (entity.getIsGraduation() == null) {
|
||||
entity.setIsGraduation(0);
|
||||
}
|
||||
if (entity.getPlannedCapacity() == null) {
|
||||
entity.setPlannedCapacity(50);
|
||||
}
|
||||
if (entity.getMaxStudentCount() == null) {
|
||||
entity.setMaxStudentCount(entity.getPlannedCapacity());
|
||||
}
|
||||
if (entity.getCurrentStudentCount() == null) {
|
||||
entity.setCurrentStudentCount(0);
|
||||
}
|
||||
if (entity.getMaleCount() == null) {
|
||||
entity.setMaleCount(0);
|
||||
}
|
||||
if (entity.getFemaleCount() == null) {
|
||||
entity.setFemaleCount(0);
|
||||
}
|
||||
if (entity.getActiveCount() == null) {
|
||||
entity.setActiveCount(0);
|
||||
}
|
||||
if (entity.getTransferInCount() == null) {
|
||||
entity.setTransferInCount(0);
|
||||
}
|
||||
if (entity.getTransferOutCount() == null) {
|
||||
entity.setTransferOutCount(0);
|
||||
}
|
||||
if (entity.getDropoutCount() == null) {
|
||||
entity.setDropoutCount(0);
|
||||
}
|
||||
if (entity.getGraduateCount() == null) {
|
||||
entity.setGraduateCount(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除班级信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 校验是否存在学生关联
|
||||
// TODO: 添加学生关联校验逻辑
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*/
|
||||
@Override
|
||||
public XgClassInfoVo queryByClassCode(String classCode) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getClassCode, classCode);
|
||||
return baseMapper.selectVoOne(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据年级查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryByGrade(String grade) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getGrade, grade);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学院代码查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryByCollegeCode(String collegeCode) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getCollegeCode, collegeCode);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据专业代码查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryByMajorCode(String majorCode) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getMajorCode, majorCode);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据辅导员ID查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryByCounselorId(Long counselorId) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getCounselorId, counselorId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班主任ID查询班级信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> queryByClassTeacherId(Long classTeacherId) {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgClassInfo::getClassTeacherId, classTeacherId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级可用选项列表(用于下拉框)
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassInfoVo> getClassOptions() {
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(XgClassInfo::getId, XgClassInfo::getClassCode, XgClassInfo::getClassName);
|
||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
||||
lqw.orderByAsc(XgClassInfo::getGrade);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任用户列表
|
||||
*/
|
||||
@Override
|
||||
public List<SysUserVo> getClassTeacherOptions() {
|
||||
log.info("开始查询班主任角色用户列表,roleKey=head_teacher");
|
||||
try {
|
||||
// 查询班主任角色的用户列表
|
||||
List<SysUserVo> userList = sysUserMapper.selectUsersByRoleKey("head_teacher"); // head_teacher是班主任角色的role_key
|
||||
|
||||
// 打印详细的结果信息
|
||||
if (userList != null && !userList.isEmpty()) {
|
||||
log.info("查询班主任角色用户成功,找到 {} 个班主任用户", userList.size());
|
||||
for (int i = 0; i < userList.size(); i++) {
|
||||
SysUserVo user = userList.get(i);
|
||||
log.info("班主任用户[{}]: userId={}, userName={}, nickName={}",
|
||||
i+1, user.getUserId(), user.getUserName(), user.getNickName());
|
||||
|
||||
// 确保userId和nickName字段不为空,这些字段将用作前端的value和label
|
||||
if (user.getUserId() == null) {
|
||||
log.warn("班主任用户[{}]的userId为空", i+1);
|
||||
}
|
||||
if (user.getNickName() == null || user.getNickName().isEmpty()) {
|
||||
log.warn("班主任用户[{}]的nickName为空", i+1);
|
||||
// 如果昵称为空,使用用户名代替
|
||||
if (user.getUserName() != null && !user.getUserName().isEmpty()) {
|
||||
user.setNickName(user.getUserName());
|
||||
log.info("班主任用户[{}]的nickName为空,使用userName代替: {}", i+1, user.getUserName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.warn("没有找到班主任角色(head_teacher)的用户,请检查角色配置和用户分配");
|
||||
}
|
||||
return userList;
|
||||
} catch (Exception e) {
|
||||
log.error("查询班主任角色用户异常", e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新班级学生统计数据
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateStudentCount(Long classId) {
|
||||
// TODO: 实现班级学生统计数据更新逻辑
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新班级学生统计数据
|
||||
*/
|
||||
@Override
|
||||
public Boolean batchUpdateStudentCount(Collection<Long> classIds) {
|
||||
if (classIds == null || classIds.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
for (Long classId : classIds) {
|
||||
updateStudentCount(classId);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用班级
|
||||
*/
|
||||
@Override
|
||||
public Boolean enableClass(Long id) {
|
||||
XgClassInfo update = new XgClassInfo();
|
||||
update.setId(id);
|
||||
update.setClassStatus("1");
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用班级
|
||||
*/
|
||||
@Override
|
||||
public Boolean disableClass(Long id) {
|
||||
XgClassInfo update = new XgClassInfo();
|
||||
update.setId(id);
|
||||
update.setClassStatus("2");
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级信息统计概览
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getStatistics() {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
// 班级总数
|
||||
LambdaQueryWrapper<XgClassInfo> totalLqw = Wrappers.lambdaQuery();
|
||||
long totalCount = baseMapper.selectCount(totalLqw);
|
||||
result.put("totalCount", totalCount);
|
||||
|
||||
// 正常班级数量
|
||||
LambdaQueryWrapper<XgClassInfo> normalLqw = Wrappers.lambdaQuery();
|
||||
normalLqw.eq(XgClassInfo::getClassStatus, "1");
|
||||
long normalCount = baseMapper.selectCount(normalLqw);
|
||||
result.put("normalCount", normalCount);
|
||||
|
||||
// 暂停班级数量
|
||||
LambdaQueryWrapper<XgClassInfo> pausedLqw = Wrappers.lambdaQuery();
|
||||
pausedLqw.eq(XgClassInfo::getClassStatus, "2");
|
||||
long pausedCount = baseMapper.selectCount(pausedLqw);
|
||||
result.put("pausedCount", pausedCount);
|
||||
|
||||
// 毕业班级数量
|
||||
LambdaQueryWrapper<XgClassInfo> graduatedLqw = Wrappers.lambdaQuery();
|
||||
graduatedLqw.eq(XgClassInfo::getClassStatus, "3");
|
||||
long graduatedCount = baseMapper.selectCount(graduatedLqw);
|
||||
result.put("graduatedCount", graduatedCount);
|
||||
|
||||
// 解散班级数量
|
||||
LambdaQueryWrapper<XgClassInfo> disbandedLqw = Wrappers.lambdaQuery();
|
||||
disbandedLqw.eq(XgClassInfo::getClassStatus, "4");
|
||||
long disbandedCount = baseMapper.selectCount(disbandedLqw);
|
||||
result.put("disbandedCount", disbandedCount);
|
||||
|
||||
// 学生总数
|
||||
LambdaQueryWrapper<XgClassInfo> studentLqw = Wrappers.lambdaQuery();
|
||||
List<XgClassInfo> classList = baseMapper.selectList(studentLqw);
|
||||
int totalStudents = classList.stream().mapToInt(XgClassInfo::getCurrentStudentCount).sum();
|
||||
result.put("totalStudents", totalStudents);
|
||||
|
||||
// 男生总数
|
||||
int totalMale = classList.stream().mapToInt(XgClassInfo::getMaleCount).sum();
|
||||
result.put("totalMale", totalMale);
|
||||
|
||||
// 女生总数
|
||||
int totalFemale = classList.stream().mapToInt(XgClassInfo::getFemaleCount).sum();
|
||||
result.put("totalFemale", totalFemale);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByCollege() {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
// 查询所有学院
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName);
|
||||
lqw.groupBy(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName);
|
||||
List<XgClassInfo> collegeList = baseMapper.selectList(lqw);
|
||||
|
||||
// 统计各学院班级数量
|
||||
for (XgClassInfo college : collegeList) {
|
||||
if (StringUtils.isBlank(college.getCollegeCode())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||
countLqw.eq(XgClassInfo::getCollegeCode, college.getCollegeCode());
|
||||
long count = baseMapper.selectCount(countLqw);
|
||||
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("collegeCode", college.getCollegeCode());
|
||||
item.put("collegeName", college.getCollegeName());
|
||||
item.put("count", count);
|
||||
result.add(item);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByGrade() {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
// 查询所有年级
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(XgClassInfo::getGrade);
|
||||
lqw.groupBy(XgClassInfo::getGrade);
|
||||
List<XgClassInfo> gradeList = baseMapper.selectList(lqw);
|
||||
|
||||
// 统计各年级班级数量
|
||||
for (XgClassInfo grade : gradeList) {
|
||||
if (StringUtils.isBlank(grade.getGrade())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||
countLqw.eq(XgClassInfo::getGrade, grade.getGrade());
|
||||
long count = baseMapper.selectCount(countLqw);
|
||||
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("grade", grade.getGrade());
|
||||
item.put("count", count);
|
||||
result.add(item);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByMajor() {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
// 查询所有专业
|
||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(XgClassInfo::getMajorCode, XgClassInfo::getMajorName);
|
||||
lqw.groupBy(XgClassInfo::getMajorCode, XgClassInfo::getMajorName);
|
||||
List<XgClassInfo> majorList = baseMapper.selectList(lqw);
|
||||
|
||||
// 统计各专业班级数量
|
||||
for (XgClassInfo major : majorList) {
|
||||
if (StringUtils.isBlank(major.getMajorCode())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||
countLqw.eq(XgClassInfo::getMajorCode, major.getMajorCode());
|
||||
long count = baseMapper.selectCount(countLqw);
|
||||
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("majorCode", major.getMajorCode());
|
||||
item.put("majorName", major.getMajorName());
|
||||
item.put("count", count);
|
||||
result.add(item);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByStatus() {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
// 正常班级数量
|
||||
Map<String, Object> normal = new HashMap<>();
|
||||
normal.put("status", "1");
|
||||
normal.put("name", "正常");
|
||||
LambdaQueryWrapper<XgClassInfo> normalLqw = Wrappers.lambdaQuery();
|
||||
normalLqw.eq(XgClassInfo::getClassStatus, "1");
|
||||
normal.put("value", baseMapper.selectCount(normalLqw));
|
||||
result.add(normal);
|
||||
|
||||
// 暂停班级数量
|
||||
Map<String, Object> paused = new HashMap<>();
|
||||
paused.put("status", "2");
|
||||
paused.put("name", "暂停");
|
||||
LambdaQueryWrapper<XgClassInfo> pausedLqw = Wrappers.lambdaQuery();
|
||||
pausedLqw.eq(XgClassInfo::getClassStatus, "2");
|
||||
paused.put("value", baseMapper.selectCount(pausedLqw));
|
||||
result.add(paused);
|
||||
|
||||
// 毕业班级数量
|
||||
Map<String, Object> graduated = new HashMap<>();
|
||||
graduated.put("status", "3");
|
||||
graduated.put("name", "毕业");
|
||||
LambdaQueryWrapper<XgClassInfo> graduatedLqw = Wrappers.lambdaQuery();
|
||||
graduatedLqw.eq(XgClassInfo::getClassStatus, "3");
|
||||
graduated.put("value", baseMapper.selectCount(graduatedLqw));
|
||||
result.add(graduated);
|
||||
|
||||
// 解散班级数量
|
||||
Map<String, Object> disbanded = new HashMap<>();
|
||||
disbanded.put("status", "4");
|
||||
disbanded.put("name", "解散");
|
||||
LambdaQueryWrapper<XgClassInfo> disbandedLqw = Wrappers.lambdaQuery();
|
||||
disbandedLqw.eq(XgClassInfo::getClassStatus, "4");
|
||||
disbanded.put("value", baseMapper.selectCount(disbandedLqw));
|
||||
result.add(disbanded);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
-186
@@ -1,186 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||
import org.dromara.xg.mapper.XgClassTeacherRelationMapper;
|
||||
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 班级班主任关系Service业务层处理
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgClassTeacherRelationServiceImpl implements IXgClassTeacherRelationService {
|
||||
|
||||
private final XgClassTeacherRelationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系
|
||||
*
|
||||
* @param id 班级班主任关系主键
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
@Override
|
||||
public XgClassTeacherRelationVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系列表
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgClassTeacherRelationVo> queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XgClassTeacherRelation> lqw = buildQueryWrapper(bo);
|
||||
Page<XgClassTeacherRelationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级班主任关系列表
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
@Override
|
||||
public List<XgClassTeacherRelationVo> queryList(XgClassTeacherRelationBo bo) {
|
||||
LambdaQueryWrapper<XgClassTeacherRelation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XgClassTeacherRelation> buildQueryWrapper(XgClassTeacherRelationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XgClassTeacherRelation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getClassId() != null, XgClassTeacherRelation::getClassId, bo.getClassId());
|
||||
lqw.eq(bo.getTeacherId() != null, XgClassTeacherRelation::getTeacherId, bo.getTeacherId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XgClassTeacherRelation::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getStartDate() != null, XgClassTeacherRelation::getStartDate, bo.getStartDate());
|
||||
lqw.eq(bo.getEndDate() != null, XgClassTeacherRelation::getEndDate, bo.getEndDate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级班主任关系
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XgClassTeacherRelationBo bo) {
|
||||
XgClassTeacherRelation add = MapstructUtils.convert(bo, XgClassTeacherRelation.class);
|
||||
// 设置默认值
|
||||
if (StringUtils.isBlank(add.getStatus())) {
|
||||
add.setStatus("0"); // 默认状态为正常
|
||||
}
|
||||
if (add.getStartDate() == null) {
|
||||
add.setStartDate(LocalDateTime.now()); // 默认开始时间为当前时间
|
||||
}
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级班主任关系
|
||||
*
|
||||
* @param bo 班级班主任关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XgClassTeacherRelationBo bo) {
|
||||
XgClassTeacherRelation update = MapstructUtils.convert(bo, XgClassTeacherRelation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(XgClassTeacherRelation entity) {
|
||||
// 校验逻辑
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除班级班主任关系
|
||||
*
|
||||
* @param ids 需要删除的班级班主任关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 校验是否允许删除
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建班级班主任关系
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param teacherId 班主任ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean createClassTeacherRelation(Long classId, Long teacherId) {
|
||||
XgClassTeacherRelationBo bo = new XgClassTeacherRelationBo();
|
||||
bo.setClassId(classId);
|
||||
bo.setTeacherId(teacherId);
|
||||
bo.setStatus("0"); // 正常状态
|
||||
bo.setStartDate(LocalDateTime.now());
|
||||
return insertByBo(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新班级班主任关系
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param teacherId 班主任ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean updateClassTeacherRelation(Long classId, Long teacherId) {
|
||||
// 将当前班级的所有班主任关系设置为失效
|
||||
baseMapper.invalidateRelationsByClassId(classId, LoginHelper.getUserId());
|
||||
|
||||
// 创建新的班主任关系
|
||||
return createClassTeacherRelation(classId, teacherId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级当前班主任
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 班级班主任关系
|
||||
*/
|
||||
@Override
|
||||
public XgClassTeacherRelation getActiveTeacherByClassId(Long classId) {
|
||||
return baseMapper.selectActiveRelationByClassId(classId);
|
||||
}
|
||||
}
|
||||
-239
@@ -1,239 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xg.domain.bo.XgCollectionBatchBo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import org.dromara.xg.mapper.XgCollectionBatchMapper;
|
||||
import org.dromara.xg.service.IXgCollectionBatchService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgCollectionBatchServiceImpl implements IXgCollectionBatchService {
|
||||
|
||||
private final XgCollectionBatchMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询信息采集批次
|
||||
*/
|
||||
@Override
|
||||
public XgCollectionBatchVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgCollectionBatchVo> queryPageList(XgCollectionBatchBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XgCollectionBatch> lqw = buildQueryWrapper(bo);
|
||||
Page<XgCollectionBatchVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryList(XgCollectionBatchBo bo) {
|
||||
LambdaQueryWrapper<XgCollectionBatch> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XgCollectionBatchBo bo) {
|
||||
XgCollectionBatch add = MapstructUtils.convert(bo, XgCollectionBatch.class);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改信息采集批次
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XgCollectionBatchBo bo) {
|
||||
XgCollectionBatch update = MapstructUtils.convert(bo, XgCollectionBatch.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除信息采集批次
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// TODO: 添加删除验证逻辑
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询条件
|
||||
*/
|
||||
private LambdaQueryWrapper<XgCollectionBatch> buildQueryWrapper(XgCollectionBatchBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XgCollectionBatch> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(bo.getBatchCode() != null, XgCollectionBatch::getBatchCode, bo.getBatchCode());
|
||||
lqw.like(bo.getBatchName() != null, XgCollectionBatch::getBatchName, bo.getBatchName());
|
||||
lqw.eq(bo.getBatchType() != null, XgCollectionBatch::getBatchType, bo.getBatchType());
|
||||
lqw.eq(bo.getAcademicYear() != null, XgCollectionBatch::getAcademicYear, bo.getAcademicYear());
|
||||
lqw.eq(bo.getSemester() != null, XgCollectionBatch::getSemester, bo.getSemester());
|
||||
lqw.eq(bo.getBatchStatus() != null, XgCollectionBatch::getBatchStatus, bo.getBatchStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
// 以下是暂时返回空结果的方法,避免编译错误
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> exportBatchData(XgCollectionBatchBo bo) {
|
||||
return queryList(bo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XgCollectionBatchVo queryByCode(String batchCode) {
|
||||
// TODO: 实现按编码查询
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryUserPermissionBatches(Long userId) {
|
||||
// TODO: 实现用户权限批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryActiveBatches() {
|
||||
// TODO: 实现活跃批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryUpcomingBatches() {
|
||||
// TODO: 实现即将开始批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryEndingSoonBatches() {
|
||||
// TODO: 实现即将结束批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryBatchesNeedReminder() {
|
||||
// TODO: 实现需要提醒的批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> queryBatchesNeedAutoClose() {
|
||||
// TODO: 实现需要自动关闭的批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean startBatch(Long batchId) {
|
||||
// TODO: 实现启动批次
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean pauseBatch(Long batchId) {
|
||||
// TODO: 实现暂停批次
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean resumeBatch(Long batchId) {
|
||||
// TODO: 实现恢复批次
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean endBatch(Long batchId) {
|
||||
// TODO: 实现结束批次
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean copyBatch(Long batchId, String newBatchCode, String newBatchName) {
|
||||
// TODO: 实现复制批次
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getBatchStatistics(Long batchId) {
|
||||
// TODO: 实现批次统计
|
||||
return Map.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getBatchOverallStatistics() {
|
||||
// TODO: 实现整体统计
|
||||
return Map.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getBatchCompletionStatistics(Long batchId) {
|
||||
// TODO: 实现完成率统计
|
||||
return Map.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getBatchDimensionStatistics(Long batchId, String dimension) {
|
||||
// TODO: 实现维度统计
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchUpdateStatus(List<Long> batchIds, String status) {
|
||||
// TODO: 实现批量更新状态
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkBatchEditable(Long batchId) {
|
||||
// TODO: 实现编辑检查
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkBatchDeletable(Long batchId) {
|
||||
// TODO: 实现删除检查
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgCollectionBatchVo> getAvailableBatches() {
|
||||
// TODO: 实现可用批次查询
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean importBatchData(List<XgCollectionBatchBo> batchList) {
|
||||
// TODO: 实现批次数据导入
|
||||
return true;
|
||||
}
|
||||
}
|
||||
-1068
File diff suppressed because it is too large.
Load diff
-362
@@ -1,362 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.redis.utils.RedisUtils;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
import org.dromara.xg.service.IXgStatisticsCacheService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* 统计缓存Service业务层处理
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgStatisticsCacheServiceImpl implements IXgStatisticsCacheService {
|
||||
|
||||
private static final String CACHE_PREFIX = "xg:statistics:";
|
||||
private static final String CACHE_STATS_PREFIX = "xg:statistics:stats:";
|
||||
private static final String CACHE_HIT_COUNT_KEY = "xg:statistics:hit:count";
|
||||
private static final String CACHE_MISS_COUNT_KEY = "xg:statistics:miss:count";
|
||||
private static final Integer DEFAULT_EXPIRE_MINUTES = 30;
|
||||
|
||||
// 缓存命中统计
|
||||
private final AtomicLong hitCount = new AtomicLong(0);
|
||||
private final AtomicLong missCount = new AtomicLong(0);
|
||||
|
||||
/**
|
||||
* 获取缓存的统计结果
|
||||
*/
|
||||
@Override
|
||||
public XgStatisticsResultVo getCachedResult(String cacheKey) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
String cachedData = RedisUtils.getCacheObject(fullKey);
|
||||
|
||||
if (StrUtil.isNotBlank(cachedData)) {
|
||||
log.debug("缓存命中,缓存键:{}", cacheKey);
|
||||
hitCount.incrementAndGet();
|
||||
updateCacheHitStats(cacheKey);
|
||||
|
||||
XgStatisticsResultVo result = JSONUtil.toBean(cachedData, XgStatisticsResultVo.class);
|
||||
result.setFromCache(true);
|
||||
result.setCacheKey(cacheKey);
|
||||
return result;
|
||||
} else {
|
||||
log.debug("缓存未命中,缓存键:{}", cacheKey);
|
||||
missCount.incrementAndGet();
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取缓存失败,缓存键:{}", cacheKey, e);
|
||||
missCount.incrementAndGet();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存统计结果
|
||||
*/
|
||||
@Override
|
||||
public void cacheResult(String cacheKey, XgStatisticsResultVo result, Integer expireMinutes) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
String jsonData = JSONUtil.toJsonStr(result);
|
||||
|
||||
int expire = expireMinutes != null ? expireMinutes : DEFAULT_EXPIRE_MINUTES;
|
||||
RedisUtils.setCacheObject(fullKey, jsonData, Duration.ofMinutes(expire));
|
||||
|
||||
// 记录缓存统计信息
|
||||
recordCacheStats(cacheKey, jsonData.length(), expire);
|
||||
|
||||
log.debug("缓存统计结果成功,缓存键:{}, 过期时间:{}分钟", cacheKey, expire);
|
||||
} catch (Exception e) {
|
||||
log.error("缓存统计结果失败,缓存键:{}", cacheKey, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteCache(String cacheKey) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
boolean result = RedisUtils.deleteObject(fullKey);
|
||||
|
||||
// 删除缓存统计信息
|
||||
String statsKey = CACHE_STATS_PREFIX + cacheKey;
|
||||
RedisUtils.deleteObject(statsKey);
|
||||
|
||||
log.debug("删除缓存{},缓存键:{}", result ? "成功" : "失败", cacheKey);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
log.error("删除缓存失败,缓存键:{}", cacheKey, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有统计缓存
|
||||
*/
|
||||
@Override
|
||||
public Boolean clearAllCache() {
|
||||
try {
|
||||
// 删除所有统计缓存
|
||||
Collection<String> keys = RedisUtils.keys(CACHE_PREFIX + "*");
|
||||
if (!keys.isEmpty()) {
|
||||
RedisUtils.deleteObject(keys);
|
||||
}
|
||||
|
||||
// 删除所有缓存统计信息
|
||||
Collection<String> statsKeys = RedisUtils.keys(CACHE_STATS_PREFIX + "*");
|
||||
if (!statsKeys.isEmpty()) {
|
||||
RedisUtils.deleteObject(statsKeys);
|
||||
}
|
||||
|
||||
// 重置命中统计
|
||||
hitCount.set(0);
|
||||
missCount.set(0);
|
||||
RedisUtils.deleteObject(CACHE_HIT_COUNT_KEY);
|
||||
RedisUtils.deleteObject(CACHE_MISS_COUNT_KEY);
|
||||
|
||||
log.info("清除所有统计缓存成功,共清除{}个缓存", keys.size());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("清除所有统计缓存失败", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存统计信息
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getCacheStatistics() {
|
||||
Map<String, Object> stats = new HashMap<>();
|
||||
|
||||
try {
|
||||
// 获取缓存总数
|
||||
Collection<String> keys = RedisUtils.keys(CACHE_PREFIX + "*");
|
||||
stats.put("total_cache_count", keys.size());
|
||||
|
||||
// 获取命中统计
|
||||
long totalHits = hitCount.get();
|
||||
long totalMisses = missCount.get();
|
||||
long totalRequests = totalHits + totalMisses;
|
||||
|
||||
stats.put("hit_count", totalHits);
|
||||
stats.put("miss_count", totalMisses);
|
||||
stats.put("total_requests", totalRequests);
|
||||
|
||||
// 计算命中率
|
||||
double hitRate = totalRequests > 0 ? (double) totalHits / totalRequests * 100 : 0.0;
|
||||
stats.put("hit_rate", Math.round(hitRate * 100.0) / 100.0);
|
||||
|
||||
// 计算缓存总大小
|
||||
long totalSize = 0;
|
||||
for (String key : keys) {
|
||||
try {
|
||||
String statsKey = key.replace(CACHE_PREFIX, CACHE_STATS_PREFIX);
|
||||
Map<String, Object> cacheStats = RedisUtils.getCacheObject(statsKey);
|
||||
if (cacheStats != null && cacheStats.containsKey("size")) {
|
||||
totalSize += (Integer) cacheStats.get("size");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("获取缓存大小失败,键:{}", key, e);
|
||||
}
|
||||
}
|
||||
stats.put("total_size_bytes", totalSize);
|
||||
stats.put("total_size_mb", Math.round(totalSize / 1024.0 / 1024.0 * 100.0) / 100.0);
|
||||
|
||||
// 获取过期缓存数量
|
||||
long expiredCount = 0;
|
||||
for (String key : keys) {
|
||||
Long expire = RedisUtils.getTimeToLive(key);
|
||||
if (expire != null && expire <= 0) {
|
||||
expiredCount++;
|
||||
}
|
||||
}
|
||||
stats.put("expired_count", expiredCount);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("获取缓存统计信息失败", e);
|
||||
}
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查缓存是否存在
|
||||
*/
|
||||
@Override
|
||||
public Boolean existsCache(String cacheKey) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
return RedisUtils.hasKey(fullKey);
|
||||
} catch (Exception e) {
|
||||
log.error("检查缓存是否存在失败,缓存键:{}", cacheKey, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置缓存过期时间
|
||||
*/
|
||||
@Override
|
||||
public Boolean expireCache(String cacheKey, Integer expireMinutes) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
return RedisUtils.expire(fullKey, Duration.ofMinutes(expireMinutes));
|
||||
} catch (Exception e) {
|
||||
log.error("设置缓存过期时间失败,缓存键:{}", cacheKey, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存剩余过期时间
|
||||
*/
|
||||
@Override
|
||||
public Long getCacheExpire(String cacheKey) {
|
||||
try {
|
||||
String fullKey = CACHE_PREFIX + cacheKey;
|
||||
return RedisUtils.getTimeToLive(fullKey);
|
||||
} catch (Exception e) {
|
||||
log.error("获取缓存剩余过期时间失败,缓存键:{}", cacheKey, e);
|
||||
return -2L;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除缓存
|
||||
*/
|
||||
@Override
|
||||
public Long deleteCacheByPattern(String pattern) {
|
||||
try {
|
||||
String fullPattern = CACHE_PREFIX + pattern;
|
||||
Collection<String> keys = RedisUtils.keys(fullPattern);
|
||||
|
||||
if (!keys.isEmpty()) {
|
||||
RedisUtils.deleteObject(keys);
|
||||
|
||||
// 删除对应的统计信息
|
||||
Collection<String> statsKeys = keys.stream()
|
||||
.map(key -> key.replace(CACHE_PREFIX, CACHE_STATS_PREFIX))
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
RedisUtils.deleteObject(statsKeys);
|
||||
|
||||
log.info("批量删除缓存成功,模式:{}, 删除数量:{}", pattern, keys.size());
|
||||
return (long) keys.size();
|
||||
}
|
||||
|
||||
return 0L;
|
||||
} catch (Exception e) {
|
||||
log.error("批量删除缓存失败,模式:{}", pattern, e);
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 预热缓存
|
||||
*/
|
||||
@Override
|
||||
public Boolean warmUpCache() {
|
||||
try {
|
||||
log.info("开始预热统计缓存");
|
||||
|
||||
// 这里可以预热一些常用的统计查询
|
||||
// 例如:性别统计、学院统计、年级统计等
|
||||
|
||||
// 预热逻辑可以根据实际需要实现
|
||||
// 比如调用统计服务的常用方法,让结果自动缓存
|
||||
|
||||
log.info("统计缓存预热完成");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("预热统计缓存失败", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成缓存键
|
||||
*/
|
||||
@Override
|
||||
public String generateCacheKey(String statisticsType, String dimension, String conditionsHash) {
|
||||
String keyContent = statisticsType + ":" + dimension + ":" + conditionsHash;
|
||||
return MD5.create().digestHex(keyContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新缓存命中统计
|
||||
*/
|
||||
@Override
|
||||
public void updateCacheHitStats(String cacheKey) {
|
||||
try {
|
||||
String statsKey = CACHE_STATS_PREFIX + cacheKey;
|
||||
Map<String, Object> stats = RedisUtils.getCacheObject(statsKey);
|
||||
|
||||
if (stats == null) {
|
||||
stats = new HashMap<>();
|
||||
stats.put("hit_count", 1);
|
||||
stats.put("last_hit_time", System.currentTimeMillis());
|
||||
} else {
|
||||
int hitCount = (Integer) stats.getOrDefault("hit_count", 0);
|
||||
stats.put("hit_count", hitCount + 1);
|
||||
stats.put("last_hit_time", System.currentTimeMillis());
|
||||
}
|
||||
|
||||
RedisUtils.setCacheObject(statsKey, stats, Duration.ofHours(24));
|
||||
} catch (Exception e) {
|
||||
log.warn("更新缓存命中统计失败,缓存键:{}", cacheKey, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存命中率
|
||||
*/
|
||||
@Override
|
||||
public Double getCacheHitRate() {
|
||||
long totalHits = hitCount.get();
|
||||
long totalMisses = missCount.get();
|
||||
long totalRequests = totalHits + totalMisses;
|
||||
|
||||
if (totalRequests == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return Math.round((double) totalHits / totalRequests * 10000.0) / 100.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录缓存统计信息
|
||||
*/
|
||||
private void recordCacheStats(String cacheKey, int dataSize, int expireMinutes) {
|
||||
try {
|
||||
String statsKey = CACHE_STATS_PREFIX + cacheKey;
|
||||
Map<String, Object> stats = new HashMap<>();
|
||||
stats.put("cache_time", System.currentTimeMillis());
|
||||
stats.put("size", dataSize);
|
||||
stats.put("expire_minutes", expireMinutes);
|
||||
stats.put("hit_count", 0);
|
||||
|
||||
RedisUtils.setCacheObject(statsKey, stats, Duration.ofHours(24));
|
||||
} catch (Exception e) {
|
||||
log.warn("记录缓存统计信息失败,缓存键:{}", cacheKey, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
-283
@@ -1,283 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xg.domain.bo.XgStatisticsConfigBo;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsConfigVo;
|
||||
import org.dromara.xg.domain.XgStatisticsConfig;
|
||||
import org.dromara.xg.mapper.XgStatisticsConfigMapper;
|
||||
import org.dromara.xg.service.IXgStatisticsConfigService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 统计分析配置Service业务层处理
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgStatisticsConfigServiceImpl implements IXgStatisticsConfigService {
|
||||
|
||||
private final XgStatisticsConfigMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询统计分析配置
|
||||
*/
|
||||
@Override
|
||||
public XgStatisticsConfigVo queryById(Long configId) {
|
||||
return baseMapper.selectVoById(configId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgStatisticsConfigVo> queryPageList(XgStatisticsConfigBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XgStatisticsConfig> lqw = buildQueryWrapper(bo);
|
||||
Page<XgStatisticsConfigVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计分析配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> queryList(XgStatisticsConfigBo bo) {
|
||||
LambdaQueryWrapper<XgStatisticsConfig> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XgStatisticsConfig> buildQueryWrapper(XgStatisticsConfigBo bo) {
|
||||
LambdaQueryWrapper<XgStatisticsConfig> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getConfigName()), XgStatisticsConfig::getConfigName, bo.getConfigName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getConfigCode()), XgStatisticsConfig::getConfigCode, bo.getConfigCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getConfigType()), XgStatisticsConfig::getConfigType, bo.getConfigType());
|
||||
lqw.eq(bo.getIsSystem() != null, XgStatisticsConfig::getIsSystem, bo.getIsSystem());
|
||||
lqw.eq(bo.getIsEnabled() != null, XgStatisticsConfig::getIsEnabled, bo.getIsEnabled());
|
||||
lqw.orderByAsc(XgStatisticsConfig::getSortOrder);
|
||||
lqw.orderByDesc(XgStatisticsConfig::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增统计分析配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XgStatisticsConfigBo bo) {
|
||||
XgStatisticsConfig add = MapstructUtils.convert(bo, XgStatisticsConfig.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改统计分析配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XgStatisticsConfigBo bo) {
|
||||
XgStatisticsConfig update = MapstructUtils.convert(bo, XgStatisticsConfig.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XgStatisticsConfig entity) {
|
||||
// 校验配置编码唯一性
|
||||
if (checkConfigCodeExists(entity.getConfigCode(), entity.getId())) {
|
||||
throw new RuntimeException("配置编码已存在:" + entity.getConfigCode());
|
||||
}
|
||||
// 设置默认值
|
||||
if (entity.getIsSystem() == null) {
|
||||
entity.setIsSystem(0);
|
||||
}
|
||||
if (entity.getIsEnabled() == null) {
|
||||
entity.setIsEnabled(1);
|
||||
}
|
||||
if (entity.getSortOrder() == null) {
|
||||
entity.setSortOrder(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除统计分析配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 校验是否存在系统配置
|
||||
long systemConfigCount = baseMapper.selectCount(
|
||||
Wrappers.<XgStatisticsConfig>lambdaQuery()
|
||||
.in(XgStatisticsConfig::getId, ids)
|
||||
.eq(XgStatisticsConfig::getIsSystem, 1)
|
||||
);
|
||||
if (systemConfigCount > 0) {
|
||||
throw new RuntimeException("不能删除系统配置");
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置编码查询配置信息
|
||||
*/
|
||||
@Override
|
||||
public XgStatisticsConfigVo queryByConfigCode(String configCode) {
|
||||
return baseMapper.selectByConfigCode(configCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定类型的配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> queryByConfigType(String configType) {
|
||||
return baseMapper.selectByConfigType(configType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询启用的配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> queryEnabledConfigs(String configType) {
|
||||
return baseMapper.selectEnabledConfigs(configType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> querySystemConfigs() {
|
||||
return baseMapper.selectSystemConfigs();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户自定义配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> queryUserConfigs(Long userId) {
|
||||
return baseMapper.selectUserConfigs(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据权限查询可访问的配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStatisticsConfigVo> queryAccessibleConfigs(Long userId, List<String> roles) {
|
||||
return baseMapper.selectAccessibleConfigs(userId, roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置排序
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateSortOrder(Long configId, Integer sortOrder) {
|
||||
return baseMapper.updateSortOrder(configId, sortOrder) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新配置状态
|
||||
*/
|
||||
@Override
|
||||
public Boolean batchUpdateStatus(List<Long> configIds, Integer isEnabled) {
|
||||
return baseMapper.batchUpdateStatus(configIds, isEnabled) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean copyConfig(Long configId, String newConfigName, String newConfigCode) {
|
||||
XgStatisticsConfig original = baseMapper.selectById(configId);
|
||||
if (original == null) {
|
||||
throw new RuntimeException("原配置不存在");
|
||||
}
|
||||
|
||||
// 检查新配置编码是否存在
|
||||
if (checkConfigCodeExists(newConfigCode, null)) {
|
||||
throw new RuntimeException("新配置编码已存在:" + newConfigCode);
|
||||
}
|
||||
|
||||
XgStatisticsConfig copy = new XgStatisticsConfig();
|
||||
copy.setConfigName(newConfigName);
|
||||
copy.setConfigCode(newConfigCode);
|
||||
copy.setConfigType(original.getConfigType());
|
||||
copy.setConfigContent(original.getConfigContent());
|
||||
copy.setIsSystem(0); // 复制的配置不是系统配置
|
||||
copy.setIsEnabled(1);
|
||||
copy.setSortOrder(original.getSortOrder());
|
||||
copy.setViewPermissions(original.getViewPermissions());
|
||||
copy.setEditPermissions(original.getEditPermissions());
|
||||
copy.setRemark("复制自:" + original.getConfigName());
|
||||
|
||||
return baseMapper.insert(copy) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean enableConfig(Long configId) {
|
||||
XgStatisticsConfig config = new XgStatisticsConfig();
|
||||
config.setId(configId);
|
||||
config.setIsEnabled(1);
|
||||
return baseMapper.updateById(config) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean disableConfig(Long configId) {
|
||||
XgStatisticsConfig config = new XgStatisticsConfig();
|
||||
config.setId(configId);
|
||||
config.setIsEnabled(0);
|
||||
return baseMapper.updateById(config) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查配置编码是否存在
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkConfigCodeExists(String configCode, Long excludeId) {
|
||||
LambdaQueryWrapper<XgStatisticsConfig> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgStatisticsConfig::getConfigCode, configCode);
|
||||
if (excludeId != null) {
|
||||
lqw.ne(XgStatisticsConfig::getId, excludeId);
|
||||
}
|
||||
return baseMapper.selectCount(lqw) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置的JSON内容
|
||||
*/
|
||||
@Override
|
||||
public String getConfigContent(Long configId) {
|
||||
XgStatisticsConfig config = baseMapper.selectById(configId);
|
||||
return config != null ? config.getConfigContent() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置的JSON内容
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateConfigContent(Long configId, String configContent) {
|
||||
XgStatisticsConfig config = new XgStatisticsConfig();
|
||||
config.setId(configId);
|
||||
config.setConfigContent(configContent);
|
||||
return baseMapper.updateById(config) > 0;
|
||||
}
|
||||
}
|
||||
-348
@@ -1,348 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.dromara.xg.domain.vo.XgStatisticsResultVo;
|
||||
import org.dromara.xg.service.IXgStatisticsExportService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计导出Service业务层处理
|
||||
*
|
||||
* @author wuzhen
|
||||
* @date 2025-01-17
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgStatisticsExportServiceImpl implements IXgStatisticsExportService {
|
||||
|
||||
private static final List<String> SUPPORTED_FORMATS = Arrays.asList("excel", "pdf", "csv", "word");
|
||||
|
||||
/**
|
||||
* 导出统计结果到Excel
|
||||
*/
|
||||
@Override
|
||||
public byte[] exportToExcel(XgStatisticsResultVo resultVo) {
|
||||
log.info("导出统计结果到Excel,标题:{}", resultVo.getTitle());
|
||||
|
||||
try (XSSFWorkbook workbook = new XSSFWorkbook();
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
|
||||
|
||||
Sheet sheet = workbook.createSheet("统计结果");
|
||||
|
||||
// 创建标题样式
|
||||
CellStyle titleStyle = createTitleStyle(workbook);
|
||||
CellStyle headerStyle = createHeaderStyle(workbook);
|
||||
CellStyle dataStyle = createDataStyle(workbook);
|
||||
|
||||
int rowIndex = 0;
|
||||
|
||||
// 创建标题行
|
||||
Row titleRow = sheet.createRow(rowIndex++);
|
||||
Cell titleCell = titleRow.createCell(0);
|
||||
titleCell.setCellValue(resultVo.getTitle());
|
||||
titleCell.setCellStyle(titleStyle);
|
||||
|
||||
// 合并标题行
|
||||
sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(0, 0, 0, 2));
|
||||
|
||||
// 创建空行
|
||||
rowIndex++;
|
||||
|
||||
// 创建统计信息行
|
||||
Row infoRow = sheet.createRow(rowIndex++);
|
||||
infoRow.createCell(0).setCellValue("统计时间:" + DateUtil.formatDateTime(resultVo.getStatisticsTime()));
|
||||
infoRow.createCell(1).setCellValue("统计类型:" + resultVo.getType());
|
||||
infoRow.createCell(2).setCellValue("总计:" + resultVo.getTotal());
|
||||
|
||||
// 创建空行
|
||||
rowIndex++;
|
||||
|
||||
// 创建表头
|
||||
Row headerRow = sheet.createRow(rowIndex++);
|
||||
headerRow.createCell(0).setCellValue("项目");
|
||||
headerRow.createCell(1).setCellValue("数量");
|
||||
headerRow.createCell(2).setCellValue("占比");
|
||||
|
||||
// 设置表头样式
|
||||
for (int i = 0; i < 3; i++) {
|
||||
headerRow.getCell(i).setCellStyle(headerStyle);
|
||||
}
|
||||
|
||||
// 填充数据
|
||||
List<Map<String, Object>> data = resultVo.getData();
|
||||
if (data != null && !data.isEmpty()) {
|
||||
for (Map<String, Object> item : data) {
|
||||
Row dataRow = sheet.createRow(rowIndex++);
|
||||
|
||||
// 项目名称
|
||||
Cell nameCell = dataRow.createCell(0);
|
||||
nameCell.setCellValue(String.valueOf(item.get("name")));
|
||||
nameCell.setCellStyle(dataStyle);
|
||||
|
||||
// 数量
|
||||
Cell countCell = dataRow.createCell(1);
|
||||
Object count = item.get("count");
|
||||
if (count instanceof Number) {
|
||||
countCell.setCellValue(((Number) count).doubleValue());
|
||||
} else {
|
||||
countCell.setCellValue(String.valueOf(count));
|
||||
}
|
||||
countCell.setCellStyle(dataStyle);
|
||||
|
||||
// 占比
|
||||
Cell ratioCell = dataRow.createCell(2);
|
||||
if (count instanceof Number && resultVo.getTotal() > 0) {
|
||||
double ratio = ((Number) count).doubleValue() / resultVo.getTotal() * 100;
|
||||
ratioCell.setCellValue(String.format("%.2f%%", ratio));
|
||||
} else {
|
||||
ratioCell.setCellValue("0.00%");
|
||||
}
|
||||
ratioCell.setCellStyle(dataStyle);
|
||||
}
|
||||
}
|
||||
|
||||
// 自动调整列宽
|
||||
for (int i = 0; i < 3; i++) {
|
||||
sheet.autoSizeColumn(i);
|
||||
}
|
||||
|
||||
workbook.write(outputStream);
|
||||
return outputStream.toByteArray();
|
||||
|
||||
} catch (IOException e) {
|
||||
log.error("导出Excel失败", e);
|
||||
throw new RuntimeException("导出Excel失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计结果到PDF
|
||||
*/
|
||||
@Override
|
||||
public byte[] exportToPdf(XgStatisticsResultVo resultVo) {
|
||||
log.info("导出统计结果到PDF,标题:{}", resultVo.getTitle());
|
||||
|
||||
// TODO: 实现PDF导出功能
|
||||
// 可以使用iText或其他PDF库来实现
|
||||
|
||||
// 临时返回空数组,实际实现时需要生成PDF内容
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计结果到CSV
|
||||
*/
|
||||
@Override
|
||||
public byte[] exportToCsv(XgStatisticsResultVo resultVo) {
|
||||
log.info("导出统计结果到CSV,标题:{}", resultVo.getTitle());
|
||||
|
||||
try {
|
||||
StringBuilder csvContent = new StringBuilder();
|
||||
|
||||
// 添加BOM头,解决中文乱码问题
|
||||
csvContent.append('\ufeff');
|
||||
|
||||
// 添加标题
|
||||
csvContent.append(resultVo.getTitle()).append("\n");
|
||||
csvContent.append("统计时间,").append(DateUtil.formatDateTime(resultVo.getStatisticsTime())).append("\n");
|
||||
csvContent.append("统计类型,").append(resultVo.getType()).append("\n");
|
||||
csvContent.append("总计,").append(resultVo.getTotal()).append("\n");
|
||||
csvContent.append("\n");
|
||||
|
||||
// 添加表头
|
||||
csvContent.append("项目,数量,占比\n");
|
||||
|
||||
// 添加数据
|
||||
List<Map<String, Object>> data = resultVo.getData();
|
||||
if (data != null && !data.isEmpty()) {
|
||||
for (Map<String, Object> item : data) {
|
||||
String name = String.valueOf(item.get("name"));
|
||||
Object count = item.get("count");
|
||||
|
||||
// 处理包含逗号的字段
|
||||
if (name.contains(",")) {
|
||||
name = "\"" + name + "\"";
|
||||
}
|
||||
|
||||
csvContent.append(name).append(",");
|
||||
csvContent.append(count).append(",");
|
||||
|
||||
// 计算占比
|
||||
if (count instanceof Number && resultVo.getTotal() > 0) {
|
||||
double ratio = ((Number) count).doubleValue() / resultVo.getTotal() * 100;
|
||||
csvContent.append(String.format("%.2f%%", ratio));
|
||||
} else {
|
||||
csvContent.append("0.00%");
|
||||
}
|
||||
csvContent.append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
return csvContent.toString().getBytes("UTF-8");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("导出CSV失败", e);
|
||||
throw new RuntimeException("导出CSV失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计结果到Word
|
||||
*/
|
||||
@Override
|
||||
public byte[] exportToWord(XgStatisticsResultVo resultVo) {
|
||||
log.info("导出统计结果到Word,标题:{}", resultVo.getTitle());
|
||||
|
||||
// TODO: 实现Word导出功能
|
||||
// 可以使用Apache POI的XWPF来实现
|
||||
|
||||
// 临时返回空数组,实际实现时需要生成Word内容
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计结果到指定格式
|
||||
*/
|
||||
@Override
|
||||
public byte[] exportToFormat(XgStatisticsResultVo resultVo, String format) {
|
||||
if (!isSupportedFormat(format)) {
|
||||
throw new IllegalArgumentException("不支持的导出格式:" + format);
|
||||
}
|
||||
|
||||
switch (format.toLowerCase()) {
|
||||
case "excel":
|
||||
return exportToExcel(resultVo);
|
||||
case "pdf":
|
||||
return exportToPdf(resultVo);
|
||||
case "csv":
|
||||
return exportToCsv(resultVo);
|
||||
case "word":
|
||||
return exportToWord(resultVo);
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的导出格式:" + format);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导出文件的Content-Type
|
||||
*/
|
||||
@Override
|
||||
public String getContentType(String format) {
|
||||
switch (format.toLowerCase()) {
|
||||
case "excel":
|
||||
return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
case "pdf":
|
||||
return "application/pdf";
|
||||
case "csv":
|
||||
return "text/csv";
|
||||
case "word":
|
||||
return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
||||
default:
|
||||
return "application/octet-stream";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导出文件的文件名
|
||||
*/
|
||||
@Override
|
||||
public String getFileName(XgStatisticsResultVo resultVo, String format) {
|
||||
String baseFileName = "statistics_" + DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
||||
|
||||
if (StrUtil.isNotBlank(resultVo.getDimension())) {
|
||||
baseFileName += "_" + resultVo.getDimension();
|
||||
}
|
||||
|
||||
switch (format.toLowerCase()) {
|
||||
case "excel":
|
||||
return baseFileName + ".xlsx";
|
||||
case "pdf":
|
||||
return baseFileName + ".pdf";
|
||||
case "csv":
|
||||
return baseFileName + ".csv";
|
||||
case "word":
|
||||
return baseFileName + ".docx";
|
||||
default:
|
||||
return baseFileName + ".dat";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查导出格式是否支持
|
||||
*/
|
||||
@Override
|
||||
public Boolean isSupportedFormat(String format) {
|
||||
return format != null && SUPPORTED_FORMATS.contains(format.toLowerCase());
|
||||
}
|
||||
|
||||
// ==================== 私有辅助方法 ====================
|
||||
|
||||
/**
|
||||
* 创建标题样式
|
||||
*/
|
||||
private CellStyle createTitleStyle(Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
Font font = workbook.createFont();
|
||||
font.setBold(true);
|
||||
font.setFontHeightInPoints((short) 16);
|
||||
style.setFont(font);
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建表头样式
|
||||
*/
|
||||
private CellStyle createHeaderStyle(Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
Font font = workbook.createFont();
|
||||
font.setBold(true);
|
||||
font.setFontHeightInPoints((short) 12);
|
||||
style.setFont(font);
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
|
||||
// 设置边框
|
||||
style.setBorderTop(BorderStyle.THIN);
|
||||
style.setBorderBottom(BorderStyle.THIN);
|
||||
style.setBorderLeft(BorderStyle.THIN);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// 设置背景色
|
||||
style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建数据样式
|
||||
*/
|
||||
private CellStyle createDataStyle(Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
|
||||
// 设置边框
|
||||
style.setBorderTop(BorderStyle.THIN);
|
||||
style.setBorderBottom(BorderStyle.THIN);
|
||||
style.setBorderLeft(BorderStyle.THIN);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
return style;
|
||||
}
|
||||
}
|
||||
-800
@@ -1,800 +0,0 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xg.domain.bo.XgStudentInfoBo;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoVo;
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import org.dromara.xg.mapper.XgStudentInfoMapper;
|
||||
import org.dromara.xg.service.IXgStudentInfoService;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.UserService;
|
||||
import org.dromara.xg.domain.bo.XgStudentInfoBo;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 学生信息Service业务层处理
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgStudentInfoServiceImpl implements IXgStudentInfoService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(XgStudentInfoServiceImpl.class);
|
||||
|
||||
private final XgStudentInfoMapper baseMapper;
|
||||
private final UserService userService;
|
||||
|
||||
/**
|
||||
* 查询学生信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生信息
|
||||
*/
|
||||
@Override
|
||||
public XgStudentInfoVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgStudentInfoVo> queryPageList(XgStudentInfoBo bo, PageQuery pageQuery) {
|
||||
log.info("=== Service层分页查询开始 ===");
|
||||
log.info("Service接收到的查询条件: {}", bo);
|
||||
log.info("Service接收到的分页参数: {}", pageQuery);
|
||||
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = buildQueryWrapper(bo);
|
||||
log.info("Service构建的Lambda查询条件: {}", lqw.getTargetSql());
|
||||
|
||||
// 执行分页查询
|
||||
Page<XgStudentInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
log.info("Mapper查询结果 - 总数: {}, 当前页记录数: {}", result.getTotal(), result.getRecords().size());
|
||||
|
||||
if (!result.getRecords().isEmpty()) {
|
||||
log.info("第一条记录详情: {}", result.getRecords().get(0));
|
||||
} else {
|
||||
log.warn("Mapper查询结果为空!");
|
||||
}
|
||||
|
||||
TableDataInfo<XgStudentInfoVo> tableDataInfo = TableDataInfo.build(result);
|
||||
log.info("最终返回结果 - 总数: {}, 行数: {}", tableDataInfo.getTotal(), tableDataInfo.getRows().size());
|
||||
log.info("=== Service层分页查询结束 ===");
|
||||
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryList(XgStudentInfoBo bo) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询条件
|
||||
*/
|
||||
private LambdaQueryWrapper<XgStudentInfo> buildQueryWrapper(XgStudentInfoBo query) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(query.getStudentNo()), XgStudentInfo::getStudentNo, query.getStudentNo());
|
||||
lqw.like(StringUtils.isNotBlank(query.getName()), XgStudentInfo::getName, query.getName());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getGender()), XgStudentInfo::getGender, query.getGender());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getIdCard()), XgStudentInfo::getIdCard, query.getIdCard());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getPhone()), XgStudentInfo::getPhone, query.getPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getEmail()), XgStudentInfo::getEmail, query.getEmail());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getNation()), XgStudentInfo::getNation, query.getNation());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getPoliticalStatus()), XgStudentInfo::getPoliticalStatus, query.getPoliticalStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getStudentStatus()), XgStudentInfo::getStudentStatus, query.getStudentStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getGrade()), XgStudentInfo::getGrade, query.getGrade());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getInfoStatus()), XgStudentInfo::getInfoStatus, query.getInfoStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getDataSource()), XgStudentInfo::getDataSource, query.getDataSource());
|
||||
|
||||
// 学院查询条件 - 支持学院ID和学院代码
|
||||
if (StringUtils.isNotBlank(query.getCollegeCode())) {
|
||||
// 如果传入的是数字,认为是学院ID,需要转换为学院代码
|
||||
if (query.getCollegeCode().matches("\\d+")) {
|
||||
// 通过学院ID查询学院代码
|
||||
String collegeCode = getCollegeCodeById(Long.parseLong(query.getCollegeCode()));
|
||||
if (StringUtils.isNotBlank(collegeCode)) {
|
||||
lqw.eq(XgStudentInfo::getCollegeCode, collegeCode);
|
||||
}
|
||||
} else {
|
||||
// 直接使用学院代码
|
||||
lqw.eq(XgStudentInfo::getCollegeCode, query.getCollegeCode());
|
||||
}
|
||||
}
|
||||
|
||||
// 专业查询条件 - 支持专业ID和专业代码
|
||||
if (StringUtils.isNotBlank(query.getMajorCode())) {
|
||||
// 如果传入的是数字,认为是专业ID,需要转换为专业代码
|
||||
if (query.getMajorCode().matches("\\d+")) {
|
||||
// 通过专业ID查询专业代码
|
||||
String majorCode = getMajorCodeById(Long.parseLong(query.getMajorCode()));
|
||||
if (StringUtils.isNotBlank(majorCode)) {
|
||||
lqw.eq(XgStudentInfo::getMajorCode, majorCode);
|
||||
}
|
||||
} else {
|
||||
// 直接使用专业代码
|
||||
lqw.eq(XgStudentInfo::getMajorCode, query.getMajorCode());
|
||||
}
|
||||
}
|
||||
|
||||
// 班级查询条件 - 支持班级ID和班级代码
|
||||
if (StringUtils.isNotBlank(query.getClassCode())) {
|
||||
// 如果传入的是数字,认为是班级ID,需要转换为班级代码
|
||||
if (query.getClassCode().matches("\\d+")) {
|
||||
// 通过班级ID查询班级代码
|
||||
String classCode = getClassCodeById(Long.parseLong(query.getClassCode()));
|
||||
if (StringUtils.isNotBlank(classCode)) {
|
||||
lqw.eq(XgStudentInfo::getClassCode, classCode);
|
||||
}
|
||||
} else {
|
||||
// 直接使用班级代码
|
||||
lqw.eq(XgStudentInfo::getClassCode, query.getClassCode());
|
||||
}
|
||||
}
|
||||
|
||||
lqw.eq(ObjectUtil.isNotNull(query.getCounselorId()), XgStudentInfo::getCounselorId, query.getCounselorId());
|
||||
lqw.eq(ObjectUtil.isNotNull(query.getClassTeacherId()), XgStudentInfo::getClassTeacherId, query.getClassTeacherId());
|
||||
lqw.between(ObjectUtil.isNotNull(query.getParams()) && query.getParams().get("beginTime") != null && query.getParams().get("endTime") != null,
|
||||
XgStudentInfo::getCreateTime, query.getParams().get("beginTime"), query.getParams().get("endTime"));
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学院ID获取学院代码
|
||||
*/
|
||||
private String getCollegeCodeById(Long collegeId) {
|
||||
try {
|
||||
// 直接执行SQL查询学院代码
|
||||
List<Map<String, Object>> result = baseMapper.selectMaps(
|
||||
Wrappers.<XgStudentInfo>lambdaQuery()
|
||||
.select(XgStudentInfo::getCollegeCode)
|
||||
.isNotNull(XgStudentInfo::getCollegeCode)
|
||||
.last("AND EXISTS (SELECT 1 FROM xg_college_info WHERE id = " + collegeId + " AND college_code = xg_student_info.college_code AND deleted = 0) LIMIT 1")
|
||||
);
|
||||
if (!result.isEmpty()) {
|
||||
return (String) result.get(0).get("college_code");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("根据学院ID获取学院代码失败: {}", collegeId, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据专业ID获取专业代码
|
||||
*/
|
||||
private String getMajorCodeById(Long majorId) {
|
||||
try {
|
||||
// 直接执行SQL查询专业代码
|
||||
List<Map<String, Object>> result = baseMapper.selectMaps(
|
||||
Wrappers.<XgStudentInfo>lambdaQuery()
|
||||
.select(XgStudentInfo::getMajorCode)
|
||||
.isNotNull(XgStudentInfo::getMajorCode)
|
||||
.last("AND EXISTS (SELECT 1 FROM xg_major_info WHERE id = " + majorId + " AND major_code = xg_student_info.major_code AND deleted = 0) LIMIT 1")
|
||||
);
|
||||
if (!result.isEmpty()) {
|
||||
return (String) result.get(0).get("major_code");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("根据专业ID获取专业代码失败: {}", majorId, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班级ID获取班级代码
|
||||
*/
|
||||
private String getClassCodeById(Long classId) {
|
||||
try {
|
||||
// 直接执行SQL查询班级代码
|
||||
List<Map<String, Object>> result = baseMapper.selectMaps(
|
||||
Wrappers.<XgStudentInfo>lambdaQuery()
|
||||
.select(XgStudentInfo::getClassCode)
|
||||
.isNotNull(XgStudentInfo::getClassCode)
|
||||
.last("AND EXISTS (SELECT 1 FROM xg_class_info WHERE id = " + classId + " AND class_code = xg_student_info.class_code AND deleted = 0) LIMIT 1")
|
||||
);
|
||||
if (!result.isEmpty()) {
|
||||
return (String) result.get(0).get("class_code");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("根据班级ID获取班级代码失败: {}", classId, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生信息
|
||||
*
|
||||
* @param bo 学生信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XgStudentInfoBo bo) {
|
||||
XgStudentInfo add = MapstructUtils.convert(bo, XgStudentInfo.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 计算完整度
|
||||
XgStudentInfoVo studentInfoVo = MapstructUtils.convert(add, XgStudentInfoVo.class);
|
||||
Double completionRate = calculateCompletionRate(studentInfoVo);
|
||||
add.setCompletionRate(BigDecimal.valueOf(completionRate));
|
||||
add.setIsComplete(completionRate >= 90.0 ? 1 : 0);
|
||||
|
||||
// 设置默认值
|
||||
if (StringUtils.isBlank(add.getStudentStatus())) {
|
||||
add.setStudentStatus("1"); // 默认在籍
|
||||
}
|
||||
if (StringUtils.isBlank(add.getInfoStatus())) {
|
||||
add.setInfoStatus("1"); // 默认正常
|
||||
}
|
||||
if (StringUtils.isBlank(add.getDataSource())) {
|
||||
add.setDataSource("manual"); // 默认手工录入
|
||||
}
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生信息
|
||||
*
|
||||
* @param bo 学生信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XgStudentInfoBo bo) {
|
||||
XgStudentInfo update = MapstructUtils.convert(bo, XgStudentInfo.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
// 重新计算完整度
|
||||
XgStudentInfoVo studentInfoVo = MapstructUtils.convert(update, XgStudentInfoVo.class);
|
||||
Double completionRate = calculateCompletionRate(studentInfoVo);
|
||||
update.setCompletionRate(BigDecimal.valueOf(completionRate));
|
||||
update.setIsComplete(completionRate >= 90.0 ? 1 : 0);
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XgStudentInfo entity) {
|
||||
// 校验学号唯一性
|
||||
if (StringUtils.isNotBlank(entity.getStudentNo())) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgStudentInfo::getStudentNo, entity.getStudentNo());
|
||||
lqw.ne(entity.getId() != null, XgStudentInfo::getId, entity.getId());
|
||||
if (baseMapper.selectCount(lqw) > 0) {
|
||||
throw new ServiceException("学号已存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 校验身份证号唯一性
|
||||
if (StringUtils.isNotBlank(entity.getIdCard())) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgStudentInfo::getIdCard, entity.getIdCard());
|
||||
lqw.ne(entity.getId() != null, XgStudentInfo::getId, entity.getId());
|
||||
if (baseMapper.selectCount(lqw) > 0) {
|
||||
throw new ServiceException("身份证号已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// 可以添加删除前的业务校验
|
||||
// 例如:检查学生是否有关联的成绩、奖惩记录等
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学号查询学生信息
|
||||
*
|
||||
* @param studentNo 学号
|
||||
* @return 学生信息
|
||||
*/
|
||||
@Override
|
||||
public XgStudentInfoVo queryByStudentNo(String studentNo) {
|
||||
return baseMapper.selectByStudentNo(studentNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证号查询学生信息
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 学生信息
|
||||
*/
|
||||
@Override
|
||||
public XgStudentInfoVo queryByIdCard(String idCard) {
|
||||
return baseMapper.selectByIdCard(idCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定班级的学生列表
|
||||
*
|
||||
* @param classCode 班级代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryByClassCode(String classCode) {
|
||||
return baseMapper.selectByClassCode(classCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定学院的学生列表
|
||||
*
|
||||
* @param collegeCode 学院代码
|
||||
* @return 学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryByCollegeCode(String collegeCode) {
|
||||
return baseMapper.selectByCollegeCode(collegeCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定辅导员的学生列表
|
||||
*
|
||||
* @param counselorId 辅导员ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryByCounselorId(Long counselorId) {
|
||||
return baseMapper.selectByCounselorId(counselorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定班主任的学生列表
|
||||
*
|
||||
* @param classTeacherId 班主任ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryByClassTeacherId(Long classTeacherId) {
|
||||
return baseMapper.selectByClassTeacherId(classTeacherId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各学院学生数量
|
||||
*
|
||||
* @return 学院学生数量统计
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByCollege() {
|
||||
return baseMapper.countByCollege();
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各年级学生数量
|
||||
*
|
||||
* @return 年级学生数量统计
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByGrade() {
|
||||
return baseMapper.countByGrade();
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计各专业学生数量
|
||||
*
|
||||
* @return 专业学生数量统计
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByMajor() {
|
||||
return baseMapper.countByMajor();
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计学籍状态分布
|
||||
*
|
||||
* @return 学籍状态统计
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByStudentStatus() {
|
||||
return baseMapper.countByStudentStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计信息完整度分布
|
||||
*
|
||||
* @return 信息完整度统计
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByCompletionRate() {
|
||||
return baseMapper.countByCompletionRate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询信息不完整的学生列表
|
||||
*
|
||||
* @return 信息不完整的学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryIncompleteStudents() {
|
||||
return baseMapper.selectIncompleteStudents();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待审核的学生信息列表
|
||||
*
|
||||
* @return 待审核的学生信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgStudentInfoVo> queryPendingAuditStudents() {
|
||||
return baseMapper.selectPendingAuditStudents();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新学生信息状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param infoStatus 信息状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean batchUpdateInfoStatus(List<Long> studentIds, String infoStatus) {
|
||||
Long updateBy = LoginHelper.getUserId();
|
||||
return baseMapper.batchUpdateInfoStatus(studentIds, infoStatus, updateBy) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新学生学籍状态
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param studentStatus 学籍状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean batchUpdateStudentStatus(List<Long> studentIds, String studentStatus) {
|
||||
Long updateBy = LoginHelper.getUserId();
|
||||
return baseMapper.batchUpdateStudentStatus(studentIds, studentStatus, updateBy) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重复学号的学生列表
|
||||
*
|
||||
* @return 重复学号的学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDuplicateStudentNo() {
|
||||
return baseMapper.selectDuplicateStudentNo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重复身份证号的学生列表
|
||||
*
|
||||
* @return 重复身份证号的学生列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDuplicateIdCard() {
|
||||
return baseMapper.selectDuplicateIdCard();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算学生信息完整度
|
||||
*
|
||||
* @param studentInfo 学生信息
|
||||
* @return 完整度百分比
|
||||
*/
|
||||
@Override
|
||||
public Double calculateCompletionRate(XgStudentInfoVo studentInfo) {
|
||||
if (studentInfo == null) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
int totalFields = 50; // 总字段数(可根据实际需要调整)
|
||||
int completedFields = 0;
|
||||
|
||||
// 基本信息字段(必填)
|
||||
if (StringUtils.isNotBlank(studentInfo.getStudentNo())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getGender())) completedFields++;
|
||||
if (studentInfo.getBirthDate() != null) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getIdCard())) completedFields++;
|
||||
|
||||
// 学籍信息字段
|
||||
if (StringUtils.isNotBlank(studentInfo.getStudentStatus())) completedFields++;
|
||||
if (studentInfo.getEnrollmentYear() != null) completedFields++;
|
||||
if (studentInfo.getEnrollmentDate() != null) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getCollegeCode())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getMajorCode())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getClassCode())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getGrade())) completedFields++;
|
||||
|
||||
// 联系信息字段
|
||||
if (StringUtils.isNotBlank(studentInfo.getPhone())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getEmail())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getHomeAddress())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getCurrentAddress())) completedFields++;
|
||||
|
||||
// 家庭信息字段
|
||||
if (StringUtils.isNotBlank(studentInfo.getFatherName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getFatherPhone())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getMotherName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getMotherPhone())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getEmergencyContactName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getEmergencyContactPhone())) completedFields++;
|
||||
|
||||
// 其他重要信息字段
|
||||
if (StringUtils.isNotBlank(studentInfo.getNation())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getPoliticalStatus())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getTrainingType())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getSourceRegion())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getMiddleSchool())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getFamilyEconomicStatus())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getHealthStatus())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getBloodType())) completedFields++;
|
||||
if (studentInfo.getHeight() != null) completedFields++;
|
||||
if (studentInfo.getWeight() != null) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getBankCardNo())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getBankName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getDormitoryBuilding())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getDormitoryRoom())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getCounselorName())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getClassTeacherName())) completedFields++;
|
||||
|
||||
// 可选信息字段
|
||||
if (StringUtils.isNotBlank(studentInfo.getNameEnglish())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getQq())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getWechat())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getReligion())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getMaritalStatus())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getSpecialties())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getAwards())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getViolations())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getSocialActivities())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getPhotoUrl())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getPostalCode())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getHouseholdRegisterType())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getHukouLocation())) completedFields++;
|
||||
if (StringUtils.isNotBlank(studentInfo.getAdmissionCategory())) completedFields++;
|
||||
|
||||
return Math.round((double) completedFields / totalFields * 100 * 100.0) / 100.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新学生信息完整度
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateCompletionRate(Long studentId) {
|
||||
XgStudentInfoVo studentInfo = baseMapper.selectVoById(studentId);
|
||||
if (studentInfo == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Double completionRate = calculateCompletionRate(studentInfo);
|
||||
|
||||
XgStudentInfo update = new XgStudentInfo();
|
||||
update.setId(studentId);
|
||||
update.setCompletionRate(BigDecimal.valueOf(completionRate));
|
||||
update.setIsComplete(completionRate >= 90.0 ? 1 : 0);
|
||||
update.setUpdateBy(LoginHelper.getUserId());
|
||||
update.setUpdateTime(new Date());
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
// 其他方法将在下一部分实现...
|
||||
|
||||
@Override
|
||||
public String importStudentInfo(List<XgStudentInfoVo> studentInfoList, Boolean isUpdateSupport, String operName) {
|
||||
// TODO: 实现批量导入功能
|
||||
return "导入功能待实现";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XgStudentInfoVo> exportStudentInfo(XgStudentInfoBo bo) {
|
||||
return queryList(bo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean auditStudentInfo(Long studentId, String auditStatus, String auditRemark) {
|
||||
// TODO: 实现审核功能
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchAuditStudentInfo(List<Long> studentIds, String auditStatus, String auditRemark) {
|
||||
// TODO: 实现批量审核功能
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStatisticsOverview() {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
// 总学生数
|
||||
LambdaQueryWrapper<XgStudentInfo> totalLqw = Wrappers.lambdaQuery();
|
||||
long totalCount = baseMapper.selectCount(totalLqw);
|
||||
result.put("totalCount", totalCount);
|
||||
|
||||
// 在籍学生数
|
||||
LambdaQueryWrapper<XgStudentInfo> activeLqw = Wrappers.lambdaQuery();
|
||||
activeLqw.eq(XgStudentInfo::getStudentStatus, "1");
|
||||
long activeCount = baseMapper.selectCount(activeLqw);
|
||||
result.put("activeCount", activeCount);
|
||||
|
||||
// 信息完整学生数
|
||||
LambdaQueryWrapper<XgStudentInfo> completeLqw = Wrappers.lambdaQuery();
|
||||
completeLqw.eq(XgStudentInfo::getIsComplete, 1);
|
||||
long completeCount = baseMapper.selectCount(completeLqw);
|
||||
result.put("completeCount", completeCount);
|
||||
|
||||
// 待审核学生数
|
||||
LambdaQueryWrapper<XgStudentInfo> pendingLqw = Wrappers.lambdaQuery();
|
||||
pendingLqw.eq(XgStudentInfo::getInfoStatus, "2");
|
||||
long pendingCount = baseMapper.selectCount(pendingLqw);
|
||||
result.put("pendingCount", pendingCount);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> generateReport(String reportType, Map<String, Object> params) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
switch (reportType) {
|
||||
case "college":
|
||||
result.put("data", countByCollege());
|
||||
break;
|
||||
case "grade":
|
||||
result.put("data", countByGrade());
|
||||
break;
|
||||
case "major":
|
||||
result.put("data", countByMajor());
|
||||
break;
|
||||
case "status":
|
||||
result.put("data", countByStudentStatus());
|
||||
break;
|
||||
case "completion":
|
||||
result.put("data", countByCompletionRate());
|
||||
break;
|
||||
default:
|
||||
result.put("data", new HashMap<>());
|
||||
}
|
||||
|
||||
result.put("reportType", reportType);
|
||||
result.put("generateTime", new Date());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 选项数据接口实现
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*
|
||||
* @return 学院选项列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getCollegeOptions() {
|
||||
return baseMapper.selectCollegeOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业选项
|
||||
*
|
||||
* @param collegeCode 学院代码(可选)
|
||||
* @return 专业选项列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getMajorOptions(String collegeCode) {
|
||||
return baseMapper.selectMajorOptions(collegeCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级选项
|
||||
*
|
||||
* @param majorCode 专业代码(可选)
|
||||
* @return 班级选项列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getClassOptions(String majorCode) {
|
||||
return baseMapper.selectClassOptions(majorCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员选项
|
||||
*
|
||||
* @return 辅导员选项列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getCounselorOptions() {
|
||||
return baseMapper.selectCounselorOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任选项
|
||||
*
|
||||
* @return 班主任选项列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getClassTeacherOptions() {
|
||||
return baseMapper.selectClassTeacherOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学号是否存在
|
||||
*
|
||||
* @param studentNo 学号
|
||||
* @param studentId 学生ID(编辑时排除自己)
|
||||
* @return 是否存在
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkStudentNo(String studentNo, Long studentId) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgStudentInfo::getStudentNo, studentNo);
|
||||
if (studentId != null) {
|
||||
lqw.ne(XgStudentInfo::getId, studentId);
|
||||
}
|
||||
return baseMapper.selectCount(lqw) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查身份证号是否存在
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @param studentId 学生ID(编辑时排除自己)
|
||||
* @return 是否存在
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkIdCard(String idCard, Long studentId) {
|
||||
LambdaQueryWrapper<XgStudentInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgStudentInfo::getIdCard, idCard);
|
||||
if (studentId != null) {
|
||||
lqw.ne(XgStudentInfo::getId, studentId);
|
||||
}
|
||||
return baseMapper.selectCount(lqw) > 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,239 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgClassInfoMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.vo.XgClassInfoVo" id="XgClassInfoVoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="classCode" column="class_code"/>
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="classType" column="class_type"/>
|
||||
<result property="grade" column="grade"/>
|
||||
<result property="enrollmentYear" column="enrollment_year"/>
|
||||
<result property="graduationYear" column="graduation_year"/>
|
||||
<result property="majorCode" column="major_code"/>
|
||||
<result property="majorName" column="major_name"/>
|
||||
<result property="trainingType" column="training_type"/>
|
||||
<result property="degreeType" column="degree_type"/>
|
||||
<result property="collegeCode" column="college_code"/>
|
||||
<result property="collegeName" column="college_name"/>
|
||||
<result property="counselorId" column="counselor_id"/>
|
||||
<result property="counselorName" column="counselor_name"/>
|
||||
<result property="classTeacherId" column="class_teacher_id"/>
|
||||
<result property="classTeacherName" column="class_teacher_name"/>
|
||||
<result property="classAdvisorId" column="class_advisor_id"/>
|
||||
<result property="classAdvisorName" column="class_advisor_name"/>
|
||||
<result property="classMonitorId" column="class_monitor_id"/>
|
||||
<result property="classMonitorName" column="class_monitor_name"/>
|
||||
<result property="deputyMonitorId" column="deputy_monitor_id"/>
|
||||
<result property="deputyMonitorName" column="deputy_monitor_name"/>
|
||||
<result property="classStatus" column="class_status"/>
|
||||
<result property="isGraduation" column="is_graduation"/>
|
||||
<result property="graduationDate" column="graduation_date"/>
|
||||
<result property="plannedCapacity" column="planned_capacity"/>
|
||||
<result property="currentStudentCount" column="current_student_count"/>
|
||||
<result property="maxStudentCount" column="max_student_count"/>
|
||||
<result property="maleCount" column="male_count"/>
|
||||
<result property="femaleCount" column="female_count"/>
|
||||
<result property="activeCount" column="active_count"/>
|
||||
<result property="transferInCount" column="transfer_in_count"/>
|
||||
<result property="transferOutCount" column="transfer_out_count"/>
|
||||
<result property="dropoutCount" column="dropout_count"/>
|
||||
<result property="graduateCount" column="graduate_count"/>
|
||||
<result property="officeLocation" column="office_location"/>
|
||||
<result property="classLocation" column="class_location"/>
|
||||
<result property="contactPhone" column="contact_phone"/>
|
||||
<result property="qqGroup" column="qq_group"/>
|
||||
<result property="wechatGroup" column="wechat_group"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="classSchedule" column="class_schedule"/>
|
||||
<result property="classCulture" column="class_culture"/>
|
||||
<result property="classRules" column="class_rules"/>
|
||||
<result property="classDescription" column="class_description"/>
|
||||
<result property="lastCountUpdate" column="last_count_update"/>
|
||||
<result property="extField1" column="ext_field1"/>
|
||||
<result property="extField2" column="ext_field2"/>
|
||||
<result property="extField3" column="ext_field3"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 自定义分页查询方法 - 移除tenant_id字段查询,但保留WHERE条件 -->
|
||||
<select id="selectVoPage" resultMap="XgClassInfoVoResult">
|
||||
<!-- 调试信息:开始执行班级信息自定义分页查询 -->
|
||||
SELECT
|
||||
id, class_code, class_name, class_type, grade, enrollment_year, graduation_year,
|
||||
major_code, major_name, training_type, degree_type, college_code, college_name,
|
||||
counselor_id, counselor_name, class_teacher_id, class_teacher_name,
|
||||
class_advisor_id, class_advisor_name, class_monitor_id, class_monitor_name,
|
||||
deputy_monitor_id, deputy_monitor_name, class_status, is_graduation, graduation_date,
|
||||
planned_capacity, current_student_count, max_student_count, male_count, female_count,
|
||||
active_count, transfer_in_count, transfer_out_count, dropout_count, graduate_count,
|
||||
office_location, class_location, contact_phone, qq_group, wechat_group, email,
|
||||
class_schedule, class_culture, class_rules, class_description, last_count_update,
|
||||
ext_field1, ext_field2, ext_field3, remark,
|
||||
create_by, create_time, update_by, update_time
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0 AND tenant_id = '000000'
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and !ew.sqlSegment.trim().toUpperCase().startsWith('ORDER BY')">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.sqlSegment.trim().toUpperCase().startsWith('ORDER BY')">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 自定义详情查询方法 - 移除tenant_id字段查询,但保留WHERE条件 -->
|
||||
<select id="selectVoById" parameterType="java.io.Serializable" resultMap="XgClassInfoVoResult">
|
||||
SELECT
|
||||
id, class_code, class_name, class_type, grade, enrollment_year, graduation_year,
|
||||
major_code, major_name, training_type, degree_type, college_code, college_name,
|
||||
counselor_id, counselor_name, class_teacher_id, class_teacher_name,
|
||||
class_advisor_id, class_advisor_name, class_monitor_id, class_monitor_name,
|
||||
deputy_monitor_id, deputy_monitor_name, class_status, is_graduation, graduation_date,
|
||||
planned_capacity, current_student_count, max_student_count, male_count, female_count,
|
||||
active_count, transfer_in_count, transfer_out_count, dropout_count, graduate_count,
|
||||
office_location, class_location, contact_phone, qq_group, wechat_group, email,
|
||||
class_schedule, class_culture, class_rules, class_description, last_count_update,
|
||||
ext_field1, ext_field2, ext_field3, remark,
|
||||
create_by, create_time, update_by, update_time
|
||||
FROM xg_class_info
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
</select>
|
||||
|
||||
<sql id="selectXgClassInfoVo">
|
||||
select id, class_code, class_name, class_type, grade, enrollment_year, graduation_year,
|
||||
major_code, major_name, training_type, degree_type, college_code, college_name,
|
||||
counselor_id, counselor_name, class_teacher_id, class_teacher_name,
|
||||
class_advisor_id, class_advisor_name, class_monitor_id, class_monitor_name,
|
||||
deputy_monitor_id, deputy_monitor_name, class_status, is_graduation, graduation_date,
|
||||
planned_capacity, current_student_count, max_student_count, male_count, female_count,
|
||||
active_count, transfer_in_count, transfer_out_count, dropout_count, graduate_count,
|
||||
office_location, class_location, contact_phone, qq_group, wechat_group, email,
|
||||
class_schedule, class_culture, class_rules, class_description, last_count_update,
|
||||
ext_field1, ext_field2, ext_field3, remark, create_by, create_time, update_by, update_time
|
||||
from xg_class_info
|
||||
</sql>
|
||||
|
||||
<!-- 根据班级代码查询班级信息 -->
|
||||
<select id="selectByClassCode" parameterType="String" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE class_code = #{classCode}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
</select>
|
||||
|
||||
<!-- 查询指定年级的班级列表 -->
|
||||
<select id="selectByGrade" parameterType="String" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE grade = #{grade}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
AND class_status = '1'
|
||||
ORDER BY class_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定学院的班级列表 -->
|
||||
<select id="selectByCollegeCode" parameterType="String" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE college_code = #{collegeCode}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
AND class_status = '1'
|
||||
ORDER BY grade, class_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定专业的班级列表 -->
|
||||
<select id="selectByMajorCode" parameterType="String" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE major_code = #{majorCode}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
AND class_status = '1'
|
||||
ORDER BY grade, class_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定辅导员的班级列表 -->
|
||||
<select id="selectByCounselorId" parameterType="Long" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE counselor_id = #{counselorId}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
AND class_status = '1'
|
||||
ORDER BY grade, class_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定班主任的班级列表 -->
|
||||
<select id="selectByClassTeacherId" parameterType="Long" resultMap="XgClassInfoVoResult">
|
||||
SELECT * FROM xg_class_info
|
||||
WHERE class_teacher_id = #{classTeacherId}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
AND class_status = '1'
|
||||
ORDER BY grade, class_code
|
||||
</select>
|
||||
|
||||
<!-- 统计各学院班级数量 -->
|
||||
<select id="countByCollege" resultType="java.util.Map">
|
||||
SELECT
|
||||
college_code,
|
||||
college_name,
|
||||
COUNT(*) as count
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
GROUP BY college_code, college_name
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计各年级班级数量 -->
|
||||
<select id="countByGrade" resultType="java.util.Map">
|
||||
SELECT
|
||||
grade,
|
||||
COUNT(*) as count
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
GROUP BY grade
|
||||
ORDER BY grade
|
||||
</select>
|
||||
|
||||
<!-- 统计各专业班级数量 -->
|
||||
<select id="countByMajor" resultType="java.util.Map">
|
||||
SELECT
|
||||
major_code,
|
||||
major_name,
|
||||
COUNT(*) as count
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
GROUP BY major_code, major_name
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计班级状态分布 -->
|
||||
<select id="countByClassStatus" resultType="java.util.Map">
|
||||
SELECT
|
||||
class_status,
|
||||
CASE
|
||||
WHEN class_status = '1' THEN '正常'
|
||||
WHEN class_status = '2' THEN '暂停'
|
||||
WHEN class_status = '3' THEN '毕业'
|
||||
WHEN class_status = '4' THEN '解散'
|
||||
ELSE '未知'
|
||||
END as status_name,
|
||||
COUNT(*) as count
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
GROUP BY class_status
|
||||
ORDER BY class_status
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgClassTeacherRelationMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.XgClassTeacherRelation" id="XgClassTeacherRelationResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="classId" column="class_id"/>
|
||||
<result property="teacherId" column="teacher_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="startDate" column="start_date"/>
|
||||
<result property="endDate" column="end_date"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.vo.XgClassTeacherRelationVo" id="XgClassTeacherRelationVoResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="classId" column="class_id"/>
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="classCode" column="class_code"/>
|
||||
<result property="teacherId" column="teacher_id"/>
|
||||
<result property="teacherName" column="teacher_name"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="startDate" column="start_date"/>
|
||||
<result property="endDate" column="end_date"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXgClassTeacherRelationVo">
|
||||
select r.id, r.class_id, c.class_name, c.class_code, r.teacher_id,
|
||||
u.nick_name as teacher_name, r.status, r.start_date, r.end_date,
|
||||
r.remark, r.create_by, r.create_time, r.update_by, r.update_time
|
||||
from xg_class_teacher_relation r
|
||||
left join xg_class_info c on c.id = r.class_id
|
||||
left join sys_user u on u.user_id = r.teacher_id
|
||||
</sql>
|
||||
|
||||
<select id="selectXgClassTeacherRelationList" parameterType="org.dromara.xg.domain.bo.XgClassTeacherRelationBo" resultMap="XgClassTeacherRelationVoResult">
|
||||
<include refid="selectXgClassTeacherRelationVo"/>
|
||||
<where>
|
||||
r.deleted = '0'
|
||||
<if test="classId != null">and r.class_id = #{classId}</if>
|
||||
<if test="teacherId != null">and r.teacher_id = #{teacherId}</if>
|
||||
<if test="status != null and status != ''">and r.status = #{status}</if>
|
||||
<if test="startDate != null">and r.start_date = #{startDate}</if>
|
||||
<if test="endDate != null">and r.end_date = #{endDate}</if>
|
||||
<if test="classIdList != null and classIdList.size() > 0">
|
||||
and r.class_id in
|
||||
<foreach item="classId" collection="classIdList" open="(" separator="," close=")">
|
||||
#{classId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="teacherIdList != null and teacherIdList.size() > 0">
|
||||
and r.teacher_id in
|
||||
<foreach item="teacherId" collection="teacherIdList" open="(" separator="," close=")">
|
||||
#{teacherId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and r.status in
|
||||
<foreach item="status" collection="statusList" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeStart != ''">
|
||||
and r.create_time >= #{createTimeStart}
|
||||
</if>
|
||||
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||
and r.create_time <= #{createTimeEnd}
|
||||
</if>
|
||||
<if test="startDateStart != null and startDateStart != ''">
|
||||
and r.start_date >= #{startDateStart}
|
||||
</if>
|
||||
<if test="startDateEnd != null and startDateEnd != ''">
|
||||
and r.start_date <= #{startDateEnd}
|
||||
</if>
|
||||
<if test="endDateStart != null and endDateStart != ''">
|
||||
and r.end_date >= #{endDateStart}
|
||||
</if>
|
||||
<if test="endDateEnd != null and endDateEnd != ''">
|
||||
and r.end_date <= #{endDateEnd}
|
||||
</if>
|
||||
</where>
|
||||
order by r.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectActiveRelationByClassId" parameterType="Long" resultMap="XgClassTeacherRelationResult">
|
||||
select id, class_id, teacher_id, status, start_date, end_date, remark,
|
||||
create_by, create_time, update_by, update_time, tenant_id, deleted
|
||||
from xg_class_teacher_relation
|
||||
where class_id = #{classId}
|
||||
and status = '0'
|
||||
and deleted = '0'
|
||||
and (end_date is null or end_date > now())
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<update id="invalidateRelationsByClassId">
|
||||
update xg_class_teacher_relation
|
||||
set status = '1',
|
||||
end_date = now(),
|
||||
update_by = #{updateBy},
|
||||
update_time = now()
|
||||
where class_id = #{classId}
|
||||
and status = '0'
|
||||
and deleted = '0'
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgCollectionBatchLogMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.XgCollectionBatchLog" id="XgCollectionBatchLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="studentId" column="student_id"/>
|
||||
<result property="operationType" column="operation_type"/>
|
||||
<result property="operationDesc" column="operation_desc"/>
|
||||
<result property="oldData" column="old_data"/>
|
||||
<result property="newData" column="new_data"/>
|
||||
<result property="operatorId" column="operator_id"/>
|
||||
<result property="operatorName" column="operator_name"/>
|
||||
<result property="operatorType" column="operator_type"/>
|
||||
<result property="ipAddress" column="ip_address"/>
|
||||
<result property="userAgent" column="user_agent"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXgCollectionBatchLogVo">
|
||||
select id, batch_id, student_id, operation_type, operation_desc, old_data, new_data,
|
||||
operator_id, operator_name, operator_type, ip_address, user_agent, create_time, tenant_id
|
||||
from xg_collection_batch_log
|
||||
</sql>
|
||||
|
||||
<!-- 重写分页查询方法 -->
|
||||
<select id="selectVoPage" resultMap="XgCollectionBatchLogResult">
|
||||
<include refid="selectXgCollectionBatchLogVo"/>
|
||||
<where>
|
||||
${ew.customSqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据批次ID查询操作日志 -->
|
||||
<select id="selectByBatchId" resultMap="XgCollectionBatchLogResult">
|
||||
<include refid="selectXgCollectionBatchLogVo"/>
|
||||
where batch_id = #{batchId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据学生ID查询操作日志 -->
|
||||
<select id="selectByStudentId" resultMap="XgCollectionBatchLogResult">
|
||||
<include refid="selectXgCollectionBatchLogVo"/>
|
||||
where student_id = #{studentId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据批次ID和学生ID查询操作日志 -->
|
||||
<select id="selectByBatchAndStudent" resultMap="XgCollectionBatchLogResult">
|
||||
<include refid="selectXgCollectionBatchLogVo"/>
|
||||
where batch_id = #{batchId} and student_id = #{studentId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 批量插入操作日志 -->
|
||||
<insert id="batchInsert">
|
||||
insert into xg_collection_batch_log (
|
||||
batch_id, student_id, operation_type, operation_desc, old_data, new_data,
|
||||
operator_id, operator_name, operator_type, ip_address, user_agent, create_time, tenant_id
|
||||
) values
|
||||
<foreach collection="logs" item="item" separator=",">
|
||||
(
|
||||
#{item.batchId}, #{item.studentId}, #{item.operationType}, #{item.operationDesc},
|
||||
#{item.oldData}, #{item.newData}, #{item.operatorId}, #{item.operatorName},
|
||||
#{item.operatorType}, #{item.ipAddress}, #{item.userAgent}, #{item.createTime}, #{item.tenantId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据批次ID删除操作日志 -->
|
||||
<delete id="deleteByBatchId">
|
||||
delete from xg_collection_batch_log where batch_id = #{batchId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据学生ID删除操作日志 -->
|
||||
<delete id="deleteByStudentId">
|
||||
delete from xg_collection_batch_log where student_id = #{studentId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
-297
@@ -1,297 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgCollectionBatchMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.vo.XgCollectionBatchVo" id="XgCollectionBatchResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="batchCode" column="batch_code"/>
|
||||
<result property="batchName" column="batch_name"/>
|
||||
<result property="batchType" column="batch_type"/>
|
||||
<result property="academicYear" column="academic_year"/>
|
||||
<result property="semester" column="semester"/>
|
||||
<result property="batchStatus" column="batch_status"/>
|
||||
<result property="publishTime" column="publish_time"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="archiveTime" column="archive_time"/>
|
||||
<result property="targetColleges" column="target_colleges"/>
|
||||
<result property="targetGrades" column="target_grades"/>
|
||||
<result property="targetMajors" column="target_majors"/>
|
||||
<result property="requiredFields" column="required_fields"/>
|
||||
<result property="optionalFields" column="optional_fields"/>
|
||||
<result property="auditLevels" column="audit_levels"/>
|
||||
<result property="totalStudents" column="total_students"/>
|
||||
<result property="submittedCount" column="submitted_count"/>
|
||||
<result property="approvedCount" column="approved_count"/>
|
||||
<result property="rejectedCount" column="rejected_count"/>
|
||||
<result property="completionRate" column="completion_rate"/>
|
||||
<result property="editPermissions" column="edit_permissions"/>
|
||||
<result property="auditPermissions" column="audit_permissions"/>
|
||||
<result property="viewPermissions" column="view_permissions"/>
|
||||
<result property="autoReminder" column="auto_reminder"/>
|
||||
<result property="reminderFrequency" column="reminder_frequency"/>
|
||||
<result property="allowModifyAfterSubmit" column="allow_modify_after_submit"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXgCollectionBatchVo">
|
||||
select id, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted,
|
||||
batch_code, batch_name, batch_type, academic_year, semester, batch_status,
|
||||
publish_time, start_time, end_time, archive_time, target_colleges, target_grades,
|
||||
target_majors, required_fields, optional_fields, audit_levels, total_students,
|
||||
submitted_count, approved_count, rejected_count, completion_rate, edit_permissions,
|
||||
audit_permissions, view_permissions, auto_reminder, reminder_frequency,
|
||||
allow_modify_after_submit, description, remark
|
||||
from xg_collection_batch
|
||||
</sql>
|
||||
|
||||
<!-- 重写分页查询方法,使用自定义ResultMap -->
|
||||
<select id="selectVoPage" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
${ew.customSqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据批次编码查询批次信息 -->
|
||||
<select id="selectByBatchCode" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_code = #{batchCode} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询指定学年的批次列表 -->
|
||||
<select id="selectByAcademicYear" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where academic_year = #{academicYear} and deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询指定状态的批次列表 -->
|
||||
<select id="selectByStatus" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = #{batchStatus} and deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询当前进行中的批次列表 -->
|
||||
<select id="selectActiveBatches" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = '3' and deleted = 0
|
||||
and start_time <= now() and end_time >= now()
|
||||
order by start_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询即将开始的批次列表(未来7天内开始) -->
|
||||
<select id="selectUpcomingBatches" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = '2' and deleted = 0
|
||||
and start_time between now() and date_add(now(), interval 7 day)
|
||||
order by start_time asc
|
||||
</select>
|
||||
|
||||
<!-- 查询即将结束的批次列表(未来7天内结束) -->
|
||||
<select id="selectEndingSoonBatches" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = '3' and deleted = 0
|
||||
and end_time between now() and date_add(now(), interval 7 day)
|
||||
order by end_time asc
|
||||
</select>
|
||||
|
||||
<!-- 根据批次类型查询批次列表 -->
|
||||
<select id="selectByBatchType" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_type = #{batchType} and deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询批次统计信息 -->
|
||||
<select id="selectBatchStatistics" resultType="map">
|
||||
select
|
||||
count(*) as total_batches,
|
||||
sum(case when batch_status = '1' then 1 else 0 end) as draft_batches,
|
||||
sum(case when batch_status = '2' then 1 else 0 end) as published_batches,
|
||||
sum(case when batch_status = '3' then 1 else 0 end) as active_batches,
|
||||
sum(case when batch_status = '4' then 1 else 0 end) as ended_batches,
|
||||
sum(case when batch_status = '5' then 1 else 0 end) as archived_batches,
|
||||
sum(total_students) as total_students,
|
||||
sum(submitted_count) as total_submitted,
|
||||
round(sum(submitted_count) * 100.0 / sum(total_students), 2) as overall_completion_rate
|
||||
from xg_collection_batch
|
||||
where deleted = 0
|
||||
<if test="batchId != null">
|
||||
and id = #{batchId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询批次完成率统计 -->
|
||||
<select id="selectCompletionRateStatistics" resultType="map">
|
||||
select
|
||||
id,
|
||||
batch_code,
|
||||
batch_name,
|
||||
total_students,
|
||||
submitted_count,
|
||||
completion_rate,
|
||||
case
|
||||
when completion_rate >= 90 then '优秀'
|
||||
when completion_rate >= 70 then '良好'
|
||||
when completion_rate >= 60 then '及格'
|
||||
else '不及格'
|
||||
end as completion_level
|
||||
from xg_collection_batch
|
||||
where id = #{batchId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询批次学院统计 -->
|
||||
<select id="selectCollegeStatistics" resultType="map">
|
||||
select
|
||||
bs.college_id,
|
||||
bs.college_name,
|
||||
count(*) as student_count,
|
||||
sum(case when bs.has_submitted = 1 then 1 else 0 end) as submitted_count,
|
||||
round(sum(case when bs.has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2) as completion_rate
|
||||
from xg_collection_batch_student bs
|
||||
where bs.batch_id = #{batchId} and bs.deleted = 0
|
||||
group by bs.college_id, bs.college_name
|
||||
order by completion_rate desc
|
||||
</select>
|
||||
|
||||
<!-- 查询批次专业统计 -->
|
||||
<select id="selectMajorStatistics" resultType="map">
|
||||
select
|
||||
bs.major_id,
|
||||
bs.major_name,
|
||||
count(*) as student_count,
|
||||
sum(case when bs.has_submitted = 1 then 1 else 0 end) as submitted_count,
|
||||
round(sum(case when bs.has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2) as completion_rate
|
||||
from xg_collection_batch_student bs
|
||||
where bs.batch_id = #{batchId} and bs.deleted = 0
|
||||
group by bs.major_id, bs.major_name
|
||||
order by completion_rate desc
|
||||
</select>
|
||||
|
||||
<!-- 查询批次班级统计 -->
|
||||
<select id="selectClassStatistics" resultType="map">
|
||||
select
|
||||
bs.class_id,
|
||||
bs.class_name,
|
||||
count(*) as student_count,
|
||||
sum(case when bs.has_submitted = 1 then 1 else 0 end) as submitted_count,
|
||||
round(sum(case when bs.has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2) as completion_rate
|
||||
from xg_collection_batch_student bs
|
||||
where bs.batch_id = #{batchId} and bs.deleted = 0
|
||||
group by bs.class_id, bs.class_name
|
||||
order by completion_rate desc
|
||||
</select>
|
||||
|
||||
<!-- 查询批次届别统计 -->
|
||||
<select id="selectGradeStatistics" resultType="map">
|
||||
select
|
||||
bs.grade,
|
||||
count(*) as student_count,
|
||||
sum(case when bs.has_submitted = 1 then 1 else 0 end) as submitted_count,
|
||||
round(sum(case when bs.has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2) as completion_rate
|
||||
from xg_collection_batch_student bs
|
||||
where bs.batch_id = #{batchId} and bs.deleted = 0
|
||||
group by bs.grade
|
||||
order by completion_rate desc
|
||||
</select>
|
||||
|
||||
<!-- 更新批次统计信息 -->
|
||||
<update id="updateBatchStatistics">
|
||||
update xg_collection_batch
|
||||
set total_students = (
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
),
|
||||
submitted_count = (
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and has_submitted = 1 and deleted = 0
|
||||
),
|
||||
completion_rate = (
|
||||
select round(
|
||||
sum(case when has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2
|
||||
)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
),
|
||||
update_time = now()
|
||||
where id = #{batchId}
|
||||
</update>
|
||||
|
||||
<!-- 批量更新批次状态 -->
|
||||
<update id="batchUpdateStatus">
|
||||
update xg_collection_batch
|
||||
set batch_status = #{batchStatus}, update_time = now()
|
||||
where id in
|
||||
<foreach collection="batchIds" item="batchId" open="(" separator="," close=")">
|
||||
#{batchId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 检查批次编码是否存在 -->
|
||||
<select id="existsBatchCode" resultType="boolean">
|
||||
select count(*) > 0
|
||||
from xg_collection_batch
|
||||
where batch_code = #{batchCode} and deleted = 0
|
||||
<if test="excludeId != null">
|
||||
and id != #{excludeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询用户有权限的批次列表 -->
|
||||
<select id="selectUserAuthorizedBatches" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where deleted = 0
|
||||
and (
|
||||
id in (
|
||||
select distinct batch_id
|
||||
from xg_collection_batch_permission
|
||||
where deleted = 0 and is_granted = 1
|
||||
and (
|
||||
user_id = #{userId}
|
||||
<if test="roleIds != null and roleIds.size() > 0">
|
||||
or role_id in
|
||||
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="collegeIds != null and collegeIds.size() > 0">
|
||||
or college_id in
|
||||
<foreach collection="collegeIds" item="collegeId" open="(" separator="," close=")">
|
||||
#{collegeId}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
)
|
||||
)
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询需要自动提醒的批次列表 -->
|
||||
<select id="selectBatchesNeedReminder" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = '3' and auto_reminder = 1 and deleted = 0
|
||||
and start_time <= now() and end_time >= now()
|
||||
order by start_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询需要自动关闭的批次列表 -->
|
||||
<select id="selectBatchesNeedAutoClose" resultMap="XgCollectionBatchResult">
|
||||
<include refid="selectXgCollectionBatchVo"/>
|
||||
where batch_status = '3' and deleted = 0
|
||||
and end_time < now()
|
||||
order by end_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-241
@@ -1,241 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgCollectionBatchStudentMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.vo.XgCollectionBatchStudentVo" id="XgCollectionBatchStudentResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="studentId" column="student_id"/>
|
||||
<result property="studentCode" column="student_code"/>
|
||||
<result property="studentName" column="student_name"/>
|
||||
<result property="collegeId" column="college_id"/>
|
||||
<result property="collegeName" column="college_name"/>
|
||||
<result property="majorId" column="major_id"/>
|
||||
<result property="majorName" column="major_name"/>
|
||||
<result property="classId" column="class_id"/>
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="grade" column="grade"/>
|
||||
<result property="canEdit" column="can_edit"/>
|
||||
<result property="hasSubmitted" column="has_submitted"/>
|
||||
<result property="submitTime" column="submit_time"/>
|
||||
<result property="lastEditTime" column="last_edit_time"/>
|
||||
<result property="editCount" column="edit_count"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXgCollectionBatchStudentVo">
|
||||
select id, batch_id, student_id, student_code, student_name, college_id, college_name,
|
||||
major_id, major_name, class_id, class_name, grade, can_edit, has_submitted,
|
||||
submit_time, last_edit_time, edit_count, tenant_id, create_by, create_time,
|
||||
update_by, update_time, deleted
|
||||
from xg_collection_batch_student
|
||||
</sql>
|
||||
|
||||
<!-- 重写分页查询方法,使用自定义ResultMap -->
|
||||
<select id="selectVoPage" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
${ew.customSqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据批次ID和学生ID查询关联信息 -->
|
||||
<select id="selectByBatchAndStudent" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and student_id = #{studentId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询指定批次的学生列表 -->
|
||||
<select id="selectByBatchId" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
order by college_name, major_name, class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定学生参与的批次列表 -->
|
||||
<select id="selectByStudentId" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where student_id = #{studentId} and deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询指定批次已提交的学生列表 -->
|
||||
<select id="selectSubmittedByBatchId" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and has_submitted = 1 and deleted = 0
|
||||
order by submit_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询指定批次未提交的学生列表 -->
|
||||
<select id="selectNotSubmittedByBatchId" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and has_submitted = 0 and deleted = 0
|
||||
order by college_name, major_name, class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定学院在指定批次的学生列表 -->
|
||||
<select id="selectByBatchAndCollege" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and college_id = #{collegeId} and deleted = 0
|
||||
order by major_name, class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定专业在指定批次的学生列表 -->
|
||||
<select id="selectByBatchAndMajor" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and major_id = #{majorId} and deleted = 0
|
||||
order by class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定班级在指定批次的学生列表 -->
|
||||
<select id="selectByBatchAndClass" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and class_id = #{classId} and deleted = 0
|
||||
order by student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询指定届别在指定批次的学生列表 -->
|
||||
<select id="selectByBatchAndGrade" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and grade = #{grade} and deleted = 0
|
||||
order by college_name, major_name, class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 批量插入批次学生关联 -->
|
||||
<insert id="batchInsert">
|
||||
insert into xg_collection_batch_student (
|
||||
batch_id, student_id, student_code, student_name, college_id, college_name,
|
||||
major_id, major_name, class_id, class_name, grade, can_edit, has_submitted,
|
||||
submit_time, last_edit_time, edit_count, tenant_id, create_by, create_time,
|
||||
update_by, update_time, deleted
|
||||
) values
|
||||
<foreach collection="batchStudents" item="item" separator=",">
|
||||
(
|
||||
#{item.batchId}, #{item.studentId}, #{item.studentCode}, #{item.studentName},
|
||||
#{item.collegeId}, #{item.collegeName}, #{item.majorId}, #{item.majorName},
|
||||
#{item.classId}, #{item.className}, #{item.grade}, #{item.canEdit},
|
||||
#{item.hasSubmitted}, #{item.submitTime}, #{item.lastEditTime}, #{item.editCount},
|
||||
#{item.tenantId}, #{item.createBy}, #{item.createTime}, #{item.updateBy},
|
||||
#{item.updateTime}, #{item.deleted}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新学生提交状态 -->
|
||||
<update id="batchUpdateSubmitStatus">
|
||||
update xg_collection_batch_student
|
||||
set has_submitted = #{hasSubmitted},
|
||||
submit_time = case when #{hasSubmitted} = 1 then now() else null end,
|
||||
update_time = now()
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
and student_id in
|
||||
<foreach collection="studentIds" item="studentId" open="(" separator="," close=")">
|
||||
#{studentId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 批量更新学生编辑权限 -->
|
||||
<update id="batchUpdateEditPermission">
|
||||
update xg_collection_batch_student
|
||||
set can_edit = #{canEdit}, update_time = now()
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
and student_id in
|
||||
<foreach collection="studentIds" item="studentId" open="(" separator="," close=")">
|
||||
#{studentId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 统计指定批次的学生数量 -->
|
||||
<select id="countByBatchId" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计指定批次已提交的学生数量 -->
|
||||
<select id="countSubmittedByBatchId" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and has_submitted = 1 and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计指定批次未提交的学生数量 -->
|
||||
<select id="countNotSubmittedByBatchId" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and has_submitted = 0 and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计指定学院在指定批次的学生数量 -->
|
||||
<select id="countByBatchAndCollege" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and college_id = #{collegeId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计指定专业在指定批次的学生数量 -->
|
||||
<select id="countByBatchAndMajor" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and major_id = #{majorId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计指定班级在指定批次的学生数量 -->
|
||||
<select id="countByBatchAndClass" resultType="int">
|
||||
select count(*)
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and class_id = #{classId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据批次ID删除所有学生关联 -->
|
||||
<delete id="deleteByBatchId">
|
||||
update xg_collection_batch_student
|
||||
set deleted = 1, update_time = now()
|
||||
where batch_id = #{batchId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据学生ID删除所有批次关联 -->
|
||||
<delete id="deleteByStudentId">
|
||||
update xg_collection_batch_student
|
||||
set deleted = 1, update_time = now()
|
||||
where student_id = #{studentId}
|
||||
</delete>
|
||||
|
||||
<!-- 检查学生是否已在指定批次中 -->
|
||||
<select id="existsByBatchAndStudent" resultType="boolean">
|
||||
select count(*) > 0
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and student_id = #{studentId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询学生在指定批次的提交状态 -->
|
||||
<select id="getSubmitStatusByBatchAndStudent" resultType="java.lang.Integer">
|
||||
select has_submitted
|
||||
from xg_collection_batch_student
|
||||
where batch_id = #{batchId} and student_id = #{studentId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询需要提醒的学生列表(未提交且在提醒范围内) -->
|
||||
<select id="selectStudentsNeedReminder" resultMap="XgCollectionBatchStudentResult">
|
||||
<include refid="selectXgCollectionBatchStudentVo"/>
|
||||
where batch_id = #{batchId} and has_submitted = 0 and can_edit = 1 and deleted = 0
|
||||
order by college_name, major_name, class_name, student_code
|
||||
</select>
|
||||
|
||||
<!-- 查询超时未提交的学生列表 -->
|
||||
<select id="selectOverdueStudents" resultMap="XgCollectionBatchStudentResult">
|
||||
select bs.*, cb.end_time
|
||||
from xg_collection_batch_student bs
|
||||
inner join xg_collection_batch cb on bs.batch_id = cb.id
|
||||
where bs.batch_id = #{batchId} and bs.has_submitted = 0 and bs.deleted = 0
|
||||
and cb.end_time < now() and cb.deleted = 0
|
||||
order by bs.college_name, bs.major_name, bs.class_name, bs.student_code
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-647
@@ -1,647 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgStatisticsAnalysisMapper">
|
||||
|
||||
<!-- 统计学生总数 -->
|
||||
<select id="countTotalStudents" resultType="java.lang.Long">
|
||||
SELECT COUNT(1) FROM xg_student_info WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计学院总数 -->
|
||||
<select id="countTotalColleges" resultType="java.lang.Long">
|
||||
SELECT COUNT(1) FROM xg_college_info WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计专业总数 -->
|
||||
<select id="countTotalMajors" resultType="java.lang.Long">
|
||||
SELECT COUNT(1) FROM xg_major_info WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 统计班级总数 -->
|
||||
<select id="countTotalClasses" resultType="java.lang.Long">
|
||||
SELECT COUNT(1) FROM xg_class_info WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 获取学院选项 -->
|
||||
<select id="getCollegeOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
college_name as label
|
||||
FROM xg_college_info
|
||||
WHERE deleted = 0
|
||||
ORDER BY college_name
|
||||
</select>
|
||||
|
||||
<!-- 获取专业选项 -->
|
||||
<select id="getMajorOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
major_name as label,
|
||||
college_code
|
||||
FROM xg_major_info
|
||||
WHERE deleted = 0
|
||||
<if test="collegeCode != null and collegeCode != ''">
|
||||
AND college_code = (
|
||||
SELECT college_code FROM xg_college_info WHERE id = #{collegeCode} AND deleted = 0
|
||||
)
|
||||
</if>
|
||||
ORDER BY major_name
|
||||
</select>
|
||||
|
||||
<!-- 获取班级选项 -->
|
||||
<select id="getClassOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
class_name as label,
|
||||
college_code,
|
||||
major_code
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
<if test="collegeCode != null and collegeCode != ''">
|
||||
AND college_code = (
|
||||
SELECT college_code FROM xg_college_info WHERE id = #{collegeCode} AND deleted = 0
|
||||
)
|
||||
</if>
|
||||
<if test="majorCode != null and majorCode != ''">
|
||||
AND major_code = (
|
||||
SELECT major_code FROM xg_major_info WHERE id = #{majorCode} AND deleted = 0
|
||||
)
|
||||
</if>
|
||||
ORDER BY class_name
|
||||
</select>
|
||||
|
||||
<!-- 通用查询条件 -->
|
||||
<sql id="commonConditions">
|
||||
<where>
|
||||
s.deleted = 0
|
||||
<if test="conditions.startTime != null">
|
||||
and s.create_time >= #{conditions.startTime}
|
||||
</if>
|
||||
<if test="conditions.endTime != null">
|
||||
and s.create_time <= #{conditions.endTime}
|
||||
</if>
|
||||
<if test="conditions.collegeIds != null and conditions.collegeIds.size() > 0">
|
||||
and c.college_code in
|
||||
<foreach collection="conditions.collegeIds" item="collegeId" open="(" separator="," close=")">
|
||||
(select college_code from xg_college_info where id = #{collegeId})
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.majorIds != null and conditions.majorIds.size() > 0">
|
||||
and c.major_code in
|
||||
<foreach collection="conditions.majorIds" item="majorId" open="(" separator="," close=")">
|
||||
(select major_code from xg_major_info where id = #{majorId})
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.classIds != null and conditions.classIds.size() > 0">
|
||||
and c.id in
|
||||
<foreach collection="conditions.classIds" item="classId" open="(" separator="," close=")">
|
||||
#{classId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.grades != null and conditions.grades.size() > 0">
|
||||
and s.grade in
|
||||
<foreach collection="conditions.grades" item="grade" open="(" separator="," close=")">
|
||||
#{grade}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.genders != null and conditions.genders.size() > 0">
|
||||
and s.gender in
|
||||
<foreach collection="conditions.genders" item="gender" open="(" separator="," close=")">
|
||||
#{gender}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.politicalStatuses != null and conditions.politicalStatuses.size() > 0">
|
||||
and s.political_status in
|
||||
<foreach collection="conditions.politicalStatuses" item="politicalStatus" open="(" separator="," close=")">
|
||||
#{politicalStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.nationalities != null and conditions.nationalities.size() > 0">
|
||||
and s.nation in
|
||||
<foreach collection="conditions.nationalities" item="nationality" open="(" separator="," close=")">
|
||||
#{nationality}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.studentStatuses != null and conditions.studentStatuses.size() > 0">
|
||||
and s.student_status in
|
||||
<foreach collection="conditions.studentStatuses" item="studentStatus" open="(" separator="," close=")">
|
||||
#{studentStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="conditions.trainingTypes != null and conditions.trainingTypes.size() > 0">
|
||||
and s.training_type in
|
||||
<foreach collection="conditions.trainingTypes" item="trainingType" open="(" separator="," close=")">
|
||||
#{trainingType}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 按学院统计学生数量 -->
|
||||
<select id="statisticsByCollege" parameterType="map" resultType="map">
|
||||
select
|
||||
col.college_name as name,
|
||||
count(*) as count,
|
||||
col.id as college_id
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_college_info col on c.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by col.id, col.college_name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按专业统计学生数量 -->
|
||||
<select id="statisticsByMajor" parameterType="map" resultType="map">
|
||||
select
|
||||
maj.major_name as name,
|
||||
count(*) as count,
|
||||
maj.id as major_id,
|
||||
col.college_name as college_name
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by maj.id, maj.major_name, col.college_name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按班级统计学生数量 -->
|
||||
<select id="statisticsByClass" parameterType="map" resultType="map">
|
||||
select
|
||||
c.class_name as name,
|
||||
count(*) as count,
|
||||
c.id as class_id,
|
||||
maj.major_name as major_name,
|
||||
col.college_name as college_name
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by c.id, c.class_name, maj.major_name, col.college_name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按年级统计学生数量 -->
|
||||
<select id="statisticsByGrade" parameterType="map" resultType="map">
|
||||
select
|
||||
s.grade as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.grade
|
||||
order by s.grade desc
|
||||
</select>
|
||||
|
||||
<!-- 按性别统计学生数量 -->
|
||||
<select id="statisticsByGender" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.gender = 'M' then '男'
|
||||
when s.gender = 'F' then '女'
|
||||
else '未知'
|
||||
end as name,
|
||||
s.gender as gender,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.gender
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按年龄段统计学生数量 -->
|
||||
<select id="statisticsByAge" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when age < 18 then '18岁以下'
|
||||
when age between 18 and 20 then '18-20岁'
|
||||
when age between 21 and 23 then '21-23岁'
|
||||
when age between 24 and 26 then '24-26岁'
|
||||
when age > 26 then '26岁以上'
|
||||
else '未知'
|
||||
end as name,
|
||||
count(*) as count
|
||||
from (
|
||||
select
|
||||
case
|
||||
when s.birth_date is not null then year(curdate()) - year(s.birth_date)
|
||||
else null
|
||||
end as age
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
) age_data
|
||||
group by name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按政治面貌统计学生数量 -->
|
||||
<select id="statisticsByPoliticalStatus" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.political_status = '01' then '中共党员'
|
||||
when s.political_status = '02' then '中共预备党员'
|
||||
when s.political_status = '03' then '共青团员'
|
||||
when s.political_status = '04' then '民革党员'
|
||||
when s.political_status = '05' then '民盟盟员'
|
||||
when s.political_status = '06' then '民建会员'
|
||||
when s.political_status = '07' then '民进会员'
|
||||
when s.political_status = '08' then '农工党党员'
|
||||
when s.political_status = '09' then '致公党党员'
|
||||
when s.political_status = '10' then '九三学社社员'
|
||||
when s.political_status = '11' then '台盟盟员'
|
||||
when s.political_status = '12' then '无党派人士'
|
||||
when s.political_status = '13' then '群众'
|
||||
else '其他'
|
||||
end as name,
|
||||
s.political_status as political_status,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.political_status
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按民族统计学生数量 -->
|
||||
<select id="statisticsByNationality" parameterType="map" resultType="map">
|
||||
select
|
||||
s.nation as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.nation
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按生源地统计学生数量 -->
|
||||
<select id="statisticsBySourceRegion" parameterType="map" resultType="map">
|
||||
select
|
||||
s.source_region as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.source_region
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按血型统计学生数量 -->
|
||||
<select id="statisticsByBloodType" parameterType="map" resultType="map">
|
||||
select
|
||||
s.blood_type as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
and s.blood_type is not null and s.blood_type != ''
|
||||
group by s.blood_type
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按宗教信仰统计学生数量 -->
|
||||
<select id="statisticsByReligion" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.religion is null or s.religion = '' then '无宗教信仰'
|
||||
else s.religion
|
||||
end as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.religion
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按学籍状态统计学生数量 -->
|
||||
<select id="statisticsByStudentStatus" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.student_status = '1' then '在校'
|
||||
when s.student_status = '2' then '休学'
|
||||
when s.student_status = '3' then '退学'
|
||||
when s.student_status = '4' then '毕业'
|
||||
when s.student_status = '5' then '肄业'
|
||||
when s.student_status = '6' then '转学'
|
||||
else '其他'
|
||||
end as name,
|
||||
s.student_status as student_status,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.student_status
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按培养方式统计学生数量 -->
|
||||
<select id="statisticsByTrainingType" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.training_type = '全日制' then '全日制'
|
||||
when s.training_type = '非全日制' then '非全日制'
|
||||
when s.training_type = '在职' then '在职'
|
||||
when s.training_type = '函授' then '函授'
|
||||
when s.training_type = '夜大' then '夜大'
|
||||
when s.training_type = '1' then '全日制'
|
||||
when s.training_type = '2' then '非全日制'
|
||||
else s.training_type
|
||||
end as name,
|
||||
s.training_type as training_type,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
group by s.training_type
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按身高范围统计学生数量 -->
|
||||
<select id="statisticsByHeight" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.height < 150 then '150cm以下'
|
||||
when s.height between 150 and 160 then '150-160cm'
|
||||
when s.height between 161 and 170 then '161-170cm'
|
||||
when s.height between 171 and 180 then '171-180cm'
|
||||
when s.height > 180 then '180cm以上'
|
||||
else '未知'
|
||||
end as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
and s.height is not null and s.height > 0
|
||||
group by name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按体重范围统计学生数量 -->
|
||||
<select id="statisticsByWeight" parameterType="map" resultType="map">
|
||||
select
|
||||
case
|
||||
when s.weight < 45 then '45kg以下'
|
||||
when s.weight between 45 and 55 then '45-55kg'
|
||||
when s.weight between 56 and 65 then '56-65kg'
|
||||
when s.weight between 66 and 75 then '66-75kg'
|
||||
when s.weight > 75 then '75kg以上'
|
||||
else '未知'
|
||||
end as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
and s.weight is not null and s.weight > 0
|
||||
group by name
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 多维度组合统计 -->
|
||||
<select id="statisticsByMultiDimensions" parameterType="map" resultType="map">
|
||||
select
|
||||
<foreach collection="dimensions" item="dimension" separator=",">
|
||||
<choose>
|
||||
<when test="dimension == 'gender'">
|
||||
case when s.gender = 'M' then '男' when s.gender = 'F' then '女' else '未知' end as gender
|
||||
</when>
|
||||
<when test="dimension == 'grade'">
|
||||
s.grade as grade
|
||||
</when>
|
||||
<when test="dimension == 'college'">
|
||||
col.college_name as college
|
||||
</when>
|
||||
<when test="dimension == 'major'">
|
||||
maj.major_name as major
|
||||
</when>
|
||||
<when test="dimension == 'class'">
|
||||
c.class_name as class
|
||||
</when>
|
||||
<when test="dimension == 'political_status'">
|
||||
case
|
||||
when s.political_status = '01' then '中共党员'
|
||||
when s.political_status = '02' then '中共预备党员'
|
||||
when s.political_status = '03' then '共青团员'
|
||||
when s.political_status = '13' then '群众'
|
||||
else '其他'
|
||||
end as political_status
|
||||
</when>
|
||||
<when test="dimension == 'nationality'">
|
||||
s.nation as nationality
|
||||
</when>
|
||||
<when test="dimension == 'student_status'">
|
||||
case
|
||||
when s.student_status = '1' then '在校'
|
||||
when s.student_status = '2' then '休学'
|
||||
when s.student_status = '3' then '退学'
|
||||
when s.student_status = '4' then '毕业'
|
||||
else '其他'
|
||||
end as student_status
|
||||
</when>
|
||||
<when test="dimension == 'training_type'">
|
||||
case
|
||||
when s.training_type = '全日制' then '全日制'
|
||||
when s.training_type = '非全日制' then '非全日制'
|
||||
when s.training_type = '在职' then '在职'
|
||||
when s.training_type = '函授' then '函授'
|
||||
when s.training_type = '夜大' then '夜大'
|
||||
when s.training_type = '1' then '全日制'
|
||||
when s.training_type = '2' then '非全日制'
|
||||
else s.training_type
|
||||
end as training_type
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by
|
||||
<foreach collection="dimensions" item="dimension" separator=",">
|
||||
<choose>
|
||||
<when test="dimension == 'gender'">s.gender</when>
|
||||
<when test="dimension == 'grade'">s.grade</when>
|
||||
<when test="dimension == 'college'">col.college_name</when>
|
||||
<when test="dimension == 'major'">maj.major_name</when>
|
||||
<when test="dimension == 'class'">c.class_name</when>
|
||||
<when test="dimension == 'political_status'">s.political_status</when>
|
||||
<when test="dimension == 'nationality'">s.nation</when>
|
||||
<when test="dimension == 'student_status'">s.student_status</when>
|
||||
<when test="dimension == 'training_type'">s.training_type</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
order by count(*) desc
|
||||
</select>
|
||||
|
||||
<!-- 按时间趋势统计学生数量 -->
|
||||
<select id="statisticsByTimeTrend" parameterType="map" resultType="map">
|
||||
select
|
||||
date_format(s.${timeField}, #{timeFormat}) as name,
|
||||
count(*) as count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
and s.${timeField} is not null
|
||||
group by date_format(s.${timeField}, #{timeFormat})
|
||||
order by name
|
||||
</select>
|
||||
|
||||
<!-- 获取学生信息汇总报表 -->
|
||||
<select id="getStudentSummaryReport" parameterType="map" resultType="map">
|
||||
select
|
||||
col.college_name as college_name,
|
||||
maj.major_name as major_name,
|
||||
c.class_name as class_name,
|
||||
s.grade as grade,
|
||||
count(*) as total_students,
|
||||
sum(case when s.gender = 'M' then 1 else 0 end) as male_count,
|
||||
sum(case when s.gender = 'F' then 1 else 0 end) as female_count,
|
||||
sum(case when s.political_status in ('01', '02') then 1 else 0 end) as party_member_count,
|
||||
sum(case when s.political_status = '03' then 1 else 0 end) as youth_league_count,
|
||||
sum(case when s.student_status = '1' then 1 else 0 end) as active_count,
|
||||
sum(case when s.student_status != '1' then 1 else 0 end) as inactive_count
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by col.college_name, maj.major_name, c.class_name, s.grade
|
||||
order by col.college_name, maj.major_name, c.class_name
|
||||
</select>
|
||||
|
||||
<!-- 获取班级统计报表 -->
|
||||
<select id="getClassStatisticsReport" parameterType="map" resultType="map">
|
||||
select
|
||||
c.id as class_id,
|
||||
c.class_name as class_name,
|
||||
c.class_code as class_code,
|
||||
maj.major_name as major_name,
|
||||
col.college_name as college_name,
|
||||
count(*) as total_students,
|
||||
sum(case when s.gender = 'M' then 1 else 0 end) as male_count,
|
||||
sum(case when s.gender = 'F' then 1 else 0 end) as female_count,
|
||||
round(sum(case when s.gender = 'M' then 1 else 0 end) / count(*) * 100, 2) as male_ratio,
|
||||
round(sum(case when s.gender = 'F' then 1 else 0 end) / count(*) * 100, 2) as female_ratio,
|
||||
sum(case when s.political_status in ('01', '02') then 1 else 0 end) as party_member_count,
|
||||
sum(case when s.political_status = '03' then 1 else 0 end) as youth_league_count,
|
||||
c.head_teacher as head_teacher,
|
||||
c.counselor as counselor
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by c.id, c.class_name, c.class_code, maj.major_name, col.college_name, c.head_teacher, c.counselor
|
||||
order by col.college_name, maj.major_name, c.class_name
|
||||
</select>
|
||||
|
||||
<!-- 获取学院统计报表 -->
|
||||
<select id="getCollegeStatisticsReport" parameterType="map" resultType="map">
|
||||
select
|
||||
col.college_name as college_name,
|
||||
count(distinct maj.major_id) as major_count,
|
||||
count(distinct c.id) as class_count,
|
||||
count(*) as total_students,
|
||||
sum(case when s.gender = 'M' then 1 else 0 end) as male_count,
|
||||
sum(case when s.gender = 'F' then 1 else 0 end) as female_count,
|
||||
round(sum(case when s.gender = 'M' then 1 else 0 end) / count(*) * 100, 2) as male_ratio,
|
||||
round(sum(case when s.gender = 'F' then 1 else 0 end) / count(*) * 100, 2) as female_ratio,
|
||||
sum(case when s.political_status in ('01', '02') then 1 else 0 end) as party_member_count,
|
||||
sum(case when s.political_status = '03' then 1 else 0 end) as youth_league_count,
|
||||
round(sum(case when s.political_status in ('01', '02') then 1 else 0 end) / count(*) * 100, 2) as party_member_ratio,
|
||||
round(sum(case when s.political_status = '03' then 1 else 0 end) / count(*) * 100, 2) as youth_league_ratio
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by col.college_name
|
||||
order by total_students desc
|
||||
</select>
|
||||
|
||||
<!-- 获取困难学生统计报表 -->
|
||||
<select id="getPoorStudentReport" parameterType="map" resultType="map">
|
||||
select
|
||||
col.college_name as college_name,
|
||||
maj.major_name as major_name,
|
||||
c.class_name as class_name,
|
||||
count(*) as total_students,
|
||||
sum(case when s.family_economic_status = '困难' then 1 else 0 end) as poor_count,
|
||||
sum(case when s.family_economic_status = '特困' then 1 else 0 end) as very_poor_count,
|
||||
sum(case when s.family_economic_status in ('困难', '特困') then 1 else 0 end) as total_poor_count,
|
||||
round(sum(case when s.family_economic_status in ('困难', '特困') then 1 else 0 end) / count(*) * 100, 2) as poor_ratio
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by col.college_name, maj.major_name, c.class_name
|
||||
having total_poor_count > 0
|
||||
order by poor_ratio desc, total_poor_count desc
|
||||
</select>
|
||||
|
||||
<!-- 获取特殊群体统计报表 -->
|
||||
<select id="getSpecialGroupReport" parameterType="map" resultType="map">
|
||||
select
|
||||
col.college_name as college_name,
|
||||
maj.major_name as major_name,
|
||||
c.class_name as class_name,
|
||||
count(*) as total_students,
|
||||
sum(case when s.nation != '汉族' then 1 else 0 end) as minority_count,
|
||||
sum(case when s.is_disabled = 1 then 1 else 0 end) as disabled_count,
|
||||
sum(case when s.is_left_behind_child = 1 then 1 else 0 end) as left_behind_count,
|
||||
sum(case when s.is_orphan = 1 then 1 else 0 end) as orphan_count,
|
||||
sum(case when s.is_single_child = 1 then 1 else 0 end) as single_parent_count,
|
||||
sum(case when s.nation != '汉族' or s.is_disabled = 1 or s.is_left_behind_child = 1 or s.is_orphan = 1 or s.is_single_child = 1 then 1 else 0 end) as special_group_count,
|
||||
round(sum(case when s.nation != '汉族' or s.is_disabled = 1 or s.is_left_behind_child = 1 or s.is_orphan = 1 or s.is_single_child = 1 then 1 else 0 end) / count(*) * 100, 2) as special_group_ratio
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
left join xg_major_info maj on c.major_code = maj.major_code
|
||||
left join xg_college_info col on maj.college_code = col.college_code
|
||||
<include refid="commonConditions"/>
|
||||
group by col.college_name, maj.major_name, c.class_name
|
||||
having special_group_count > 0
|
||||
order by special_group_ratio desc, special_group_count desc
|
||||
</select>
|
||||
|
||||
<!-- 获取统计摘要信息 -->
|
||||
<select id="getStatisticsSummary" parameterType="map" resultType="map">
|
||||
select
|
||||
count(*) as total_students,
|
||||
count(distinct c.college_code) as total_colleges,
|
||||
count(distinct c.major_code) as total_majors,
|
||||
count(distinct c.id) as total_classes,
|
||||
count(distinct s.grade) as total_grades,
|
||||
sum(case when s.gender = 'M' then 1 else 0 end) as male_count,
|
||||
sum(case when s.gender = 'F' then 1 else 0 end) as female_count,
|
||||
round(sum(case when s.gender = 'M' then 1 else 0 end) / count(*) * 100, 2) as male_ratio,
|
||||
round(sum(case when s.gender = 'F' then 1 else 0 end) / count(*) * 100, 2) as female_ratio,
|
||||
sum(case when s.political_status in ('01', '02') then 1 else 0 end) as party_member_count,
|
||||
sum(case when s.political_status = '03' then 1 else 0 end) as youth_league_count,
|
||||
round(sum(case when s.political_status in ('01', '02') then 1 else 0 end) / count(*) * 100, 2) as party_member_ratio,
|
||||
round(sum(case when s.political_status = '03' then 1 else 0 end) / count(*) * 100, 2) as youth_league_ratio,
|
||||
sum(case when s.nation != '汉族' then 1 else 0 end) as minority_count,
|
||||
round(sum(case when s.nation != '汉族' then 1 else 0 end) / count(*) * 100, 2) as minority_ratio,
|
||||
sum(case when s.student_status = '1' then 1 else 0 end) as active_count,
|
||||
sum(case when s.student_status != '1' then 1 else 0 end) as inactive_count,
|
||||
round(sum(case when s.student_status = '1' then 1 else 0 end) / count(*) * 100, 2) as active_ratio
|
||||
from xg_student_info s
|
||||
left join xg_class_info c on s.class_code = c.class_code
|
||||
<include refid="commonConditions"/>
|
||||
</select>
|
||||
|
||||
<!-- 自定义SQL统计查询 -->
|
||||
<select id="customStatisticsQuery" parameterType="map" resultType="map">
|
||||
${sqlTemplate}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-257
@@ -1,257 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgStatisticsConfigMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.XgStatisticsConfig" id="XgStatisticsConfigResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="configName" column="config_name"/>
|
||||
<result property="configCode" column="config_code"/>
|
||||
<result property="configType" column="config_type"/>
|
||||
<result property="configContent" column="config_content"/>
|
||||
<result property="isSystem" column="is_system"/>
|
||||
<result property="isEnabled" column="is_enabled"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="viewPermissions" column="view_permissions"/>
|
||||
<result property="editPermissions" column="edit_permissions"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXgStatisticsConfigVo">
|
||||
select id, tenant_id, config_name, config_code, config_type, config_content, is_system, is_enabled, sort_order, view_permissions, edit_permissions, remark, create_by, create_time, update_by, update_time, deleted
|
||||
from xg_statistics_config
|
||||
</sql>
|
||||
|
||||
<select id="selectVoList" parameterType="org.dromara.xg.domain.XgStatisticsConfig" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
and config_name like concat('%', #{configName}, '%')
|
||||
</if>
|
||||
<if test="configCode != null and configCode != ''">
|
||||
and config_code = #{configCode}
|
||||
</if>
|
||||
<if test="configType != null and configType != ''">
|
||||
and config_type = #{configType}
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
and is_system = #{isSystem}
|
||||
</if>
|
||||
<if test="isEnabled != null">
|
||||
and is_enabled = #{isEnabled}
|
||||
</if>
|
||||
and deleted = 0
|
||||
</where>
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectVoById" parameterType="Long" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where id = #{id} and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByConfigCode" parameterType="String" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where config_code = #{configCode} and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByConfigType" parameterType="String" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where config_type = #{configType} and deleted = 0
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEnabledConfigs" parameterType="String" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where is_enabled = 1 and deleted = 0
|
||||
<if test="configType != null and configType != ''">
|
||||
and config_type = #{configType}
|
||||
</if>
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSystemConfigs" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where is_system = 1 and deleted = 0
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectUserConfigs" parameterType="Long" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where is_system = 0 and create_by = #{userId} and deleted = 0
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAccessibleConfigs" resultType="org.dromara.xg.domain.vo.XgStatisticsConfigVo">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where deleted = 0
|
||||
and (
|
||||
is_system = 1
|
||||
or create_by = #{userId}
|
||||
or view_permissions is null
|
||||
or view_permissions = ''
|
||||
<if test="roles != null and roles.size() > 0">
|
||||
or exists (
|
||||
select 1 from (
|
||||
select trim(substring_index(substring_index(view_permissions, ',', numbers.n), ',', -1)) as role
|
||||
from (
|
||||
select 1 n union all select 2 union all select 3 union all select 4 union all select 5
|
||||
union all select 6 union all select 7 union all select 8 union all select 9 union all select 10
|
||||
) numbers
|
||||
where char_length(view_permissions) - char_length(replace(view_permissions, ',', '')) >= numbers.n - 1
|
||||
) roles_split
|
||||
where roles_split.role in
|
||||
<foreach collection="roles" item="role" open="(" separator="," close=")">
|
||||
#{role}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
)
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<update id="updateSortOrder">
|
||||
update xg_statistics_config
|
||||
set sort_order = #{sortOrder}, update_time = now()
|
||||
where id = #{configId} and deleted = 0
|
||||
</update>
|
||||
|
||||
<update id="batchUpdateStatus">
|
||||
update xg_statistics_config
|
||||
set is_enabled = #{isEnabled}, update_time = now()
|
||||
where id in
|
||||
<foreach collection="configIds" item="configId" open="(" separator="," close=")">
|
||||
#{configId}
|
||||
</foreach>
|
||||
and deleted = 0
|
||||
</update>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into xg_statistics_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
<if test="configName != null">config_name,</if>
|
||||
<if test="configCode != null">config_code,</if>
|
||||
<if test="configType != null">config_type,</if>
|
||||
<if test="configContent != null">config_content,</if>
|
||||
<if test="isSystem != null">is_system,</if>
|
||||
<if test="isEnabled != null">is_enabled,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
<if test="viewPermissions != null">view_permissions,</if>
|
||||
<if test="editPermissions != null">edit_permissions,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time,
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
update_time,
|
||||
deleted
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
<if test="configName != null">#{configName},</if>
|
||||
<if test="configCode != null">#{configCode},</if>
|
||||
<if test="configType != null">#{configType},</if>
|
||||
<if test="configContent != null">#{configContent},</if>
|
||||
<if test="isSystem != null">#{isSystem},</if>
|
||||
<if test="isEnabled != null">#{isEnabled},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
<if test="viewPermissions != null">#{viewPermissions},</if>
|
||||
<if test="editPermissions != null">#{editPermissions},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
now(),
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
now(),
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateById" parameterType="org.dromara.xg.domain.XgStatisticsConfig">
|
||||
update xg_statistics_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||
<if test="configName != null">config_name = #{configName},</if>
|
||||
<if test="configCode != null">config_code = #{configCode},</if>
|
||||
<if test="configType != null">config_type = #{configType},</if>
|
||||
<if test="configContent != null">config_content = #{configContent},</if>
|
||||
<if test="isSystem != null">is_system = #{isSystem},</if>
|
||||
<if test="isEnabled != null">is_enabled = #{isEnabled},</if>
|
||||
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||
<if test="viewPermissions != null">view_permissions = #{viewPermissions},</if>
|
||||
<if test="editPermissions != null">edit_permissions = #{editPermissions},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id} and deleted = 0
|
||||
</update>
|
||||
|
||||
<delete id="deleteById" parameterType="Long">
|
||||
update xg_statistics_config set deleted = 1 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds" parameterType="Long">
|
||||
update xg_statistics_config set deleted = 1 where id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectById" parameterType="Long" resultMap="XgStatisticsConfigResult">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
where id = #{id} and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectList" parameterType="org.dromara.xg.domain.XgStatisticsConfig" resultMap="XgStatisticsConfigResult">
|
||||
<include refid="selectXgStatisticsConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
and config_name like concat('%', #{configName}, '%')
|
||||
</if>
|
||||
<if test="configCode != null and configCode != ''">
|
||||
and config_code = #{configCode}
|
||||
</if>
|
||||
<if test="configType != null and configType != ''">
|
||||
and config_type = #{configType}
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
and is_system = #{isSystem}
|
||||
</if>
|
||||
<if test="isEnabled != null">
|
||||
and is_enabled = #{isEnabled}
|
||||
</if>
|
||||
and deleted = 0
|
||||
</where>
|
||||
order by sort_order asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCount" parameterType="org.dromara.xg.domain.XgStatisticsConfig" resultType="long">
|
||||
select count(*) from xg_statistics_config
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
and config_name like concat('%', #{configName}, '%')
|
||||
</if>
|
||||
<if test="configCode != null and configCode != ''">
|
||||
and config_code = #{configCode}
|
||||
</if>
|
||||
<if test="configType != null and configType != ''">
|
||||
and config_type = #{configType}
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
and is_system = #{isSystem}
|
||||
</if>
|
||||
<if test="isEnabled != null">
|
||||
and is_enabled = #{isEnabled}
|
||||
</if>
|
||||
and deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
-468
@@ -1,468 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgStudentInfoMapper">
|
||||
|
||||
<resultMap type="org.dromara.xg.domain.vo.XgStudentInfoVo" id="XgStudentInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="studentNo" column="student_no"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="name" column="name"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="nameEnglish" column="name_english"/>
|
||||
<result property="formerName" column="former_name"/>
|
||||
<result property="namePinyin" column="name_pinyin"/>
|
||||
<result property="maritalStatus" column="marital_status"/>
|
||||
<result property="photoPath" column="photo_path"/>
|
||||
<result property="enrollmentYear" column="enrollment_year"/>
|
||||
<result property="admissionCategory" column="admission_category"/>
|
||||
-->
|
||||
<result property="gender" column="gender"/>
|
||||
<result property="birthDate" column="birth_date"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="nation" column="nation"/>
|
||||
<result property="religion" column="religion"/>
|
||||
<result property="photoUrl" column="photo_url"/>
|
||||
<result property="schoolSystem" column="school_system"/>
|
||||
<result property="educationLevel" column="education_level"/>
|
||||
<result property="trainingType" column="training_type"/>
|
||||
<result property="sourceRegion" column="source_region"/>
|
||||
<result property="middleSchool" column="middle_school"/>
|
||||
-->
|
||||
<result property="politicalStatus" column="political_status"/>
|
||||
<result property="studentStatus" column="student_status"/>
|
||||
<result property="enrollmentDate" column="enrollment_date"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="majorCode" column="major_code"/>
|
||||
<result property="majorName" column="major_name"/>
|
||||
<result property="classCode" column="class_code"/>
|
||||
<result property="grade" column="grade"/>
|
||||
<result property="collegeCode" column="college_code"/>
|
||||
<result property="counselorId" column="counselor_id"/>
|
||||
<result property="counselorName" column="counselor_name"/>
|
||||
<result property="classTeacherId" column="class_teacher_id"/>
|
||||
<result property="classTeacherName" column="class_teacher_name"/>
|
||||
-->
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="collegeName" column="college_name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="qq" column="qq"/>
|
||||
<result property="wechat" column="wechat"/>
|
||||
<result property="homeAddress" column="home_address"/>
|
||||
<result property="postalCode" column="postal_code"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="currentAddress" column="current_address"/>
|
||||
<result property="householdRegisterType" column="household_register_type"/>
|
||||
<result property="hukouLocation" column="hukou_location"/>
|
||||
<result property="dormitoryBuilding" column="dormitory_building"/>
|
||||
<result property="dormitoryRoom" column="dormitory_room"/>
|
||||
-->
|
||||
<!-- 启用紧急联系人和家庭信息字段映射 -->
|
||||
<result property="emergencyContactName" column="emergency_contact_name"/>
|
||||
<result property="emergencyContactPhone" column="emergency_contact_phone"/>
|
||||
<result property="emergencyContactRelation" column="emergency_contact_relation"/>
|
||||
<result property="fatherName" column="father_name"/>
|
||||
<result property="fatherPhone" column="father_phone"/>
|
||||
<result property="fatherWorkUnit" column="father_work_unit"/>
|
||||
<result property="motherName" column="mother_name"/>
|
||||
<result property="motherPhone" column="mother_phone"/>
|
||||
<result property="motherWorkUnit" column="mother_work_unit"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="guardianName" column="guardian_name"/>
|
||||
<result property="guardianPhone" column="guardian_phone"/>
|
||||
<result property="guardianRelation" column="guardian_relation"/>
|
||||
-->
|
||||
<!-- 启用家庭经济信息字段映射 -->
|
||||
<result property="familyIncome" column="family_income"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="familyEconomicStatus" column="family_economic_status"/>
|
||||
-->
|
||||
<result property="familyMembers" column="family_members"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="weight" column="weight"/>
|
||||
<result property="bloodType" column="blood_type"/>
|
||||
<!-- 启用健康信息字段映射 -->
|
||||
<result property="healthStatus" column="health_status"/>
|
||||
<result property="specialCondition" column="special_condition"/>
|
||||
<result property="medicalHistory" column="medical_history"/>
|
||||
<result property="allergies" column="allergies"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="disabilityType" column="disability_type"/>
|
||||
<result property="disabilityLevel" column="disability_level"/>
|
||||
-->
|
||||
<!-- 启用银行信息字段映射 -->
|
||||
<result property="bankCardNo" column="bank_card_no"/>
|
||||
<result property="bankName" column="bank_name"/>
|
||||
<result property="bankBranch" column="bank_branch"/>
|
||||
<!-- 启用银行信息和特殊情况字段映射 -->
|
||||
<result property="cardHolderName" column="card_holder_name"/>
|
||||
<result property="isPoorStudent" column="is_poor_student"/>
|
||||
<result property="isMinority" column="is_minority"/>
|
||||
<result property="isDisabled" column="is_disabled"/>
|
||||
<result property="isOrphan" column="is_orphan"/>
|
||||
<result property="isLeftBehindChild" column="is_left_behind_child"/>
|
||||
<result property="isSingleChild" column="is_single_child"/>
|
||||
<!-- 以下字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="hasLoan" column="has_loan"/>
|
||||
<result property="loanAmount" column="loan_amount"/>
|
||||
-->
|
||||
<!-- 启用扩展信息字段映射 -->
|
||||
<result property="specialties" column="specialties"/>
|
||||
<result property="awards" column="awards"/>
|
||||
<result property="violations" column="violations"/>
|
||||
<result property="socialActivities" column="social_activities"/>
|
||||
<result property="infoStatus" column="info_status"/>
|
||||
<result property="dataSource" column="data_source"/>
|
||||
<result property="lastBatchId" column="last_batch_id"/>
|
||||
<result property="lastAuditTime" column="last_audit_time"/>
|
||||
<result property="isComplete" column="is_complete"/>
|
||||
<result property="completionRate" column="completion_rate"/>
|
||||
<!-- 以下扩展字段在当前数据库中不存在,暂时注释掉 -->
|
||||
<!--
|
||||
<result property="extField1" column="ext_field1"/>
|
||||
<result property="extField2" column="ext_field2"/>
|
||||
<result property="extField3" column="ext_field3"/>
|
||||
<result property="extField4" column="ext_field4"/>
|
||||
<result property="extField5" column="ext_field5"/>
|
||||
-->
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 自定义分页查询方法 -->
|
||||
<select id="selectVoPage" resultMap="XgStudentInfoResult">
|
||||
<!-- 调试信息:开始执行自定义分页查询 -->
|
||||
SELECT
|
||||
id, student_no, name, gender, birth_date, phone, email,
|
||||
id_card, political_status, class_name,
|
||||
grade, college_name, enrollment_date, student_status, remark,
|
||||
create_by, create_time, update_by, update_time,
|
||||
deleted, tenant_id, home_address,
|
||||
-- 健康信息字段(确实存在的)
|
||||
height, weight, blood_type, health_status, allergies, medical_history, special_condition,
|
||||
-- 父母信息字段(确实存在的)
|
||||
father_name, father_phone, father_work_unit,
|
||||
mother_name, mother_phone, mother_work_unit,
|
||||
-- 紧急联系人字段(确实存在的)
|
||||
emergency_contact_name, emergency_contact_phone, emergency_contact_relation,
|
||||
-- 银行信息字段(确实存在的)
|
||||
bank_card_no, bank_name, bank_branch, card_holder_name,
|
||||
-- 特殊情况字段(确实存在的)
|
||||
is_poor_student, is_minority, is_disabled, is_orphan, is_left_behind_child, is_single_child,
|
||||
-- 扩展信息字段(确实存在的)
|
||||
specialties, family_income, family_members, social_activities, awards, violations
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0 AND tenant_id = '000000'
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and !ew.sqlSegment.trim().toUpperCase().startsWith('ORDER BY')">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.sqlSegment.trim().toUpperCase().startsWith('ORDER BY')">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 自定义详情查询方法 - 使用正确的ResultMap -->
|
||||
<select id="selectVoById" parameterType="java.io.Serializable" resultMap="XgStudentInfoResult">
|
||||
SELECT
|
||||
id, student_no, name, gender, birth_date, phone, email,
|
||||
id_card, political_status, class_name,
|
||||
grade, college_name, enrollment_date, student_status, remark,
|
||||
create_by, create_time, update_by, update_time,
|
||||
deleted, tenant_id, home_address,
|
||||
-- 健康信息字段(确实存在的)
|
||||
height, weight, blood_type, health_status, allergies, medical_history, special_condition,
|
||||
-- 父母信息字段(确实存在的)
|
||||
father_name, father_phone, father_work_unit,
|
||||
mother_name, mother_phone, mother_work_unit,
|
||||
-- 紧急联系人字段(确实存在的)
|
||||
emergency_contact_name, emergency_contact_phone, emergency_contact_relation,
|
||||
-- 银行信息字段(确实存在的)
|
||||
bank_card_no, bank_name, bank_branch, card_holder_name,
|
||||
-- 特殊情况字段(确实存在的)
|
||||
is_poor_student, is_minority, is_disabled, is_orphan, is_left_behind_child, is_single_child,
|
||||
-- 扩展信息字段(确实存在的)
|
||||
specialties, family_income, family_members, social_activities, awards, violations
|
||||
FROM xg_student_info
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
AND tenant_id = '000000'
|
||||
</select>
|
||||
|
||||
<!-- 根据学号查询学生信息 -->
|
||||
<select id="selectByStudentNo" parameterType="String" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE student_no = #{studentNo}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据身份证号查询学生信息 -->
|
||||
<select id="selectByIdCard" parameterType="String" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE id_card = #{idCard}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询指定班级的学生列表 -->
|
||||
<select id="selectByClassCode" parameterType="String" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE class_code = #{classCode}
|
||||
AND deleted = 0
|
||||
ORDER BY student_no
|
||||
</select>
|
||||
|
||||
<!-- 查询指定学院的学生列表 -->
|
||||
<select id="selectByCollegeCode" parameterType="String" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE college_code = #{collegeCode}
|
||||
AND deleted = 0
|
||||
ORDER BY class_code, student_no
|
||||
</select>
|
||||
|
||||
<!-- 查询指定辅导员的学生列表 -->
|
||||
<select id="selectByCounselorId" parameterType="Long" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE counselor_id = #{counselorId}
|
||||
AND deleted = 0
|
||||
ORDER BY class_code, student_no
|
||||
</select>
|
||||
|
||||
<!-- 查询指定班主任的学生列表 -->
|
||||
<select id="selectByClassTeacherId" parameterType="Long" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE class_teacher_id = #{classTeacherId}
|
||||
AND deleted = 0
|
||||
ORDER BY class_code, student_no
|
||||
</select>
|
||||
|
||||
<!-- 统计各学院学生数量 -->
|
||||
<select id="countByCollege" resultType="java.util.Map">
|
||||
SELECT
|
||||
college_code,
|
||||
college_name,
|
||||
COUNT(*) as count
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY college_code, college_name
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计各年级学生数量 -->
|
||||
<select id="countByGrade" resultType="java.util.Map">
|
||||
SELECT
|
||||
grade,
|
||||
COUNT(*) as count
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY grade
|
||||
ORDER BY grade
|
||||
</select>
|
||||
|
||||
<!-- 统计各专业学生数量 -->
|
||||
<select id="countByMajor" resultType="java.util.Map">
|
||||
SELECT
|
||||
major_code,
|
||||
major_name,
|
||||
COUNT(*) as count
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY major_code, major_name
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计学籍状态分布 -->
|
||||
<select id="countByStudentStatus" resultType="java.util.Map">
|
||||
SELECT
|
||||
student_status,
|
||||
COUNT(*) as count
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY student_status
|
||||
ORDER BY student_status
|
||||
</select>
|
||||
|
||||
<!-- 统计信息完整度分布 -->
|
||||
<select id="countByCompletionRate" resultType="java.util.Map">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN completion_rate >= 90 THEN '90-100%'
|
||||
WHEN completion_rate >= 80 THEN '80-90%'
|
||||
WHEN completion_rate >= 70 THEN '70-80%'
|
||||
WHEN completion_rate >= 60 THEN '60-70%'
|
||||
ELSE '60%以下'
|
||||
END as rate_range,
|
||||
COUNT(*) as count
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY rate_range
|
||||
ORDER BY rate_range DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询信息不完整的学生列表 -->
|
||||
<select id="selectIncompleteStudents" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE is_complete = 0
|
||||
AND deleted = 0
|
||||
ORDER BY completion_rate ASC, student_no
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的学生信息列表 -->
|
||||
<select id="selectPendingAuditStudents" resultMap="XgStudentInfoResult">
|
||||
SELECT * FROM xg_student_info
|
||||
WHERE info_status = '2'
|
||||
AND deleted = 0
|
||||
ORDER BY create_time ASC
|
||||
</select>
|
||||
|
||||
<!-- 批量更新学生信息状态 -->
|
||||
<update id="batchUpdateInfoStatus">
|
||||
UPDATE xg_student_info
|
||||
SET info_status = #{infoStatus},
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW()
|
||||
WHERE id IN
|
||||
<foreach collection="studentIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 批量更新学生学籍状态 -->
|
||||
<update id="batchUpdateStudentStatus">
|
||||
UPDATE xg_student_info
|
||||
SET student_status = #{studentStatus},
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW()
|
||||
WHERE id IN
|
||||
<foreach collection="studentIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 查询重复学号的学生列表 -->
|
||||
<select id="selectDuplicateStudentNo" resultType="java.util.Map">
|
||||
SELECT
|
||||
student_no,
|
||||
COUNT(*) as count,
|
||||
GROUP_CONCAT(id) as ids,
|
||||
GROUP_CONCAT(name) as names
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
GROUP BY student_no
|
||||
HAVING COUNT(*) > 1
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询重复身份证号的学生列表 -->
|
||||
<select id="selectDuplicateIdCard" resultType="java.util.Map">
|
||||
SELECT
|
||||
id_card,
|
||||
COUNT(*) as count,
|
||||
GROUP_CONCAT(id) as ids,
|
||||
GROUP_CONCAT(name) as names
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
AND id_card IS NOT NULL
|
||||
AND id_card != ''
|
||||
GROUP BY id_card
|
||||
HAVING COUNT(*) > 1
|
||||
ORDER BY count DESC
|
||||
</select>
|
||||
|
||||
<!-- ================================ -->
|
||||
<!-- 选项数据查询SQL -->
|
||||
<!-- ================================ -->
|
||||
|
||||
<!-- 查询学院选项 -->
|
||||
<select id="selectCollegeOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
college_name as label,
|
||||
college_code
|
||||
FROM xg_college_info
|
||||
WHERE deleted = 0
|
||||
ORDER BY college_name
|
||||
</select>
|
||||
|
||||
<!-- 查询专业选项 -->
|
||||
<select id="selectMajorOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
major_name as label,
|
||||
major_code,
|
||||
college_code
|
||||
FROM xg_major_info
|
||||
WHERE deleted = 0
|
||||
<if test="collegeCode != null and collegeCode != ''">
|
||||
AND college_code = (
|
||||
SELECT college_code FROM xg_college_info WHERE id = #{collegeCode} AND deleted = 0
|
||||
)
|
||||
</if>
|
||||
ORDER BY major_name
|
||||
</select>
|
||||
|
||||
<!-- 查询班级选项 -->
|
||||
<select id="selectClassOptions" resultType="java.util.Map">
|
||||
SELECT
|
||||
id as value,
|
||||
class_name as label,
|
||||
class_code,
|
||||
major_code,
|
||||
college_code
|
||||
FROM xg_class_info
|
||||
WHERE deleted = 0
|
||||
<if test="majorCode != null and majorCode != ''">
|
||||
AND major_code = (
|
||||
SELECT major_code FROM xg_major_info WHERE id = #{majorCode} AND deleted = 0
|
||||
)
|
||||
</if>
|
||||
ORDER BY class_name
|
||||
</select>
|
||||
|
||||
<!-- 查询辅导员选项 -->
|
||||
<select id="selectCounselorOptions" resultType="java.util.Map">
|
||||
SELECT DISTINCT
|
||||
counselor_id as value,
|
||||
counselor_name as label
|
||||
FROM xg_student_info
|
||||
WHERE deleted = 0
|
||||
AND counselor_id IS NOT NULL
|
||||
AND counselor_name IS NOT NULL
|
||||
AND counselor_name != ''
|
||||
ORDER BY counselor_name
|
||||
</select>
|
||||
|
||||
<!-- 查询班主任选项 -->
|
||||
<select id="selectClassTeacherOptions" resultType="java.util.Map">
|
||||
SELECT DISTINCT
|
||||
u.user_id as value,
|
||||
u.nick_name as label,
|
||||
u.user_name,
|
||||
u.email,
|
||||
u.phonenumber,
|
||||
r.role_name as role_name
|
||||
FROM sys_user u
|
||||
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
|
||||
INNER JOIN sys_role r ON ur.role_id = r.role_id
|
||||
WHERE u.del_flag = '0'
|
||||
AND u.status = '0'
|
||||
AND r.del_flag = '0'
|
||||
AND r.status = '0'
|
||||
AND r.role_key = '19' -- 班主任角色key
|
||||
ORDER BY u.user_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?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="org.dromara.xg.mapper.XgSysUserMapper">
|
||||
|
||||
<resultMap type="org.dromara.system.domain.vo.SysUserVo" id="SysUserResult">
|
||||
<id property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="nickName" column="nick_name"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="phonenumber" column="phonenumber"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询班主任用户SQL -->
|
||||
<select id="selectUsersByRoleKey" resultMap="SysUserResult">
|
||||
SELECT DISTINCT
|
||||
u.user_id, u.dept_id, u.user_name, u.nick_name,
|
||||
u.email, u.phonenumber, u.sex, u.avatar, u.status,
|
||||
u.create_time, u.remark
|
||||
FROM
|
||||
sys_user u
|
||||
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id AND u.tenant_id = '000000'
|
||||
INNER JOIN sys_role r ON ur.role_id = r.role_id AND r.tenant_id = '000000'
|
||||
WHERE
|
||||
u.del_flag = '0'
|
||||
AND u.status = '0'
|
||||
AND r.del_flag = '0'
|
||||
AND r.status = '0'
|
||||
AND r.role_key = #{roleKey}
|
||||
ORDER BY
|
||||
u.user_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,316 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ClassInfoVO, ClassInfoQuery, ClassInfoForm, OptionData } from './classInfo/types';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { DeptTreeVO, DeptVO } from '@/api/system/dept/types';
|
||||
import { treeselect as deptTreeselect, listDeptExcludeChild } from '@/api/system/dept';
|
||||
|
||||
// 通用类型定义
|
||||
interface TableDataInfo<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
rows: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
interface R<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
export const listClassInfo = (query: ClassInfoQuery): AxiosPromise<TableDataInfo<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询班级信息详细
|
||||
*/
|
||||
export const getClassInfo = (id: string | number): AxiosPromise<R<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增班级信息
|
||||
*/
|
||||
export const addClassInfo = (data: ClassInfoForm): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改班级信息
|
||||
*/
|
||||
export const updateClassInfo = (data: ClassInfoForm): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除班级信息
|
||||
*/
|
||||
export const delClassInfo = (id: string | number | Array<string | number>): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出班级信息
|
||||
*/
|
||||
export const exportClassInfo = (query: ClassInfoQuery): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*/
|
||||
export const getClassInfoByCode = (classCode: string): AxiosPromise<R<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByClassCode/' + classCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据年级查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByGrade = (grade: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByGrade/' + grade,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据学院代码查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByCollege = (collegeCode: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByCollegeCode/' + collegeCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据专业代码查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByMajor = (majorCode: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByMajorCode/' + majorCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据辅导员ID查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByCounselor = (counselorId: number): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByCounselorId/' + counselorId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据班主任ID查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByClassTeacher = (classTeacherId: number): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByClassTeacherId/' + classTeacherId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取班级选项列表(用于下拉框)
|
||||
*/
|
||||
export const getClassOptions = (): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getClassOptions', // 修正路径:从 /options 改为 /getClassOptions
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新班级学生统计
|
||||
*/
|
||||
export const updateStudentCount = (classId: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/updateStudentCount/' + classId,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量更新班级学生统计
|
||||
*/
|
||||
export const batchUpdateStudentCount = (classIds: number[]): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/batchUpdateStudentCount',
|
||||
method: 'post', // 修正HTTP方法:从 put 改为 post
|
||||
data: classIds
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 启用班级
|
||||
*/
|
||||
export const enableClass = (id: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/enable/' + id,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 禁用班级
|
||||
*/
|
||||
export const disableClass = (id: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/disable/' + id,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
// ================================
|
||||
// 统计数据接口 - 新增
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取班级信息统计概览
|
||||
*/
|
||||
export const getClassStatistics = (): AxiosPromise<R<any>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*/
|
||||
export const countClassByCollege = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/college',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*/
|
||||
export const countClassByGrade = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/grade',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*/
|
||||
export const countClassByMajor = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/major',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*/
|
||||
export const countClassByStatus = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/status',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
export const getCollegeOptions = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/colleges',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 从系统部门获取学院选项(二级学院)
|
||||
*/
|
||||
export const getDeptCollegeOptions = (): AxiosPromise<DeptTreeVO[]> => {
|
||||
console.log('直接调用部门树API,避免treeselect参数问题');
|
||||
return request({
|
||||
url: '/system/dept/treeselect',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 从系统部门获取专业选项(学院的下级部门)
|
||||
*/
|
||||
export const getDeptMajorOptions = (deptId: string | number): AxiosPromise<DeptVO[]> => {
|
||||
// 确保deptId是有效的数字ID
|
||||
if (!deptId || isNaN(Number(deptId))) {
|
||||
console.error('Invalid deptId:', deptId);
|
||||
return Promise.reject(new Error('无效的部门ID'));
|
||||
}
|
||||
|
||||
// 直接调用接口,不使用封装的系统API
|
||||
const numericDeptId = Number(deptId);
|
||||
console.log('直接调用部门API,使用数字ID:', numericDeptId);
|
||||
|
||||
return request({
|
||||
url: '/system/dept/list/exclude/' + numericDeptId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取辅导员选项
|
||||
*/
|
||||
export const getCounselorOptions = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/counselors',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取班主任选项列表
|
||||
*/
|
||||
export const getClassTeacherOptions = (): AxiosPromise<R<OptionData[]>> => {
|
||||
console.log('调用班主任API: /xg/classInfo/teacherOptions');
|
||||
return request({
|
||||
url: '/xg/classInfo/teacherOptions',
|
||||
method: 'get',
|
||||
headers: {
|
||||
// 确保请求带有认证信息
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
'clientid': import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,786 +0,0 @@
|
||||
/**
|
||||
* 班级信息管理模块 - 类型定义
|
||||
*/
|
||||
|
||||
/**
|
||||
* 班级信息 VO
|
||||
*/
|
||||
export interface ClassInfoVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
tenantId?: string;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
trainingType?: string;
|
||||
|
||||
/**
|
||||
* 学位类型:本科、专科、研究生等
|
||||
*/
|
||||
degreeType?: string;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
classAdvisorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
classAdvisorName?: string;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
classMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
classMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
deputyMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
deputyMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 是否毕业:0-未毕业,1-已毕业
|
||||
*/
|
||||
isGraduation?: number;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
graduationDate?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plannedCapacity?: number;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
currentStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
maxStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
maleCount?: number;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
femaleCount?: number;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
activeCount?: number;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
transferInCount?: number;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
transferOutCount?: number;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
dropoutCount?: number;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
graduateCount?: number;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
officeLocation?: string;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
classLocation?: string;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
contactPhone?: string;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
qqGroup?: string;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
wechatGroup?: string;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
classSchedule?: string;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
classCulture?: string;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
classRules?: string;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
classDescription?: string;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
lastCountUpdate?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy?: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy?: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级信息查询对象
|
||||
*/
|
||||
export interface ClassInfoQuery {
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
pageNum?: number;
|
||||
|
||||
/**
|
||||
* 每页显示记录数
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode?: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 班级类型
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade?: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear?: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 班级代码列表(批量查询)
|
||||
*/
|
||||
classCodeList?: string[];
|
||||
|
||||
/**
|
||||
* 班级状态列表(批量查询)
|
||||
*/
|
||||
classStatusList?: string[];
|
||||
|
||||
/**
|
||||
* 入学年份开始
|
||||
*/
|
||||
enrollmentYearStart?: number;
|
||||
|
||||
/**
|
||||
* 入学年份结束
|
||||
*/
|
||||
enrollmentYearEnd?: number;
|
||||
|
||||
/**
|
||||
* 创建时间开始
|
||||
*/
|
||||
createTimeStart?: string;
|
||||
|
||||
/**
|
||||
* 创建时间结束
|
||||
*/
|
||||
createTimeEnd?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级信息表单对象
|
||||
*/
|
||||
export interface ClassInfoForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode?: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 班级类型
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade?: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear?: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 培养方式
|
||||
*/
|
||||
trainingType?: string;
|
||||
|
||||
/**
|
||||
* 学位类型
|
||||
*/
|
||||
degreeType?: string;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
classAdvisorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
classAdvisorName?: string;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
classMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
classMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
deputyMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
deputyMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 是否毕业
|
||||
*/
|
||||
isGraduation?: number;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
graduationDate?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plannedCapacity?: number;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
currentStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
maxStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
maleCount?: number;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
femaleCount?: number;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
activeCount?: number;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
transferInCount?: number;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
transferOutCount?: number;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
dropoutCount?: number;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
graduateCount?: number;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
officeLocation?: string;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
classLocation?: string;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
contactPhone?: string;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
qqGroup?: string;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
wechatGroup?: string;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
classSchedule?: string;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
classCulture?: string;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
classRules?: string;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
classDescription?: string;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
lastCountUpdate?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级统计数据
|
||||
*/
|
||||
export interface ClassStatisticsData {
|
||||
/**
|
||||
* 总班级数
|
||||
*/
|
||||
totalCount: number;
|
||||
|
||||
/**
|
||||
* 正常班级数
|
||||
*/
|
||||
activeCount: number;
|
||||
|
||||
/**
|
||||
* 已毕业班级数
|
||||
*/
|
||||
graduatedCount: number;
|
||||
|
||||
/**
|
||||
* 暂停班级数
|
||||
*/
|
||||
suspendedCount: number;
|
||||
|
||||
/**
|
||||
* 解散班级数
|
||||
*/
|
||||
dissolvedCount: number;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
totalStudentCount: number;
|
||||
|
||||
/**
|
||||
* 平均班级人数
|
||||
*/
|
||||
averageClassSize: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级选项数据
|
||||
*/
|
||||
export interface OptionData {
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
value: string | number;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* 扩展数据
|
||||
*/
|
||||
data?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级图表数据
|
||||
*/
|
||||
export interface ClassChartData {
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
category: string;
|
||||
|
||||
/**
|
||||
* 数值
|
||||
*/
|
||||
value: number;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* 百分比
|
||||
*/
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量操作结果
|
||||
*/
|
||||
export interface BatchOperationResult {
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
total: number;
|
||||
|
||||
/**
|
||||
* 成功数
|
||||
*/
|
||||
success: number;
|
||||
|
||||
/**
|
||||
* 失败数
|
||||
*/
|
||||
failed: number;
|
||||
|
||||
/**
|
||||
* 失败的记录
|
||||
*/
|
||||
failedRecords?: Array<{
|
||||
id: string | number;
|
||||
reason: string;
|
||||
}>;
|
||||
}
|
||||
@@ -1,283 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CollectionBatchVO, CollectionBatchForm, CollectionBatchQuery } from './types';
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
export const listCollectionBatch = (query?: CollectionBatchQuery): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询信息采集批次详细
|
||||
*/
|
||||
export const getCollectionBatch = (id: string | number): AxiosPromise<CollectionBatchVO> => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据批次编码查询批次信息
|
||||
*/
|
||||
export const getCollectionBatchByCode = (batchCode: string): AxiosPromise<CollectionBatchVO> => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/code/${batchCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
export const addCollectionBatch = (data: CollectionBatchForm) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改信息采集批次
|
||||
*/
|
||||
export const updateCollectionBatch = (data: CollectionBatchForm) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除信息采集批次
|
||||
*/
|
||||
export const delCollectionBatch = (ids: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出信息采集批次
|
||||
*/
|
||||
export const exportCollectionBatch = (query?: CollectionBatchQuery) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询用户权限内的批次列表
|
||||
*/
|
||||
export const getUserPermissionBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/userPermission',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询活跃的批次列表
|
||||
*/
|
||||
export const getActiveBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/active',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询即将开始的批次列表
|
||||
*/
|
||||
export const getUpcomingBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/upcoming',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询即将结束的批次列表
|
||||
*/
|
||||
export const getEndingSoonBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/endingSoon',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 开始批次
|
||||
*/
|
||||
export const startBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/start/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 暂停批次
|
||||
*/
|
||||
export const pauseBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/pause/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 恢复批次
|
||||
*/
|
||||
export const resumeBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/resume/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
export const endBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/end/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
export const copyBatch = (batchId: string | number, newBatchCode: string, newBatchName: string) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/copy/${batchId}`,
|
||||
method: 'post',
|
||||
data: {
|
||||
newBatchCode,
|
||||
newBatchName
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次统计信息
|
||||
*/
|
||||
export const getBatchStatistics = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取整体统计信息
|
||||
*/
|
||||
export const getOverallStatistics = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/statistics/overall',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次完成度统计
|
||||
*/
|
||||
export const getBatchCompletionStatistics = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/completion/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次多维度统计
|
||||
*/
|
||||
export const getBatchDimensionStatistics = (batchId: string | number, dimension: string) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/dimension/${batchId}`,
|
||||
method: 'get',
|
||||
params: { dimension }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量更新批次状态
|
||||
*/
|
||||
export const batchUpdateStatus = (batchIds: Array<string | number>, status: string) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/batchUpdateStatus',
|
||||
method: 'post',
|
||||
data: {
|
||||
batchIds,
|
||||
status
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 检查批次是否可编辑
|
||||
*/
|
||||
export const checkBatchEditable = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/checkEditable/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 检查批次是否可删除
|
||||
*/
|
||||
export const checkBatchDeletable = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/checkDeletable/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取可用批次选项
|
||||
*/
|
||||
export const getAvailableBatches = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/available',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导入批次数据
|
||||
*/
|
||||
export const importBatchData = (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return request({
|
||||
url: '/xg/collectionBatch/import',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 下载批次数据导入模板
|
||||
*/
|
||||
export const downloadBatchTemplate = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/importTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
@@ -1,501 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// ========== 统计分析相关类型定义 ==========
|
||||
|
||||
// 统计查询参数
|
||||
export interface StatisticsQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
isEnabled?: boolean;
|
||||
createTime?: string[];
|
||||
}
|
||||
|
||||
// 统计分析查询参数
|
||||
export interface StatisticsAnalysisQuery {
|
||||
statisticsType?: string;
|
||||
dimension?: string;
|
||||
field?: string;
|
||||
groupBy?: string;
|
||||
conditions?: Record<string, any>;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
collegeIds?: number[];
|
||||
majorIds?: number[];
|
||||
classIds?: number[];
|
||||
grades?: string[];
|
||||
genders?: string[];
|
||||
politicalStatuses?: string[];
|
||||
nationalities?: string[];
|
||||
studentStatuses?: string[];
|
||||
trainingTypes?: string[];
|
||||
useCache?: boolean;
|
||||
}
|
||||
|
||||
// 统计配置视图对象
|
||||
export interface StatisticsConfigVo {
|
||||
id?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
queryConditions?: string;
|
||||
displaySettings?: string;
|
||||
chartType?: string;
|
||||
isEnabled?: boolean;
|
||||
sortOrder?: number;
|
||||
remark?: string;
|
||||
createBy?: number;
|
||||
createTime?: string;
|
||||
updateBy?: number;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 统计配置业务对象
|
||||
export interface StatisticsConfigBo {
|
||||
id?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
queryConditions?: string;
|
||||
displaySettings?: string;
|
||||
chartType?: string;
|
||||
isEnabled?: boolean;
|
||||
sortOrder?: number;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// 统计结果视图对象
|
||||
export interface StatisticsResultVo {
|
||||
title?: string;
|
||||
type?: string;
|
||||
dimension?: string;
|
||||
data?: Array<Record<string, any>>;
|
||||
total?: number;
|
||||
statisticsTime?: string;
|
||||
fromCache?: boolean;
|
||||
cacheKey?: string;
|
||||
extra?: Record<string, any>;
|
||||
chartConfig?: Record<string, any>;
|
||||
groupData?: Record<string, Array<Record<string, any>>>;
|
||||
summary?: Record<string, any>;
|
||||
}
|
||||
|
||||
// 统计报表视图对象
|
||||
export interface StatisticsReportVo {
|
||||
reportType?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
data?: Array<Record<string, any>>;
|
||||
summary?: Record<string, any>;
|
||||
generateTime?: string;
|
||||
metadata?: {
|
||||
total: number;
|
||||
conditions: Record<string, any>;
|
||||
};
|
||||
}
|
||||
|
||||
// 统计缓存信息
|
||||
export interface StatisticsCacheInfo {
|
||||
key?: string;
|
||||
hitCount?: number;
|
||||
missCount?: number;
|
||||
hitRate?: number;
|
||||
size?: number;
|
||||
lastAccessTime?: string;
|
||||
createTime?: string;
|
||||
expireTime?: string;
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export interface StatisticsExportQuery {
|
||||
dimension?: string;
|
||||
format?: 'excel' | 'csv';
|
||||
includeChart?: boolean;
|
||||
conditions?: Record<string, any>;
|
||||
reportType?: string;
|
||||
}
|
||||
|
||||
// ========== 统计配置管理API ==========
|
||||
|
||||
// 查询统计配置列表
|
||||
export function listStatisticsConfig(query: StatisticsQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取统计配置详情
|
||||
export function getStatisticsConfig(id: number): AxiosPromise<StatisticsConfigVo> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增统计配置
|
||||
export function addStatisticsConfig(data: StatisticsConfigBo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改统计配置
|
||||
export function updateStatisticsConfig(data: StatisticsConfigBo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除统计配置
|
||||
export function delStatisticsConfig(ids: number[]): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出统计配置
|
||||
export function exportStatisticsConfig(query: StatisticsQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 启用/禁用统计配置
|
||||
export function changeStatisticsConfigStatus(id: number, status: boolean): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/changeStatus`,
|
||||
method: 'put',
|
||||
data: { id, isEnabled: status }
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计分析API ==========
|
||||
|
||||
// 获取统计概览
|
||||
export function getStatisticsOverview(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/overview',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 学院统计
|
||||
export function getCollegeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/college',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 专业统计
|
||||
export function getMajorStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/major',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 班级统计
|
||||
export function getClassStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/class',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 年级统计
|
||||
export function getGradeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/grade',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 性别统计
|
||||
export function getGenderStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/gender',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 年龄统计
|
||||
export function getAgeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/age',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 政治面貌统计
|
||||
export function getPoliticalStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/political',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 民族统计
|
||||
export function getNationStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/nation',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 生源地统计
|
||||
export function getSourceRegionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/sourceRegion',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 血型统计
|
||||
export function getBloodTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/bloodType',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 宗教信仰统计
|
||||
export function getReligionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/religion',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 学籍状态统计
|
||||
export function getStudentStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/studentStatus',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 培养方式统计
|
||||
export function getTrainingTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/trainingType',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 高级统计 - 身高统计
|
||||
export function getHeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/height',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 高级统计 - 体重统计
|
||||
export function getWeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/weight',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 多维度组合统计
|
||||
export function getMultiDimensionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/multiDimension',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 时间趋势统计
|
||||
export function getTimeTrendStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/timeTrend',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计报表API ==========
|
||||
|
||||
// 生成学生信息汇总报表
|
||||
export function generateStudentSummaryReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/studentSummary',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成班级统计报表
|
||||
export function generateClassStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/classStatistics',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成学院统计报表
|
||||
export function generateCollegeStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/collegeStatistics',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成困难学生统计报表
|
||||
export function generateDifficultStudentReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/difficultStudent',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成特殊群体统计报表
|
||||
export function generateSpecialGroupReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/specialGroup',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计导出API ==========
|
||||
|
||||
// 导出统计结果
|
||||
export function exportStatisticsResult(query: StatisticsExportQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出统计报表
|
||||
export function exportStatisticsReport(query: StatisticsExportQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/exportReport',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计缓存API ==========
|
||||
|
||||
// 获取缓存统计信息
|
||||
export function getCacheStatistics(): AxiosPromise<StatisticsCacheInfo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/info',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 清空统计缓存
|
||||
export function clearStatisticsCache(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/clear',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 预热统计缓存
|
||||
export function warmupStatisticsCache(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/warmup',
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 辅助API ==========
|
||||
|
||||
// 获取统计维度选项
|
||||
export function getStatisticsDimensionOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/dimensionOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取图表类型选项
|
||||
export function getChartTypeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/chartTypeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取学院选项
|
||||
export function getCollegeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/collegeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取专业选项
|
||||
export function getMajorOptions(collegeCode?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/majorOptions',
|
||||
method: 'get',
|
||||
params: { collegeCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班级选项
|
||||
export function getClassOptions(majorCode?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/classOptions',
|
||||
method: 'get',
|
||||
params: { majorCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取年级选项
|
||||
export function getGradeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/gradeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 执行统计配置
|
||||
export function executeStatisticsConfig(configId: number, query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: `/xg/statisticsAnalysis/executeConfig/${configId}`,
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
@@ -1,454 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
// 学生信息数据类型
|
||||
export interface StudentInfo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
idCard?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
admissionCategory?: string;
|
||||
sourceRegion?: string;
|
||||
middleSchool?: string;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorName?: string;
|
||||
classTeacherName?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormitoryBuilding?: string;
|
||||
dormitoryRoom?: string;
|
||||
homeAddress?: string;
|
||||
currentAddress?: string;
|
||||
postalCode?: string;
|
||||
householdRegisterType?: string;
|
||||
hukouLocation?: string;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
specialCondition?: string;
|
||||
medicalHistory?: string;
|
||||
allergies?: string;
|
||||
disabilityType?: string;
|
||||
disabilityLevel?: string;
|
||||
emergencyContactName?: string;
|
||||
emergencyContactPhone?: string;
|
||||
emergencyContactRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherWorkUnit?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherWorkUnit?: string;
|
||||
guardianName?: string;
|
||||
guardianPhone?: string;
|
||||
guardianRelation?: string;
|
||||
familyIncome?: string;
|
||||
familyEconomicStatus?: string;
|
||||
familyMembers?: number;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardHolderName?: string;
|
||||
isPoorStudent?: number;
|
||||
isMinority?: number;
|
||||
isDisabled?: number;
|
||||
isOrphan?: number;
|
||||
isLeftBehindChild?: number;
|
||||
isSingleChild?: number;
|
||||
hasLoan?: number;
|
||||
loanAmount?: number;
|
||||
specialties?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
dataSource?: string;
|
||||
lastAuditTime?: string;
|
||||
isComplete?: number;
|
||||
completionRate?: number;
|
||||
extField1?: string;
|
||||
extField2?: string;
|
||||
extField3?: string;
|
||||
extField4?: string;
|
||||
extField5?: string;
|
||||
remark?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 查询参数类型
|
||||
export interface StudentQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
gender?: string;
|
||||
idCard?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorId?: number;
|
||||
classTeacherId?: number;
|
||||
}
|
||||
|
||||
// 统计数据类型
|
||||
export interface StatisticsData {
|
||||
totalCount?: number;
|
||||
activeCount?: number;
|
||||
completeCount?: number;
|
||||
pendingCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
}
|
||||
|
||||
// 选项数据类型
|
||||
export interface OptionData {
|
||||
value: string | number;
|
||||
label: string;
|
||||
code?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 查询学生信息列表
|
||||
export function listStudents(query: StudentQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取学生信息详情
|
||||
export function getStudent(id: number): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据学号查询学生信息
|
||||
export function getStudentByNo(studentNo: string): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/studentNo/${studentNo}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据身份证号查询学生信息
|
||||
export function getStudentByIdCard(idCard: string): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/idCard/${idCard}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据班级代码查询学生列表
|
||||
export function getStudentsByClass(classCode: string): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/class/${classCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据学院代码查询学生列表
|
||||
export function getStudentsByCollege(collegeCode: string): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/college/${collegeCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增学生信息
|
||||
export function addStudent(data: StudentInfo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改学生信息
|
||||
export function updateStudent(data: StudentInfo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除学生信息
|
||||
export function delStudent(ids: number[]): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${ids.join(',')}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出学生信息
|
||||
export function exportStudents(query: StudentQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 批量导入学生信息
|
||||
export function importStudents(data: any): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/import',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取导入模板
|
||||
export function getImportTemplate(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/importTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 批量更新学生信息状态
|
||||
export function batchUpdateInfoStatus(studentIds: number[], infoStatus: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchUpdateInfoStatus',
|
||||
method: 'put',
|
||||
data: { studentIds, infoStatus }
|
||||
});
|
||||
}
|
||||
|
||||
// 批量更新学生学籍状态
|
||||
export function batchUpdateStudentStatus(studentIds: number[], studentStatus: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchUpdateStudentStatus',
|
||||
method: 'put',
|
||||
data: { studentIds, studentStatus }
|
||||
});
|
||||
}
|
||||
|
||||
// 审核学生信息
|
||||
export function auditStudent(studentId: number, auditStatus: string, auditRemark?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${studentId}/audit`,
|
||||
method: 'put',
|
||||
params: { auditStatus, auditRemark }
|
||||
});
|
||||
}
|
||||
|
||||
// 批量审核学生信息
|
||||
export function batchAuditStudents(studentIds: number[], auditStatus: string, auditRemark?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchAudit',
|
||||
method: 'put',
|
||||
data: { studentIds, auditStatus, auditRemark }
|
||||
});
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 统计相关接口
|
||||
// ================================
|
||||
|
||||
// 获取统计概览
|
||||
export function getStatisticsOverview(): AxiosPromise<StatisticsData> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/overview',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各学院学生数量
|
||||
export function getCollegeStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/college',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各年级学生数量
|
||||
export function getGradeStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/grade',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各专业学生数量
|
||||
export function getMajorStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/major',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计学籍状态分布
|
||||
export function getStudentStatusStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/studentStatus',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计信息完整度分布
|
||||
export function getCompletionRateStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/completionRate',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询信息不完整的学生列表
|
||||
export function getIncompleteStudents(): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/incomplete',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询待审核的学生列表
|
||||
export function getPendingAuditStudents(): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/pendingAudit',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 生成学生信息报表
|
||||
export function generateReport(reportType: string, params?: any): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/report/${reportType}`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 选项数据接口
|
||||
// ================================
|
||||
|
||||
// 获取学院选项
|
||||
export function getCollegeOptions(): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/colleges',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取专业选项
|
||||
export function getMajorOptions(collegeCode?: string): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/majors',
|
||||
method: 'get',
|
||||
params: { collegeCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班级选项
|
||||
export function getClassOptions(majorCode?: string): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/classes',
|
||||
method: 'get',
|
||||
params: { majorCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取辅导员选项
|
||||
export function getCounselorOptions(): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/counselors',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班主任选项
|
||||
export function getClassTeacherOptions(): AxiosPromise<OptionData[]> {
|
||||
console.log('调用班主任API: /xg/classInfo/teacherOptions');
|
||||
return request({
|
||||
url: '/xg/classInfo/teacherOptions',
|
||||
method: 'get',
|
||||
headers: {
|
||||
// 确保请求带有认证信息
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
'clientid': import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 检查学号是否存在
|
||||
export function checkStudentNo(studentNo: string, studentId?: number): AxiosPromise<boolean> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/checkStudentNo',
|
||||
method: 'get',
|
||||
params: { studentNo, studentId }
|
||||
});
|
||||
}
|
||||
|
||||
// 检查身份证号是否存在
|
||||
export function checkIdCard(idCard: string, studentId?: number): AxiosPromise<boolean> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/checkIdCard',
|
||||
method: 'get',
|
||||
params: { idCard, studentId }
|
||||
});
|
||||
}
|
||||
|
||||
// 查询重复学号的学生列表
|
||||
export function getDuplicateStudentNo(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/duplicateStudentNo',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询重复身份证号的学生列表
|
||||
export function getDuplicateIdCard(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/duplicateIdCard',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 更新学生信息完整度
|
||||
export function updateCompletionRate(studentId: number): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${studentId}/updateCompletionRate`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
@@ -1,675 +0,0 @@
|
||||
// 学生信息管理模块类型定义
|
||||
|
||||
// ========== 信息采集批次管理相关类型 ==========
|
||||
|
||||
// 信息采集批次VO
|
||||
export interface CollectionBatchVO {
|
||||
id?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
publishTime?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
archiveTime?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
requiredFields?: string;
|
||||
optionalFields?: string;
|
||||
auditLevels?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
completionRate?: number;
|
||||
// 新增统计字段
|
||||
studentCount?: number; // 兼容性字段,映射到 totalStudents
|
||||
pendingCount?: number; // 待提交数量
|
||||
description?: string;
|
||||
editPermissions?: string;
|
||||
auditPermissions?: string;
|
||||
viewPermissions?: string;
|
||||
autoReminder?: number;
|
||||
reminderFrequency?: number;
|
||||
allowModifyAfterSubmit?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
createBy?: number;
|
||||
updateBy?: number;
|
||||
}
|
||||
|
||||
// 信息采集批次表单
|
||||
export interface CollectionBatchForm {
|
||||
id?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
publishTime?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
archiveTime?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
requiredFields?: string;
|
||||
optionalFields?: string;
|
||||
auditLevels?: string;
|
||||
description?: string;
|
||||
editPermissions?: string;
|
||||
auditPermissions?: string;
|
||||
viewPermissions?: string;
|
||||
autoReminder?: number;
|
||||
reminderFrequency?: number;
|
||||
allowModifyAfterSubmit?: number;
|
||||
}
|
||||
|
||||
// 信息采集批次查询参数
|
||||
export interface CollectionBatchQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
publishTimeStart?: string;
|
||||
publishTimeEnd?: string;
|
||||
startTimeStart?: string;
|
||||
startTimeEnd?: string;
|
||||
endTimeStart?: string;
|
||||
endTimeEnd?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
// 批次统计信息
|
||||
export interface BatchStatistics {
|
||||
totalBatches?: number;
|
||||
activeBatches?: number;
|
||||
completedBatches?: number;
|
||||
draftBatches?: number;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
completionRate?: number;
|
||||
averageCompletionTime?: number;
|
||||
}
|
||||
|
||||
// 批次完成度统计
|
||||
export interface BatchCompletionStatistics {
|
||||
batchId?: number;
|
||||
batchName?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
pendingCount?: number;
|
||||
completionRate?: number;
|
||||
submitRate?: number;
|
||||
approvalRate?: number;
|
||||
collegeStatistics?: CollegeCompletionStatistics[];
|
||||
}
|
||||
|
||||
// 学院完成度统计
|
||||
export interface CollegeCompletionStatistics {
|
||||
collegeId?: number;
|
||||
collegeName?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
pendingCount?: number;
|
||||
completionRate?: number;
|
||||
submitRate?: number;
|
||||
approvalRate?: number;
|
||||
}
|
||||
|
||||
// 批次多维度统计
|
||||
export interface BatchDimensionStatistics {
|
||||
dimension?: string;
|
||||
dimensionName?: string;
|
||||
items?: DimensionStatisticsItem[];
|
||||
}
|
||||
|
||||
// 维度统计项
|
||||
export interface DimensionStatisticsItem {
|
||||
key?: string;
|
||||
label?: string;
|
||||
count?: number;
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
// ========== 学生信息相关类型 ==========
|
||||
|
||||
// 学生信息完整数据结构
|
||||
export interface StudentInfoVo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
idCard?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
studentStatus?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
counselorId?: number;
|
||||
counselorName?: string;
|
||||
classTeacherId?: number;
|
||||
classTeacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
homeAddress?: string;
|
||||
emergencyContact?: string;
|
||||
emergencyPhone?: string;
|
||||
emergencyRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherJob?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherJob?: string;
|
||||
familyIncome?: string;
|
||||
familyMembers?: number;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
allergies?: string;
|
||||
medicalHistory?: string;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardholderName?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isLeftBehind?: boolean;
|
||||
isOnlyChild?: boolean;
|
||||
specialTalents?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
infoStatus?: string;
|
||||
dataSource?: string;
|
||||
lastBatchId?: number;
|
||||
lastAuditTime?: string;
|
||||
isComplete?: boolean;
|
||||
completionRate?: number;
|
||||
remark?: string;
|
||||
createBy?: number;
|
||||
createTime?: string;
|
||||
updateBy?: number;
|
||||
updateTime?: string;
|
||||
createDept?: number;
|
||||
tenantId?: string;
|
||||
deleted?: boolean;
|
||||
}
|
||||
|
||||
// 学生信息查询参数
|
||||
export interface StudentQueryBo {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
gender?: string;
|
||||
idCard?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorId?: number;
|
||||
classTeacherId?: number;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isComplete?: boolean;
|
||||
completionRateMin?: number;
|
||||
completionRateMax?: number;
|
||||
createTimeBegin?: string;
|
||||
createTimeEnd?: string;
|
||||
updateTimeBegin?: string;
|
||||
updateTimeEnd?: string;
|
||||
}
|
||||
|
||||
// 学生信息新增/编辑参数
|
||||
export interface StudentInfoBo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
idCard?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
studentStatus?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
counselorId?: number;
|
||||
counselorName?: string;
|
||||
classTeacherId?: number;
|
||||
classTeacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
homeAddress?: string;
|
||||
emergencyContact?: string;
|
||||
emergencyPhone?: string;
|
||||
emergencyRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherJob?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherJob?: string;
|
||||
familyIncome?: string;
|
||||
familyMembers?: number;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
allergies?: string;
|
||||
medicalHistory?: string;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardholderName?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isLeftBehind?: boolean;
|
||||
isOnlyChild?: boolean;
|
||||
specialTalents?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
infoStatus?: string;
|
||||
dataSource?: string;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// 统计数据结构
|
||||
export interface StatisticsOverview {
|
||||
totalCount?: number;
|
||||
activeCount?: number;
|
||||
completeCount?: number;
|
||||
pendingCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
graduatedCount?: number;
|
||||
suspendedCount?: number;
|
||||
poorFamilyCount?: number;
|
||||
minorityCount?: number;
|
||||
disabledCount?: number;
|
||||
orphanCount?: number;
|
||||
}
|
||||
|
||||
// 学院统计数据
|
||||
export interface CollegeStatistics {
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
totalCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
activeCount?: number;
|
||||
suspendedCount?: number;
|
||||
graduatedCount?: number;
|
||||
poorFamilyCount?: number;
|
||||
minorityCount?: number;
|
||||
disabledCount?: number;
|
||||
orphanCount?: number;
|
||||
}
|
||||
|
||||
// 年级统计数据
|
||||
export interface GradeStatistics {
|
||||
grade?: string;
|
||||
count?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
activeCount?: number;
|
||||
}
|
||||
|
||||
// 专业统计数据
|
||||
export interface MajorStatistics {
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
count?: number;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 学籍状态统计数据
|
||||
export interface StudentStatusStatistics {
|
||||
studentStatus?: string;
|
||||
count?: number;
|
||||
statusName?: string;
|
||||
}
|
||||
|
||||
// 信息完整度统计数据
|
||||
export interface CompletionRateStatistics {
|
||||
rateRange?: string;
|
||||
count?: number;
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
// 选项数据结构
|
||||
export interface OptionItem {
|
||||
value: string | number;
|
||||
label: string;
|
||||
code?: string;
|
||||
disabled?: boolean;
|
||||
children?: OptionItem[];
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 学院选项
|
||||
export interface CollegeOption extends OptionItem {
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 专业选项
|
||||
export interface MajorOption extends OptionItem {
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 班级选项
|
||||
export interface ClassOption extends OptionItem {
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
}
|
||||
|
||||
// 教师选项
|
||||
export interface TeacherOption extends OptionItem {
|
||||
teacherId?: number;
|
||||
teacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
department?: string;
|
||||
}
|
||||
|
||||
// 表格列配置
|
||||
export interface TableColumn {
|
||||
prop: string;
|
||||
label: string;
|
||||
width?: number | string;
|
||||
minWidth?: number | string;
|
||||
fixed?: boolean | string;
|
||||
align?: 'left' | 'center' | 'right';
|
||||
sortable?: boolean | string;
|
||||
showOverflowTooltip?: boolean;
|
||||
formatter?: (row: any, column: any, cellValue: any, index: number) => string;
|
||||
render?: (row: any, column: any, cellValue: any, index: number) => any;
|
||||
}
|
||||
|
||||
// 搜索表单配置
|
||||
export interface SearchFormItem {
|
||||
prop: string;
|
||||
label: string;
|
||||
type: 'input' | 'select' | 'date' | 'daterange' | 'number' | 'switch' | 'cascader';
|
||||
placeholder?: string;
|
||||
options?: OptionItem[];
|
||||
width?: number | string;
|
||||
span?: number;
|
||||
rules?: any[];
|
||||
clearable?: boolean;
|
||||
multiple?: boolean;
|
||||
filterable?: boolean;
|
||||
remote?: boolean;
|
||||
remoteMethod?: (query: string) => void;
|
||||
props?: any;
|
||||
format?: string;
|
||||
valueFormat?: string;
|
||||
rangeSeparator?: string;
|
||||
startPlaceholder?: string;
|
||||
endPlaceholder?: string;
|
||||
}
|
||||
|
||||
// 表单配置
|
||||
export interface FormItem {
|
||||
prop: string;
|
||||
label: string;
|
||||
type: 'input' | 'select' | 'date' | 'number' | 'switch' | 'textarea' | 'upload' | 'cascader' | 'radio' | 'checkbox';
|
||||
placeholder?: string;
|
||||
options?: OptionItem[];
|
||||
width?: number | string;
|
||||
span?: number;
|
||||
rules?: any[];
|
||||
required?: boolean;
|
||||
clearable?: boolean;
|
||||
multiple?: boolean;
|
||||
filterable?: boolean;
|
||||
remote?: boolean;
|
||||
remoteMethod?: (query: string) => void;
|
||||
props?: any;
|
||||
format?: string;
|
||||
valueFormat?: string;
|
||||
maxlength?: number;
|
||||
showWordLimit?: boolean;
|
||||
rows?: number;
|
||||
autosize?: boolean | { minRows: number; maxRows: number };
|
||||
accept?: string;
|
||||
listType?: 'text' | 'picture' | 'picture-card';
|
||||
limit?: number;
|
||||
action?: string;
|
||||
headers?: any;
|
||||
data?: any;
|
||||
beforeUpload?: (file: File) => boolean | Promise<boolean>;
|
||||
onSuccess?: (response: any, file: File, fileList: any[]) => void;
|
||||
onError?: (error: any, file: File, fileList: any[]) => void;
|
||||
onRemove?: (file: File, fileList: any[]) => void;
|
||||
disabled?: boolean;
|
||||
readonly?: boolean;
|
||||
size?: 'large' | 'default' | 'small';
|
||||
}
|
||||
|
||||
// 批量操作配置
|
||||
export interface BatchOperation {
|
||||
key: string;
|
||||
label: string;
|
||||
type: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
||||
icon?: string;
|
||||
permission?: string;
|
||||
confirm?: boolean;
|
||||
confirmMessage?: string;
|
||||
handler: (selectedRows: any[], selectedIds: any[]) => void;
|
||||
}
|
||||
|
||||
// 操作按钮配置
|
||||
export interface ActionButton {
|
||||
key: string;
|
||||
label: string;
|
||||
type: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
||||
icon?: string;
|
||||
permission?: string;
|
||||
show?: (row: any) => boolean;
|
||||
disabled?: (row: any) => boolean;
|
||||
confirm?: boolean;
|
||||
confirmMessage?: string | ((row: any) => string);
|
||||
handler: (row: any, index: number) => void;
|
||||
}
|
||||
|
||||
// 统计卡片配置
|
||||
export interface StatisticsCard {
|
||||
title: string;
|
||||
value: number | string;
|
||||
icon: string;
|
||||
color: string;
|
||||
trend?: {
|
||||
type: 'up' | 'down';
|
||||
value: number | string;
|
||||
label: string;
|
||||
};
|
||||
action?: {
|
||||
label: string;
|
||||
handler: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
// 图表配置
|
||||
export interface ChartConfig {
|
||||
type: 'bar' | 'line' | 'pie' | 'doughnut' | 'radar';
|
||||
title?: string;
|
||||
data: any[];
|
||||
xField?: string;
|
||||
yField?: string;
|
||||
seriesField?: string;
|
||||
colorField?: string;
|
||||
colors?: string[];
|
||||
legend?: boolean;
|
||||
tooltip?: boolean;
|
||||
label?: boolean;
|
||||
height?: number;
|
||||
width?: number;
|
||||
padding?: number | number[];
|
||||
meta?: any;
|
||||
interactions?: any[];
|
||||
annotations?: any[];
|
||||
}
|
||||
|
||||
// 导入配置
|
||||
export interface ImportConfig {
|
||||
templateUrl: string;
|
||||
uploadUrl: string;
|
||||
maxSize: number;
|
||||
allowedTypes: string[];
|
||||
requiredFields: string[];
|
||||
fieldMapping: { [key: string]: string };
|
||||
validateRules: { [key: string]: any[] };
|
||||
beforeUpload?: (file: File) => boolean | Promise<boolean>;
|
||||
onProgress?: (percent: number) => void;
|
||||
onSuccess?: (response: any) => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
|
||||
// 导出配置
|
||||
export interface ExportConfig {
|
||||
filename: string;
|
||||
sheetName: string;
|
||||
columns: {
|
||||
prop: string;
|
||||
label: string;
|
||||
width?: number;
|
||||
formatter?: (value: any, row: any) => string;
|
||||
}[];
|
||||
beforeExport?: (data: any[]) => any[];
|
||||
onSuccess?: () => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
|
||||
// 审核配置
|
||||
export interface AuditConfig {
|
||||
statusOptions: OptionItem[];
|
||||
remarkRequired: boolean;
|
||||
maxRemarkLength: number;
|
||||
batchAuditEnabled: boolean;
|
||||
autoNotify: boolean;
|
||||
notifyTemplate: string;
|
||||
}
|
||||
|
||||
// 权限配置
|
||||
export interface PermissionConfig {
|
||||
list: string;
|
||||
query: string;
|
||||
add: string;
|
||||
edit: string;
|
||||
remove: string;
|
||||
export: string;
|
||||
import: string;
|
||||
audit: string;
|
||||
statistics: string;
|
||||
batchUpdate: string;
|
||||
}
|
||||
|
||||
// 页面配置
|
||||
export interface PageConfig {
|
||||
title: string;
|
||||
breadcrumb: string[];
|
||||
permissions: PermissionConfig;
|
||||
searchForm: SearchFormItem[];
|
||||
tableColumns: TableColumn[];
|
||||
formItems: FormItem[];
|
||||
batchOperations: BatchOperation[];
|
||||
actionButtons: ActionButton[];
|
||||
statisticsCards: StatisticsCard[];
|
||||
chartConfigs: ChartConfig[];
|
||||
importConfig: ImportConfig;
|
||||
exportConfig: ExportConfig;
|
||||
auditConfig: AuditConfig;
|
||||
}
|
||||
@@ -1,246 +0,0 @@
|
||||
# 班级信息管理模块
|
||||
|
||||
## 📋 模块说明
|
||||
|
||||
- **模块名称**: 班级信息管理 (Class Information Management)
|
||||
- **模块简称**: classInfo
|
||||
- **对应后端**: backend/ruoyi-modules/ruoyi-xg-xx/
|
||||
- **对应API**: web/src/api/xg-xx/classInfo.ts
|
||||
|
||||
## 🎯 功能概述
|
||||
|
||||
班级信息管理模块提供完整的班级信息管理功能,包括:
|
||||
|
||||
### 📊 统计概览
|
||||
|
||||
- 总班级数统计
|
||||
- 正常班级数统计
|
||||
- 总学生数统计
|
||||
- 平均学生数统计
|
||||
|
||||
### 🔍 查询功能
|
||||
|
||||
- 班级代码、班级名称模糊查询
|
||||
- 年级、学院、专业级联查询
|
||||
- 班级类型、班级状态筛选
|
||||
- 班主任姓名查询
|
||||
|
||||
### 📝 基础管理
|
||||
|
||||
- 班级信息新增、修改、删除
|
||||
- 班级信息详情查看
|
||||
- 班级信息批量导出
|
||||
|
||||
### 👥 人员配置
|
||||
|
||||
- 班主任、辅导员配置
|
||||
- 班干部信息管理(班长、学习委员、生活委员等)
|
||||
- 联系方式管理
|
||||
|
||||
### 📈 统计功能
|
||||
|
||||
- 学生数量统计更新
|
||||
- 批量统计刷新
|
||||
- 实时数据同步
|
||||
|
||||
## 🎨 页面设计
|
||||
|
||||
### 页面布局
|
||||
|
||||
- **搜索区域**: 8个搜索条件,支持组合查询
|
||||
- **统计卡片**: 4个统计指标,渐变色彩设计
|
||||
- **表格区域**: 完整的班级信息展示
|
||||
- **操作按钮**: 查看、编辑、删除、统计更新
|
||||
|
||||
### 对话框设计
|
||||
|
||||
- **新增/编辑**: 分页签设计(基本信息、人员配置、联系方式)
|
||||
- **详情查看**: 描述列表展示完整信息
|
||||
- **响应式布局**: 适配不同屏幕尺寸
|
||||
|
||||
## 🔧 技术特性
|
||||
|
||||
### 前端技术
|
||||
|
||||
- **Vue 3.5.13** + **TypeScript 5.8.3**
|
||||
- **Element Plus** UI组件库
|
||||
- **Composition API** 组合式API
|
||||
- **响应式设计** 适配多端
|
||||
|
||||
### 样式设计
|
||||
|
||||
- **参考后勤管理模块** 保持风格一致
|
||||
- **渐变色卡片** 美观的统计展示
|
||||
- **悬停效果** 良好的交互体验
|
||||
- **操作按钮** 图标化设计
|
||||
|
||||
### 数据处理
|
||||
|
||||
- **级联选择** 学院-专业联动
|
||||
- **表单验证** 完整的输入校验
|
||||
- **状态管理** 响应式数据更新
|
||||
- **错误处理** 友好的错误提示
|
||||
|
||||
## 📋 API接口
|
||||
|
||||
### 16个标准API接口
|
||||
|
||||
#### 基础CRUD接口
|
||||
|
||||
1. `GET /list` - 查询班级信息列表
|
||||
2. `POST /export` - 导出班级信息列表
|
||||
3. `GET /{id}` - 获取班级信息详情
|
||||
4. `POST /` - 新增班级信息
|
||||
5. `PUT /` - 修改班级信息
|
||||
6. `DELETE /{ids}` - 删除班级信息
|
||||
|
||||
#### 业务查询接口
|
||||
|
||||
7. `GET /getByClassCode/{classCode}` - 根据班级代码查询
|
||||
8. `GET /getByGrade/{grade}` - 根据年级查询
|
||||
9. `GET /getByCollegeCode/{collegeCode}` - 根据学院代码查询
|
||||
10. `GET /getByMajorCode/{majorCode}` - 根据专业代码查询
|
||||
11. `GET /getByCounselorId/{counselorId}` - 根据辅导员ID查询
|
||||
12. `GET /getByClassTeacherId/{classTeacherId}` - 根据班主任ID查询
|
||||
|
||||
#### 辅助功能接口
|
||||
|
||||
13. `GET /getClassOptions` - 获取班级选项列表
|
||||
14. `POST /updateStudentCount/{id}` - 更新班级学生统计
|
||||
15. `POST /batchUpdateStudentCount` - 批量更新学生统计
|
||||
16. `POST /enable/{id}` 和 `POST /disable/{id}` - 启用/禁用班级
|
||||
|
||||
## 🎯 权限控制
|
||||
|
||||
### 权限编码
|
||||
|
||||
- `xg:classInfo:list` - 班级信息查询
|
||||
- `xg:classInfo:query` - 班级信息详情
|
||||
- `xg:classInfo:add` - 班级信息新增
|
||||
- `xg:classInfo:edit` - 班级信息修改
|
||||
- `xg:classInfo:remove` - 班级信息删除
|
||||
- `xg:classInfo:export` - 班级信息导出
|
||||
|
||||
### 按钮权限
|
||||
|
||||
- 所有操作按钮都配置了对应的权限控制
|
||||
- 使用 `v-hasPermi` 指令进行权限验证
|
||||
- 无权限时自动隐藏相关按钮
|
||||
|
||||
## 📊 数据字典
|
||||
|
||||
### 班级类型 (xg_class_type)
|
||||
|
||||
- `regular` - 普通班级
|
||||
- `honor` - 荣誉班级
|
||||
- `experimental` - 实验班级
|
||||
- `special` - 特殊班级
|
||||
|
||||
### 班级状态 (xg_class_status)
|
||||
|
||||
- `1` - 正常
|
||||
- `2` - 暂停
|
||||
- `3` - 毕业
|
||||
- `4` - 解散
|
||||
|
||||
### 年级选项 (xg_grade_options)
|
||||
|
||||
- 支持动态配置年级选项
|
||||
- 适配不同学制需求
|
||||
|
||||
## 🔄 数据流程
|
||||
|
||||
### 查询流程
|
||||
|
||||
1. 用户输入查询条件
|
||||
2. 前端组装查询参数
|
||||
3. 调用列表查询API
|
||||
4. 后端返回分页数据
|
||||
5. 前端渲染表格和统计
|
||||
|
||||
### 新增/修改流程
|
||||
|
||||
1. 用户填写表单信息
|
||||
2. 前端表单验证
|
||||
3. 调用新增/修改API
|
||||
4. 后端业务处理
|
||||
5. 返回操作结果
|
||||
6. 刷新列表和统计
|
||||
|
||||
### 统计更新流程
|
||||
|
||||
1. 用户点击统计更新
|
||||
2. 调用统计更新API
|
||||
3. 后端重新计算学生数
|
||||
4. 更新班级统计信息
|
||||
5. 返回最新统计数据
|
||||
|
||||
## 🎨 样式规范
|
||||
|
||||
### 色彩设计
|
||||
|
||||
- **主色调**: 蓝色系 (#409eff)
|
||||
- **统计卡片**: 渐变色设计
|
||||
- **状态标签**: 语义化颜色
|
||||
- **交互效果**: 悬停和点击反馈
|
||||
|
||||
### 布局规范
|
||||
|
||||
- **页面间距**: 8px 外边距
|
||||
- **组件间距**: 10px 组件间距
|
||||
- **表格样式**: 斑马纹和悬停效果
|
||||
- **按钮样式**: 图标化小按钮
|
||||
|
||||
### 响应式设计
|
||||
|
||||
- **搜索区域**: 4列布局,支持响应式
|
||||
- **统计卡片**: 4列布局,移动端自适应
|
||||
- **表格列**: 固定宽度和自适应结合
|
||||
- **对话框**: 固定宽度,内容自适应
|
||||
|
||||
## 📝 使用说明
|
||||
|
||||
### 基本操作
|
||||
|
||||
1. **查询班级**: 使用搜索条件筛选班级信息
|
||||
2. **新增班级**: 点击"新增班级"按钮,填写班级信息
|
||||
3. **修改班级**: 点击表格行的"编辑"按钮
|
||||
4. **查看详情**: 双击表格行或点击"查看"按钮
|
||||
5. **删除班级**: 选择班级后点击"删除"按钮
|
||||
|
||||
### 高级功能
|
||||
|
||||
1. **批量操作**: 选择多个班级进行批量删除
|
||||
2. **导出数据**: 根据查询条件导出Excel文件
|
||||
3. **统计更新**: 手动更新班级学生统计数据
|
||||
4. **级联查询**: 学院-专业联动查询
|
||||
|
||||
### 注意事项
|
||||
|
||||
- 班级代码必须唯一,系统会自动校验
|
||||
- 删除班级前请确认该班级下无学生信息
|
||||
- 统计数据会定期自动更新,也可手动刷新
|
||||
- 导出功能会根据当前查询条件生成文件
|
||||
|
||||
## 🚀 扩展功能
|
||||
|
||||
### 计划功能
|
||||
|
||||
- 班级学生管理集成
|
||||
- 班级活动管理
|
||||
- 班级成绩统计
|
||||
- 班级考勤管理
|
||||
|
||||
### 技术优化
|
||||
|
||||
- 虚拟滚动优化大数据量
|
||||
- 缓存机制提升查询性能
|
||||
- 实时数据推送
|
||||
- 移动端适配优化
|
||||
|
||||
---
|
||||
|
||||
**📅 创建时间**: 2025-01-01
|
||||
**👨💻 开发者**: Cursor AI
|
||||
**📝 版本**: v1.0.0
|
||||
**🔄 更新**: 持续迭代中
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,307 +0,0 @@
|
||||
# 信息采集批次管理前端应用
|
||||
|
||||
## 📋 概述
|
||||
|
||||
信息采集批次管理模块是学工管理系统的重要组成部分,用于管理学生信息采集的批次流程,包括批次创建、状态管理、权限配置、统计分析等功能。
|
||||
|
||||
## 🏗️ 项目结构
|
||||
|
||||
```
|
||||
web/src/views/xg-xx/collectionBatch/
|
||||
├── components/ # 组件目录
|
||||
│ ├── BatchActions.vue # 批次操作组件
|
||||
│ ├── BatchStatusTag.vue # 批次状态标签组件
|
||||
│ ├── BatchTypeTag.vue # 批次类型标签组件
|
||||
│ ├── ProgressBar.vue # 进度条组件
|
||||
│ └── SearchForm.vue # 搜索表单组件
|
||||
├── index.vue # 批次列表页面
|
||||
├── form.vue # 批次编辑表单页面
|
||||
├── detail.vue # 批次详情页面
|
||||
├── statistics.vue # 批次统计页面
|
||||
├── permission.vue # 权限配置页面
|
||||
├── route.ts # 路由配置
|
||||
└── README.md # 使用文档
|
||||
```
|
||||
|
||||
## 🎯 功能特性
|
||||
|
||||
### 1. 批次列表管理
|
||||
|
||||
- ✅ 批次列表展示(支持分页)
|
||||
- ✅ 多条件搜索过滤
|
||||
- ✅ 批次状态和类型标签展示
|
||||
- ✅ 完成进度可视化
|
||||
- ✅ 批次操作(新增、编辑、删除)
|
||||
|
||||
### 2. 批次表单管理
|
||||
|
||||
- ✅ 批次新增和编辑
|
||||
- ✅ 分组表单设计(基本信息、时间设置、目标设置等)
|
||||
- ✅ 表单验证
|
||||
- ✅ 保存和发布功能
|
||||
|
||||
### 3. 批次详情查看
|
||||
|
||||
- ✅ 批次详细信息展示
|
||||
- ✅ 卡片式布局
|
||||
- ✅ 实时状态更新
|
||||
- ✅ 批次操作按钮
|
||||
|
||||
### 4. 统计分析
|
||||
|
||||
- ✅ 批次统计数据展示
|
||||
- ✅ 图表可视化(ECharts)
|
||||
- ✅ 学院完成情况统计
|
||||
- ✅ 多维度数据分析
|
||||
|
||||
### 5. 权限配置
|
||||
|
||||
- ✅ 角色权限管理
|
||||
- ✅ 批量权限配置
|
||||
- ✅ 权限有效期设置
|
||||
- ✅ 权限状态管理
|
||||
|
||||
## 🛠️ 技术栈
|
||||
|
||||
- **Vue 3.5.13** - 前端框架
|
||||
- **TypeScript 5.8.3** - 类型支持
|
||||
- **Element Plus** - UI组件库
|
||||
- **ECharts** - 图表库
|
||||
- **Vue Router** - 路由管理
|
||||
- **Axios** - HTTP请求
|
||||
|
||||
## 📦 组件说明
|
||||
|
||||
### BatchStatusTag.vue
|
||||
|
||||
批次状态标签组件,用于显示批次的当前状态。
|
||||
|
||||
```vue
|
||||
<BatchStatusTag :status="batchStatus" :show-icon="true" />
|
||||
```
|
||||
|
||||
**Props:**
|
||||
|
||||
- `status`: 批次状态(draft, published, active, paused, ended, archived)
|
||||
- `showIcon`: 是否显示图标
|
||||
- `effect`: 标签效果(dark, light, plain)
|
||||
|
||||
### BatchTypeTag.vue
|
||||
|
||||
批次类型标签组件,用于显示批次的类型。
|
||||
|
||||
```vue
|
||||
<BatchTypeTag :type="batchType" :show-icon="true" />
|
||||
```
|
||||
|
||||
**Props:**
|
||||
|
||||
- `type`: 批次类型(student_info, scholarship, evaluation, other)
|
||||
- `showIcon`: 是否显示图标
|
||||
- `effect`: 标签效果
|
||||
|
||||
### ProgressBar.vue
|
||||
|
||||
进度条组件,用于显示批次的完成进度。
|
||||
|
||||
```vue
|
||||
<ProgressBar :current="submittedCount" :total="totalStudents" />
|
||||
```
|
||||
|
||||
**Props:**
|
||||
|
||||
- `current`: 当前完成数量
|
||||
- `total`: 总数量
|
||||
- `strokeWidth`: 进度条宽度
|
||||
- `showText`: 是否显示文本
|
||||
- `showDetail`: 是否显示详细信息
|
||||
|
||||
### BatchActions.vue
|
||||
|
||||
批次操作组件,提供批次相关的操作按钮。
|
||||
|
||||
```vue
|
||||
<BatchActions :batch="batchData" @start="handleStart" @pause="handlePause" />
|
||||
```
|
||||
|
||||
**Props:**
|
||||
|
||||
- `batch`: 批次数据对象
|
||||
|
||||
**Events:**
|
||||
|
||||
- `start`: 开始批次
|
||||
- `pause`: 暂停批次
|
||||
- `resume`: 恢复批次
|
||||
- `end`: 结束批次
|
||||
- `copy`: 复制批次
|
||||
- `statistics`: 统计分析
|
||||
- `permission`: 权限配置
|
||||
- `export`: 导出数据
|
||||
- `delete`: 删除批次
|
||||
|
||||
### SearchForm.vue
|
||||
|
||||
搜索表单组件,用于批次列表的搜索过滤。
|
||||
|
||||
```vue
|
||||
<SearchForm @search="handleSearch" @reset="handleReset" />
|
||||
```
|
||||
|
||||
**Events:**
|
||||
|
||||
- `search`: 搜索事件,返回查询参数
|
||||
- `reset`: 重置事件
|
||||
|
||||
## 🚀 使用指南
|
||||
|
||||
### 1. 批次管理流程
|
||||
|
||||
1. **创建批次**
|
||||
|
||||
- 点击"新增批次"按钮
|
||||
- 填写批次基本信息、时间设置、目标设置等
|
||||
- 保存草稿或直接发布
|
||||
|
||||
2. **管理批次**
|
||||
|
||||
- 在列表中查看批次状态和进度
|
||||
- 使用搜索功能快速定位批次
|
||||
- 通过操作按钮管理批次状态
|
||||
|
||||
3. **查看统计**
|
||||
|
||||
- 进入统计页面查看批次数据
|
||||
- 查看图表分析和学院完成情况
|
||||
- 导出统计报告
|
||||
|
||||
4. **配置权限**
|
||||
- 设置不同角色的权限范围
|
||||
- 配置权限有效期
|
||||
- 批量设置权限
|
||||
|
||||
### 2. 页面导航
|
||||
|
||||
- `/xg-xx/collectionBatch` - 批次列表页面
|
||||
- `/xg-xx/collectionBatch/add` - 新增批次页面
|
||||
- `/xg-xx/collectionBatch/edit?id={id}` - 编辑批次页面
|
||||
- `/xg-xx/collectionBatch/detail?id={id}` - 批次详情页面
|
||||
- `/xg-xx/collectionBatch/statistics` - 统计分析页面
|
||||
- `/xg-xx/collectionBatch/permission` - 权限配置页面
|
||||
|
||||
### 3. 权限控制
|
||||
|
||||
系统基于角色和权限进行访问控制:
|
||||
|
||||
- `xg:collectionBatch:list` - 查看批次列表
|
||||
- `xg:collectionBatch:add` - 新增批次
|
||||
- `xg:collectionBatch:edit` - 编辑批次
|
||||
- `xg:collectionBatch:remove` - 删除批次
|
||||
- `xg:collectionBatch:query` - 查看批次详情
|
||||
- `xg:collectionBatch:export` - 导出批次数据
|
||||
- `xg:collectionBatch:statistics` - 查看统计分析
|
||||
- `xg:collectionBatch:permission` - 配置权限
|
||||
|
||||
## 🔧 开发指南
|
||||
|
||||
### 1. 本地开发
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 启动开发服务器
|
||||
npm run dev
|
||||
|
||||
# 构建生产版本
|
||||
npm run build
|
||||
```
|
||||
|
||||
### 2. 代码规范
|
||||
|
||||
- 使用 TypeScript 进行类型检查
|
||||
- 遵循 Vue 3 Composition API 规范
|
||||
- 使用 ESLint 进行代码检查
|
||||
- 组件命名使用 PascalCase
|
||||
|
||||
### 3. 样式规范
|
||||
|
||||
- 使用 Element Plus 设计系统
|
||||
- 遵循后勤管理模块的颜色和样式规范
|
||||
- 使用 Tailwind CSS 类名进行样式定制
|
||||
- 响应式设计适配不同屏幕尺寸
|
||||
|
||||
## 📝 API 接口
|
||||
|
||||
### 批次管理接口
|
||||
|
||||
```typescript
|
||||
// 查询批次列表
|
||||
listCollectionBatch(query: CollectionBatchQuery): Promise<CollectionBatchVO[]>
|
||||
|
||||
// 获取批次详情
|
||||
getCollectionBatch(id: string | number): Promise<CollectionBatchVO>
|
||||
|
||||
// 新增批次
|
||||
addCollectionBatch(data: CollectionBatchForm): Promise<void>
|
||||
|
||||
// 更新批次
|
||||
updateCollectionBatch(data: CollectionBatchForm): Promise<void>
|
||||
|
||||
// 删除批次
|
||||
delCollectionBatch(ids: string | number | Array<string | number>): Promise<void>
|
||||
|
||||
// 批次状态操作
|
||||
startBatch(batchId: string | number): Promise<void>
|
||||
pauseBatch(batchId: string | number): Promise<void>
|
||||
resumeBatch(batchId: string | number): Promise<void>
|
||||
endBatch(batchId: string | number): Promise<void>
|
||||
|
||||
// 统计分析
|
||||
getBatchStatistics(batchId: string | number): Promise<any>
|
||||
getOverallStatistics(): Promise<any>
|
||||
```
|
||||
|
||||
## 🐛 问题排查
|
||||
|
||||
### 常见问题
|
||||
|
||||
1. **页面无法访问**
|
||||
|
||||
- 检查路由配置是否正确
|
||||
- 确认用户权限是否充足
|
||||
|
||||
2. **数据加载失败**
|
||||
|
||||
- 检查 API 接口是否正常
|
||||
- 确认后端服务是否启动
|
||||
|
||||
3. **图表显示异常**
|
||||
|
||||
- 检查 ECharts 是否正确引入
|
||||
- 确认数据格式是否正确
|
||||
|
||||
4. **权限配置无效**
|
||||
- 检查权限标识是否正确
|
||||
- 确认用户角色是否匹配
|
||||
|
||||
### 调试技巧
|
||||
|
||||
1. 使用浏览器开发者工具查看网络请求
|
||||
2. 检查 Console 中的错误信息
|
||||
3. 使用 Vue DevTools 调试组件状态
|
||||
4. 查看后端日志确认接口调用情况
|
||||
|
||||
## 📞 技术支持
|
||||
|
||||
如有问题,请联系开发团队或查看相关文档:
|
||||
|
||||
- 项目文档:`docs/开发文档/API/`
|
||||
- 后端接口:`backend/ruoyi-modules/ruoyi-xg-xx/`
|
||||
- 前端代码:`web/src/views/xg-xx/collectionBatch/`
|
||||
|
||||
---
|
||||
|
||||
**版本信息**:V1.0.0
|
||||
**更新时间**:2025-01-17
|
||||
**维护团队**:前端开发组
|
||||
@@ -1,85 +0,0 @@
|
||||
<template>
|
||||
<div class="batch-actions">
|
||||
<el-dropdown @command="handleCommand" trigger="click">
|
||||
<el-button type="primary" size="small">
|
||||
批次操作
|
||||
<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="batch.batchStatus === 'draft'" command="start" icon="VideoPlay"> 开始批次 </el-dropdown-item>
|
||||
<el-dropdown-item v-if="batch.batchStatus === 'active'" command="pause" icon="VideoPause"> 暂停批次 </el-dropdown-item>
|
||||
<el-dropdown-item v-if="batch.batchStatus === 'paused'" command="resume" icon="VideoPlay"> 恢复批次 </el-dropdown-item>
|
||||
<el-dropdown-item v-if="['active', 'paused'].includes(batch.batchStatus)" command="end" icon="VideoCamera"> 结束批次 </el-dropdown-item>
|
||||
<el-dropdown-item divided />
|
||||
<el-dropdown-item command="copy" icon="CopyDocument"> 复制批次 </el-dropdown-item>
|
||||
<el-dropdown-item command="statistics" icon="TrendCharts"> 统计分析 </el-dropdown-item>
|
||||
<el-dropdown-item command="permission" icon="Lock"> 权限配置 </el-dropdown-item>
|
||||
<el-dropdown-item divided />
|
||||
<el-dropdown-item command="export" icon="Download"> 导出数据 </el-dropdown-item>
|
||||
<el-dropdown-item command="delete" icon="Delete" style="color: #f56c6c"> 删除批次 </el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CollectionBatchVO } from '@/api/xg-xx-bak/types';
|
||||
|
||||
interface Props {
|
||||
batch: CollectionBatchVO;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
start: [batch: CollectionBatchVO];
|
||||
pause: [batch: CollectionBatchVO];
|
||||
resume: [batch: CollectionBatchVO];
|
||||
end: [batch: CollectionBatchVO];
|
||||
copy: [batch: CollectionBatchVO];
|
||||
statistics: [batch: CollectionBatchVO];
|
||||
permission: [batch: CollectionBatchVO];
|
||||
export: [batch: CollectionBatchVO];
|
||||
delete: [batch: CollectionBatchVO];
|
||||
}>();
|
||||
|
||||
const handleCommand = (command: string) => {
|
||||
switch (command) {
|
||||
case 'start':
|
||||
emit('start', props.batch);
|
||||
break;
|
||||
case 'pause':
|
||||
emit('pause', props.batch);
|
||||
break;
|
||||
case 'resume':
|
||||
emit('resume', props.batch);
|
||||
break;
|
||||
case 'end':
|
||||
emit('end', props.batch);
|
||||
break;
|
||||
case 'copy':
|
||||
emit('copy', props.batch);
|
||||
break;
|
||||
case 'statistics':
|
||||
emit('statistics', props.batch);
|
||||
break;
|
||||
case 'permission':
|
||||
emit('permission', props.batch);
|
||||
break;
|
||||
case 'export':
|
||||
emit('export', props.batch);
|
||||
break;
|
||||
case 'delete':
|
||||
emit('delete', props.batch);
|
||||
break;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.batch-actions {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
@@ -1,75 +0,0 @@
|
||||
<template>
|
||||
<el-tag :type="tagType" :effect="effect">
|
||||
<el-icon v-if="showIcon" class="mr-1">
|
||||
<component :is="iconComponent" />
|
||||
</el-icon>
|
||||
{{ statusText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
interface Props {
|
||||
status: string;
|
||||
showIcon?: boolean;
|
||||
effect?: 'dark' | 'light' | 'plain';
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showIcon: true,
|
||||
effect: 'light'
|
||||
});
|
||||
|
||||
// 状态映射配置
|
||||
const statusConfig = {
|
||||
draft: {
|
||||
text: '草稿',
|
||||
type: 'info',
|
||||
icon: 'Edit'
|
||||
},
|
||||
published: {
|
||||
text: '已发布',
|
||||
type: 'warning',
|
||||
icon: 'Bell'
|
||||
},
|
||||
active: {
|
||||
text: '进行中',
|
||||
type: 'success',
|
||||
icon: 'VideoPlay'
|
||||
},
|
||||
paused: {
|
||||
text: '已暂停',
|
||||
type: 'warning',
|
||||
icon: 'VideoPause'
|
||||
},
|
||||
ended: {
|
||||
text: '已结束',
|
||||
type: 'danger',
|
||||
icon: 'VideoCamera'
|
||||
},
|
||||
archived: {
|
||||
text: '已归档',
|
||||
type: 'info',
|
||||
icon: 'FolderOpened'
|
||||
}
|
||||
};
|
||||
|
||||
const tagType = computed(() => {
|
||||
return statusConfig[props.status as keyof typeof statusConfig]?.type || 'default';
|
||||
});
|
||||
|
||||
const statusText = computed(() => {
|
||||
return statusConfig[props.status as keyof typeof statusConfig]?.text || props.status;
|
||||
});
|
||||
|
||||
const iconComponent = computed(() => {
|
||||
return statusConfig[props.status as keyof typeof statusConfig]?.icon || 'QuestionFilled';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mr-1 {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,65 +0,0 @@
|
||||
<template>
|
||||
<el-tag :type="tagType" :effect="effect">
|
||||
<el-icon v-if="showIcon" class="mr-1">
|
||||
<component :is="iconComponent" />
|
||||
</el-icon>
|
||||
{{ typeText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
interface Props {
|
||||
type: string;
|
||||
showIcon?: boolean;
|
||||
effect?: 'dark' | 'light' | 'plain';
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showIcon: true,
|
||||
effect: 'light'
|
||||
});
|
||||
|
||||
// 类型映射配置
|
||||
const typeConfig = {
|
||||
student_info: {
|
||||
text: '学生信息采集',
|
||||
type: 'primary',
|
||||
icon: 'User'
|
||||
},
|
||||
scholarship: {
|
||||
text: '奖助学金申请',
|
||||
type: 'success',
|
||||
icon: 'Trophy'
|
||||
},
|
||||
evaluation: {
|
||||
text: '综合测评',
|
||||
type: 'warning',
|
||||
icon: 'DataAnalysis'
|
||||
},
|
||||
other: {
|
||||
text: '其他',
|
||||
type: 'info',
|
||||
icon: 'More'
|
||||
}
|
||||
};
|
||||
|
||||
const tagType = computed(() => {
|
||||
return (typeConfig[props.type as keyof typeof typeConfig]?.type as 'primary' | 'success' | 'warning' | 'info' | 'danger') || 'info';
|
||||
});
|
||||
|
||||
const typeText = computed(() => {
|
||||
return typeConfig[props.type as keyof typeof typeConfig]?.text || props.type;
|
||||
});
|
||||
|
||||
const iconComponent = computed(() => {
|
||||
return typeConfig[props.type as keyof typeof typeConfig]?.icon || 'QuestionFilled';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mr-1 {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
</style>
|
||||
Loaded 100 of 123 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user