feat: 学生信息管理系统开发完成
- 完成学生信息管理核心功能开发 - 新增学生信息采集批次管理功能 - 完成班干部管理模块开发 - 修复物业报修模块附件上传逻辑 - 完善数据库表结构和权限配置 - 更新API文档和变更记录 - 优化前端页面交互体验 详细变更记录见: - docs/变更管理/code-adjust-record-2025-01-13-wuzhen.md - docs/变更管理/code-adjust-record-2025-07-11-wuzilong.md - docs/变更管理/code-adjust-record-2025-07-12-wuzhen.md
This commit is contained in:
commit
8697b21b4d
237 files changed
+35787
-2878
No files matched your search
@@ -1979,3 +1979,53 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||
Page<SysUserVo> selectUserPage(Page<SysUser> page, @Param("bo") SysUserBo bo);
|
||||
}
|
||||
```
|
||||
|
||||
### 🗑️ 逻辑删除规则(全局强制,2025-07-11新增)
|
||||
|
||||
> **适用范围**:所有业务表、所有MyBatis-Plus实体、所有Service删除操作
|
||||
>
|
||||
> **设计目标**:统一软删除实现,避免物理删除带来的数据丢失,保证查询接口自动过滤已删除数据。
|
||||
|
||||
1. **数据库字段**
|
||||
- 字段名:`deleted`
|
||||
- 字段类型:`tinyint(1)`
|
||||
- 默认值:`0`(存在)
|
||||
- 含义:`0`-存在,`1`-已删除
|
||||
|
||||
2. **实体类注解**
|
||||
```java
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
```
|
||||
- `@TableLogic` 由 MyBatis-Plus 提供,可自动将 `DELETE` SQL 转换为
|
||||
```sql
|
||||
UPDATE table SET deleted = 1 WHERE id = ?
|
||||
```
|
||||
- 同时在所有自动生成的 `SELECT` 语句中追加条件 `deleted = 0`,无需显式编写过滤条件。
|
||||
|
||||
3. **删除操作代码规范**
|
||||
- Service 层推荐使用 MyBatis-Plus 的 `deleteById` / `deleteBatchIds` 等方法即可触发逻辑删除。
|
||||
- 如需自定义删除 SQL,**必须**包含 `deleted = 0` 过滤并在删除时设置 `deleted = 1`。
|
||||
- Controller 层仍按业务语义暴露 `DELETE /{id}` 接口,无需额外逻辑,保持与物理删除一致的调用方式。
|
||||
|
||||
4. **查询操作规范**
|
||||
- 默认情况下,MyBatis-Plus 已自动附加 `deleted = 0` 条件。编写自定义 SQL 时,**必须**手动加上 `AND deleted = 0`。
|
||||
- 对外返回的分页/列表接口,不得包含 `deleted = 1` 的数据。
|
||||
|
||||
5. **数据恢复**
|
||||
- 若业务需要"恢复已删除数据",可单独提供接口,将 `deleted` 字段重新置回 `0`。
|
||||
|
||||
> 📌 **注意**:逻辑删除是项目级强制要求,任何物理删除(`DELETE FROM ...`)将被代码审查拒绝。
|
||||
|
||||
#### 🔴 AI 开发强制要求
|
||||
|
||||
当使用 AI 进行数据库开发时:
|
||||
|
||||
1. **必须先阅读** `docs/设计文档/database/mysql-database-standard.md` 规范
|
||||
2. **必须使用标准模板**,不得随意修改基础字段
|
||||
3. **必须保持与现有表结构的一致性**
|
||||
4. **建表后必须立即更新** `hzdyjs_xg.sql` 文件
|
||||
5. **必须在变更记录中记录** 数据库变更
|
||||
@@ -809,3 +809,103 @@ export default defineConfig({
|
||||
1. **按钮规范**: 工具栏第一个新增按钮必须使用 `type="primary" plain`,其他按钮使用默认样式
|
||||
2. **颜色系统**: 使用最新的 Art Design Pro 颜色变量
|
||||
3. **文档同步**: 代码变更后必须同步更新相关文档
|
||||
|
||||
## 4. 附件管理统一规范(强制性)
|
||||
|
||||
> 适用范围:所有使用 **Element Plus** + **Vue 3 + TS** 的前端页面(弹窗、新建、编辑、详情、预览等)涉及“附件/文件”功能的模块,必须遵循本规范,以保持 UI 及交互的一致性。
|
||||
|
||||
### 4.1 组件结构
|
||||
|
||||
| 组件 | 说明 |
|
||||
|------|------|
|
||||
| `<el-upload list-type="picture-card">` | 核心上传组件,拖拽 + 点击上传,**单文件最大 10 MB**,**最多 15 个文件** |
|
||||
| 自定义 `#file` 模板 | 自绘「卡片样式」:缩略图 + 文件名 + 操作按钮组 |
|
||||
| `<el-button-group>` | 卡片底部操作按钮:下载(success)、删除(danger) |
|
||||
| 自定义 CSS 类 | `.upload-file-card / thumb / name / actions` 等,详见样式规范 |
|
||||
|
||||
### 4.2 功能实现
|
||||
|
||||
1. **上传 Upload**
|
||||
- `auto-upload="true"` + 立即上传
|
||||
- `accept="image/*,video/*,.pdf,.doc,.docx,.txt"`
|
||||
- 上传前 (`before-upload`) 校验大小 <10 MB
|
||||
- 上传成功:
|
||||
- 新建模式:将返回的 `id` 收集到 `tempAttachmentIds`
|
||||
- 编辑模式:文件已自动关联到工单
|
||||
- 上传失败:Element Plus message 提示
|
||||
|
||||
2. **下载 Download (强制使用 fetch + blob)**
|
||||
- 统一函数 `handleDownloadAttachment(file)` / `downloadAttachment(attachment)`
|
||||
- 流程:`fetch(filePath) → blob → URL.createObjectURL → <a download>`
|
||||
- 使用 `ElLoading.service()` 显示 *正在下载文件…*
|
||||
- 下载完成后 `revokeObjectURL` 释放内存
|
||||
- 解决浏览器对图片/PDF 默认预览导致无法下载的问题
|
||||
|
||||
3. **删除 Delete(延迟删除机制)**
|
||||
- 点击删除 → `proxy.$modal.confirm()` 二次确认
|
||||
- 已上传文件:只把 `attachment.id` 放入 `pendingDeleteAttachmentIds`,**不立即调用后端**
|
||||
- 表单保存时统一调用 `deleteAttachment` 批量删除
|
||||
- 新增未上传文件:直接从 `tempFileList` / `attachmentList` 移除
|
||||
|
||||
4. **预览 Preview**
|
||||
- 判断 `fileType === 'image'` → 使用 `Element Plus ImageViewer` 预览
|
||||
- 其他类型文件 `window.open(filePath,'_blank')`
|
||||
- 详情弹窗附件列表同样遵循该预览逻辑
|
||||
|
||||
### 4.3 样式规范(SCSS)
|
||||
|
||||
```scss
|
||||
/* 让附件卡片一行展示 4 个 */
|
||||
:deep(.el-upload-list--picture-card) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 9px;
|
||||
margin-top: 12px;
|
||||
.el-upload-list__item {
|
||||
width: 166px !important;
|
||||
min-height: 180px !important;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* 卡片整体布局 */
|
||||
.upload-file-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 180px;
|
||||
}
|
||||
.upload-file-thumb { height: 120px; overflow: hidden; }
|
||||
.upload-file-name { font-size: 12px; padding: 8px 4px 4px; text-align: center; overflow: hidden; }
|
||||
.upload-file-card-actions {
|
||||
padding: 6px 8px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fafafa;
|
||||
display: flex; justify-content: center;
|
||||
}
|
||||
```
|
||||
|
||||
### 4.4 统一变量 & Hook
|
||||
|
||||
```ts
|
||||
const attachmentList = ref<any[]>([]); // el-upload file-list
|
||||
const tempFileList = ref<File[]>([]); // 新建时未上传的本地文件
|
||||
const tempAttachmentIds = ref<string[]>([]); // 新建时已上传待关联附件 id
|
||||
const pendingDeleteAttachmentIds = ref<string[]>([]); // 编辑时标记待删除附件 id
|
||||
```
|
||||
|
||||
### 4.5 集成步骤(页面级)
|
||||
|
||||
1. 在 `<script setup>` 引入上述变量 + 上传/下载/删除/预览函数
|
||||
2. 使用统一的上传组件模板(参考 `web/src/views/hq/pm/repairOrder/index.vue`)
|
||||
3. 在 *保存/提交* 逻辑中调用 `handlePendingAttachments(orderId)` 处理上传 & 删除
|
||||
4. 样式直接复制 *样式规范* 中的片段或通过全局样式引入
|
||||
|
||||
### 4.6 强制性要求
|
||||
|
||||
- **🚨 不得** 在其他页面自定义下载逻辑(必须使用 fetch+blob)
|
||||
- **🚨 不得** 直接删除附件数据库记录;必须延迟删除
|
||||
- **🚨 不得** 修改附件卡片 UI 结构及尺寸;需保持一致
|
||||
- **✅ 必须** 在新页面开发时引用本规范并注明 *附件管理统一规范* 版本
|
||||
|
||||
> **版本**: 2025-01-27 附件管理统一规范 v1.0
|
||||
+49
-31
@@ -77,7 +77,7 @@ show_help() {
|
||||
# 检查环境
|
||||
check_environment() {
|
||||
echo -e "${BLUE}🔍 检查运行环境...${NC}"
|
||||
|
||||
|
||||
# 检查Java版本
|
||||
if command -v java &> /dev/null; then
|
||||
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2)
|
||||
@@ -86,7 +86,7 @@ check_environment() {
|
||||
echo -e " ❌ ${RED}未找到Java环境${NC}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
# 检查Maven版本
|
||||
if command -v mvn &> /dev/null; then
|
||||
MVN_VERSION=$(mvn -version 2>/dev/null | head -n 1 | cut -d' ' -f3)
|
||||
@@ -95,7 +95,7 @@ check_environment() {
|
||||
echo -e " ❌ ${RED}未找到Maven环境${NC}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
# 检查目标模块
|
||||
if [ -d "$DEFAULT_MODULE" ]; then
|
||||
echo -e " ✅ 目标模块: ${GREEN}$DEFAULT_MODULE${NC}"
|
||||
@@ -103,14 +103,14 @@ check_environment() {
|
||||
echo -e " ❌ ${RED}未找到目标模块: $DEFAULT_MODULE${NC}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
# 检查热加载配置
|
||||
if grep -q "spring-boot-devtools" $DEFAULT_MODULE/pom.xml; then
|
||||
echo -e " ✅ 热加载配置: ${GREEN}已启用${NC}"
|
||||
else
|
||||
echo -e " ⚠️ 热加载配置: ${YELLOW}未配置${NC}"
|
||||
fi
|
||||
|
||||
|
||||
# 检查配置文件
|
||||
CONFIG_FILE="$DEFAULT_MODULE/src/main/resources/application-$DEFAULT_PROFILE.yml"
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
@@ -119,7 +119,7 @@ check_environment() {
|
||||
echo -e " ❌ ${RED}未找到配置文件: $CONFIG_FILE${NC}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
echo -e "${GREEN}✅ 环境检查完成${NC}"
|
||||
return 0
|
||||
}
|
||||
@@ -164,13 +164,27 @@ clean_build() {
|
||||
|
||||
# 构建项目
|
||||
build_project() {
|
||||
echo -e "${BLUE}🔨 编译项目...${NC}"
|
||||
echo -e "${BLUE}🔨 编译并打包项目...${NC}"
|
||||
cd $DEFAULT_MODULE
|
||||
mvn compile -q
|
||||
mvn clean package -q
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✅ 编译完成${NC}"
|
||||
echo -e "${GREEN}✅ 编译打包完成${NC}"
|
||||
else
|
||||
echo -e "${RED}❌ 编译失败${NC}"
|
||||
echo -e "${RED}❌ 编译打包失败${NC}"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
}
|
||||
|
||||
# 新增:构建 ruoyi-modules
|
||||
build_ruoyi_modules() {
|
||||
echo -e "${BLUE}🔨 开始编译并打包 ruoyi-modules...${NC}"
|
||||
cd ruoyi-modules
|
||||
mvn clean install -q
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✅ ruoyi-modules 编译打包完成${NC}"
|
||||
else
|
||||
echo -e "${RED}❌ ruoyi-modules 编译打包失败${NC}"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
@@ -183,7 +197,7 @@ start_application() {
|
||||
local debug_mode=$3
|
||||
local hot_reload=$4
|
||||
local jvm_opts=$5
|
||||
|
||||
|
||||
echo -e "${BLUE}🚀 启动应用...${NC}"
|
||||
echo -e "${CYAN}配置信息:${NC}"
|
||||
echo -e " 📂 模块: ${GREEN}$DEFAULT_MODULE${NC}"
|
||||
@@ -192,42 +206,42 @@ start_application() {
|
||||
echo -e " 🔥 热加载: ${GREEN}$([ "$hot_reload" = "true" ] && echo "启用" || echo "禁用")${NC}"
|
||||
echo -e " 🐛 调试模式: ${GREEN}$([ "$debug_mode" = "true" ] && echo "启用" || echo "禁用")${NC}"
|
||||
echo ""
|
||||
|
||||
|
||||
cd $DEFAULT_MODULE
|
||||
|
||||
|
||||
# 构建Maven命令
|
||||
MVN_CMD="mvn spring-boot:run"
|
||||
|
||||
|
||||
# 添加环境配置
|
||||
MVN_CMD="$MVN_CMD -Dspring-boot.run.profiles=$profile"
|
||||
|
||||
|
||||
# 添加端口配置
|
||||
if [ "$port" != "$DEFAULT_PORT" ]; then
|
||||
MVN_CMD="$MVN_CMD -Dspring-boot.run.arguments=--server.port=$port"
|
||||
fi
|
||||
|
||||
|
||||
# 添加JVM参数
|
||||
if [ -n "$jvm_opts" ]; then
|
||||
MVN_CMD="$MVN_CMD -Dspring-boot.run.jvmArguments=\"$jvm_opts\""
|
||||
else
|
||||
MVN_CMD="$MVN_CMD -Dspring-boot.run.jvmArguments=\"$MAVEN_OPTS\""
|
||||
fi
|
||||
|
||||
|
||||
# 调试模式
|
||||
if [ "$debug_mode" = "true" ]; then
|
||||
MVN_CMD="$MVN_CMD -Dspring-boot.run.jvmArguments=\"$MAVEN_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005\""
|
||||
echo -e "${PURPLE}🐛 调试端口: 5005${NC}"
|
||||
fi
|
||||
|
||||
|
||||
# 禁用热加载
|
||||
if [ "$hot_reload" = "false" ]; then
|
||||
MVN_CMD="$MVN_CMD -Dspring.devtools.restart.enabled=false"
|
||||
fi
|
||||
|
||||
|
||||
echo -e "${CYAN}执行命令: ${WHITE}$MVN_CMD${NC}"
|
||||
echo -e "${GREEN}==================== 应用启动日志 ====================${NC}"
|
||||
echo ""
|
||||
|
||||
|
||||
# 执行命令
|
||||
eval $MVN_CMD
|
||||
}
|
||||
@@ -243,7 +257,7 @@ main() {
|
||||
HOT_RELOAD=true
|
||||
JVM_OPTS=""
|
||||
CHECK_ONLY=false
|
||||
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
@@ -294,37 +308,41 @@ main() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# 显示Logo
|
||||
show_logo
|
||||
|
||||
|
||||
# 仅检查环境
|
||||
if [ "$CHECK_ONLY" = "true" ]; then
|
||||
check_environment
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
||||
# 环境检查
|
||||
if ! check_environment; then
|
||||
echo -e "${RED}❌ 环境检查失败,请检查配置${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
|
||||
|
||||
# 端口检查
|
||||
check_port $PORT
|
||||
|
||||
|
||||
# 清理编译
|
||||
if [ "$CLEAN_BUILD" = "true" ]; then
|
||||
clean_build
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# 编译项目
|
||||
|
||||
# 先编译打包 ruoyi-modules
|
||||
build_ruoyi_modules
|
||||
echo ""
|
||||
|
||||
# 再编译打包 ruoyi-admin
|
||||
build_project
|
||||
echo ""
|
||||
|
||||
|
||||
# 启动应用
|
||||
start_application "$PROFILE" "$PORT" "$DEBUG_MODE" "$HOT_RELOAD" "$JVM_OPTS"
|
||||
}
|
||||
@@ -333,4 +351,4 @@ main() {
|
||||
trap 'echo -e "\n${YELLOW}⚠️ 应用启动已中断${NC}"; exit 1' INT TERM
|
||||
|
||||
# 执行主函数
|
||||
main "$@"
|
||||
main "$@"
|
||||
+53
-1
@@ -107,7 +107,7 @@ public class HqPmRepairAttachmentController extends BaseController {
|
||||
@Log(title = "上传报修附件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/upload")
|
||||
public R<HqPmRepairAttachmentVo> uploadFile(
|
||||
@RequestParam("orderId") Long orderId,
|
||||
@RequestParam(value = "orderId", required = false) Long orderId,
|
||||
@RequestParam(value = "uploadStage", defaultValue = "1") String uploadStage,
|
||||
@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "description", required = false) String description) {
|
||||
@@ -183,4 +183,56 @@ public class HqPmRepairAttachmentController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
// @SaCheckPermission("pm:attachment:edit")
|
||||
@Log(title = "更新附件工单ID", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{attachmentId}/order/{orderId}")
|
||||
public R<Void> updateAttachmentOrderId(@PathVariable("attachmentId") Long attachmentId,
|
||||
@PathVariable("orderId") Long orderId) {
|
||||
return toAjax(attachmentService.updateAttachmentOrderId(attachmentId, orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
// @SaCheckPermission("pm:attachment:edit")
|
||||
@Log(title = "批量更新附件工单ID", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/batch-update-order")
|
||||
public R<Void> batchUpdateAttachmentOrderId(@RequestBody BatchUpdateOrderIdRequest request) {
|
||||
if (request.getAttachmentIds() == null || request.getAttachmentIds().isEmpty()) {
|
||||
return R.fail("附件ID列表不能为空");
|
||||
}
|
||||
if (request.getOrderId() == null) {
|
||||
return R.fail("工单ID不能为空");
|
||||
}
|
||||
|
||||
return toAjax(attachmentService.batchUpdateAttachmentOrderId(request.getAttachmentIds(), request.getOrderId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新附件工单ID的请求参数
|
||||
*/
|
||||
public static class BatchUpdateOrderIdRequest {
|
||||
private List<Long> attachmentIds;
|
||||
private Long orderId;
|
||||
|
||||
public List<Long> getAttachmentIds() {
|
||||
return attachmentIds;
|
||||
}
|
||||
|
||||
public void setAttachmentIds(List<Long> attachmentIds) {
|
||||
this.attachmentIds = attachmentIds;
|
||||
}
|
||||
|
||||
public Long getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,5 +49,10 @@ public class HqHallInfo extends TenantEntity {
|
||||
*/
|
||||
private String hallDescription;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
+6
@@ -121,4 +121,10 @@ public class HqPmRepairCategory extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
+6
@@ -175,4 +175,10 @@ public class HqPmRepairOrder extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
+10
@@ -73,4 +73,14 @@ public interface IHqPmRepairAttachmentService {
|
||||
*/
|
||||
void updateOrderAttachmentCount(Long orderId);
|
||||
|
||||
/**
|
||||
* 更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
Boolean updateAttachmentOrderId(Long attachmentId, Long orderId);
|
||||
|
||||
/**
|
||||
* 批量更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
Boolean batchUpdateAttachmentOrderId(List<Long> attachmentIds, Long orderId);
|
||||
|
||||
}
|
||||
+93
@@ -303,6 +303,99 @@ public class HqPmRepairAttachmentServiceImpl implements IHqPmRepairAttachmentSer
|
||||
repairOrderMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateAttachmentOrderId(Long attachmentId, Long orderId) {
|
||||
if (attachmentId == null || orderId == null) {
|
||||
log.warn("更新附件工单ID参数不能为空: attachmentId={}, orderId={}", attachmentId, orderId);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查附件是否存在
|
||||
HqPmRepairAttachmentVo attachment = queryById(attachmentId);
|
||||
if (attachment == null) {
|
||||
log.warn("附件不存在: attachmentId={}", attachmentId);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 更新附件的工单ID
|
||||
LambdaUpdateWrapper<HqPmRepairAttachment> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.eq(HqPmRepairAttachment::getId, attachmentId)
|
||||
.set(HqPmRepairAttachment::getOrderId, orderId);
|
||||
|
||||
boolean success = baseMapper.update(null, updateWrapper) > 0;
|
||||
|
||||
if (success) {
|
||||
log.info("成功更新附件工单ID: attachmentId={}, orderId={}", attachmentId, orderId);
|
||||
// 更新工单的附件数量
|
||||
updateOrderAttachmentCount(orderId);
|
||||
// 如果原来有工单ID,也需要更新原工单的附件数量
|
||||
if (attachment.getOrderId() != null && !attachment.getOrderId().equals(orderId)) {
|
||||
updateOrderAttachmentCount(attachment.getOrderId());
|
||||
}
|
||||
} else {
|
||||
log.error("更新附件工单ID失败: attachmentId={}, orderId={}", attachmentId, orderId);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新附件的工单ID(用于新增工单时关联已上传的附件)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchUpdateAttachmentOrderId(List<Long> attachmentIds, Long orderId) {
|
||||
if (attachmentIds == null || attachmentIds.isEmpty() || orderId == null) {
|
||||
log.warn("批量更新附件工单ID参数不能为空: attachmentIds={}, orderId={}", attachmentIds, orderId);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
// 获取要更新的附件列表(在更新前)
|
||||
List<HqPmRepairAttachmentVo> existingAttachments = new ArrayList<>();
|
||||
for (Long attachmentId : attachmentIds) {
|
||||
HqPmRepairAttachmentVo attachment = queryById(attachmentId);
|
||||
if (attachment != null) {
|
||||
existingAttachments.add(attachment);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量更新附件的工单ID
|
||||
LambdaUpdateWrapper<HqPmRepairAttachment> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.in(HqPmRepairAttachment::getId, attachmentIds)
|
||||
.set(HqPmRepairAttachment::getOrderId, orderId);
|
||||
|
||||
boolean success = baseMapper.update(null, updateWrapper) > 0;
|
||||
|
||||
if (success) {
|
||||
log.info("成功批量更新附件工单ID: attachmentIds={}, orderId={}, count={}",
|
||||
attachmentIds, orderId, attachmentIds.size());
|
||||
|
||||
// 更新新工单的附件数量
|
||||
updateOrderAttachmentCount(orderId);
|
||||
|
||||
// 更新原来有工单ID的附件所属工单的数量
|
||||
existingAttachments.stream()
|
||||
.map(HqPmRepairAttachmentVo::getOrderId)
|
||||
.filter(oldOrderId -> oldOrderId != null && !oldOrderId.equals(orderId))
|
||||
.distinct()
|
||||
.forEach(this::updateOrderAttachmentCount);
|
||||
} else {
|
||||
log.error("批量更新附件工单ID失败: attachmentIds={}, orderId={}", attachmentIds, orderId);
|
||||
}
|
||||
|
||||
return success;
|
||||
} catch (Exception e) {
|
||||
log.error("批量更新附件工单ID异常: attachmentIds={}, orderId={}, error={}",
|
||||
attachmentIds, orderId, e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据MIME类型获取文件类型
|
||||
*/
|
||||
|
||||
+2
-1
@@ -254,7 +254,8 @@ public class HqPmRepairCategoryServiceImpl implements IHqPmRepairCategoryService
|
||||
@Override
|
||||
public List<HqPmRepairCategoryVo> queryTree() {
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairCategory::getStatus, "1");
|
||||
// 不过滤状态,返回所有分类(包括停用状态),前端可自行根据 status 进行展示控制
|
||||
// lqw.eq(HqPmRepairCategory::getStatus, "1");
|
||||
lqw.orderByAsc(HqPmRepairCategory::getSortOrder).orderByAsc(HqPmRepairCategory::getId);
|
||||
List<HqPmRepairCategoryVo> allList = baseMapper.selectVoList(lqw);
|
||||
|
||||
|
||||
+9
-1
@@ -29,6 +29,7 @@ import org.dromara.common.core.service.UserService;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 报修工单Service业务层处理
|
||||
@@ -140,7 +141,14 @@ public class HqPmRepairOrderServiceImpl implements IHqPmRepairOrderService {
|
||||
private LambdaQueryWrapper<HqPmRepairOrder> buildQueryWrapper(HqPmRepairOrderBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(HqPmRepairOrder::getCreateTime);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), HqPmRepairOrder::getOrderNo, bo.getOrderNo());
|
||||
// 使用 LIKE 进行模糊匹配,支持输入部分工单编号
|
||||
lqw.like(StringUtils.isNotBlank(bo.getOrderNo()), HqPmRepairOrder::getOrderNo, bo.getOrderNo());
|
||||
// 处理创建时间范围过滤条件
|
||||
Map<String, Object> params = bo.getParams();
|
||||
lqw.between(params != null && params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
HqPmRepairOrder::getCreateTime,
|
||||
params.get("beginCreateTime"),
|
||||
params.get("endCreateTime"));
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTitle()), HqPmRepairOrder::getTitle, bo.getTitle());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDescription()), HqPmRepairOrder::getDescription, bo.getDescription());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRepairLocation()), HqPmRepairOrder::getRepairLocation,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"doc":" 信息采集批次视图对象 xg_collection_batch\n\n @author Cursor AI\n @date 2025-01-12\n","fields":[{"name":"id","doc":" 主键ID\n"},{"name":"batchCode","doc":" 批次编号\n"},{"name":"batchName","doc":" 批次名称\n"},{"name":"batchDescription","doc":" 批次描述\n"},{"name":"batchType","doc":" 批次类型\n"},{"name":"academicYear","doc":" 学年\n"},{"name":"semester","doc":" 学期\n"},{"name":"scopeType","doc":" 适用范围\n"},{"name":"startTime","doc":" 开始时间\n"},{"name":"endTime","doc":" 结束时间\n"},{"name":"batchStatus","doc":" 批次状态\n"},{"name":"publishStatus","doc":" 发布状态\n"},{"name":"responsiblePersonName","doc":" 负责人姓名\n"},{"name":"contactPhone","doc":" 联系电话\n"},{"name":"remark","doc":" 备注\n"},{"name":"createTime","doc":" 创建时间\n"},{"name":"createBy","doc":" 创建者\n"},{"name":"updateTime","doc":" 更新时间\n"},{"name":"updateBy","doc":" 更新者\n"},{"name":"totalStudents","doc":" 总学生数\n"},{"name":"submittedStudents","doc":" 已提交学生数\n"},{"name":"approvedStudents","doc":" 已通过学生数\n"},{"name":"rejectedStudents","doc":" 已拒绝学生数\n"},{"name":"completionRate","doc":" 完成率\n"}],"enumConstants":[],"methods":[{"name":"getId","paramTypes":[],"doc":"主键ID"},{"name":"getBatchCode","paramTypes":[],"doc":"批次编号"},{"name":"getBatchName","paramTypes":[],"doc":"批次名称"},{"name":"getBatchDescription","paramTypes":[],"doc":"批次描述"},{"name":"getBatchType","paramTypes":[],"doc":"批次类型"},{"name":"getAcademicYear","paramTypes":[],"doc":"学年"},{"name":"getSemester","paramTypes":[],"doc":"学期"},{"name":"getScopeType","paramTypes":[],"doc":"适用范围"},{"name":"getStartTime","paramTypes":[],"doc":"开始时间"},{"name":"getEndTime","paramTypes":[],"doc":"结束时间"},{"name":"getBatchStatus","paramTypes":[],"doc":"批次状态"},{"name":"getPublishStatus","paramTypes":[],"doc":"发布状态"},{"name":"getResponsiblePersonName","paramTypes":[],"doc":"负责人姓名"},{"name":"getContactPhone","paramTypes":[],"doc":"联系电话"},{"name":"getRemark","paramTypes":[],"doc":"备注"},{"name":"getCreateTime","paramTypes":[],"doc":"创建时间"},{"name":"getCreateBy","paramTypes":[],"doc":"创建者"},{"name":"getUpdateTime","paramTypes":[],"doc":"更新时间"},{"name":"getUpdateBy","paramTypes":[],"doc":"更新者"},{"name":"getTotalStudents","paramTypes":[],"doc":"总学生数"},{"name":"getSubmittedStudents","paramTypes":[],"doc":"已提交学生数"},{"name":"getApprovedStudents","paramTypes":[],"doc":"已通过学生数"},{"name":"getRejectedStudents","paramTypes":[],"doc":"已拒绝学生数"},{"name":"getCompletionRate","paramTypes":[],"doc":"完成率"},{"name":"setId","paramTypes":["java.lang.Long"],"doc":"主键ID"},{"name":"setBatchCode","paramTypes":["java.lang.String"],"doc":"批次编号"},{"name":"setBatchName","paramTypes":["java.lang.String"],"doc":"批次名称"},{"name":"setBatchDescription","paramTypes":["java.lang.String"],"doc":"批次描述"},{"name":"setBatchType","paramTypes":["java.lang.String"],"doc":"批次类型"},{"name":"setAcademicYear","paramTypes":["java.lang.String"],"doc":"学年"},{"name":"setSemester","paramTypes":["java.lang.String"],"doc":"学期"},{"name":"setScopeType","paramTypes":["java.lang.String"],"doc":"适用范围"},{"name":"setStartTime","paramTypes":["java.util.Date"],"doc":"开始时间"},{"name":"setEndTime","paramTypes":["java.util.Date"],"doc":"结束时间"},{"name":"setBatchStatus","paramTypes":["java.lang.String"],"doc":"批次状态"},{"name":"setPublishStatus","paramTypes":["java.lang.String"],"doc":"发布状态"},{"name":"setResponsiblePersonName","paramTypes":["java.lang.String"],"doc":"负责人姓名"},{"name":"setContactPhone","paramTypes":["java.lang.String"],"doc":"联系电话"},{"name":"setRemark","paramTypes":["java.lang.String"],"doc":"备注"},{"name":"setCreateTime","paramTypes":["java.util.Date"],"doc":"创建时间"},{"name":"setCreateBy","paramTypes":["java.lang.Long"],"doc":"创建者"},{"name":"setUpdateTime","paramTypes":["java.util.Date"],"doc":"更新时间"},{"name":"setUpdateBy","paramTypes":["java.lang.Long"],"doc":"更新者"},{"name":"setTotalStudents","paramTypes":["java.lang.Integer"],"doc":"总学生数"},{"name":"setSubmittedStudents","paramTypes":["java.lang.Integer"],"doc":"已提交学生数"},{"name":"setApprovedStudents","paramTypes":["java.lang.Integer"],"doc":"已通过学生数"},{"name":"setRejectedStudents","paramTypes":["java.lang.Integer"],"doc":"已拒绝学生数"},{"name":"setCompletionRate","paramTypes":["java.lang.Double"],"doc":"完成率"}],"constructors":[]}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.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.XgAcademicYearBo;
|
||||
import org.dromara.xg.domain.vo.XgAcademicYearVo;
|
||||
import org.dromara.xg.service.IXgAcademicYearService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学年管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/academicYear")
|
||||
public class XgAcademicYearController extends BaseController {
|
||||
|
||||
private final IXgAcademicYearService academicYearService;
|
||||
|
||||
/**
|
||||
* 查询学年管理列表
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgAcademicYearVo> list(XgAcademicYearBo bo, PageQuery pageQuery) {
|
||||
return academicYearService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学年管理列表
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:export")
|
||||
@Log(title = "学年管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgAcademicYearBo bo, HttpServletResponse response) {
|
||||
List<XgAcademicYearVo> list = academicYearService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "学年管理", XgAcademicYearVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学年管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgAcademicYearVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(academicYearService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学年管理
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:add")
|
||||
@Log(title = "学年管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgAcademicYearBo bo) {
|
||||
return toAjax(academicYearService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学年管理
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:edit")
|
||||
@Log(title = "学年管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgAcademicYearBo bo) {
|
||||
return toAjax(academicYearService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学年管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:remove")
|
||||
@Log(title = "学年管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(academicYearService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前学年
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:query")
|
||||
@GetMapping("/current")
|
||||
public R<XgAcademicYearVo> getCurrentYear() {
|
||||
return R.ok(academicYearService.queryCurrentYear());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前学年
|
||||
*
|
||||
* @param id 学年ID
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:edit")
|
||||
@Log(title = "设置当前学年", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/setCurrent/{id}")
|
||||
public R<Void> setCurrentYear(@NotNull(message = "学年ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(academicYearService.setCurrentYear(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学年编码查询学年信息
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
*/
|
||||
@SaCheckPermission("xg:academicYear:query")
|
||||
@GetMapping("/getByCode/{yearCode}")
|
||||
public R<XgAcademicYearVo> getByYearCode(@PathVariable String yearCode) {
|
||||
return R.ok(academicYearService.queryByYearCode(yearCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学年编码是否存在
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
* @param id 学年ID(修改时使用)
|
||||
*/
|
||||
@GetMapping("/checkYearCode")
|
||||
public R<Boolean> checkYearCode(@RequestParam String yearCode, @RequestParam(required = false) Long id) {
|
||||
return R.ok(academicYearService.checkYearCodeExists(yearCode, id));
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
|
||||
+359
@@ -0,0 +1,359 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
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.common.excel.core.ExcelResult;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xg.domain.vo.XgClassCadreVo;
|
||||
import org.dromara.xg.domain.bo.XgClassCadreBo;
|
||||
import org.dromara.xg.service.IXgClassCadreService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 班级干部信息管理Controller
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/classCadre")
|
||||
public class XgClassCadreController extends BaseController {
|
||||
|
||||
private final IXgClassCadreService xgClassCadreService;
|
||||
|
||||
/**
|
||||
* 查询班级干部信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgClassCadreVo> list(XgClassCadreBo bo, PageQuery pageQuery) {
|
||||
return xgClassCadreService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班级干部信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:export")
|
||||
@Log(title = "班级干部信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgClassCadreBo bo, HttpServletResponse response) {
|
||||
List<XgClassCadreVo> list = xgClassCadreService.exportCadreList(bo);
|
||||
ExcelUtil.exportExcel(list, "班级干部信息", XgClassCadreVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级干部信息详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgClassCadreVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(xgClassCadreService.queryCadreWithDetails(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级干部信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:add")
|
||||
@Log(title = "班级干部信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassCadreBo bo) {
|
||||
return toAjax(xgClassCadreService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级干部信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:edit")
|
||||
@Log(title = "班级干部信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassCadreBo bo) {
|
||||
return toAjax(xgClassCadreService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级干部信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:remove")
|
||||
@Log(title = "班级干部信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(xgClassCadreService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
// ==================== 业务功能接口 ====================
|
||||
|
||||
/**
|
||||
* 根据班级ID查询班干部列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/class/{classId}")
|
||||
public R<List<XgClassCadreVo>> getCadresByClass(@NotNull(message = "班级ID不能为空") @PathVariable Long classId) {
|
||||
return R.ok(xgClassCadreService.queryCadresByClassId(classId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学生ID查询班干部信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/student/{studentId}")
|
||||
public R<List<XgClassCadreVo>> getCadresByStudent(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId) {
|
||||
return R.ok(xgClassCadreService.queryCadresByStudentId(studentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前在任班干部列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/current")
|
||||
public R<List<XgClassCadreVo>> getCurrentCadres(@RequestParam(required = false) Long classId) {
|
||||
return R.ok(xgClassCadreService.queryCurrentCadres(classId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据职务查询班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/position")
|
||||
public R<XgClassCadreVo> getCadreByPosition(
|
||||
@NotNull(message = "班级ID不能为空") @RequestParam Long classId,
|
||||
@NotBlank(message = "职务编码不能为空") @RequestParam String positionCode) {
|
||||
return R.ok(xgClassCadreService.queryCadreByPosition(classId, positionCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 任命班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:appoint")
|
||||
@Log(title = "任命班干部", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/appoint")
|
||||
public R<Void> appointCadre(@Validated(AddGroup.class) @RequestBody XgClassCadreBo bo) {
|
||||
return toAjax(xgClassCadreService.appointCadre(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 免职班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:dismiss")
|
||||
@Log(title = "免职班干部", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/dismiss/{cadreId}")
|
||||
public R<Void> dismissCadre(
|
||||
@NotNull(message = "班干部ID不能为空") @PathVariable Long cadreId,
|
||||
@NotBlank(message = "免职原因不能为空") @RequestParam String dismissalReason,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date dismissalDate) {
|
||||
return toAjax(xgClassCadreService.dismissCadre(cadreId, dismissalReason, dismissalDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 调任班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:transfer")
|
||||
@Log(title = "调任班干部", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/transfer/{cadreId}")
|
||||
public R<Void> transferCadre(
|
||||
@NotNull(message = "班干部ID不能为空") @PathVariable Long cadreId,
|
||||
@NotBlank(message = "新职务编码不能为空") @RequestParam String newPositionCode,
|
||||
@NotBlank(message = "新职务名称不能为空") @RequestParam String newPositionName,
|
||||
@NotBlank(message = "调任原因不能为空") @RequestParam String transferReason,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date effectiveDate) {
|
||||
return toAjax(xgClassCadreService.transferCadre(cadreId, newPositionCode, newPositionName, transferReason, effectiveDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 续任班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:renew")
|
||||
@Log(title = "续任班干部", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/renew/{cadreId}")
|
||||
public R<Void> renewCadre(
|
||||
@NotNull(message = "班干部ID不能为空") @PathVariable Long cadreId,
|
||||
@NotNull(message = "新任期时长不能为空") @Min(value = 1, message = "新任期时长最少1个月") @Max(value = 48, message = "新任期时长最多48个月") @RequestParam Integer newTermDuration,
|
||||
@NotBlank(message = "续任原因不能为空") @RequestParam String renewalReason) {
|
||||
return toAjax(xgClassCadreService.renewCadre(cadreId, newTermDuration, renewalReason));
|
||||
}
|
||||
|
||||
/**
|
||||
* 班干部辞职
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:resign")
|
||||
@Log(title = "班干部辞职", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/resign/{cadreId}")
|
||||
public R<Void> resignCadre(
|
||||
@NotNull(message = "班干部ID不能为空") @PathVariable Long cadreId,
|
||||
@NotBlank(message = "辞职原因不能为空") @RequestParam String resignationReason,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date resignationDate) {
|
||||
return toAjax(xgClassCadreService.resignCadre(cadreId, resignationReason, resignationDate));
|
||||
}
|
||||
|
||||
// ==================== 统计查询接口 ====================
|
||||
|
||||
/**
|
||||
* 查询即将到期的班干部列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/expiring")
|
||||
public R<List<XgClassCadreVo>> getExpiringCadres(@RequestParam(defaultValue = "30") Integer days) {
|
||||
return R.ok(xgClassCadreService.queryExpiringCadres(days));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已到期的班干部列表
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/expired")
|
||||
public R<List<XgClassCadreVo>> getExpiredCadres() {
|
||||
return R.ok(xgClassCadreService.queryExpiredCadres());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学院查询班干部统计
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/college/{collegeName}")
|
||||
public R<List<XgClassCadreVo>> getCadresByCollege(@NotBlank(message = "学院名称不能为空") @PathVariable String collegeName) {
|
||||
return R.ok(xgClassCadreService.queryCadresByCollege(collegeName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据年级查询班干部统计
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/grade/{grade}")
|
||||
public R<List<XgClassCadreVo>> getCadresByGrade(@NotBlank(message = "年级不能为空") @PathVariable String grade) {
|
||||
return R.ok(xgClassCadreService.queryCadresByGrade(grade));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班干部任期统计
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/term-statistics")
|
||||
public R<List<XgClassCadreVo>> getCadreTermStatistics(
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
return R.ok(xgClassCadreService.queryCadreTermStatistics(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据职务级别查询班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/level/{positionLevel}")
|
||||
public R<List<XgClassCadreVo>> getCadresByLevel(@NotNull(message = "职务级别不能为空") @PathVariable Integer positionLevel) {
|
||||
return R.ok(xgClassCadreService.queryCadresByPositionLevel(positionLevel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班干部工作表现统计
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/performance/{performance}")
|
||||
public R<List<XgClassCadreVo>> getCadresByPerformance(@NotBlank(message = "工作表现不能为空") @PathVariable String performance) {
|
||||
return R.ok(xgClassCadreService.queryCadresByPerformance(performance));
|
||||
}
|
||||
|
||||
// ==================== 辅助功能接口 ====================
|
||||
|
||||
/**
|
||||
* 检查职务是否已被占用
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/check-position")
|
||||
public R<Boolean> checkPositionOccupied(
|
||||
@NotNull(message = "班级ID不能为空") @RequestParam Long classId,
|
||||
@NotBlank(message = "职务编码不能为空") @RequestParam String positionCode,
|
||||
@RequestParam(required = false) Long excludeId) {
|
||||
return R.ok(xgClassCadreService.checkPositionOccupied(classId, positionCode, excludeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学生是否已有其他职务
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:list")
|
||||
@GetMapping("/check-student")
|
||||
public R<Boolean> checkStudentHasOtherPosition(
|
||||
@NotNull(message = "学生ID不能为空") @RequestParam Long studentId,
|
||||
@RequestParam(required = false) Long excludeId) {
|
||||
return R.ok(xgClassCadreService.checkStudentHasOtherPosition(studentId, excludeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新班干部状态
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:edit")
|
||||
@Log(title = "批量更新班干部状态", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/batch-status")
|
||||
public R<Void> batchUpdateStatus(
|
||||
@NotEmpty(message = "班干部ID列表不能为空") @RequestParam List<Long> cadreIds,
|
||||
@NotBlank(message = "状态不能为空") @RequestParam String status) {
|
||||
return toAjax(xgClassCadreService.batchUpdateCadreStatus(cadreIds, status));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动处理到期班干部
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:process")
|
||||
@Log(title = "自动处理到期班干部", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/auto-process-expired")
|
||||
public R<Void> autoProcessExpired() {
|
||||
return toAjax(xgClassCadreService.autoProcessExpiredCadres());
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送到期提醒通知
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:notify")
|
||||
@Log(title = "发送到期提醒通知", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/send-reminder")
|
||||
public R<Void> sendReminder(@RequestParam(defaultValue = "30") Integer days) {
|
||||
return toAjax(xgClassCadreService.sendExpirationReminder(days));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入班干部信息
|
||||
*/
|
||||
@SaCheckPermission("xg:classCadre:import")
|
||||
@Log(title = "班级干部信息", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/import")
|
||||
public R<Void> importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<XgClassCadreVo> result = ExcelUtil.importExcel(file.getInputStream(), XgClassCadreVo.class, true);
|
||||
List<XgClassCadreVo> cadreList = result.getList();
|
||||
String operName = LoginHelper.getUsername();
|
||||
String message = xgClassCadreService.importCadreList(cadreList, updateSupport, operName);
|
||||
return R.ok(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入模板
|
||||
*/
|
||||
@PostMapping("/import-template")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(List.of(), "班级干部信息", XgClassCadreVo.class, response);
|
||||
}
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 信息采集批次管理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@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:list")
|
||||
@GetMapping("/listAll")
|
||||
public R<List<XgCollectionBatchVo>> listAll(XgCollectionBatchBo bo) {
|
||||
List<XgCollectionBatchVo> list = collectionBatchService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出信息采集批次列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:export")
|
||||
@Log(title = "信息采集批次", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgCollectionBatchBo bo, HttpServletResponse response) {
|
||||
List<XgCollectionBatchVo> list = collectionBatchService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "信息采集批次", XgCollectionBatchVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息采集批次详细信息
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgCollectionBatchVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(collectionBatchService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
@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("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(collectionBatchService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:publish")
|
||||
@Log(title = "发布信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/publish/{id}")
|
||||
public R<Void> publishBatch(@NotNull(message = "批次ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(collectionBatchService.publishBatch(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消发布批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:unpublish")
|
||||
@Log(title = "取消发布信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/unpublish/{id}")
|
||||
public R<Void> unpublishBatch(@NotNull(message = "批次ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(collectionBatchService.unpublishBatch(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:complete")
|
||||
@Log(title = "结束信息采集批次", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/complete/{id}")
|
||||
public R<Void> completeBatch(@NotNull(message = "批次ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(collectionBatchService.completeBatch(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:copy")
|
||||
@Log(title = "复制信息采集批次", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/copy/{id}")
|
||||
public R<Void> copyBatch(@NotNull(message = "批次ID不能为空") @PathVariable Long id,
|
||||
@RequestParam String newBatchName,
|
||||
@RequestParam String newBatchCode) {
|
||||
return toAjax(collectionBatchService.copyBatch(id, newBatchName, newBatchCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次统计信息
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@GetMapping("/statistics/{id}")
|
||||
public R<Map<String, Object>> getBatchStatistics(@NotNull(message = "批次ID不能为空") @PathVariable Long id) {
|
||||
return R.ok(collectionBatchService.getBatchStatistics(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前活跃批次
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/active")
|
||||
public R<List<XgCollectionBatchVo>> getActiveBatches() {
|
||||
return R.ok(collectionBatchService.getActiveBatches());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新批次统计信息
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:statistics")
|
||||
@Log(title = "更新批次统计信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/updateStatistics/{id}")
|
||||
public R<Void> updateBatchStatistics(@NotNull(message = "批次ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(collectionBatchService.updateBatchStatistics(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次选项列表
|
||||
*/
|
||||
@SaCheckPermission("xg:collectionBatch:list")
|
||||
@GetMapping("/options")
|
||||
public R<List<Map<String, Object>>> getBatchOptions() {
|
||||
return R.ok(collectionBatchService.getBatchOptions());
|
||||
}
|
||||
}
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.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.XgSemesterBo;
|
||||
import org.dromara.xg.domain.vo.XgSemesterVo;
|
||||
import org.dromara.xg.service.IXgSemesterService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学期管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/semester")
|
||||
public class XgSemesterController extends BaseController {
|
||||
|
||||
private final IXgSemesterService semesterService;
|
||||
|
||||
/**
|
||||
* 查询学期管理列表
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XgSemesterVo> list(XgSemesterBo bo, PageQuery pageQuery) {
|
||||
return semesterService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学期管理列表
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:export")
|
||||
@Log(title = "学期管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XgSemesterBo bo, HttpServletResponse response) {
|
||||
List<XgSemesterVo> list = semesterService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "学期管理", XgSemesterVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学期管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XgSemesterVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(semesterService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学期管理
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:add")
|
||||
@Log(title = "学期管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgSemesterBo bo) {
|
||||
return toAjax(semesterService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学期管理
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:edit")
|
||||
@Log(title = "学期管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgSemesterBo bo) {
|
||||
return toAjax(semesterService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学期管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:remove")
|
||||
@Log(title = "学期管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(semesterService.deleteWithValidByIds(List.of(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学年ID查询学期列表
|
||||
*
|
||||
* @param academicYearId 学年ID
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:query")
|
||||
@GetMapping("/getByAcademicYear/{academicYearId}")
|
||||
public R<List<XgSemesterVo>> getByAcademicYearId(@PathVariable Long academicYearId) {
|
||||
return R.ok(semesterService.queryByAcademicYearId(academicYearId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前学期
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:query")
|
||||
@GetMapping("/current")
|
||||
public R<XgSemesterVo> getCurrentSemester() {
|
||||
return R.ok(semesterService.queryCurrentSemester());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前学期
|
||||
*
|
||||
* @param id 学期ID
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:edit")
|
||||
@Log(title = "设置当前学期", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/setCurrent/{id}")
|
||||
public R<Void> setCurrentSemester(@NotNull(message = "学期ID不能为空") @PathVariable Long id) {
|
||||
return toAjax(semesterService.setCurrentSemester(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可用的学期选项
|
||||
*/
|
||||
@SaCheckPermission("xg:semester:query")
|
||||
@GetMapping("/availableOptions")
|
||||
public R<List<XgSemesterVo>> getAvailableOptions() {
|
||||
return R.ok(semesterService.queryAvailableOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验学期名称是否唯一
|
||||
*
|
||||
* @param semesterName 学期名称
|
||||
* @param id 学期ID
|
||||
*/
|
||||
@GetMapping("/checkSemesterName")
|
||||
public R<Boolean> checkSemesterName(@RequestParam String semesterName, @RequestParam(required = false) Long id) {
|
||||
return R.ok(semesterService.checkSemesterNameUnique(semesterName, id));
|
||||
}
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package org.dromara.xg.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
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.XgStudentInfoApprovalBo;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoApprovalVo;
|
||||
import org.dromara.xg.service.IXgStudentInfoApprovalService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生信息审核管理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xg/studentInfoApproval")
|
||||
public class XgStudentInfoApprovalController extends BaseController {
|
||||
|
||||
private final IXgStudentInfoApprovalService studentInfoApprovalService;
|
||||
|
||||
/**
|
||||
* 查询待审核的学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@GetMapping("/pending")
|
||||
public TableDataInfo<XgStudentInfoApprovalVo> queryPendingApprovalList(XgStudentInfoApprovalBo bo, PageQuery pageQuery) {
|
||||
return studentInfoApprovalService.queryPendingApprovalList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已审核的学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@GetMapping("/approved")
|
||||
public TableDataInfo<XgStudentInfoApprovalVo> queryApprovedList(XgStudentInfoApprovalBo bo, PageQuery pageQuery) {
|
||||
return studentInfoApprovalService.queryApprovedList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批学生信息
|
||||
*/
|
||||
@PostMapping("/approve")
|
||||
public R<Void> approveStudentInfo(@RequestParam @NotNull(message = "学生ID不能为空") Long studentId,
|
||||
@RequestParam @NotNull(message = "批次ID不能为空") Long batchId,
|
||||
@RequestParam @NotNull(message = "审核结果不能为空") Boolean approved,
|
||||
@RequestParam String comments) {
|
||||
String approvalStatus = approved ? "approved" : "rejected";
|
||||
return toAjax(studentInfoApprovalService.approveStudentInfo(studentId, batchId, approvalStatus, comments));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量审批学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@Log(title = "批量审核学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batchApprove")
|
||||
public R<Void> batchApproveStudentInfo(@NotEmpty(message = "学生ID列表不能为空") @RequestBody List<Long> studentIds,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId,
|
||||
@NotNull(message = "审核结果不能为空") @RequestParam Boolean approved,
|
||||
@RequestParam(required = false) String comments) {
|
||||
String approvalStatus = approved ? "approved" : "rejected";
|
||||
return toAjax(studentInfoApprovalService.batchApproveStudentInfo(studentIds, batchId, approvalStatus, comments));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销审批
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@Log(title = "撤销审核", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/revoke")
|
||||
public R<Void> revokeApproval(@NotNull(message = "学生ID不能为空") @RequestParam Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId,
|
||||
@RequestParam(required = false) String reason) {
|
||||
return toAjax(studentInfoApprovalService.revokeApproval(studentId, batchId, reason));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生信息审核历史
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@GetMapping("/history")
|
||||
public R<List<XgStudentInfoApprovalVo>> queryApprovalHistory(@NotNull(message = "学生ID不能为空") @RequestParam Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
return R.ok(studentInfoApprovalService.queryApprovalHistory(studentId, batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批统计
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@GetMapping("/statistics/{batchId}")
|
||||
public R<Map<String, Object>> getApprovalStatistics(@PathVariable @NotNull(message = "批次ID不能为空") Long batchId) {
|
||||
return success(studentInfoApprovalService.getApprovalStatistics(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查审批权限
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:approve")
|
||||
@GetMapping("/checkPermission/{batchId}")
|
||||
public R<Boolean> checkApprovalPermission(@PathVariable @NotNull(message = "批次ID不能为空") Long batchId) {
|
||||
return success(studentInfoApprovalService.checkApprovalPermission(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出审核结果
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:export")
|
||||
@Log(title = "导出审核结果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void exportApprovalResults(XgStudentInfoApprovalBo bo, HttpServletResponse response) {
|
||||
List<XgStudentInfoApprovalVo> list = studentInfoApprovalService.exportApprovalResult(bo);
|
||||
ExcelUtil.exportExcel(list, "审批结果", XgStudentInfoApprovalVo.class, response);
|
||||
}
|
||||
}
|
||||
+153
-2
@@ -3,6 +3,7 @@ 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;
|
||||
@@ -97,6 +98,40 @@ public class XgStudentInfoController extends BaseController {
|
||||
return R.ok(studentInfoService.queryByClassCode(classCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班级ID查询学生信息(用于班级干部管理)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:list")
|
||||
@GetMapping("/byClassId/{classId}")
|
||||
public R<List<XgStudentInfoVo>> getByClassId(@NotNull(message = "班级ID不能为空") @PathVariable Long classId) {
|
||||
return R.ok(studentInfoService.queryByClassId(classId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班级ID获取学生选项列表(用于班级干部管理下拉框)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:list")
|
||||
@GetMapping("/optionsByClassId/{classId}")
|
||||
public R<List<Map<String, Object>>> getStudentOptionsByClassId(@NotNull(message = "班级ID不能为空") @PathVariable Long classId) {
|
||||
List<XgStudentInfoVo> students = studentInfoService.queryByClassId(classId);
|
||||
|
||||
List<Map<String, Object>> options = students.stream()
|
||||
.map(student -> {
|
||||
Map<String, Object> option = new java.util.HashMap<>();
|
||||
option.put("value", student.getId());
|
||||
option.put("label", student.getName() + "(" + student.getStudentNo() + ")");
|
||||
option.put("studentNo", student.getStudentNo());
|
||||
option.put("studentName", student.getName());
|
||||
option.put("className", student.getClassName());
|
||||
option.put("gender", student.getGender());
|
||||
option.put("phone", student.getPhone());
|
||||
return option;
|
||||
})
|
||||
.toList();
|
||||
|
||||
return R.ok(options);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学院学生列表
|
||||
*/
|
||||
@@ -390,7 +425,7 @@ public class XgStudentInfoController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生选项列表(用于下拉选择)
|
||||
* 获取学生选项(用于下拉框)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:list")
|
||||
@GetMapping("/studentOptions")
|
||||
@@ -398,6 +433,7 @@ public class XgStudentInfoController extends BaseController {
|
||||
@RequestParam(required = false) String name,
|
||||
@RequestParam(required = false) String classCode,
|
||||
@RequestParam(required = false) String collegeCode) {
|
||||
|
||||
XgStudentInfoBo bo = new XgStudentInfoBo();
|
||||
if (name != null) {
|
||||
bo.setName(name);
|
||||
@@ -412,7 +448,7 @@ public class XgStudentInfoController extends BaseController {
|
||||
|
||||
List<Map<String, Object>> options = students.stream()
|
||||
.map(student -> {
|
||||
Map<String, Object> option = new java.util.HashMap<>();
|
||||
Map<String, Object> option = new HashMap<>();
|
||||
option.put("value", student.getId());
|
||||
option.put("label", student.getName() + "(" + student.getStudentNo() + ")");
|
||||
option.put("studentNo", student.getStudentNo());
|
||||
@@ -426,4 +462,119 @@ public class XgStudentInfoController extends BaseController {
|
||||
return R.ok(options);
|
||||
}
|
||||
|
||||
// ==================== 批次相关功能 ====================
|
||||
|
||||
/**
|
||||
* 根据批次ID查询学生信息列表
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:list")
|
||||
@GetMapping("/byBatch/{batchId}")
|
||||
public TableDataInfo<XgStudentInfoVo> getByBatchId(@NotNull(message = "批次ID不能为空") @PathVariable Long batchId,
|
||||
PageQuery pageQuery) {
|
||||
// 创建查询条件,设置批次ID
|
||||
XgStudentInfoBo bo = new XgStudentInfoBo();
|
||||
bo.setBatchId(batchId);
|
||||
return studentInfoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生信息关联到批次
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:batch")
|
||||
@Log(title = "学生信息关联批次", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/associateToBatch")
|
||||
public R<Void> associateStudentToBatch(@NotNull(message = "学生ID不能为空") @RequestParam Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
return toAjax(studentInfoService.associateStudentToBatch(studentId, batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量关联学生到批次
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:batch")
|
||||
@Log(title = "批量关联学生到批次", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batchAssociateToBatch")
|
||||
public R<Void> batchAssociateStudentsToBatch(@NotEmpty(message = "学生ID列表不能为空") @RequestBody List<Long> studentIds,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
return toAjax(studentInfoService.batchAssociateStudentsToBatch(studentIds, batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生提交信息(调用现有的提交审核方法)
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:submit")
|
||||
@Log(title = "学生提交信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/{studentId}/submit")
|
||||
public R<Void> submitStudentInfo(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
// 调用现有的提交审核方法
|
||||
return submitForAudit(studentId, batchId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生撤回提交
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:submit")
|
||||
@Log(title = "学生撤回提交", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/{studentId}/withdraw")
|
||||
public R<Void> withdrawSubmission(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
return toAjax(studentInfoService.withdrawSubmission(studentId, batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生批次进度
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/{studentId}/batchProgress")
|
||||
public R<Map<String, Object>> getStudentBatchProgress(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
return R.ok(studentInfoService.getStudentBatchProgress(studentId, batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量审核学生信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:audit")
|
||||
@Log(title = "批量审核学生信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batchAudit")
|
||||
public R<Void> batchAuditStudentInfo(@NotEmpty(message = "学生ID列表不能为空") @RequestBody List<Long> studentIds,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId,
|
||||
@NotBlank(message = "审核结果不能为空") @RequestParam String auditResult,
|
||||
@RequestParam(required = false) String auditComment) {
|
||||
return toAjax(studentInfoService.batchAuditStudentInfo(studentIds, batchId, auditResult, auditComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学生编辑权限
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:query")
|
||||
@GetMapping("/checkEditPermission")
|
||||
public R<Boolean> checkEditPermission(@NotNull(message = "学生ID不能为空") @RequestParam Long studentId,
|
||||
@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
// 这里需要调用权限服务检查
|
||||
return R.ok(true); // 临时返回true,实际应该调用权限服务
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生批次统计信息
|
||||
*/
|
||||
@SaCheckPermission("xg:studentInfo:statistics")
|
||||
@GetMapping("/batchStatistics")
|
||||
public R<Map<String, Object>> getStudentBatchStatistics(@NotNull(message = "批次ID不能为空") @RequestParam Long batchId) {
|
||||
// 这里需要调用统计服务
|
||||
Map<String, Object> statistics = new HashMap<>();
|
||||
statistics.put("batchId", batchId);
|
||||
statistics.put("totalCount", 0);
|
||||
statistics.put("submittedCount", 0);
|
||||
statistics.put("approvedCount", 0);
|
||||
statistics.put("rejectedCount", 0);
|
||||
return R.ok(statistics);
|
||||
}
|
||||
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 学年管理对象 xg_academic_year
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_academic_year")
|
||||
public class XgAcademicYear extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学年编码,如2024-2025
|
||||
*/
|
||||
private String yearCode;
|
||||
|
||||
/**
|
||||
* 学年名称,如2024-2025学年
|
||||
*/
|
||||
private String yearName;
|
||||
|
||||
/**
|
||||
* 学年开始日期
|
||||
*/
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 学年结束日期
|
||||
*/
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学年:0-否,1-是
|
||||
*/
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 状态:active-有效,inactive-无效
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 学年描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
// 手动添加缺失的getter方法,解决编译错误
|
||||
public String getYearCode() {
|
||||
return yearCode;
|
||||
}
|
||||
|
||||
public LocalDate getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public String getYearName() {
|
||||
return yearName;
|
||||
}
|
||||
|
||||
// 手动添加缺失的getter方法,解决编译错误
|
||||
public Boolean getIsCurrent() {
|
||||
return isCurrent;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
+40
-85
@@ -1,24 +1,25 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 审核记录对象 xg_audit_record
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_audit_record")
|
||||
public class XgAuditRecord extends TenantEntity {
|
||||
public class XgAuditRecord extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -26,105 +27,54 @@ public class XgAuditRecord extends TenantEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务类型:1-学生信息审核,2-班级信息审核,3-批次信息审核
|
||||
*/
|
||||
private String businessType;
|
||||
|
||||
/**
|
||||
* 业务ID,关联具体业务表的主键
|
||||
*/
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id(学生信息审核时必填)
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 班级ID,关联xg_class_info.id
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 批次ID,关联xg_collection_batch.id
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 审核级别:1-一级审核,2-二级审核,3-三级审核,4-四级审核
|
||||
* 审核级别:1-初审,2-复审,3-终审
|
||||
*/
|
||||
private Integer auditLevel;
|
||||
|
||||
/**
|
||||
* 当前审核级别
|
||||
* 审核类型:submit-提交,approve-通过,reject-拒绝,return-退回
|
||||
*/
|
||||
private Integer currentLevel;
|
||||
private String auditType;
|
||||
|
||||
/**
|
||||
* 审核状态:1-待审核,2-审核中,3-审核通过,4-审核驳回,5-已退回
|
||||
* 审核状态:pending-待审核,approved-已通过,rejected-已拒绝
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 审核结果:1-待审核,2-通过,3-驳回,4-退回修改,5-转审
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditResult;
|
||||
|
||||
/**
|
||||
* 提交人ID,关联sys_user.id
|
||||
*/
|
||||
private Long submitUserId;
|
||||
|
||||
/**
|
||||
* 提交人姓名
|
||||
*/
|
||||
private String submitUserName;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTime;
|
||||
|
||||
/**
|
||||
* 审核人ID,关联sys_user.id
|
||||
*/
|
||||
private Long auditUserId;
|
||||
private Long auditorId;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String auditUserName;
|
||||
private String auditorName;
|
||||
|
||||
/**
|
||||
* 审核人角色
|
||||
*/
|
||||
private String auditorRole;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
@@ -132,39 +82,44 @@ public class XgAuditRecord extends TenantEntity {
|
||||
private String auditComment;
|
||||
|
||||
/**
|
||||
* 审核耗时(分钟)
|
||||
* 变更字段(JSON格式)
|
||||
*/
|
||||
private Integer auditDuration;
|
||||
private String changedFields;
|
||||
|
||||
/**
|
||||
* 是否需要下级审核:0-否,1-是
|
||||
* 下一审核人ID
|
||||
*/
|
||||
private Integer needNextLevel;
|
||||
private Long nextAuditorId;
|
||||
|
||||
/**
|
||||
* 下级审核人ID,关联sys_user.id
|
||||
* 下一审核人姓名
|
||||
*/
|
||||
private Long nextAuditUserId;
|
||||
private String nextAuditorName;
|
||||
|
||||
/**
|
||||
* 下级审核人姓名
|
||||
* 是否最终审核:0-否,1-是
|
||||
*/
|
||||
private String nextAuditUserName;
|
||||
private Boolean isFinal;
|
||||
|
||||
/**
|
||||
* 变更内容,JSON格式存储变更的字段和内容
|
||||
* 处理时长(分钟)
|
||||
*/
|
||||
private String changeContent;
|
||||
private Integer processDuration;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
* IP地址
|
||||
*/
|
||||
private String changeReason;
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 审核进度,格式:当前级别/总级别,如:2/3
|
||||
* 用户代理
|
||||
*/
|
||||
private String auditProgress;
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 附件URL列表(JSON格式)
|
||||
*/
|
||||
private String attachmentUrls;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 批次操作日志对象 xg_batch_operation_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_batch_operation_log")
|
||||
public class XgBatchOperationLog extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID,关联xg_collection_batch.id
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 操作类型:CREATE-创建,UPDATE-修改,DELETE-删除,PUBLISH-发布,UNPUBLISH-取消发布,COMPLETE-完成,COPY-复制
|
||||
*/
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 操作描述
|
||||
*/
|
||||
private String operationDescription;
|
||||
|
||||
/**
|
||||
* 操作前数据(JSON格式)
|
||||
*/
|
||||
private String beforeData;
|
||||
|
||||
/**
|
||||
* 操作后数据(JSON格式)
|
||||
*/
|
||||
private String afterData;
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
private LocalDateTime operationTime;
|
||||
|
||||
/**
|
||||
* 操作IP地址
|
||||
*/
|
||||
private String operationIp;
|
||||
|
||||
/**
|
||||
* 操作结果:SUCCESS-成功,FAILED-失败
|
||||
*/
|
||||
private String operationResult;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 操作详情
|
||||
*/
|
||||
private String operationDetails;
|
||||
|
||||
/**
|
||||
* 操作人(兼容字段)
|
||||
*/
|
||||
private Long operationBy;
|
||||
|
||||
// 手动添加缺失的getter/setter方法
|
||||
public String getOperationDetails() {
|
||||
return operationDetails;
|
||||
}
|
||||
|
||||
public void setOperationDetails(String operationDetails) {
|
||||
this.operationDetails = operationDetails;
|
||||
}
|
||||
|
||||
public Long getOperationBy() {
|
||||
return operationBy;
|
||||
}
|
||||
|
||||
public void setOperationBy(Long operationBy) {
|
||||
this.operationBy = operationBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置批次ID
|
||||
*/
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作类型
|
||||
*/
|
||||
public void setOperationType(String operationType) {
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作描述
|
||||
*/
|
||||
public void setOperationDescription(String operationDescription) {
|
||||
this.operationDescription = operationDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作者ID
|
||||
*/
|
||||
public void setOperatorId(Long operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作者姓名
|
||||
*/
|
||||
public void setOperatorName(String operatorName) {
|
||||
this.operatorName = operatorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作时间
|
||||
*/
|
||||
public void setOperationTime(LocalDateTime operationTime) {
|
||||
this.operationTime = operationTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作结果
|
||||
*/
|
||||
public void setOperationResult(String operationResult) {
|
||||
this.operationResult = operationResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
// 手动添加setter方法以确保编译通过
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
+347
@@ -0,0 +1,347 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 批次权限配置对象 xg_batch_permission
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_batch_permission")
|
||||
public class XgBatchPermission extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID,关联xg_collection_batch.id
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 用户类型:student-学生,counselor-辅导员,head_teacher-班主任,college_admin-学院管理员,dept_admin-学生处管理员
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 权限类型:read-查看,write-编辑,audit-审核,manage-管理
|
||||
*/
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限范围:all-全部,college-学院,class-班级,self-本人
|
||||
*/
|
||||
private String scopeType;
|
||||
|
||||
/**
|
||||
* 权限范围ID列表(JSON格式)
|
||||
*/
|
||||
private String scopeIds;
|
||||
|
||||
/**
|
||||
* 是否可查看:0-否,1-是
|
||||
*/
|
||||
private Boolean canView;
|
||||
|
||||
/**
|
||||
* 是否可编辑:0-否,1-是
|
||||
*/
|
||||
private Boolean canEdit;
|
||||
|
||||
/**
|
||||
* 是否可提交:0-否,1-是
|
||||
*/
|
||||
private Boolean canSubmit;
|
||||
|
||||
/**
|
||||
* 是否可审核:0-否,1-是
|
||||
*/
|
||||
private Boolean canApprove;
|
||||
|
||||
/**
|
||||
* 是否可拒绝:0-否,1-是
|
||||
*/
|
||||
private Boolean canReject;
|
||||
|
||||
/**
|
||||
* 是否可撤回:0-否,1-是
|
||||
*/
|
||||
private Boolean canWithdraw;
|
||||
|
||||
/**
|
||||
* 是否允许删除
|
||||
*/
|
||||
private Boolean canDelete;
|
||||
|
||||
/**
|
||||
* 是否允许导出
|
||||
*/
|
||||
private Boolean canExport;
|
||||
|
||||
/**
|
||||
* 是否允许导入
|
||||
*/
|
||||
private Boolean canImport;
|
||||
|
||||
/**
|
||||
* 权限开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 权限结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 是否激活:0-否,1-是
|
||||
*/
|
||||
private Boolean isActive;
|
||||
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
// ==================== 手动添加的 getter/setter 方法 ====================
|
||||
|
||||
/**
|
||||
* 获取批次ID
|
||||
*/
|
||||
public Long getBatchId() {
|
||||
return this.batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置批次ID
|
||||
*/
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色ID
|
||||
*/
|
||||
public Long getRoleId() {
|
||||
return this.roleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名称
|
||||
*/
|
||||
public String getRoleName() {
|
||||
return this.roleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限类型
|
||||
*/
|
||||
public String getPermissionType() {
|
||||
return this.permissionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可查看
|
||||
*/
|
||||
public Boolean getCanView() {
|
||||
return this.canView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可编辑
|
||||
*/
|
||||
public Boolean getCanEdit() {
|
||||
return this.canEdit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可提交
|
||||
*/
|
||||
public Boolean getCanSubmit() {
|
||||
return this.canSubmit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可审核
|
||||
*/
|
||||
public Boolean getCanApprove() {
|
||||
return this.canApprove;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可拒绝
|
||||
*/
|
||||
public Boolean getCanReject() {
|
||||
return this.canReject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否可撤回
|
||||
*/
|
||||
public Boolean getCanWithdraw() {
|
||||
return this.canWithdraw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限开始时间
|
||||
*/
|
||||
public LocalDateTime getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限结束时间
|
||||
*/
|
||||
public LocalDateTime getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否激活
|
||||
*/
|
||||
public Boolean getIsActive() {
|
||||
return this.isActive;
|
||||
}
|
||||
|
||||
// ==================== 剩余的 setter 方法 ====================
|
||||
|
||||
/**
|
||||
* 设置角色ID
|
||||
*/
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置角色名称
|
||||
*/
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置权限类型
|
||||
*/
|
||||
public void setPermissionType(String permissionType) {
|
||||
this.permissionType = permissionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可查看
|
||||
*/
|
||||
public void setCanView(Boolean canView) {
|
||||
this.canView = canView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可编辑
|
||||
*/
|
||||
public void setCanEdit(Boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可提交
|
||||
*/
|
||||
public void setCanSubmit(Boolean canSubmit) {
|
||||
this.canSubmit = canSubmit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可审核
|
||||
*/
|
||||
public void setCanApprove(Boolean canApprove) {
|
||||
this.canApprove = canApprove;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可拒绝
|
||||
*/
|
||||
public void setCanReject(Boolean canReject) {
|
||||
this.canReject = canReject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否可撤回
|
||||
*/
|
||||
public void setCanWithdraw(Boolean canWithdraw) {
|
||||
this.canWithdraw = canWithdraw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置权限开始时间
|
||||
*/
|
||||
public void setStartTime(LocalDateTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置结束时间
|
||||
*/
|
||||
public void setEndTime(LocalDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否激活
|
||||
*/
|
||||
public void setIsActive(Boolean isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
public Boolean getCanDelete() {
|
||||
return canDelete;
|
||||
}
|
||||
|
||||
public void setCanDelete(Boolean canDelete) {
|
||||
this.canDelete = canDelete;
|
||||
}
|
||||
|
||||
public Boolean getCanExport() {
|
||||
return canExport;
|
||||
}
|
||||
|
||||
public void setCanExport(Boolean canExport) {
|
||||
this.canExport = canExport;
|
||||
}
|
||||
|
||||
public Boolean getCanImport() {
|
||||
return canImport;
|
||||
}
|
||||
|
||||
public void setCanImport(Boolean canImport) {
|
||||
this.canImport = canImport;
|
||||
}
|
||||
|
||||
}
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 批次学生关联对象 xg_batch_student_relation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_batch_student_relation")
|
||||
public class XgBatchStudentRelation extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
@TableId
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNumber;
|
||||
|
||||
/**
|
||||
* 提交状态:DRAFT-草稿,SUBMITTED-已提交,WITHDRAWN-已撤回
|
||||
*/
|
||||
private String submissionStatus;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime submissionTime;
|
||||
|
||||
/**
|
||||
* 审核状态:PENDING-待审核,APPROVED-已审核,REJECTED-已拒绝
|
||||
*/
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime approvalTime;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String approvalComments;
|
||||
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastEditTime;
|
||||
|
||||
/**
|
||||
* 提交次数
|
||||
*/
|
||||
private Integer submissionCount;
|
||||
|
||||
/**
|
||||
* 是否允许编辑:0-否,1-是
|
||||
*/
|
||||
private Integer allowEdit;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
private String extField3;
|
||||
|
||||
// 手动添加缺失的getter/setter方法,解决编译错误
|
||||
public Long getId() {
|
||||
return relationId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.relationId = id;
|
||||
}
|
||||
|
||||
public Long getStudentId() {
|
||||
return studentId;
|
||||
}
|
||||
|
||||
public void setStudentId(Long studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getApprovalBy() {
|
||||
return approvalBy;
|
||||
}
|
||||
|
||||
public String getApprovalComments() {
|
||||
return approvalComments;
|
||||
}
|
||||
|
||||
public void setSubmissionTime(LocalDateTime submissionTime) {
|
||||
this.submissionTime = submissionTime;
|
||||
}
|
||||
|
||||
public Integer getSubmissionCount() {
|
||||
return submissionCount;
|
||||
}
|
||||
|
||||
public void setSubmissionCount(Integer submissionCount) {
|
||||
this.submissionCount = submissionCount;
|
||||
}
|
||||
|
||||
public LocalDateTime getLastEditTime() {
|
||||
return lastEditTime;
|
||||
}
|
||||
|
||||
// 为了兼容Service中的方法引用,添加以下方法
|
||||
public Long getBatchId() {
|
||||
return this.batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getSubmissionStatus() {
|
||||
return this.submissionStatus;
|
||||
}
|
||||
|
||||
public void setSubmissionStatus(String submissionStatus) {
|
||||
this.submissionStatus = submissionStatus;
|
||||
}
|
||||
|
||||
public String getApprovalStatus() {
|
||||
return this.approvalStatus;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(String approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提交时间
|
||||
*/
|
||||
public LocalDateTime getSubmissionTime() {
|
||||
return this.submissionTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批时间
|
||||
*/
|
||||
public LocalDateTime getApprovalTime() {
|
||||
return this.approvalTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审批时间
|
||||
*/
|
||||
public void setApprovalTime(LocalDateTime approvalTime) {
|
||||
this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审批人
|
||||
*/
|
||||
public void setApprovalBy(Long approvalBy) {
|
||||
this.approvalBy = approvalBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审批意见
|
||||
*/
|
||||
public void setApprovalComments(String approvalComments) {
|
||||
this.approvalComments = approvalComments;
|
||||
}
|
||||
}
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务期管理对象 xg_business_period
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_business_period")
|
||||
public class XgBusinessPeriod extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID,关联xg_collection_batch.id
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 业务期编码
|
||||
*/
|
||||
private String periodCode;
|
||||
|
||||
/**
|
||||
* 业务期名称
|
||||
*/
|
||||
private String periodName;
|
||||
|
||||
/**
|
||||
* 业务期类型:collection-信息采集期,audit-审核期,confirm-确认期
|
||||
*/
|
||||
private String periodType;
|
||||
|
||||
/**
|
||||
* 关联学年ID
|
||||
*/
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 关联学期ID
|
||||
*/
|
||||
private Long semesterId;
|
||||
|
||||
/**
|
||||
* 业务期开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 业务期结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 状态:not_started-未开始,in_progress-进行中,ended-已结束,suspended-已暂停
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 目标角色(JSON格式)
|
||||
*/
|
||||
private String targetRoles;
|
||||
|
||||
/**
|
||||
* 是否激活:0-否,1-是
|
||||
*/
|
||||
private Boolean isActive;
|
||||
|
||||
/**
|
||||
* 是否自动开始:0-否,1-是
|
||||
*/
|
||||
private Boolean autoStart;
|
||||
|
||||
/**
|
||||
* 是否自动结束:0-否,1-是
|
||||
*/
|
||||
private Boolean autoEnd;
|
||||
|
||||
/**
|
||||
* 业务期描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String noticeContent;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 目标角色(兼容字段)
|
||||
*/
|
||||
private String targetRole;
|
||||
|
||||
// 手动添加缺失的getter/setter方法
|
||||
public String getTargetRole() {
|
||||
return targetRole;
|
||||
}
|
||||
|
||||
public void setTargetRole(String targetRole) {
|
||||
this.targetRole = targetRole;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次ID
|
||||
*/
|
||||
public Long getBatchId() {
|
||||
return this.batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置批次ID
|
||||
*/
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取期间名称
|
||||
*/
|
||||
public String getPeriodName() {
|
||||
return this.periodName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置期间名称
|
||||
*/
|
||||
public void setPeriodName(String periodName) {
|
||||
this.periodName = periodName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取期间类型
|
||||
*/
|
||||
public String getPeriodType() {
|
||||
return this.periodType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置期间类型
|
||||
*/
|
||||
public void setPeriodType(String periodType) {
|
||||
this.periodType = periodType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开始时间
|
||||
*/
|
||||
public LocalDateTime getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置开始时间
|
||||
*/
|
||||
public void setStartTime(LocalDateTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结束时间
|
||||
*/
|
||||
public LocalDateTime getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置结束时间
|
||||
*/
|
||||
public void setEndTime(LocalDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取目标角色
|
||||
*/
|
||||
public String getTargetRoles() {
|
||||
return this.targetRoles;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置目标角色
|
||||
*/
|
||||
public void setTargetRoles(String targetRoles) {
|
||||
this.targetRoles = targetRoles;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否激活
|
||||
*/
|
||||
public Boolean getIsActive() {
|
||||
return this.isActive;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否激活
|
||||
*/
|
||||
public void setIsActive(Boolean isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取描述
|
||||
*/
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置描述
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
}
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 班干部变更记录对象 xg_cadre_change_log
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_cadre_change_log")
|
||||
public class XgCadreChangeLog extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班干部ID,关联xg_class_cadre.id
|
||||
*/
|
||||
@NotNull(message = "班干部ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long cadreId;
|
||||
|
||||
/**
|
||||
* 班级ID,关联xg_class_info.id
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 32, message = "学号长度不能超过32个字符")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@NotBlank(message = "学生姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "学生姓名长度不能超过50个字符")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 变更类型:appointment-任命,dismissal-免职,transfer-调任,renewal-续任,resignation-辞职
|
||||
*/
|
||||
@NotBlank(message = "变更类型不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Pattern(regexp = "^(appointment|dismissal|transfer|renewal|resignation)$",
|
||||
message = "变更类型必须是appointment、dismissal、transfer、renewal、resignation中的一个")
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变更日期
|
||||
*/
|
||||
@NotNull(message = "变更日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date changeDate;
|
||||
|
||||
/**
|
||||
* 生效日期
|
||||
*/
|
||||
@NotNull(message = "生效日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date effectiveDate;
|
||||
|
||||
/**
|
||||
* 原职务编码
|
||||
*/
|
||||
@Size(max = 20, message = "原职务编码长度不能超过20个字符")
|
||||
private String oldPositionCode;
|
||||
|
||||
/**
|
||||
* 原职务名称
|
||||
*/
|
||||
@Size(max = 50, message = "原职务名称长度不能超过50个字符")
|
||||
private String oldPositionName;
|
||||
|
||||
/**
|
||||
* 新职务编码
|
||||
*/
|
||||
@Size(max = 20, message = "新职务编码长度不能超过20个字符")
|
||||
private String newPositionCode;
|
||||
|
||||
/**
|
||||
* 新职务名称
|
||||
*/
|
||||
@Size(max = 50, message = "新职务名称长度不能超过50个字符")
|
||||
private String newPositionName;
|
||||
|
||||
/**
|
||||
* 职务变更原因
|
||||
*/
|
||||
@Size(max = 200, message = "职务变更原因长度不能超过200个字符")
|
||||
private String positionChangeReason;
|
||||
|
||||
/**
|
||||
* 操作人ID,关联sys_user.id
|
||||
*/
|
||||
@NotNull(message = "操作人ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@NotBlank(message = "操作人姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "操作人姓名长度不能超过50个字符")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作人角色:counselor-辅导员,teacher-班主任,admin-管理员
|
||||
*/
|
||||
@NotBlank(message = "操作人角色不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Pattern(regexp = "^(counselor|teacher|admin)$",
|
||||
message = "操作人角色必须是counselor、teacher、admin中的一个")
|
||||
private String operatorRole;
|
||||
|
||||
/**
|
||||
* 操作人部门
|
||||
*/
|
||||
@Size(max = 100, message = "操作人部门长度不能超过100个字符")
|
||||
private String operatorDept;
|
||||
|
||||
/**
|
||||
* 是否需要审批:0-否,1-是
|
||||
*/
|
||||
private Boolean needApproval;
|
||||
|
||||
/**
|
||||
* 审批状态:1-待审批,2-已通过,3-已驳回
|
||||
*/
|
||||
@Pattern(regexp = "^[1-3]$", message = "审批状态必须是1-3之间的数字")
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 审批人ID,关联sys_user.id
|
||||
*/
|
||||
private Long approverId;
|
||||
|
||||
/**
|
||||
* 审批人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "审批人姓名长度不能超过50个字符")
|
||||
private String approverName;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
@Size(max = 500, message = "审批意见长度不能超过500个字符")
|
||||
private String approvalComments;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@NotBlank(message = "变更原因不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 500, message = "变更原因长度不能超过500个字符")
|
||||
private String changeReason;
|
||||
|
||||
/**
|
||||
* 变更描述
|
||||
*/
|
||||
private String changeDescription;
|
||||
|
||||
/**
|
||||
* 文件编号
|
||||
*/
|
||||
@Size(max = 100, message = "文件编号长度不能超过100个字符")
|
||||
private String documentNumber;
|
||||
|
||||
/**
|
||||
* 参考文件
|
||||
*/
|
||||
@Size(max = 500, message = "参考文件长度不能超过500个字符")
|
||||
private String referenceDocuments;
|
||||
|
||||
/**
|
||||
* 影响分析
|
||||
*/
|
||||
private String impactAnalysis;
|
||||
|
||||
/**
|
||||
* 继任者ID,关联xg_student_info.id
|
||||
*/
|
||||
private Long successorId;
|
||||
|
||||
/**
|
||||
* 继任者姓名
|
||||
*/
|
||||
@Size(max = 50, message = "继任者姓名长度不能超过50个字符")
|
||||
private String successorName;
|
||||
|
||||
/**
|
||||
* 交接状态:1-未交接,2-交接中,3-已完成
|
||||
*/
|
||||
@Pattern(regexp = "^[1-3]$", message = "交接状态必须是1-3之间的数字")
|
||||
private String handoverStatus;
|
||||
|
||||
/**
|
||||
* 交接日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date handoverDate;
|
||||
|
||||
/**
|
||||
* 是否紧急变更:0-否,1-是
|
||||
*/
|
||||
private Boolean isEmergency;
|
||||
|
||||
/**
|
||||
* 是否已发送通知:0-否,1-是
|
||||
*/
|
||||
private Boolean notificationSent;
|
||||
|
||||
/**
|
||||
* 附件ID列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 500, message = "附件ID列表长度不能超过500个字符")
|
||||
private String attachmentIds;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// 以下是从基类继承的字段,这里显式声明用于MyBatis映射
|
||||
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;
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 班干部职务配置对象 xg_cadre_position_config
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_cadre_position_config")
|
||||
public class XgCadrePositionConfig extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 职务编码
|
||||
*/
|
||||
@NotBlank(message = "职务编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 20, message = "职务编码长度不能超过20个字符")
|
||||
private String positionCode;
|
||||
|
||||
/**
|
||||
* 职务名称
|
||||
*/
|
||||
@NotBlank(message = "职务名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "职务名称长度不能超过50个字符")
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 职务英文名称
|
||||
*/
|
||||
@Size(max = 100, message = "职务英文名称长度不能超过100个字符")
|
||||
private String positionNameEn;
|
||||
|
||||
/**
|
||||
* 职务级别:1-班长,2-副班长,3-委员,9-普通成员
|
||||
*/
|
||||
@NotNull(message = "职务级别不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Min(value = 1, message = "职务级别最小值为1")
|
||||
@Max(value = 9, message = "职务级别最大值为9")
|
||||
private Integer positionLevel;
|
||||
|
||||
/**
|
||||
* 职务类别:class-班级干部,party-党团干部,other-其他
|
||||
*/
|
||||
@Size(max = 20, message = "职务类别长度不能超过20个字符")
|
||||
private String positionCategory;
|
||||
|
||||
/**
|
||||
* 每班最大人数
|
||||
*/
|
||||
@Min(value = 0, message = "每班最大人数不能小于0")
|
||||
@Max(value = 10, message = "每班最大人数不能超过10")
|
||||
private Integer maxCountPerClass;
|
||||
|
||||
/**
|
||||
* 每班最小人数
|
||||
*/
|
||||
@Min(value = 0, message = "每班最小人数不能小于0")
|
||||
@Max(value = 10, message = "每班最小人数不能超过10")
|
||||
private Integer minCountPerClass;
|
||||
|
||||
/**
|
||||
* 是否必设:0-否,1-是
|
||||
*/
|
||||
private Boolean isRequired;
|
||||
|
||||
/**
|
||||
* 是否允许兼职:0-否,1-是
|
||||
*/
|
||||
private Boolean isConcurrentAllowed;
|
||||
|
||||
/**
|
||||
* 默认任期(月)
|
||||
*/
|
||||
@Min(value = 1, message = "默认任期最少1个月")
|
||||
@Max(value = 48, message = "默认任期最多48个月")
|
||||
private Integer defaultTermMonths;
|
||||
|
||||
/**
|
||||
* 最低年级要求
|
||||
*/
|
||||
@Size(max = 10, message = "最低年级要求长度不能超过10个字符")
|
||||
private String minGradeRequirement;
|
||||
|
||||
/**
|
||||
* 学业要求
|
||||
*/
|
||||
@Size(max = 200, message = "学业要求长度不能超过200个字符")
|
||||
private String academicRequirements;
|
||||
|
||||
/**
|
||||
* 技能要求
|
||||
*/
|
||||
private String skillRequirements;
|
||||
|
||||
/**
|
||||
* 经验要求
|
||||
*/
|
||||
private String experienceRequirements;
|
||||
|
||||
/**
|
||||
* 默认权限(JSON格式)
|
||||
*/
|
||||
private String defaultPermissions;
|
||||
|
||||
/**
|
||||
* 系统角色列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 200, message = "系统角色列表长度不能超过200个字符")
|
||||
private String systemRoles;
|
||||
|
||||
/**
|
||||
* 访问级别:1-基础,2-中级,3-高级
|
||||
*/
|
||||
@Min(value = 1, message = "访问级别最小值为1")
|
||||
@Max(value = 3, message = "访问级别最大值为3")
|
||||
private Integer accessLevel;
|
||||
|
||||
/**
|
||||
* 职责描述
|
||||
*/
|
||||
private String responsibilities;
|
||||
|
||||
/**
|
||||
* 具体职务
|
||||
*/
|
||||
private String duties;
|
||||
|
||||
/**
|
||||
* KPI指标(JSON格式)
|
||||
*/
|
||||
private String kpiIndicators;
|
||||
|
||||
/**
|
||||
* 工作标准
|
||||
*/
|
||||
private String workStandards;
|
||||
|
||||
/**
|
||||
* 配置状态:1-启用,2-禁用
|
||||
*/
|
||||
@Pattern(regexp = "^[1-2]$", message = "配置状态必须是1或2")
|
||||
private String configStatus;
|
||||
|
||||
/**
|
||||
* 是否系统职务:0-否,1-是
|
||||
*/
|
||||
private Boolean isSystemPosition;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 职务图标
|
||||
*/
|
||||
@Size(max = 100, message = "职务图标长度不能超过100个字符")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 显示颜色
|
||||
*/
|
||||
@Size(max = 20, message = "显示颜色长度不能超过20个字符")
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 职务描述
|
||||
*/
|
||||
@Size(max = 500, message = "职务描述长度不能超过500个字符")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// 以下是从基类继承的字段,这里显式声明用于MyBatis映射
|
||||
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;
|
||||
}
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
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 org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 班级干部信息对象 xg_class_cadre
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_class_cadre")
|
||||
public class XgClassCadre extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID,关联xg_class_info.id
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 32, message = "学号长度不能超过32个字符")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名(冗余字段)
|
||||
*/
|
||||
@NotBlank(message = "学生姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "学生姓名长度不能超过50个字符")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 职务编码:monitor-班长,deputy-副班长,secretary-学习委员等
|
||||
*/
|
||||
@NotBlank(message = "职务编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 20, message = "职务编码长度不能超过20个字符")
|
||||
private String positionCode;
|
||||
|
||||
/**
|
||||
* 职务名称
|
||||
*/
|
||||
@NotBlank(message = "职务名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "职务名称长度不能超过50个字符")
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 职务级别:1-班长,2-副班长,3-委员,9-普通成员
|
||||
*/
|
||||
@Min(value = 1, message = "职务级别最小值为1")
|
||||
@Max(value = 9, message = "职务级别最大值为9")
|
||||
private Integer positionLevel;
|
||||
|
||||
/**
|
||||
* 职务类别:class-班级干部,party-党团干部,other-其他
|
||||
*/
|
||||
@Size(max = 20, message = "职务类别长度不能超过20个字符")
|
||||
private String positionCategory;
|
||||
|
||||
/**
|
||||
* 任职日期
|
||||
*/
|
||||
@NotNull(message = "任职日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date appointmentDate;
|
||||
|
||||
/**
|
||||
* 任期开始日期
|
||||
*/
|
||||
@NotNull(message = "任期开始日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termStartDate;
|
||||
|
||||
/**
|
||||
* 任期结束日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termEndDate;
|
||||
|
||||
/**
|
||||
* 任期时长(月)
|
||||
*/
|
||||
@Min(value = 1, message = "任期时长最少1个月")
|
||||
@Max(value = 48, message = "任期时长最多48个月")
|
||||
private Integer termDuration;
|
||||
|
||||
/**
|
||||
* 是否现任:0-否,1-是
|
||||
*/
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 任职状态:1-在任,2-到期,3-辞职,4-免职,5-调任
|
||||
*/
|
||||
@Pattern(regexp = "^[1-5]$", message = "任职状态必须是1-5之间的数字")
|
||||
private String cadreStatus;
|
||||
|
||||
/**
|
||||
* 是否兼职:0-否,1-是
|
||||
*/
|
||||
private Boolean isConcurrent;
|
||||
|
||||
/**
|
||||
* 兼任职务列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 200, message = "兼任职务列表长度不能超过200个字符")
|
||||
private String concurrentPositions;
|
||||
|
||||
/**
|
||||
* 任命人ID,关联sys_user.id
|
||||
*/
|
||||
private Long appointerId;
|
||||
|
||||
/**
|
||||
* 任命人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "任命人姓名长度不能超过50个字符")
|
||||
private String appointerName;
|
||||
|
||||
/**
|
||||
* 任命原因
|
||||
*/
|
||||
@Size(max = 200, message = "任命原因长度不能超过200个字符")
|
||||
private String appointmentReason;
|
||||
|
||||
/**
|
||||
* 任命文件号
|
||||
*/
|
||||
@Size(max = 200, message = "任命文件号长度不能超过200个字符")
|
||||
private String appointmentDocument;
|
||||
|
||||
/**
|
||||
* 离任日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dismissalDate;
|
||||
|
||||
/**
|
||||
* 离任原因
|
||||
*/
|
||||
@Size(max = 200, message = "离任原因长度不能超过200个字符")
|
||||
private String dismissalReason;
|
||||
|
||||
/**
|
||||
* 免职人ID,关联sys_user.id
|
||||
*/
|
||||
private Long dismisserId;
|
||||
|
||||
/**
|
||||
* 免职人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "免职人姓名长度不能超过50个字符")
|
||||
private String dismisserName;
|
||||
|
||||
/**
|
||||
* 免职文件号
|
||||
*/
|
||||
@Size(max = 200, message = "免职文件号长度不能超过200个字符")
|
||||
private String dismissalDocument;
|
||||
|
||||
/**
|
||||
* 工作表现:excellent-优秀,good-良好,average-一般,poor-较差
|
||||
*/
|
||||
@Pattern(regexp = "^(excellent|good|average|poor)$", message = "工作表现必须是excellent、good、average、poor中的一个")
|
||||
private String workPerformance;
|
||||
|
||||
/**
|
||||
* 表现评分(0-10分)
|
||||
*/
|
||||
@DecimalMin(value = "0.0", message = "表现评分不能小于0分")
|
||||
@DecimalMax(value = "10.0", message = "表现评分不能大于10分")
|
||||
private BigDecimal performanceScore;
|
||||
|
||||
/**
|
||||
* 工作总结
|
||||
*/
|
||||
private String workSummary;
|
||||
|
||||
/**
|
||||
* 评价意见
|
||||
*/
|
||||
private String evaluationComments;
|
||||
|
||||
/**
|
||||
* 权限配置(JSON格式)
|
||||
*/
|
||||
private String permissions;
|
||||
|
||||
/**
|
||||
* 系统角色列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 200, message = "系统角色列表长度不能超过200个字符")
|
||||
private String systemRoles;
|
||||
|
||||
/**
|
||||
* 访问级别:1-基础,2-中级,3-高级
|
||||
*/
|
||||
@Min(value = 1, message = "访问级别最小值为1")
|
||||
@Max(value = 3, message = "访问级别最大值为3")
|
||||
private Integer accessLevel;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Size(max = 20, message = "联系电话长度不能超过20个字符")
|
||||
@Pattern(regexp = "^[0-9+-]*$", message = "联系电话格式不正确")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
@Size(max = 100, message = "联系邮箱长度不能超过100个字符")
|
||||
@Email(message = "联系邮箱格式不正确")
|
||||
private String contactEmail;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
@Size(max = 50, message = "紧急联系人长度不能超过50个字符")
|
||||
private String emergencyContact;
|
||||
|
||||
/**
|
||||
* 紧急联系电话
|
||||
*/
|
||||
@Size(max = 20, message = "紧急联系电话长度不能超过20个字符")
|
||||
@Pattern(regexp = "^[0-9+-]*$", message = "紧急联系电话格式不正确")
|
||||
private String emergencyPhone;
|
||||
|
||||
/**
|
||||
* 工作计划
|
||||
*/
|
||||
private String workPlan;
|
||||
|
||||
/**
|
||||
* 主要成就
|
||||
*/
|
||||
private String achievements;
|
||||
|
||||
/**
|
||||
* 培训记录(JSON格式)
|
||||
*/
|
||||
private String trainingRecords;
|
||||
|
||||
/**
|
||||
* 会议出席记录(JSON格式)
|
||||
*/
|
||||
private String meetingAttendance;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// 以下是从基类继承的字段,这里显式声明用于MyBatis映射
|
||||
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;
|
||||
|
||||
// 手动添加所有缺失的getter和setter方法
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getClassId() {
|
||||
return this.classId;
|
||||
}
|
||||
|
||||
public void setClassId(Long classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public Long getStudentId() {
|
||||
return this.studentId;
|
||||
}
|
||||
|
||||
public void setStudentId(Long studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public String getStudentNo() {
|
||||
return this.studentNo;
|
||||
}
|
||||
|
||||
public void setStudentNo(String studentNo) {
|
||||
this.studentNo = studentNo;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return this.studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public String getPositionCode() {
|
||||
return this.positionCode;
|
||||
}
|
||||
|
||||
public void setPositionCode(String positionCode) {
|
||||
this.positionCode = positionCode;
|
||||
}
|
||||
|
||||
public String getPositionName() {
|
||||
return this.positionName;
|
||||
}
|
||||
|
||||
public void setPositionName(String positionName) {
|
||||
this.positionName = positionName;
|
||||
}
|
||||
|
||||
public Integer getPositionLevel() {
|
||||
return this.positionLevel;
|
||||
}
|
||||
|
||||
public void setPositionLevel(Integer positionLevel) {
|
||||
this.positionLevel = positionLevel;
|
||||
}
|
||||
|
||||
public String getPositionCategory() {
|
||||
return this.positionCategory;
|
||||
}
|
||||
|
||||
public void setPositionCategory(String positionCategory) {
|
||||
this.positionCategory = positionCategory;
|
||||
}
|
||||
|
||||
public Boolean getIsCurrent() {
|
||||
return this.isCurrent;
|
||||
}
|
||||
|
||||
public void setIsCurrent(Boolean isCurrent) {
|
||||
this.isCurrent = isCurrent;
|
||||
}
|
||||
|
||||
public String getCadreStatus() {
|
||||
return this.cadreStatus;
|
||||
}
|
||||
|
||||
public void setCadreStatus(String cadreStatus) {
|
||||
this.cadreStatus = cadreStatus;
|
||||
}
|
||||
|
||||
public Boolean getIsConcurrent() {
|
||||
return this.isConcurrent;
|
||||
}
|
||||
|
||||
public void setIsConcurrent(Boolean isConcurrent) {
|
||||
this.isConcurrent = isConcurrent;
|
||||
}
|
||||
|
||||
public String getWorkPerformance() {
|
||||
return this.workPerformance;
|
||||
}
|
||||
|
||||
public void setWorkPerformance(String workPerformance) {
|
||||
this.workPerformance = workPerformance;
|
||||
}
|
||||
|
||||
public Date getAppointmentDate() {
|
||||
return this.appointmentDate;
|
||||
}
|
||||
|
||||
public void setAppointmentDate(Date appointmentDate) {
|
||||
this.appointmentDate = appointmentDate;
|
||||
}
|
||||
|
||||
public Date getTermStartDate() {
|
||||
return this.termStartDate;
|
||||
}
|
||||
|
||||
public void setTermStartDate(Date termStartDate) {
|
||||
this.termStartDate = termStartDate;
|
||||
}
|
||||
|
||||
public Date getTermEndDate() {
|
||||
return this.termEndDate;
|
||||
}
|
||||
|
||||
public void setTermEndDate(Date termEndDate) {
|
||||
this.termEndDate = termEndDate;
|
||||
}
|
||||
|
||||
public Date getDismissalDate() {
|
||||
return this.dismissalDate;
|
||||
}
|
||||
|
||||
public void setDismissalDate(Date dismissalDate) {
|
||||
this.dismissalDate = dismissalDate;
|
||||
}
|
||||
|
||||
public String getDismissalReason() {
|
||||
return this.dismissalReason;
|
||||
}
|
||||
|
||||
public void setDismissalReason(String dismissalReason) {
|
||||
this.dismissalReason = dismissalReason;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
// 手动添加缺失的setter方法,解决编译错误
|
||||
public void setDismisserId(Long dismisserId) {
|
||||
this.dismisserId = dismisserId;
|
||||
}
|
||||
|
||||
public void setDismisserName(String dismisserName) {
|
||||
this.dismisserName = dismisserName;
|
||||
}
|
||||
|
||||
public void setTermDuration(Integer termDuration) {
|
||||
this.termDuration = termDuration;
|
||||
}
|
||||
|
||||
}
|
||||
+140
@@ -154,4 +154,144 @@ public class XgClassInfo extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 获取主键ID
|
||||
*/
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级代码
|
||||
*/
|
||||
public String getClassCode() {
|
||||
return this.classCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级名称
|
||||
*/
|
||||
public String getClassName() {
|
||||
return this.className;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入学年份
|
||||
*/
|
||||
public Integer getEnrollmentYear() {
|
||||
return this.enrollmentYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业代码
|
||||
*/
|
||||
public String getMajorCode() {
|
||||
return this.majorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业名称
|
||||
*/
|
||||
public String getMajorName() {
|
||||
return this.majorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院代码
|
||||
*/
|
||||
public String getCollegeCode() {
|
||||
return this.collegeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院名称
|
||||
*/
|
||||
public String getCollegeName() {
|
||||
return this.collegeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员ID
|
||||
*/
|
||||
public Long getCounselorId() {
|
||||
return this.counselorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员姓名
|
||||
*/
|
||||
public String getCounselorName() {
|
||||
return this.counselorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任ID
|
||||
*/
|
||||
public Long getClassTeacherId() {
|
||||
return this.classTeacherId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任姓名
|
||||
*/
|
||||
public String getClassTeacherName() {
|
||||
return this.classTeacherName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级状态
|
||||
*/
|
||||
public String getClassStatus() {
|
||||
return this.classStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置班级状态
|
||||
*/
|
||||
public void setClassStatus(String classStatus) {
|
||||
this.classStatus = classStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前学生数
|
||||
*/
|
||||
public Integer getCurrentStudentCount() {
|
||||
return this.currentStudentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前学生数
|
||||
*/
|
||||
public void setCurrentStudentCount(Integer currentStudentCount) {
|
||||
this.currentStudentCount = currentStudentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取男生数量
|
||||
*/
|
||||
public Integer getMaleCount() {
|
||||
return this.maleCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置男生数量
|
||||
*/
|
||||
public void setMaleCount(Integer maleCount) {
|
||||
this.maleCount = maleCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取女生数量
|
||||
*/
|
||||
public Integer getFemaleCount() {
|
||||
return this.femaleCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置女生数量
|
||||
*/
|
||||
public void setFemaleCount(Integer femaleCount) {
|
||||
this.femaleCount = femaleCount;
|
||||
}
|
||||
|
||||
}
|
||||
+389
-64
@@ -1,24 +1,26 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 信息采集批次对象 xg_collection_batch
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_collection_batch")
|
||||
public class XgCollectionBatch extends TenantEntity {
|
||||
public class XgCollectionBatch extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -26,11 +28,16 @@ public class XgCollectionBatch extends TenantEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次编号,格式:BATCH+年份+流水号
|
||||
* 批次ID(业务主键)
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
@@ -40,130 +47,448 @@ public class XgCollectionBatch extends TenantEntity {
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次描述
|
||||
*/
|
||||
private String batchDescription;
|
||||
|
||||
/**
|
||||
* 批次类型:1-新生信息采集,2-在校生信息更新,3-毕业生信息核查,4-专项信息采集
|
||||
* 批次类型:regular-常规,special-专项,urgent-紧急
|
||||
*/
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 学年,格式:2024-2025
|
||||
* 学年
|
||||
*/
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期:1-第一学期,2-第二学期,3-第三学期
|
||||
* 学期
|
||||
*/
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 适用范围:1-全校,2-指定学院,3-指定专业,4-指定班级,5-指定学生
|
||||
* 关联学年ID
|
||||
*/
|
||||
private String scopeType;
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 范围配置,JSON格式存储具体的学院、专业、班级或学生列表
|
||||
* 关联学期ID
|
||||
*/
|
||||
private String scopeConfig;
|
||||
private Long semesterId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
* 关联业务期ID
|
||||
*/
|
||||
private Long businessPeriodId;
|
||||
|
||||
/**
|
||||
* 目标范围:all-全部,college-学院,class-班级,student-个人
|
||||
*/
|
||||
private String targetScope;
|
||||
|
||||
/**
|
||||
* 目标ID列表(JSON格式),当target_scope不为all时使用
|
||||
*/
|
||||
private String targetIds;
|
||||
|
||||
/**
|
||||
* 批次开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
* 批次结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 批次状态:1-准备中,2-进行中,3-暂停,4-已结束,5-已归档
|
||||
* 实际结束时间
|
||||
*/
|
||||
private String batchStatus;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime actualEndTime;
|
||||
|
||||
/**
|
||||
* 是否允许学生修改:0-否,1-是
|
||||
* 批次状态:DRAFT-草稿,ACTIVE-进行中,COMPLETED-已完成,CANCELLED-已取消
|
||||
*/
|
||||
private Integer allowStudentEdit;
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 是否允许辅导员修改:0-否,1-是
|
||||
* 发布状态:UNPUBLISHED-未发布,PUBLISHED-已发布
|
||||
*/
|
||||
private Integer allowCounselorEdit;
|
||||
private String publishStatus;
|
||||
|
||||
/**
|
||||
* 是否允许学院管理员修改:0-否,1-是
|
||||
* 是否已发布:0-否,1-是
|
||||
*/
|
||||
private Integer allowCollegeEdit;
|
||||
private Boolean isPublished;
|
||||
|
||||
/**
|
||||
* 是否需要审核:0-否,1-是
|
||||
* 发布时间
|
||||
*/
|
||||
private Integer needAudit;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 审核级别:1-辅导员审核,2-学院审核,3-学生处审核,4-多级审核
|
||||
* 是否自动提醒:0-否,1-是
|
||||
*/
|
||||
private String auditLevel;
|
||||
private Boolean autoRemind;
|
||||
|
||||
/**
|
||||
* 必填字段配置,JSON格式存储必填字段列表
|
||||
* 提醒天数(结束前几天提醒)
|
||||
*/
|
||||
private String requiredFields;
|
||||
private Integer remindDays;
|
||||
|
||||
/**
|
||||
* 可编辑字段配置,JSON格式存储可编辑字段列表
|
||||
* 批次描述
|
||||
*/
|
||||
private String editableFields;
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 目标学生总数
|
||||
* 通知内容
|
||||
*/
|
||||
private Integer targetStudentCount;
|
||||
private String noticeContent;
|
||||
|
||||
/**
|
||||
* 已提交学生数
|
||||
* 完成率
|
||||
*/
|
||||
private Integer submittedStudentCount;
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 已审核学生数
|
||||
* 总人数
|
||||
*/
|
||||
private Integer auditedStudentCount;
|
||||
private Integer totalCount;
|
||||
|
||||
/**
|
||||
* 提交率(百分比)
|
||||
* 已完成人数
|
||||
*/
|
||||
private Integer submissionRate;
|
||||
private Integer completedCount;
|
||||
|
||||
/**
|
||||
* 审核通过率(百分比)
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer auditPassRate;
|
||||
|
||||
/**
|
||||
* 负责人ID,关联sys_user.id
|
||||
*/
|
||||
private Long responsiblePersonId;
|
||||
|
||||
/**
|
||||
* 负责人姓名
|
||||
*/
|
||||
private String responsiblePersonName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否允许编辑:0-否,1-是
|
||||
*/
|
||||
private Integer allowEdit;
|
||||
|
||||
// ==================== 统计字段 ====================
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交学生数
|
||||
*/
|
||||
private Integer submittedStudents;
|
||||
|
||||
/**
|
||||
* 已通过学生数
|
||||
*/
|
||||
private Integer approvedStudents;
|
||||
|
||||
/**
|
||||
* 已拒绝学生数
|
||||
*/
|
||||
private Integer rejectedStudents;
|
||||
|
||||
// ==================== 审核配置字段 ====================
|
||||
|
||||
/**
|
||||
* 是否需要审核:0-否,1-是
|
||||
*/
|
||||
private Boolean requireApproval;
|
||||
|
||||
/**
|
||||
* 是否自动审核:0-否,1-是
|
||||
*/
|
||||
private Boolean autoApprove;
|
||||
|
||||
/**
|
||||
* 是否通知学生:0-否,1-是
|
||||
*/
|
||||
private Boolean notifyStudents;
|
||||
|
||||
/**
|
||||
* 提醒天数(结束前几天提醒)
|
||||
*/
|
||||
private Integer reminderDays;
|
||||
|
||||
// ==================== 兼容方法 ====================
|
||||
|
||||
/**
|
||||
* 批次状态(别名,与status保持一致)
|
||||
*/
|
||||
public String getBatchStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setBatchStatus(String batchStatus) {
|
||||
this.status = batchStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次ID(如果batchId为null,返回主键id)
|
||||
*/
|
||||
public Long getBatchId() {
|
||||
return this.batchId != null ? this.batchId : this.id;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
if (this.id == null) {
|
||||
this.id = batchId;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 手动添加的 getter/setter 方法 ====================
|
||||
|
||||
/**
|
||||
* 获取批次编码
|
||||
*/
|
||||
public String getBatchCode() {
|
||||
return this.batchCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次名称
|
||||
*/
|
||||
public String getBatchName() {
|
||||
return this.batchName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次类型
|
||||
*/
|
||||
public String getBatchType() {
|
||||
return this.batchType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学年
|
||||
*/
|
||||
public String getAcademicYear() {
|
||||
return this.academicYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学期
|
||||
*/
|
||||
public String getSemester() {
|
||||
return this.semester;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布状态
|
||||
*/
|
||||
public String getPublishStatus() {
|
||||
return this.publishStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置发布状态
|
||||
*/
|
||||
public void setPublishStatus(String publishStatus) {
|
||||
this.publishStatus = publishStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开始时间
|
||||
*/
|
||||
public LocalDateTime getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结束时间
|
||||
*/
|
||||
public LocalDateTime getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置发布时间
|
||||
*/
|
||||
public void setPublishTime(LocalDateTime publishTime) {
|
||||
this.publishTime = publishTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实际结束时间
|
||||
*/
|
||||
public void setActualEndTime(LocalDateTime actualEndTime) {
|
||||
this.actualEndTime = actualEndTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置总学生数
|
||||
*/
|
||||
public void setTotalStudents(Integer totalStudents) {
|
||||
this.totalStudents = totalStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已提交学生数
|
||||
*/
|
||||
public void setSubmittedStudents(Integer submittedStudents) {
|
||||
this.submittedStudents = submittedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已通过学生数
|
||||
*/
|
||||
public void setApprovedStudents(Integer approvedStudents) {
|
||||
this.approvedStudents = approvedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已拒绝学生数
|
||||
*/
|
||||
public void setRejectedStudents(Integer rejectedStudents) {
|
||||
this.rejectedStudents = rejectedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置完成率
|
||||
*/
|
||||
public void setCompletionRate(Double completionRate) {
|
||||
if (completionRate != null) {
|
||||
this.completionRate = BigDecimal.valueOf(completionRate);
|
||||
} else {
|
||||
this.completionRate = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否允许编辑
|
||||
*/
|
||||
public Integer getAllowEdit() {
|
||||
return this.allowEdit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否需要审核
|
||||
*/
|
||||
public Boolean getRequireApproval() {
|
||||
return this.requireApproval;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否自动审核
|
||||
*/
|
||||
public Boolean getAutoApprove() {
|
||||
return this.autoApprove;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否通知学生
|
||||
*/
|
||||
public Boolean getNotifyStudents() {
|
||||
return this.notifyStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提醒天数
|
||||
*/
|
||||
public Integer getReminderDays() {
|
||||
return this.reminderDays;
|
||||
}
|
||||
|
||||
// ==================== 剩余的 setter 方法 ====================
|
||||
|
||||
/**
|
||||
* 设置批次编码
|
||||
*/
|
||||
public void setBatchCode(String batchCode) {
|
||||
this.batchCode = batchCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置批次名称
|
||||
*/
|
||||
public void setBatchName(String batchName) {
|
||||
this.batchName = batchName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置批次类型
|
||||
*/
|
||||
public void setBatchType(String batchType) {
|
||||
this.batchType = batchType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置学年
|
||||
*/
|
||||
public void setAcademicYear(String academicYear) {
|
||||
this.academicYear = academicYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置学期
|
||||
*/
|
||||
public void setSemester(String semester) {
|
||||
this.semester = semester;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置描述
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置开始时间
|
||||
*/
|
||||
public void setStartTime(LocalDateTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置结束时间
|
||||
*/
|
||||
public void setEndTime(LocalDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否允许编辑
|
||||
*/
|
||||
public void setAllowEdit(Integer allowEdit) {
|
||||
this.allowEdit = allowEdit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否需要审核
|
||||
*/
|
||||
public void setRequireApproval(Boolean requireApproval) {
|
||||
this.requireApproval = requireApproval;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否自动审核
|
||||
*/
|
||||
public void setAutoApprove(Boolean autoApprove) {
|
||||
this.autoApprove = autoApprove;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否通知学生
|
||||
*/
|
||||
public void setNotifyStudents(Boolean notifyStudents) {
|
||||
this.notifyStudents = notifyStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置提醒天数
|
||||
*/
|
||||
public void setReminderDays(Integer reminderDays) {
|
||||
this.reminderDays = reminderDays;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据字典对象 xg_dict_data
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_dict_data")
|
||||
public class XgDictData extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
private String dictLabel;
|
||||
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
private Integer dictSort;
|
||||
|
||||
/**
|
||||
* 样式属性
|
||||
*/
|
||||
private String cssClass;
|
||||
|
||||
/**
|
||||
* 表格回显样式
|
||||
*/
|
||||
private String listClass;
|
||||
|
||||
/**
|
||||
* 是否默认:0-否,1-是
|
||||
*/
|
||||
private Boolean isDefault;
|
||||
|
||||
/**
|
||||
* 状态:0-正常,1-停用
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告对象 xg_notice
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_notice")
|
||||
public class XgNotice extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 通知编码
|
||||
*/
|
||||
private String noticeCode;
|
||||
|
||||
/**
|
||||
* 通知标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 通知类型:batch-批次通知,audit-审核通知,remind-提醒通知,system-系统通知
|
||||
*/
|
||||
private String noticeType;
|
||||
|
||||
/**
|
||||
* 优先级:low-低,normal-普通,high-高,urgent-紧急
|
||||
*/
|
||||
private String priority;
|
||||
|
||||
/**
|
||||
* 目标类型:all-全部,role-角色,user-用户,college-学院,class-班级
|
||||
*/
|
||||
private String targetType;
|
||||
|
||||
/**
|
||||
* 目标ID列表(JSON格式)
|
||||
*/
|
||||
private String targetIds;
|
||||
|
||||
/**
|
||||
* 关联ID(如批次ID、审核ID等)
|
||||
*/
|
||||
private Long relatedId;
|
||||
|
||||
/**
|
||||
* 关联类型:batch-批次,audit-审核,student-学生
|
||||
*/
|
||||
private String relatedType;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
* 是否已发布:0-否,1-是
|
||||
*/
|
||||
private Boolean isPublished;
|
||||
|
||||
/**
|
||||
* 是否置顶:0-否,1-是
|
||||
*/
|
||||
private Boolean isTop;
|
||||
|
||||
/**
|
||||
* 阅读次数
|
||||
*/
|
||||
private Integer readCount;
|
||||
|
||||
/**
|
||||
* 附件URL列表(JSON格式)
|
||||
*/
|
||||
private String attachmentUrls;
|
||||
|
||||
/**
|
||||
* 是否自动发送:0-否,1-是
|
||||
*/
|
||||
private Boolean autoSend;
|
||||
|
||||
/**
|
||||
* 发送渠道:web-网页,email-邮件,sms-短信,wechat-微信
|
||||
*/
|
||||
private String sendChannels;
|
||||
|
||||
/**
|
||||
* 状态:draft-草稿,published-已发布,expired-已过期,cancelled-已取消
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知阅读记录对象 xg_notice_read
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_notice_read")
|
||||
public class XgNoticeRead extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 通知ID,关联xg_notice.id
|
||||
*/
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
* 阅读时长(秒)
|
||||
*/
|
||||
private Integer readDuration;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 设备类型:pc-电脑,mobile-手机,tablet-平板
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
// 手动添加getter/setter方法以解决Lombok问题
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getNoticeId() {
|
||||
return noticeId;
|
||||
}
|
||||
|
||||
public void setNoticeId(Long noticeId) {
|
||||
this.noticeId = noticeId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public LocalDateTime getReadTime() {
|
||||
return readTime;
|
||||
}
|
||||
|
||||
public void setReadTime(LocalDateTime readTime) {
|
||||
this.readTime = readTime;
|
||||
}
|
||||
|
||||
public Integer getReadDuration() {
|
||||
return readDuration;
|
||||
}
|
||||
|
||||
public void setReadDuration(Integer readDuration) {
|
||||
this.readDuration = readDuration;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public String getUserAgent() {
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
public void setUserAgent(String userAgent) {
|
||||
this.userAgent = userAgent;
|
||||
}
|
||||
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 学期管理对象 xg_semester
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_semester")
|
||||
public class XgSemester extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学年ID,关联xg_academic_year.id
|
||||
*/
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 学期编码,如2024-2025-1
|
||||
*/
|
||||
private String semesterCode;
|
||||
|
||||
/**
|
||||
* 学期名称,如2024-2025学年第一学期
|
||||
*/
|
||||
private String semesterName;
|
||||
|
||||
/**
|
||||
* 学期类型:first-第一学期,second-第二学期,summer-暑期
|
||||
*/
|
||||
private String semesterType;
|
||||
|
||||
/**
|
||||
* 学期开始日期
|
||||
*/
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 学期结束日期
|
||||
*/
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学期:0-否,1-是
|
||||
*/
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 状态:active-有效,inactive-无效
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 学期描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+199
-212
@@ -1,25 +1,27 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生信息对象 xg_student_info
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_student_info")
|
||||
public class XgStudentInfo extends TenantEntity {
|
||||
public class XgStudentInfo extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -27,29 +29,19 @@ public class XgStudentInfo extends TenantEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号,唯一标识
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 姓名拼音
|
||||
*/
|
||||
private String namePinyin;
|
||||
|
||||
/**
|
||||
* 性别:M-男,F-女
|
||||
*/
|
||||
@@ -59,7 +51,12 @@ public class XgStudentInfo extends TenantEntity {
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
private LocalDate birthDate;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
@@ -72,158 +69,47 @@ public class XgStudentInfo extends TenantEntity {
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业,6-肄业,7-转学,8-其他
|
||||
* 宗教信仰
|
||||
*/
|
||||
private String studentStatus;
|
||||
private String religion;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
private Integer enrollmentYear;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date enrollmentDate;
|
||||
|
||||
/**
|
||||
* 学制(年)
|
||||
*/
|
||||
private Integer schoolSystem;
|
||||
|
||||
/**
|
||||
* 学历层次
|
||||
*/
|
||||
private String educationLevel;
|
||||
|
||||
/**
|
||||
* 培养方式
|
||||
*/
|
||||
private String trainingType;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号码
|
||||
*/
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* 现住址
|
||||
*/
|
||||
private String currentAddress;
|
||||
|
||||
/**
|
||||
* 家庭地址
|
||||
*/
|
||||
private String homeAddress;
|
||||
|
||||
/**
|
||||
* 户籍所在地
|
||||
*/
|
||||
private String domicilePlace;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
private String postalCode;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
* 紧急联系人
|
||||
*/
|
||||
private String emergencyContactName;
|
||||
private String emergencyContact;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
* 紧急联系电话
|
||||
*/
|
||||
private String emergencyContactRelation;
|
||||
private String emergencyPhone;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
* 身高(厘米)
|
||||
*/
|
||||
private String emergencyContactPhone;
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 父亲姓名
|
||||
*/
|
||||
private String fatherName;
|
||||
|
||||
/**
|
||||
* 父亲联系电话
|
||||
*/
|
||||
private String fatherPhone;
|
||||
|
||||
/**
|
||||
* 父亲工作单位
|
||||
*/
|
||||
private String fatherWorkUnit;
|
||||
|
||||
/**
|
||||
* 母亲姓名
|
||||
*/
|
||||
private String motherName;
|
||||
|
||||
/**
|
||||
* 母亲联系电话
|
||||
*/
|
||||
private String motherPhone;
|
||||
|
||||
/**
|
||||
* 母亲工作单位
|
||||
*/
|
||||
private String motherWorkUnit;
|
||||
|
||||
/**
|
||||
* 身高(cm)
|
||||
*/
|
||||
private Integer height;
|
||||
|
||||
/**
|
||||
* 体重(kg)
|
||||
* 体重(公斤)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
@@ -233,114 +119,215 @@ public class XgStudentInfo extends TenantEntity {
|
||||
private String bloodType;
|
||||
|
||||
/**
|
||||
* 特殊体质或疾病
|
||||
* 健康状况
|
||||
*/
|
||||
private String specialCondition;
|
||||
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
private String religion;
|
||||
|
||||
/**
|
||||
* 特长爱好
|
||||
*/
|
||||
private String hobbies;
|
||||
|
||||
/**
|
||||
* 是否贫困生:0-否,1-是
|
||||
*/
|
||||
private Integer isPoorStudent;
|
||||
|
||||
/**
|
||||
* 贫困等级
|
||||
*/
|
||||
private String povertyLevel;
|
||||
|
||||
/**
|
||||
* 是否享受助学金:0-否,1-是
|
||||
*/
|
||||
private Integer hasGrant;
|
||||
|
||||
/**
|
||||
* 助学金金额
|
||||
*/
|
||||
private BigDecimal grantAmount;
|
||||
|
||||
/**
|
||||
* 是否办理助学贷款:0-否,1-是
|
||||
*/
|
||||
private Integer hasLoan;
|
||||
|
||||
/**
|
||||
* 助学贷款金额
|
||||
*/
|
||||
private BigDecimal loanAmount;
|
||||
private String healthStatus;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCardNo;
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
* 开户行
|
||||
*/
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
* 持卡人姓名
|
||||
*/
|
||||
private String bankBranch;
|
||||
private String cardHolder;
|
||||
|
||||
/**
|
||||
* 信息状态:1-正常,2-待审核,3-审核中,4-已驳回,5-已锁定
|
||||
* 照片URL
|
||||
*/
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 特长
|
||||
*/
|
||||
private String specialties;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
private String major;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate enrollmentDate;
|
||||
|
||||
/**
|
||||
* 学制(年)
|
||||
*/
|
||||
private Integer educationLength;
|
||||
|
||||
/**
|
||||
* 学籍状态:active-在读,graduated-已毕业,dropout-退学,suspended-休学
|
||||
*/
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 培养方式:full_time-全日制,part_time-非全日制
|
||||
*/
|
||||
private String trainingMode;
|
||||
|
||||
/**
|
||||
* 当前批次ID
|
||||
*/
|
||||
private Long currentBatchId;
|
||||
|
||||
/**
|
||||
* 信息状态:draft-草稿,submitted-已提交,approved-已审核
|
||||
*/
|
||||
private String infoStatus;
|
||||
|
||||
/**
|
||||
* 数据来源:1-学生录入,2-批量导入,3-系统迁移,4-第三方同步
|
||||
* 最后提交时间
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 最后修改批次ID
|
||||
*/
|
||||
private Long lastBatchId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastSubmitTime;
|
||||
|
||||
/**
|
||||
* 最后审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastAuditTime;
|
||||
private LocalDateTime lastAuditTime;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
* 审核意见
|
||||
*/
|
||||
private String extField1;
|
||||
private String auditComment;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
* 版本号
|
||||
*/
|
||||
private String extField2;
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
* 排序字段
|
||||
*/
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 扩展字段4
|
||||
*/
|
||||
private String extField4;
|
||||
|
||||
/**
|
||||
* 扩展字段5
|
||||
*/
|
||||
private String extField5;
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
// 手动添加缺失的getter方法,解决编译错误
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getStudentNo() {
|
||||
return studentNo;
|
||||
}
|
||||
|
||||
public String getClassCode() {
|
||||
return String.valueOf(classId);
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public String getCollegeCode() {
|
||||
return String.valueOf(collegeId);
|
||||
}
|
||||
|
||||
public String getCollegeName() {
|
||||
return collegeName;
|
||||
}
|
||||
|
||||
public void setSubmissionTime(LocalDateTime submissionTime) {
|
||||
this.lastSubmitTime = submissionTime;
|
||||
}
|
||||
|
||||
// 手动添加审批相关的setter方法以确保编译通过
|
||||
public void setSubmissionStatus(String submissionStatus) {
|
||||
// 如果字段不存在,先添加字段
|
||||
// this.submissionStatus = submissionStatus;
|
||||
}
|
||||
|
||||
public void setApprovalTime(java.time.LocalDateTime approvalTime) {
|
||||
// 如果字段不存在,先添加字段
|
||||
// this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
public void setApprovalBy(Long approvalBy) {
|
||||
// 如果字段不存在,先添加字段
|
||||
// this.approvalBy = approvalBy;
|
||||
}
|
||||
|
||||
public void setApprovalComments(String approvalComments) {
|
||||
// 如果字段不存在,先添加字段
|
||||
// this.approvalComments = approvalComments;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getStudentStatus() {
|
||||
return studentStatus;
|
||||
}
|
||||
|
||||
public void setStudentStatus(String studentStatus) {
|
||||
this.studentStatus = studentStatus;
|
||||
}
|
||||
|
||||
public String getMajor() {
|
||||
return major;
|
||||
}
|
||||
|
||||
public void setMajor(String major) {
|
||||
this.major = major;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生信息变更记录对象 xg_student_info_history
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_student_info_history")
|
||||
public class XgStudentInfoHistory extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 变更类型:create-新增,update-修改,delete-删除
|
||||
*/
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变更字段列表(JSON格式)
|
||||
*/
|
||||
private String changeFields;
|
||||
|
||||
/**
|
||||
* 变更前数据(JSON格式)
|
||||
*/
|
||||
private String oldValues;
|
||||
|
||||
/**
|
||||
* 变更后数据(JSON格式)
|
||||
*/
|
||||
private String newValues;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
private String changeReason;
|
||||
|
||||
/**
|
||||
* 变更时间
|
||||
*/
|
||||
private LocalDateTime changeTime;
|
||||
|
||||
/**
|
||||
* 变更人
|
||||
*/
|
||||
private Long changeBy;
|
||||
|
||||
/**
|
||||
* 变更人姓名
|
||||
*/
|
||||
private String changeByName;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package org.dromara.xg.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 系统配置对象 xg_system_config
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xg_system_config")
|
||||
public class XgSystemConfig extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 配置键
|
||||
*/
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 配置类型:string-字符串,number-数字,boolean-布尔,json-JSON
|
||||
*/
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置分组
|
||||
*/
|
||||
private String configGroup;
|
||||
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
private String configDesc;
|
||||
|
||||
/**
|
||||
* 是否系统配置:0-否,1-是
|
||||
*/
|
||||
private Boolean isSystem;
|
||||
|
||||
/**
|
||||
* 是否只读:0-否,1-是
|
||||
*/
|
||||
private Boolean isReadonly;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgAcademicYear;
|
||||
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.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 学年管理业务对象 xg_academic_year
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgAcademicYear.class, reverseConvertGenerate = false)
|
||||
public class XgAcademicYearBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学年编码,如2024-2025
|
||||
*/
|
||||
@NotBlank(message = "学年编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 20, message = "学年编码长度不能超过20个字符")
|
||||
private String yearCode;
|
||||
|
||||
/**
|
||||
* 学年名称,如2024-2025学年
|
||||
*/
|
||||
@NotBlank(message = "学年名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "学年名称长度不能超过50个字符")
|
||||
private String yearName;
|
||||
|
||||
/**
|
||||
* 学年开始日期
|
||||
*/
|
||||
@NotNull(message = "学年开始日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 学年结束日期
|
||||
*/
|
||||
@NotNull(message = "学年结束日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学年:0-否,1-是
|
||||
*/
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 状态:active-有效,inactive-无效
|
||||
*/
|
||||
@Size(max = 20, message = "状态长度不能超过20个字符")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 学年描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// 手动添加缺失的getter方法,解决编译错误
|
||||
public String getYearName() {
|
||||
return yearName;
|
||||
}
|
||||
|
||||
public String getYearCode() {
|
||||
return yearCode;
|
||||
}
|
||||
|
||||
public LocalDate getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public Boolean getIsCurrent() {
|
||||
return isCurrent;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
import org.dromara.xg.domain.XgBatchPermission;
|
||||
|
||||
/**
|
||||
* 批次权限配置业务对象 xg_batch_permission
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgBatchPermission.class, reverseConvertGenerate = false)
|
||||
public class XgBatchPermissionBo 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 = 50, message = "用户组类型长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String userGroupType;
|
||||
|
||||
/**
|
||||
* 用户组名称
|
||||
*/
|
||||
@NotBlank(message = "用户组名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "用户组名称长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String userGroupName;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@NotBlank(message = "权限类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "权限类型长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限范围
|
||||
*/
|
||||
@Size(max = 500, message = "权限范围长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String permissionScope;
|
||||
|
||||
/**
|
||||
* 是否可查看
|
||||
*/
|
||||
@NotNull(message = "是否可查看不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean canView;
|
||||
|
||||
/**
|
||||
* 是否可编辑
|
||||
*/
|
||||
@NotNull(message = "是否可编辑不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean canEdit;
|
||||
|
||||
/**
|
||||
* 是否可审核
|
||||
*/
|
||||
@NotNull(message = "是否可审核不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean canAudit;
|
||||
|
||||
/**
|
||||
* 是否可导出
|
||||
*/
|
||||
@NotNull(message = "是否可导出不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean canExport;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Min(value = 0, message = "排序号不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "状态长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务期间业务对象 XgBusinessPeriodBo
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgBusinessPeriodBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 业务期ID
|
||||
*/
|
||||
@NotNull(message = "业务期ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 业务期名称
|
||||
*/
|
||||
@NotBlank(message = "业务期名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String periodName;
|
||||
|
||||
/**
|
||||
* 业务期类型
|
||||
*/
|
||||
@NotBlank(message = "业务期类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String periodType;
|
||||
|
||||
/**
|
||||
* 目标角色
|
||||
*/
|
||||
@NotBlank(message = "目标角色不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String targetRole;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 查询关键字
|
||||
*/
|
||||
private String keyword;
|
||||
|
||||
/**
|
||||
* 批次名称(用于查询)
|
||||
*/
|
||||
private String batchName;
|
||||
}
|
||||
+432
@@ -0,0 +1,432 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassCadre;
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 班级干部信息业务对象 xg_class_cadre
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgClassCadre.class, reverseConvertGenerate = false)
|
||||
public class XgClassCadreBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID,关联xg_class_info.id
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 32, message = "学号长度不能超过32个字符")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名(冗余字段)
|
||||
*/
|
||||
@NotBlank(message = "学生姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "学生姓名长度不能超过50个字符")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 职务编码:monitor-班长,deputy-副班长,secretary-学习委员等
|
||||
*/
|
||||
@NotBlank(message = "职务编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 20, message = "职务编码长度不能超过20个字符")
|
||||
private String positionCode;
|
||||
|
||||
/**
|
||||
* 职务名称
|
||||
*/
|
||||
@NotBlank(message = "职务名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@Size(max = 50, message = "职务名称长度不能超过50个字符")
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 职务级别:1-班长,2-副班长,3-委员,9-普通成员
|
||||
*/
|
||||
@Min(value = 1, message = "职务级别最小值为1")
|
||||
@Max(value = 9, message = "职务级别最大值为9")
|
||||
private Integer positionLevel;
|
||||
|
||||
/**
|
||||
* 职务类别:class-班级干部,party-党团干部,other-其他
|
||||
*/
|
||||
@Size(max = 20, message = "职务类别长度不能超过20个字符")
|
||||
private String positionCategory;
|
||||
|
||||
/**
|
||||
* 任职日期
|
||||
*/
|
||||
@NotNull(message = "任职日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date appointmentDate;
|
||||
|
||||
/**
|
||||
* 任期开始日期
|
||||
*/
|
||||
@NotNull(message = "任期开始日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termStartDate;
|
||||
|
||||
/**
|
||||
* 任期结束日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termEndDate;
|
||||
|
||||
/**
|
||||
* 任期时长(月)
|
||||
*/
|
||||
@Min(value = 1, message = "任期时长最少1个月")
|
||||
@Max(value = 48, message = "任期时长最多48个月")
|
||||
private Integer termDuration;
|
||||
|
||||
/**
|
||||
* 是否现任:0-否,1-是
|
||||
*/
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 任职状态:1-在任,2-到期,3-辞职,4-免职,5-调任
|
||||
*/
|
||||
@Pattern(regexp = "^[1-5]$", message = "任职状态必须是1-5之间的数字")
|
||||
private String cadreStatus;
|
||||
|
||||
/**
|
||||
* 是否兼职:0-否,1-是
|
||||
*/
|
||||
private Boolean isConcurrent;
|
||||
|
||||
/**
|
||||
* 兼任职务列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 200, message = "兼任职务列表长度不能超过200个字符")
|
||||
private String concurrentPositions;
|
||||
|
||||
/**
|
||||
* 任命人ID,关联sys_user.id
|
||||
*/
|
||||
private Long appointerId;
|
||||
|
||||
/**
|
||||
* 任命人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "任命人姓名长度不能超过50个字符")
|
||||
private String appointerName;
|
||||
|
||||
/**
|
||||
* 任命原因
|
||||
*/
|
||||
@Size(max = 200, message = "任命原因长度不能超过200个字符")
|
||||
private String appointmentReason;
|
||||
|
||||
/**
|
||||
* 任命文件号
|
||||
*/
|
||||
@Size(max = 200, message = "任命文件号长度不能超过200个字符")
|
||||
private String appointmentDocument;
|
||||
|
||||
/**
|
||||
* 离任日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dismissalDate;
|
||||
|
||||
/**
|
||||
* 离任原因
|
||||
*/
|
||||
@Size(max = 200, message = "离任原因长度不能超过200个字符")
|
||||
private String dismissalReason;
|
||||
|
||||
/**
|
||||
* 免职人ID,关联sys_user.id
|
||||
*/
|
||||
private Long dismisserId;
|
||||
|
||||
/**
|
||||
* 免职人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "免职人姓名长度不能超过50个字符")
|
||||
private String dismisserName;
|
||||
|
||||
/**
|
||||
* 免职文件号
|
||||
*/
|
||||
@Size(max = 200, message = "免职文件号长度不能超过200个字符")
|
||||
private String dismissalDocument;
|
||||
|
||||
/**
|
||||
* 工作表现:excellent-优秀,good-良好,average-一般,poor-较差
|
||||
*/
|
||||
@Pattern(regexp = "^(excellent|good|average|poor)$", message = "工作表现必须是excellent、good、average、poor中的一个")
|
||||
private String workPerformance;
|
||||
|
||||
/**
|
||||
* 表现评分(0-10分)
|
||||
*/
|
||||
@DecimalMin(value = "0.0", message = "表现评分不能小于0分")
|
||||
@DecimalMax(value = "10.0", message = "表现评分不能大于10分")
|
||||
private BigDecimal performanceScore;
|
||||
|
||||
/**
|
||||
* 工作总结
|
||||
*/
|
||||
private String workSummary;
|
||||
|
||||
/**
|
||||
* 评价意见
|
||||
*/
|
||||
private String evaluationComments;
|
||||
|
||||
/**
|
||||
* 权限配置(JSON格式)
|
||||
*/
|
||||
private String permissions;
|
||||
|
||||
/**
|
||||
* 系统角色列表(逗号分隔)
|
||||
*/
|
||||
@Size(max = 200, message = "系统角色列表长度不能超过200个字符")
|
||||
private String systemRoles;
|
||||
|
||||
/**
|
||||
* 访问级别:1-基础,2-中级,3-高级
|
||||
*/
|
||||
@Min(value = 1, message = "访问级别最小值为1")
|
||||
@Max(value = 3, message = "访问级别最大值为3")
|
||||
private Integer accessLevel;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Size(max = 20, message = "联系电话长度不能超过20个字符")
|
||||
@Pattern(regexp = "^[0-9+-]*$", message = "联系电话格式不正确")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
@Size(max = 100, message = "联系邮箱长度不能超过100个字符")
|
||||
@Email(message = "联系邮箱格式不正确")
|
||||
private String contactEmail;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
@Size(max = 50, message = "紧急联系人长度不能超过50个字符")
|
||||
private String emergencyContact;
|
||||
|
||||
/**
|
||||
* 紧急联系电话
|
||||
*/
|
||||
@Size(max = 20, message = "紧急联系电话长度不能超过20个字符")
|
||||
@Pattern(regexp = "^[0-9+-]*$", message = "紧急联系电话格式不正确")
|
||||
private String emergencyPhone;
|
||||
|
||||
/**
|
||||
* 工作计划
|
||||
*/
|
||||
private String workPlan;
|
||||
|
||||
/**
|
||||
* 主要成就
|
||||
*/
|
||||
private String achievements;
|
||||
|
||||
/**
|
||||
* 培训记录(JSON格式)
|
||||
*/
|
||||
private String trainingRecords;
|
||||
|
||||
/**
|
||||
* 会议出席记录(JSON格式)
|
||||
*/
|
||||
private String meetingAttendance;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Size(max = 500, message = "备注信息长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// 查询条件字段
|
||||
/**
|
||||
* 班级编码(查询条件)
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称(查询条件)
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院名称(查询条件)
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 年级(查询条件)
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 专业名称(查询条件)
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 任职开始日期(查询条件)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date appointmentStartDate;
|
||||
|
||||
/**
|
||||
* 任职结束日期(查询条件)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date appointmentEndDate;
|
||||
|
||||
/**
|
||||
* 任期开始日期(查询条件)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termStartDateBegin;
|
||||
|
||||
/**
|
||||
* 任期结束日期(查询条件)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termStartDateEnd;
|
||||
|
||||
// 手动添加getter方法以确保编译通过
|
||||
public Long getClassId() {
|
||||
return this.classId;
|
||||
}
|
||||
|
||||
public Long getStudentId() {
|
||||
return this.studentId;
|
||||
}
|
||||
|
||||
public String getStudentNo() {
|
||||
return this.studentNo;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return this.studentName;
|
||||
}
|
||||
|
||||
public String getPositionCode() {
|
||||
return this.positionCode;
|
||||
}
|
||||
|
||||
public String getPositionName() {
|
||||
return this.positionName;
|
||||
}
|
||||
|
||||
public Integer getPositionLevel() {
|
||||
return this.positionLevel;
|
||||
}
|
||||
|
||||
public String getPositionCategory() {
|
||||
return this.positionCategory;
|
||||
}
|
||||
|
||||
public void setPositionCategory(String positionCategory) {
|
||||
this.positionCategory = positionCategory;
|
||||
}
|
||||
|
||||
public Boolean getIsCurrent() {
|
||||
return this.isCurrent;
|
||||
}
|
||||
|
||||
public void setIsCurrent(Boolean isCurrent) {
|
||||
this.isCurrent = isCurrent;
|
||||
}
|
||||
|
||||
public String getCadreStatus() {
|
||||
return this.cadreStatus;
|
||||
}
|
||||
|
||||
public void setCadreStatus(String cadreStatus) {
|
||||
this.cadreStatus = cadreStatus;
|
||||
}
|
||||
|
||||
public String getWorkPerformance() {
|
||||
return this.workPerformance;
|
||||
}
|
||||
|
||||
public void setWorkPerformance(String workPerformance) {
|
||||
this.workPerformance = workPerformance;
|
||||
}
|
||||
|
||||
public Date getAppointmentDate() {
|
||||
return this.appointmentDate;
|
||||
}
|
||||
|
||||
public void setAppointmentDate(Date appointmentDate) {
|
||||
this.appointmentDate = appointmentDate;
|
||||
}
|
||||
|
||||
public Date getTermStartDate() {
|
||||
return this.termStartDate;
|
||||
}
|
||||
|
||||
public void setTermStartDate(Date termStartDate) {
|
||||
this.termStartDate = termStartDate;
|
||||
}
|
||||
|
||||
public Date getTermEndDate() {
|
||||
return this.termEndDate;
|
||||
}
|
||||
|
||||
public void setTermEndDate(Date termEndDate) {
|
||||
this.termEndDate = termEndDate;
|
||||
}
|
||||
|
||||
public Integer getTermDuration() {
|
||||
return this.termDuration;
|
||||
}
|
||||
|
||||
public void setTermDuration(Integer termDuration) {
|
||||
this.termDuration = termDuration;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
+97
@@ -155,4 +155,101 @@ public class XgClassInfoBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 获取班级代码
|
||||
*/
|
||||
public String getClassCode() {
|
||||
return this.classCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级名称
|
||||
*/
|
||||
public String getClassName() {
|
||||
return this.className;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入学年份
|
||||
*/
|
||||
public Integer getEnrollmentYear() {
|
||||
return this.enrollmentYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业代码
|
||||
*/
|
||||
public String getMajorCode() {
|
||||
return this.majorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业名称
|
||||
*/
|
||||
public String getMajorName() {
|
||||
return this.majorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院代码
|
||||
*/
|
||||
public String getCollegeCode() {
|
||||
return this.collegeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院名称
|
||||
*/
|
||||
public String getCollegeName() {
|
||||
return this.collegeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员ID
|
||||
*/
|
||||
public Long getCounselorId() {
|
||||
return this.counselorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员姓名
|
||||
*/
|
||||
public String getCounselorName() {
|
||||
return this.counselorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任ID
|
||||
*/
|
||||
public Long getClassTeacherId() {
|
||||
return this.classTeacherId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任姓名
|
||||
*/
|
||||
public String getClassTeacherName() {
|
||||
return this.classTeacherName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级状态
|
||||
*/
|
||||
public String getClassStatus() {
|
||||
return this.classStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置主键ID
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主键ID
|
||||
*/
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 信息采集批次业务对象 XgCollectionBatchBo
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgCollectionBatchBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID(业务主键,与id保持一致)
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
@NotBlank(message = "批次编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "批次编码长度不能超过50个字符")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@NotBlank(message = "批次名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 200, message = "批次名称长度不能超过200个字符")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 批次类型
|
||||
*/
|
||||
@NotBlank(message = "批次类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "批次类型长度不能超过50个字符")
|
||||
private String batchType;
|
||||
|
||||
/**
|
||||
* 学年
|
||||
*/
|
||||
@Size(max = 20, message = "学年长度不能超过20个字符")
|
||||
private String academicYear;
|
||||
|
||||
/**
|
||||
* 学期
|
||||
*/
|
||||
@Size(max = 20, message = "学期长度不能超过20个字符")
|
||||
private String semester;
|
||||
|
||||
/**
|
||||
* 批次状态
|
||||
*/
|
||||
@NotBlank(message = "批次状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "批次状态长度不能超过20个字符")
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 发布状态
|
||||
*/
|
||||
@Size(max = 20, message = "发布状态长度不能超过20个字符")
|
||||
private String publishStatus;
|
||||
|
||||
/**
|
||||
* 批次描述
|
||||
*/
|
||||
@Size(max = 500, message = "批次描述长度不能超过500个字符")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 关联学年ID
|
||||
*/
|
||||
@NotNull(message = "关联学年ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 关联学期ID
|
||||
*/
|
||||
private Long semesterId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 目标范围
|
||||
*/
|
||||
@NotBlank(message = "目标范围不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "目标范围长度不能超过50个字符")
|
||||
private String targetScope;
|
||||
|
||||
/**
|
||||
* 目标届别
|
||||
*/
|
||||
@Size(max = 50, message = "目标届别长度不能超过50个字符")
|
||||
private String targetGrade;
|
||||
|
||||
/**
|
||||
* 目标学院ID列表(JSON格式)
|
||||
*/
|
||||
private String targetCollegeIds;
|
||||
|
||||
/**
|
||||
* 目标专业ID列表(JSON格式)
|
||||
*/
|
||||
private String targetMajorIds;
|
||||
|
||||
/**
|
||||
* 目标班级ID列表(JSON格式)
|
||||
*/
|
||||
private String targetClassIds;
|
||||
|
||||
/**
|
||||
* 目标学院ID列表(用于前端)
|
||||
*/
|
||||
private List<Long> targetCollegeIdList;
|
||||
|
||||
/**
|
||||
* 目标专业ID列表(用于前端)
|
||||
*/
|
||||
private List<Long> targetMajorIdList;
|
||||
|
||||
/**
|
||||
* 目标班级ID列表(用于前端)
|
||||
*/
|
||||
private List<Long> targetClassIdList;
|
||||
|
||||
/**
|
||||
* 是否发布
|
||||
*/
|
||||
private Boolean isPublished;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private Date publishTime;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer totalCount;
|
||||
|
||||
/**
|
||||
* 完成数
|
||||
*/
|
||||
private Integer completedCount;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
private Double completionRate;
|
||||
|
||||
/**
|
||||
* 开始前提醒时间(小时)
|
||||
*/
|
||||
@Min(value = 1, message = "开始前提醒时间必须大于0")
|
||||
@Max(value = 168, message = "开始前提醒时间不能超过168小时")
|
||||
private Integer remindBeforeStart;
|
||||
|
||||
/**
|
||||
* 结束前提醒时间(小时)
|
||||
*/
|
||||
@Min(value = 1, message = "结束前提醒时间必须大于0")
|
||||
@Max(value = 168, message = "结束前提醒时间不能超过168小时")
|
||||
private Integer remindBeforeEnd;
|
||||
|
||||
/**
|
||||
* 是否自动关闭
|
||||
*/
|
||||
private Boolean autoClose;
|
||||
|
||||
/**
|
||||
* 是否已发送通知
|
||||
*/
|
||||
private Boolean notificationSent;
|
||||
|
||||
/**
|
||||
* 创建模块
|
||||
*/
|
||||
private String createdByModule;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ==================== 兼容性方法 ====================
|
||||
|
||||
/**
|
||||
* 获取批次ID(如果batchId为null,返回主键id)
|
||||
*/
|
||||
public Long getBatchId() {
|
||||
return this.batchId != null ? this.batchId : this.id;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
if (this.id == null) {
|
||||
this.id = batchId;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 手动添加的 getter 方法 ====================
|
||||
|
||||
/**
|
||||
* 获取批次编码
|
||||
*/
|
||||
public String getBatchCode() {
|
||||
return this.batchCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次名称
|
||||
*/
|
||||
public String getBatchName() {
|
||||
return this.batchName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次类型
|
||||
*/
|
||||
public String getBatchType() {
|
||||
return this.batchType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学年
|
||||
*/
|
||||
public String getAcademicYear() {
|
||||
return this.academicYear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学期
|
||||
*/
|
||||
public String getSemester() {
|
||||
return this.semester;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次状态
|
||||
*/
|
||||
public String getBatchStatus() {
|
||||
return this.batchStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布状态
|
||||
*/
|
||||
public String getPublishStatus() {
|
||||
return this.publishStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开始时间
|
||||
*/
|
||||
public Date getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结束时间
|
||||
*/
|
||||
public Date getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次描述
|
||||
*/
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 数据字典业务对象 xg_dict_data
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgDictDataBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 字典数据ID
|
||||
*/
|
||||
@NotNull(message = "字典数据ID不能为空", groups = { EditGroup.class })
|
||||
private Long dictDataId;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@NotBlank(message = "字典类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "字典类型长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@NotBlank(message = "字典标签不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String dictLabel;
|
||||
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
@NotBlank(message = "字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "字典键值长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
@NotNull(message = "字典排序不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 0, message = "字典排序不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer dictSort;
|
||||
|
||||
/**
|
||||
* 样式属性
|
||||
*/
|
||||
@Size(max = 100, message = "样式属性长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String cssClass;
|
||||
|
||||
/**
|
||||
* 表格字典样式
|
||||
*/
|
||||
@Size(max = 100, message = "表格字典样式长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String listClass;
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*/
|
||||
@NotNull(message = "是否默认不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isDefault;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "状态长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告业务对象 xg_notice
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgNoticeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 通知ID
|
||||
*/
|
||||
@NotNull(message = "通知ID不能为空", groups = { EditGroup.class })
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 通知标题
|
||||
*/
|
||||
@NotBlank(message = "通知标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 200, message = "通知标题长度不能超过200个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String noticeTitle;
|
||||
|
||||
/**
|
||||
* 通知类型
|
||||
*/
|
||||
@NotBlank(message = "通知类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "通知类型长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String noticeType;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
@NotBlank(message = "通知内容不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String noticeContent;
|
||||
|
||||
/**
|
||||
* 发布范围
|
||||
*/
|
||||
@Size(max = 500, message = "发布范围长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String publishScope;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
@NotNull(message = "优先级不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Min(value = 1, message = "优先级不能小于1", groups = { AddGroup.class, EditGroup.class })
|
||||
@Max(value = 5, message = "优先级不能大于5", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@NotNull(message = "是否置顶不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isTop;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
* 附件路径
|
||||
*/
|
||||
@Size(max = 500, message = "附件路径长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String attachmentPath;
|
||||
|
||||
/**
|
||||
* 阅读次数
|
||||
*/
|
||||
@Min(value = 0, message = "阅读次数不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer readCount;
|
||||
|
||||
/**
|
||||
* 发布状态
|
||||
*/
|
||||
@NotBlank(message = "发布状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "发布状态长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String publishStatus;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Min(value = 0, message = "排序号不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "状态长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知阅读记录业务对象 xg_notice_read
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgNoticeReadBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 阅读记录ID
|
||||
*/
|
||||
@NotNull(message = "阅读记录ID不能为空", groups = { EditGroup.class })
|
||||
private Long readId;
|
||||
|
||||
/**
|
||||
* 通知ID
|
||||
*/
|
||||
@NotNull(message = "通知ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@NotBlank(message = "用户类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "用户类型长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@NotNull(message = "阅读时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
* 阅读时长(秒)
|
||||
*/
|
||||
@Min(value = 0, message = "阅读时长不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer readDuration;
|
||||
|
||||
/**
|
||||
* 阅读状态
|
||||
*/
|
||||
@NotBlank(message = "阅读状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "阅读状态长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String readStatus;
|
||||
|
||||
/**
|
||||
* 阅读设备
|
||||
*/
|
||||
@Size(max = 50, message = "阅读设备长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String readDevice;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@Size(max = 50, message = "IP地址长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 阅读位置
|
||||
*/
|
||||
@Size(max = 200, message = "阅读位置长度不能超过200个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String readLocation;
|
||||
|
||||
/**
|
||||
* 是否完整阅读
|
||||
*/
|
||||
@NotNull(message = "是否完整阅读不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isFullRead;
|
||||
|
||||
/**
|
||||
* 阅读进度
|
||||
*/
|
||||
@Min(value = 0, message = "阅读进度不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
@Max(value = 100, message = "阅读进度不能大于100", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer readProgress;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
// 手动添加getter/setter方法以解决Lombok问题
|
||||
public Long getNoticeId() {
|
||||
return noticeId;
|
||||
}
|
||||
|
||||
public void setNoticeId(Long noticeId) {
|
||||
this.noticeId = noticeId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public LocalDateTime getReadTime() {
|
||||
return readTime;
|
||||
}
|
||||
|
||||
public void setReadTime(LocalDateTime readTime) {
|
||||
this.readTime = readTime;
|
||||
}
|
||||
|
||||
public Long getReadId() {
|
||||
return readId;
|
||||
}
|
||||
|
||||
public void setReadId(Long readId) {
|
||||
this.readId = readId;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public Integer getReadDuration() {
|
||||
return readDuration;
|
||||
}
|
||||
|
||||
public void setReadDuration(Integer readDuration) {
|
||||
this.readDuration = readDuration;
|
||||
}
|
||||
|
||||
public String getReadStatus() {
|
||||
return readStatus;
|
||||
}
|
||||
|
||||
public void setReadStatus(String readStatus) {
|
||||
this.readStatus = readStatus;
|
||||
}
|
||||
|
||||
public String getReadDevice() {
|
||||
return readDevice;
|
||||
}
|
||||
|
||||
public void setReadDevice(String readDevice) {
|
||||
this.readDevice = readDevice;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public String getReadLocation() {
|
||||
return readLocation;
|
||||
}
|
||||
|
||||
public void setReadLocation(String readLocation) {
|
||||
this.readLocation = readLocation;
|
||||
}
|
||||
|
||||
public Boolean getIsFullRead() {
|
||||
return isFullRead;
|
||||
}
|
||||
|
||||
public void setIsFullRead(Boolean isFullRead) {
|
||||
this.isFullRead = isFullRead;
|
||||
}
|
||||
|
||||
public Integer getReadProgress() {
|
||||
return readProgress;
|
||||
}
|
||||
|
||||
public void setReadProgress(Integer readProgress) {
|
||||
this.readProgress = readProgress;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import org.dromara.xg.domain.XgSemester;
|
||||
|
||||
/**
|
||||
* 学期管理业务对象 xg_semester
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XgSemester.class, reverseConvertGenerate = false)
|
||||
public class XgSemesterBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 学期ID
|
||||
*/
|
||||
@NotNull(message = "学期ID不能为空", groups = { EditGroup.class })
|
||||
private Long semesterId;
|
||||
|
||||
/**
|
||||
* 学年ID
|
||||
*/
|
||||
@NotNull(message = "学年ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 学期名称
|
||||
*/
|
||||
@NotBlank(message = "学期名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "学期名称长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String semesterName;
|
||||
|
||||
/**
|
||||
* 学期代码
|
||||
*/
|
||||
@NotBlank(message = "学期代码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "学期代码长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String semesterCode;
|
||||
|
||||
/**
|
||||
* 学期类型
|
||||
*/
|
||||
@NotBlank(message = "学期类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 20, message = "学期类型长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String semesterType;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@NotNull(message = "开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@NotNull(message = "结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学期
|
||||
*/
|
||||
@NotNull(message = "是否当前学期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Min(value = 0, message = "排序号不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "状态长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生信息审核业务对象 XgStudentInfoApprovalBo
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgStudentInfoApprovalBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 提交状态
|
||||
*/
|
||||
private String submissionStatus;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 提交时间开始
|
||||
*/
|
||||
private LocalDateTime submissionTimeStart;
|
||||
|
||||
/**
|
||||
* 提交时间结束
|
||||
*/
|
||||
private LocalDateTime submissionTimeEnd;
|
||||
|
||||
/**
|
||||
* 审核时间开始
|
||||
*/
|
||||
private LocalDateTime approvalTimeStart;
|
||||
|
||||
/**
|
||||
* 审核时间结束
|
||||
*/
|
||||
private LocalDateTime approvalTimeEnd;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String approvalByName;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String approvalComments;
|
||||
|
||||
/**
|
||||
* 查询关键字(学生姓名或学号)
|
||||
*/
|
||||
private String keyword;
|
||||
|
||||
/**
|
||||
* 是否导出
|
||||
*/
|
||||
private Boolean export;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
private LocalDateTime approvalTime;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private LocalDateTime submissionTime;
|
||||
|
||||
// 手动添加getter方法以确保编译通过
|
||||
public Long getBatchId() {
|
||||
return this.batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
// 添加缺失的getter/setter方法
|
||||
public Long getStudentId() {
|
||||
return studentId;
|
||||
}
|
||||
|
||||
public void setStudentId(Long studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public String getApprovalStatus() {
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(String approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getApprovalComments() {
|
||||
return approvalComments;
|
||||
}
|
||||
|
||||
public void setApprovalComments(String approvalComments) {
|
||||
this.approvalComments = approvalComments;
|
||||
}
|
||||
|
||||
public LocalDateTime getApprovalTime() {
|
||||
return approvalTime;
|
||||
}
|
||||
|
||||
public void setApprovalTime(LocalDateTime approvalTime) {
|
||||
this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getSubmissionTime() {
|
||||
return submissionTime;
|
||||
}
|
||||
|
||||
public void setSubmissionTime(LocalDateTime submissionTime) {
|
||||
this.submissionTime = submissionTime;
|
||||
}
|
||||
}
|
||||
+166
-4
@@ -323,23 +323,185 @@ public class XgStudentInfoBo extends BaseEntity {
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 学籍状态IN查询(用于状态过滤)
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 学生状态范围查询
|
||||
*/
|
||||
private List<String> studentStatusIn;
|
||||
|
||||
/**
|
||||
* 班级代码IN查询(用于班级过滤)
|
||||
* 班级代码范围查询
|
||||
*/
|
||||
private List<String> classCodeIn;
|
||||
|
||||
/**
|
||||
* 学院代码IN查询(用于学院过滤)
|
||||
* 学院代码范围查询
|
||||
*/
|
||||
private List<String> collegeCodeIn;
|
||||
|
||||
/**
|
||||
* 入学年份IN查询(用于年级过滤)
|
||||
* 入学年份范围查询
|
||||
*/
|
||||
private List<Integer> enrollmentYearIn;
|
||||
|
||||
/**
|
||||
* 搜索关键字
|
||||
*/
|
||||
private String keyword;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 学生状态
|
||||
*/
|
||||
private String studentStatus;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
// 手动添加getter和setter方法以确保编译通过
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getClassCode() {
|
||||
return classCode;
|
||||
}
|
||||
|
||||
public void setClassCode(String classCode) {
|
||||
this.classCode = classCode;
|
||||
}
|
||||
|
||||
public String getCollegeCode() {
|
||||
return collegeCode;
|
||||
}
|
||||
|
||||
public void setCollegeCode(String collegeCode) {
|
||||
this.collegeCode = collegeCode;
|
||||
}
|
||||
|
||||
public Long getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getKeyword() {
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword) {
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public String getStudentNo() {
|
||||
return studentNo;
|
||||
}
|
||||
|
||||
public void setStudentNo(String studentNo) {
|
||||
this.studentNo = studentNo;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getStudentStatus() {
|
||||
return studentStatus;
|
||||
}
|
||||
|
||||
public void setStudentStatus(String studentStatus) {
|
||||
this.studentStatus = studentStatus;
|
||||
}
|
||||
|
||||
public String getMajorName() {
|
||||
return majorName;
|
||||
}
|
||||
|
||||
public void setMajorName(String majorName) {
|
||||
this.majorName = majorName;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getCollegeName() {
|
||||
return collegeName;
|
||||
}
|
||||
|
||||
public void setCollegeName(String collegeName) {
|
||||
this.collegeName = collegeName;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生信息历史业务对象 xg_student_info_history
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgStudentInfoHistoryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 历史记录ID
|
||||
*/
|
||||
@NotNull(message = "历史记录ID不能为空", groups = { EditGroup.class })
|
||||
private Long historyId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "学号长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@NotBlank(message = "变更类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "变更类型长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变更字段
|
||||
*/
|
||||
@NotBlank(message = "变更字段不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "变更字段长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String changeField;
|
||||
|
||||
/**
|
||||
* 变更前值
|
||||
*/
|
||||
private String oldValue;
|
||||
|
||||
/**
|
||||
* 变更后值
|
||||
*/
|
||||
private String newValue;
|
||||
|
||||
/**
|
||||
* 变更时间
|
||||
*/
|
||||
@NotNull(message = "变更时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDateTime changeTime;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@Size(max = 500, message = "变更原因长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String changeReason;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "操作人姓名长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
@Size(max = 50, message = "批次编号长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@Size(max = 20, message = "审核状态长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
@Size(max = 50, message = "审核人姓名长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String auditorName;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@Size(max = 500, message = "审核意见长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String auditComment;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@Size(max = 50, message = "数据来源长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 是否生效
|
||||
*/
|
||||
@NotNull(message = "是否生效不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isEffective;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package org.dromara.xg.domain.bo;
|
||||
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 系统配置业务对象 xg_system_config
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class XgSystemConfigBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 配置ID
|
||||
*/
|
||||
@NotNull(message = "配置ID不能为空", groups = { EditGroup.class })
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 配置键
|
||||
*/
|
||||
@NotBlank(message = "配置键不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "配置键长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@NotBlank(message = "配置名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 100, message = "配置名称长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@NotBlank(message = "配置值不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 配置类型
|
||||
*/
|
||||
@NotBlank(message = "配置类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 50, message = "配置类型长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置分组
|
||||
*/
|
||||
@Size(max = 50, message = "配置分组长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configGroup;
|
||||
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
@Size(max = 500, message = "配置描述长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String configDescription;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
private String defaultValue;
|
||||
|
||||
/**
|
||||
* 是否系统内置
|
||||
*/
|
||||
@NotNull(message = "是否系统内置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isSystem;
|
||||
|
||||
/**
|
||||
* 是否可编辑
|
||||
*/
|
||||
@NotNull(message = "是否可编辑不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isEditable;
|
||||
|
||||
/**
|
||||
* 是否可删除
|
||||
*/
|
||||
@NotNull(message = "是否可删除不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Boolean isDeletable;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Min(value = 0, message = "排序号不能小于0", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@Size(max = 10, message = "状态长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgAcademicYear;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 学年管理视图对象 xg_academic_year
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgAcademicYear.class)
|
||||
public class XgAcademicYearVo extends XgAcademicYear {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学年编码,如2024-2025
|
||||
*/
|
||||
@ExcelProperty(value = "学年编码")
|
||||
private String yearCode;
|
||||
|
||||
/**
|
||||
* 学年名称,如2024-2025学年
|
||||
*/
|
||||
@ExcelProperty(value = "学年名称")
|
||||
private String yearName;
|
||||
|
||||
/**
|
||||
* 学年开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "学年开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 学年结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "学年结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学年:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否当前学年")
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 状态:active-有效,inactive-无效
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 学年描述
|
||||
*/
|
||||
@ExcelProperty(value = "学年描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
@ExcelProperty(value = "排序字段")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
// 基础字段
|
||||
@ExcelProperty(value = "创建者")
|
||||
private Long createBy;
|
||||
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
|
||||
@ExcelProperty(value = "更新者")
|
||||
private Long updateBy;
|
||||
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xg.domain.XgBatchOperationLog;
|
||||
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_batch_operation_log
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgBatchOperationLog.class)
|
||||
public class XgBatchOperationLogVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志ID
|
||||
*/
|
||||
@ExcelProperty(value = "日志ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@ExcelProperty(value = "操作类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_batch_operation_type")
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 操作描述
|
||||
*/
|
||||
@ExcelProperty(value = "操作描述")
|
||||
private String operationDescription;
|
||||
|
||||
/**
|
||||
* 操作前数据(JSON格式)
|
||||
*/
|
||||
private String beforeData;
|
||||
|
||||
/**
|
||||
* 操作后数据(JSON格式)
|
||||
*/
|
||||
private String afterData;
|
||||
|
||||
/**
|
||||
* 操作人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 operationIp;
|
||||
|
||||
/**
|
||||
* 操作结果
|
||||
*/
|
||||
@ExcelProperty(value = "操作结果", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_operation_result")
|
||||
private String operationResult;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@ExcelProperty(value = "失败原因")
|
||||
private String failureReason;
|
||||
|
||||
/**
|
||||
* 关联业务ID
|
||||
*/
|
||||
private Long relatedId;
|
||||
|
||||
/**
|
||||
* 关联业务类型
|
||||
*/
|
||||
@ExcelProperty(value = "关联业务类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_related_type")
|
||||
private String relatedType;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchPermission;
|
||||
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;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 批次权限配置视图对象 xg_batch_permission
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgBatchPermission.class)
|
||||
public class XgBatchPermissionVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 权限配置ID
|
||||
*/
|
||||
@ExcelProperty(value = "权限配置ID")
|
||||
private Long permissionId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 用户组类型
|
||||
*/
|
||||
@ExcelProperty(value = "用户组类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_user_group_type")
|
||||
private String userGroupType;
|
||||
|
||||
/**
|
||||
* 用户组名称
|
||||
*/
|
||||
@ExcelProperty(value = "用户组名称")
|
||||
private String userGroupName;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@ExcelProperty(value = "权限类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_permission_type")
|
||||
private String permissionType;
|
||||
|
||||
/**
|
||||
* 权限范围
|
||||
*/
|
||||
@ExcelProperty(value = "权限范围")
|
||||
private String permissionScope;
|
||||
|
||||
/**
|
||||
* 是否可查看
|
||||
*/
|
||||
@ExcelProperty(value = "是否可查看", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean canView;
|
||||
|
||||
/**
|
||||
* 是否可编辑
|
||||
*/
|
||||
@ExcelProperty(value = "是否可编辑", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean canEdit;
|
||||
|
||||
/**
|
||||
* 是否可审核
|
||||
*/
|
||||
@ExcelProperty(value = "是否可审核", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean canAudit;
|
||||
|
||||
/**
|
||||
* 是否可导出
|
||||
*/
|
||||
@ExcelProperty(value = "是否可导出", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean canExport;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.dromara.xg.domain.XgBatchStudentRelation;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 批次学生关联视图对象 xg_batch_student_relation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = XgBatchStudentRelation.class)
|
||||
public class XgBatchStudentRelationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNumber;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学生性别
|
||||
*/
|
||||
private String studentGender;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 提交状态:DRAFT-草稿,SUBMITTED-已提交,WITHDRAWN-已撤回
|
||||
*/
|
||||
private String submissionStatus;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime submissionTime;
|
||||
|
||||
/**
|
||||
* 审核状态:PENDING-待审核,APPROVED-已审核,REJECTED-已拒绝
|
||||
*/
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime approvalTime;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String approvalByName;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String approvalComments;
|
||||
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastEditTime;
|
||||
|
||||
/**
|
||||
* 提交次数
|
||||
*/
|
||||
private Integer submissionCount;
|
||||
|
||||
/**
|
||||
* 是否允许编辑:0-否,1-是
|
||||
*/
|
||||
private Integer allowEdit;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
private String extField1;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
private String extField2;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
private String extField3;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private Long updateBy;
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgBusinessPeriod;
|
||||
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;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务期管理视图对象 xg_business_period
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgBusinessPeriod.class)
|
||||
public class XgBusinessPeriodVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务期ID
|
||||
*/
|
||||
@ExcelProperty(value = "业务期ID")
|
||||
private Long businessPeriodId;
|
||||
|
||||
/**
|
||||
* 业务期名称
|
||||
*/
|
||||
@ExcelProperty(value = "业务期名称")
|
||||
private String periodName;
|
||||
|
||||
/**
|
||||
* 业务期代码
|
||||
*/
|
||||
@ExcelProperty(value = "业务期代码")
|
||||
private String periodCode;
|
||||
|
||||
/**
|
||||
* 业务期类型
|
||||
*/
|
||||
@ExcelProperty(value = "业务期类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_business_period_type")
|
||||
private String periodType;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
@ExcelProperty(value = "是否激活", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isActive;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ExcelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+266
@@ -0,0 +1,266 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgClassCadre;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
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_class_cadre
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgClassCadre.class)
|
||||
public class XgClassCadreVo extends XgClassCadre {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 班级ID,关联xg_class_info.id
|
||||
*/
|
||||
@ExcelProperty(value = "班级ID")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_info.id
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 职务编码
|
||||
*/
|
||||
@ExcelProperty(value = "职务编码")
|
||||
private String positionCode;
|
||||
|
||||
/**
|
||||
* 职务名称
|
||||
*/
|
||||
@ExcelProperty(value = "职务名称")
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 职务级别:1-班长,2-副班长,3-委员,9-普通成员
|
||||
*/
|
||||
@ExcelProperty(value = "职务级别")
|
||||
private Integer positionLevel;
|
||||
|
||||
/**
|
||||
* 职务类别:class-班级干部,party-党团干部,other-其他
|
||||
*/
|
||||
@ExcelProperty(value = "职务类别")
|
||||
private String positionCategory;
|
||||
|
||||
/**
|
||||
* 任职日期
|
||||
*/
|
||||
@ExcelProperty(value = "任职日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date appointmentDate;
|
||||
|
||||
/**
|
||||
* 任期开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "任期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termStartDate;
|
||||
|
||||
/**
|
||||
* 任期结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "任期结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date termEndDate;
|
||||
|
||||
/**
|
||||
* 任期时长(月)
|
||||
*/
|
||||
@ExcelProperty(value = "任期时长(月)")
|
||||
private Integer termDuration;
|
||||
|
||||
/**
|
||||
* 是否现任:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否现任")
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 任职状态:1-在任,2-到期,3-辞职,4-免职,5-调任
|
||||
*/
|
||||
@ExcelProperty(value = "任职状态")
|
||||
private String cadreStatus;
|
||||
|
||||
/**
|
||||
* 是否兼职:0-否,1-是
|
||||
*/
|
||||
@ExcelProperty(value = "是否兼职")
|
||||
private Boolean isConcurrent;
|
||||
|
||||
/**
|
||||
* 兼任职务列表
|
||||
*/
|
||||
@ExcelProperty(value = "兼任职务列表")
|
||||
private String concurrentPositions;
|
||||
|
||||
/**
|
||||
* 任命人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "任命人姓名")
|
||||
private String appointerName;
|
||||
|
||||
/**
|
||||
* 任命原因
|
||||
*/
|
||||
@ExcelProperty(value = "任命原因")
|
||||
private String appointmentReason;
|
||||
|
||||
/**
|
||||
* 工作表现:excellent-优秀,good-良好,average-一般,poor-较差
|
||||
*/
|
||||
@ExcelProperty(value = "工作表现")
|
||||
private String workPerformance;
|
||||
|
||||
/**
|
||||
* 表现评分(0-10分)
|
||||
*/
|
||||
@ExcelProperty(value = "表现评分")
|
||||
private BigDecimal performanceScore;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "联系邮箱")
|
||||
private String contactEmail;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
// 关联信息字段
|
||||
/**
|
||||
* 班级编码
|
||||
*/
|
||||
@ExcelProperty(value = "班级编码")
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院名称")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@ExcelProperty(value = "年级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业名称")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 职责描述
|
||||
*/
|
||||
@ExcelProperty(value = "职责描述")
|
||||
private String responsibilities;
|
||||
|
||||
/**
|
||||
* 具体职务
|
||||
*/
|
||||
@ExcelProperty(value = "具体职务")
|
||||
private String duties;
|
||||
|
||||
/**
|
||||
* 剩余任期天数
|
||||
*/
|
||||
@ExcelProperty(value = "剩余任期天数")
|
||||
private Integer daysRemaining;
|
||||
|
||||
/**
|
||||
* 任职状态显示文本
|
||||
*/
|
||||
@ExcelProperty(value = "任职状态显示")
|
||||
private String cadreStatusText;
|
||||
|
||||
/**
|
||||
* 职务级别显示文本
|
||||
*/
|
||||
@ExcelProperty(value = "职务级别显示")
|
||||
private String positionLevelText;
|
||||
|
||||
/**
|
||||
* 工作表现显示文本
|
||||
*/
|
||||
@ExcelProperty(value = "工作表现显示")
|
||||
private String workPerformanceText;
|
||||
|
||||
/**
|
||||
* 是否现任显示文本
|
||||
*/
|
||||
@ExcelProperty(value = "是否现任显示")
|
||||
private String isCurrentText;
|
||||
|
||||
/**
|
||||
* 是否兼职显示文本
|
||||
*/
|
||||
@ExcelProperty(value = "是否兼职显示")
|
||||
private String isConcurrentText;
|
||||
|
||||
// 以下是从基类继承的字段,这里显式声明用于MyBatis映射
|
||||
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;
|
||||
}
|
||||
+42
@@ -204,4 +204,46 @@ public class XgClassInfoVo implements Serializable {
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 获取学院代码
|
||||
*/
|
||||
public String getCollegeCode() {
|
||||
return this.collegeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅导员ID
|
||||
*/
|
||||
public Long getCounselorId() {
|
||||
return this.counselorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班主任ID
|
||||
*/
|
||||
public Long getClassTeacherId() {
|
||||
return this.classTeacherId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前学生数
|
||||
*/
|
||||
public Integer getCurrentStudentCount() {
|
||||
return this.currentStudentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取男生数量
|
||||
*/
|
||||
public Integer getMaleCount() {
|
||||
return this.maleCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取女生数量
|
||||
*/
|
||||
public Integer getFemaleCount() {
|
||||
return this.femaleCount;
|
||||
}
|
||||
|
||||
}
|
||||
BIN
Binary file not shown.
+80
-30
@@ -2,12 +2,10 @@ package org.dromara.xg.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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 java.io.Serial;
|
||||
@@ -21,12 +19,20 @@ import java.io.Serializable;
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgCollectionBatch.class)
|
||||
public class XgCollectionBatchVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 手动添加缺失的getter方法,解决编译错误
|
||||
public Long getBatchId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getBatchName() {
|
||||
return batchName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@@ -97,34 +103,10 @@ public class XgCollectionBatchVo implements Serializable {
|
||||
private String batchStatus;
|
||||
|
||||
/**
|
||||
* 目标学生总数
|
||||
* 发布状态
|
||||
*/
|
||||
@ExcelProperty(value = "目标学生总数")
|
||||
private Integer targetStudentCount;
|
||||
|
||||
/**
|
||||
* 已提交学生数
|
||||
*/
|
||||
@ExcelProperty(value = "已提交学生数")
|
||||
private Integer submittedStudentCount;
|
||||
|
||||
/**
|
||||
* 已审核学生数
|
||||
*/
|
||||
@ExcelProperty(value = "已审核学生数")
|
||||
private Integer auditedStudentCount;
|
||||
|
||||
/**
|
||||
* 提交率(百分比)
|
||||
*/
|
||||
@ExcelProperty(value = "提交率(%)")
|
||||
private Integer submissionRate;
|
||||
|
||||
/**
|
||||
* 审核通过率(百分比)
|
||||
*/
|
||||
@ExcelProperty(value = "审核通过率(%)")
|
||||
private Integer auditPassRate;
|
||||
@ExcelProperty(value = "发布状态")
|
||||
private String publishStatus;
|
||||
|
||||
/**
|
||||
* 负责人姓名
|
||||
@@ -167,4 +149,72 @@ public class XgCollectionBatchVo implements Serializable {
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
// ==================== 统计字段 ====================
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
@ExcelProperty(value = "总学生数")
|
||||
private Integer totalStudents;
|
||||
|
||||
/**
|
||||
* 已提交学生数
|
||||
*/
|
||||
@ExcelProperty(value = "已提交学生数")
|
||||
private Integer submittedStudents;
|
||||
|
||||
/**
|
||||
* 已通过学生数
|
||||
*/
|
||||
@ExcelProperty(value = "已通过学生数")
|
||||
private Integer approvedStudents;
|
||||
|
||||
/**
|
||||
* 已拒绝学生数
|
||||
*/
|
||||
@ExcelProperty(value = "已拒绝学生数")
|
||||
private Integer rejectedStudents;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
@ExcelProperty(value = "完成率(%)")
|
||||
private Double completionRate;
|
||||
|
||||
// ==================== 手动添加的 setter 方法 ====================
|
||||
|
||||
/**
|
||||
* 设置总学生数
|
||||
*/
|
||||
public void setTotalStudents(Integer totalStudents) {
|
||||
this.totalStudents = totalStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已提交学生数
|
||||
*/
|
||||
public void setSubmittedStudents(Integer submittedStudents) {
|
||||
this.submittedStudents = submittedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已通过学生数
|
||||
*/
|
||||
public void setApprovedStudents(Integer approvedStudents) {
|
||||
this.approvedStudents = approvedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已拒绝学生数
|
||||
*/
|
||||
public void setRejectedStudents(Integer rejectedStudents) {
|
||||
this.rejectedStudents = rejectedStudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置完成率
|
||||
*/
|
||||
public void setCompletionRate(Double completionRate) {
|
||||
this.completionRate = completionRate;
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgDictData;
|
||||
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 lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 数据字典视图对象 xg_dict_data
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XgDictDataVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 字典数据ID
|
||||
*/
|
||||
@ExcelProperty(value = "字典数据ID")
|
||||
private Long dictDataId;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ExcelProperty(value = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@ExcelProperty(value = "字典标签")
|
||||
private String dictLabel;
|
||||
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
@ExcelProperty(value = "字典键值")
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
@ExcelProperty(value = "字典排序")
|
||||
private Integer dictSort;
|
||||
|
||||
/**
|
||||
* 样式属性
|
||||
*/
|
||||
@ExcelProperty(value = "样式属性")
|
||||
private String cssClass;
|
||||
|
||||
/**
|
||||
* 表格字典样式
|
||||
*/
|
||||
@ExcelProperty(value = "表格字典样式")
|
||||
private String listClass;
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*/
|
||||
@ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isDefault;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgNoticeRead;
|
||||
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 lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知阅读记录视图对象 xg_notice_read
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XgNoticeReadVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 阅读记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "阅读记录ID")
|
||||
private Long readId;
|
||||
|
||||
/**
|
||||
* 通知ID
|
||||
*/
|
||||
@ExcelProperty(value = "通知ID")
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@ExcelProperty(value = "用户类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_user_type")
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@ExcelProperty(value = "阅读时间")
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
* 阅读时长(秒)
|
||||
*/
|
||||
@ExcelProperty(value = "阅读时长(秒)")
|
||||
private Integer readDuration;
|
||||
|
||||
/**
|
||||
* 阅读状态
|
||||
*/
|
||||
@ExcelProperty(value = "阅读状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_read_status")
|
||||
private String readStatus;
|
||||
|
||||
/**
|
||||
* 阅读设备
|
||||
*/
|
||||
@ExcelProperty(value = "阅读设备")
|
||||
private String readDevice;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@ExcelProperty(value = "IP地址")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 阅读位置
|
||||
*/
|
||||
@ExcelProperty(value = "阅读位置")
|
||||
private String readLocation;
|
||||
|
||||
/**
|
||||
* 是否完整阅读
|
||||
*/
|
||||
@ExcelProperty(value = "是否完整阅读", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isFullRead;
|
||||
|
||||
/**
|
||||
* 阅读进度
|
||||
*/
|
||||
@ExcelProperty(value = "阅读进度(%)")
|
||||
private Integer readProgress;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Long getNoticeId() {
|
||||
return noticeId;
|
||||
}
|
||||
|
||||
public void setNoticeId(Long noticeId) {
|
||||
this.noticeId = noticeId;
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgNotice;
|
||||
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 lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告视图对象 xg_notice
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XgNoticeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 通知ID
|
||||
*/
|
||||
@ExcelProperty(value = "通知ID")
|
||||
private Long noticeId;
|
||||
|
||||
/**
|
||||
* 通知标题
|
||||
*/
|
||||
@ExcelProperty(value = "通知标题")
|
||||
private String noticeTitle;
|
||||
|
||||
/**
|
||||
* 通知类型
|
||||
*/
|
||||
@ExcelProperty(value = "通知类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_notice_type")
|
||||
private String noticeType;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
@ExcelProperty(value = "通知内容")
|
||||
private String noticeContent;
|
||||
|
||||
/**
|
||||
* 发布范围
|
||||
*/
|
||||
@ExcelProperty(value = "发布范围")
|
||||
private String publishScope;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
@ExcelProperty(value = "优先级", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_notice_priority")
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@ExcelProperty(value = "是否置顶", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isTop;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@ExcelProperty(value = "发布时间")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@ExcelProperty(value = "过期时间")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
* 附件路径
|
||||
*/
|
||||
@ExcelProperty(value = "附件路径")
|
||||
private String attachmentPath;
|
||||
|
||||
/**
|
||||
* 阅读次数
|
||||
*/
|
||||
@ExcelProperty(value = "阅读次数")
|
||||
private Integer readCount;
|
||||
|
||||
/**
|
||||
* 发布状态
|
||||
*/
|
||||
@ExcelProperty(value = "发布状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_publish_status")
|
||||
private String publishStatus;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgSemester;
|
||||
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;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学期管理视图对象 xg_semester
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XgSemester.class)
|
||||
public class XgSemesterVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 学期ID
|
||||
*/
|
||||
@ExcelProperty(value = "学期ID")
|
||||
private Long semesterId;
|
||||
|
||||
/**
|
||||
* 学年ID
|
||||
*/
|
||||
@ExcelProperty(value = "学年ID")
|
||||
private Long academicYearId;
|
||||
|
||||
/**
|
||||
* 学期名称
|
||||
*/
|
||||
@ExcelProperty(value = "学期名称")
|
||||
private String semesterName;
|
||||
|
||||
/**
|
||||
* 学期代码
|
||||
*/
|
||||
@ExcelProperty(value = "学期代码")
|
||||
private String semesterCode;
|
||||
|
||||
/**
|
||||
* 学期类型
|
||||
*/
|
||||
@ExcelProperty(value = "学期类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_semester_type")
|
||||
private String semesterType;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 是否当前学期
|
||||
*/
|
||||
@ExcelProperty(value = "是否当前学期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isCurrent;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生信息审核视图对象 XgStudentInfoApprovalVo
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
public class XgStudentInfoApprovalVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
private String classCode;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
private String collegeCode;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
private String majorCode;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 提交状态
|
||||
*/
|
||||
private String submissionStatus;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String approvalStatus;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime submissionTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime approvalTime;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String approvalByName;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String approvalComments;
|
||||
|
||||
/**
|
||||
* 学生联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 学生身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 统计信息 - 总数
|
||||
*/
|
||||
private Long totalCount;
|
||||
|
||||
/**
|
||||
* 统计信息 - 待审核数
|
||||
*/
|
||||
private Long pendingCount;
|
||||
|
||||
/**
|
||||
* 统计信息 - 已通过数
|
||||
*/
|
||||
private Long approvedCount;
|
||||
|
||||
/**
|
||||
* 统计信息 - 已拒绝数
|
||||
*/
|
||||
private Long rejectedCount;
|
||||
|
||||
/**
|
||||
* 统计信息 - 已提交数
|
||||
*/
|
||||
private Long submittedCount;
|
||||
|
||||
/**
|
||||
* 统计信息 - 草稿数
|
||||
*/
|
||||
private Long draftCount;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
// 手动添加setter方法以确保编译通过
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public void setTotalCount(Long totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
public void setPendingCount(Long pendingCount) {
|
||||
this.pendingCount = pendingCount;
|
||||
}
|
||||
|
||||
public void setApprovedCount(Long approvedCount) {
|
||||
this.approvedCount = approvedCount;
|
||||
}
|
||||
|
||||
public void setRejectedCount(Long rejectedCount) {
|
||||
this.rejectedCount = rejectedCount;
|
||||
}
|
||||
|
||||
public void setSubmittedCount(Long submittedCount) {
|
||||
this.submittedCount = submittedCount;
|
||||
}
|
||||
|
||||
public void setDraftCount(Long draftCount) {
|
||||
this.draftCount = draftCount;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public void setStudentNo(String studentNo) {
|
||||
this.studentNo = studentNo;
|
||||
}
|
||||
|
||||
public void setClassCode(String classCode) {
|
||||
this.classCode = classCode;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public void setCollegeCode(String collegeCode) {
|
||||
this.collegeCode = collegeCode;
|
||||
}
|
||||
|
||||
public void setCollegeName(String collegeName) {
|
||||
this.collegeName = collegeName;
|
||||
}
|
||||
|
||||
public void setSubmissionStatus(String submissionStatus) {
|
||||
this.submissionStatus = submissionStatus;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(String approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public void setSubmissionTime(LocalDateTime submissionTime) {
|
||||
this.submissionTime = submissionTime;
|
||||
}
|
||||
|
||||
public void setApprovalTime(LocalDateTime approvalTime) {
|
||||
this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
public void setApprovalBy(Long approvalBy) {
|
||||
this.approvalBy = approvalBy;
|
||||
}
|
||||
|
||||
public void setApprovalComments(String approvalComments) {
|
||||
this.approvalComments = approvalComments;
|
||||
}
|
||||
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public void setCreateBy(Long createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(Long updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setStudentId(Long studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(Long createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Long getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(Long updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
}
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgStudentInfoHistory;
|
||||
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 lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生信息历史视图对象 xg_student_info_history
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XgStudentInfoHistoryVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 历史记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "历史记录ID")
|
||||
private Long historyId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@ExcelProperty(value = "变更类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_change_type")
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变更字段
|
||||
*/
|
||||
@ExcelProperty(value = "变更字段")
|
||||
private String changeField;
|
||||
|
||||
/**
|
||||
* 变更前值
|
||||
*/
|
||||
@ExcelProperty(value = "变更前值")
|
||||
private String oldValue;
|
||||
|
||||
/**
|
||||
* 变更后值
|
||||
*/
|
||||
@ExcelProperty(value = "变更后值")
|
||||
private String newValue;
|
||||
|
||||
/**
|
||||
* 变更时间
|
||||
*/
|
||||
@ExcelProperty(value = "变更时间")
|
||||
private LocalDateTime changeTime;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@ExcelProperty(value = "变更原因")
|
||||
private String changeReason;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "操作人")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
@ExcelProperty(value = "批次编号")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_audit_status")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@ExcelProperty(value = "审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "审核人")
|
||||
private String auditorName;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@ExcelProperty(value = "审核意见")
|
||||
private String auditComment;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@ExcelProperty(value = "数据来源")
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 是否生效
|
||||
*/
|
||||
@ExcelProperty(value = "是否生效", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isEffective;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+84
@@ -408,4 +408,88 @@ public class XgStudentInfoVo implements Serializable {
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 获取主键ID
|
||||
*/
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生姓名
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学号
|
||||
*/
|
||||
public String getStudentNo() {
|
||||
return this.studentNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级名称
|
||||
*/
|
||||
public String getClassName() {
|
||||
return this.className;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取性别
|
||||
*/
|
||||
public String getGender() {
|
||||
return this.gender;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机号
|
||||
*/
|
||||
public String getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院代码
|
||||
*/
|
||||
public String getCollegeCode() {
|
||||
return this.collegeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学院名称
|
||||
*/
|
||||
public String getCollegeName() {
|
||||
return this.collegeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业代码
|
||||
*/
|
||||
public String getMajorCode() {
|
||||
return this.majorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专业名称
|
||||
*/
|
||||
public String getMajorName() {
|
||||
return this.majorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级代码
|
||||
*/
|
||||
public String getClassCode() {
|
||||
return this.classCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生状态
|
||||
*/
|
||||
public String getStudentStatus() {
|
||||
return this.studentStatus;
|
||||
}
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package org.dromara.xg.domain.vo;
|
||||
|
||||
import org.dromara.xg.domain.XgSystemConfig;
|
||||
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 lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 系统配置视图对象 xg_system_config
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class XgSystemConfigVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 配置ID
|
||||
*/
|
||||
@ExcelProperty(value = "配置ID")
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 配置键
|
||||
*/
|
||||
@ExcelProperty(value = "配置键")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ExcelProperty(value = "配置名称")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@ExcelProperty(value = "配置值")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 配置类型
|
||||
*/
|
||||
@ExcelProperty(value = "配置类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xg_config_type")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置分组
|
||||
*/
|
||||
@ExcelProperty(value = "配置分组")
|
||||
private String configGroup;
|
||||
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
@ExcelProperty(value = "配置描述")
|
||||
private String configDescription;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
@ExcelProperty(value = "默认值")
|
||||
private String defaultValue;
|
||||
|
||||
/**
|
||||
* 是否系统内置
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统内置", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isSystem;
|
||||
|
||||
/**
|
||||
* 是否可编辑
|
||||
*/
|
||||
@ExcelProperty(value = "是否可编辑", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isEditable;
|
||||
|
||||
/**
|
||||
* 是否可删除
|
||||
*/
|
||||
@ExcelProperty(value = "是否可删除", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Boolean isDeletable;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgAcademicYear;
|
||||
import org.dromara.xg.domain.vo.XgAcademicYearVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学年管理Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgAcademicYearMapper extends BaseMapperPlus<XgAcademicYear, XgAcademicYearVo> {
|
||||
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchOperationLog;
|
||||
import org.dromara.xg.domain.vo.XgBatchOperationLogVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批次操作日志Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface XgBatchOperationLogMapper extends BaseMapperPlus<XgBatchOperationLog, XgBatchOperationLogVo> {
|
||||
|
||||
/**
|
||||
* 根据批次ID查询操作日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgBatchOperationLogVo> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据操作类型查询日志
|
||||
*
|
||||
* @param operationType 操作类型
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgBatchOperationLogVo> selectByOperationType(String operationType);
|
||||
|
||||
/**
|
||||
* 根据操作人查询日志
|
||||
*
|
||||
* @param operatorId 操作人ID
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgBatchOperationLogVo> selectByOperatorId(Long operatorId);
|
||||
|
||||
/**
|
||||
* 查询最近的操作日志
|
||||
*
|
||||
* @param limit 限制数量
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgBatchOperationLogVo> selectRecentLogs(int limit);
|
||||
|
||||
/**
|
||||
* 根据批次ID和操作类型查询日志
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param operationType 操作类型
|
||||
* @return 操作日志列表
|
||||
*/
|
||||
List<XgBatchOperationLogVo> selectByBatchIdAndOperationType(Long batchId, String operationType);
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchPermission;
|
||||
import org.dromara.xg.domain.vo.XgBatchPermissionVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批次权限Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface XgBatchPermissionMapper extends BaseMapperPlus<XgBatchPermission, XgBatchPermissionVo> {
|
||||
|
||||
/**
|
||||
* 根据批次ID查询权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgBatchPermissionVo> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询权限配置
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgBatchPermissionVo> selectByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 根据批次ID和角色ID查询权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param roleId 角色ID
|
||||
* @return 权限配置
|
||||
*/
|
||||
XgBatchPermissionVo selectByBatchIdAndRoleId(Long batchId, Long roleId);
|
||||
|
||||
/**
|
||||
* 根据权限类型查询权限配置
|
||||
*
|
||||
* @param permissionType 权限类型
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgBatchPermissionVo> selectByPermissionType(String permissionType);
|
||||
|
||||
/**
|
||||
* 查询活跃的权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 活跃权限配置列表
|
||||
*/
|
||||
List<XgBatchPermissionVo> selectActivePermissions(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户在批次中的权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @return 用户权限配置
|
||||
*/
|
||||
XgBatchPermissionVo selectUserPermission(Long batchId, Long userId);
|
||||
|
||||
/**
|
||||
* 批量更新权限状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param roleIds 角色ID列表
|
||||
* @param isActive 是否活跃
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdatePermissionStatus(Long batchId, List<Long> roleIds, Integer isActive);
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgBatchStudentRelation;
|
||||
import org.dromara.xg.domain.vo.XgBatchStudentRelationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
/**
|
||||
* 批次学生关联Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface XgBatchStudentRelationMapper extends BaseMapperPlus<XgBatchStudentRelation, XgBatchStudentRelationVo> {
|
||||
|
||||
/**
|
||||
* 根据批次ID查询学生关联列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学生关联列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询批次关联列表
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 批次关联列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 根据批次ID和学生ID查询关联信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 关联信息
|
||||
*/
|
||||
XgBatchStudentRelationVo selectByBatchAndStudent(Long batchId, Long studentId);
|
||||
|
||||
/**
|
||||
* 根据学号查询批次关联列表
|
||||
*
|
||||
* @param studentNumber 学号
|
||||
* @return 批次关联列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectByStudentNumber(String studentNumber);
|
||||
|
||||
/**
|
||||
* 查询批次学生统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 统计信息
|
||||
*/
|
||||
Map<String, Object> selectBatchStudentStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询待审核的学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 待审核学生列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectPendingApprovalStudents(Long batchId);
|
||||
|
||||
/**
|
||||
* 批量更新学生提交状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentIds 学生ID列表
|
||||
* @param status 状态
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdateSubmissionStatus(Long batchId, List<Long> studentIds, String status);
|
||||
|
||||
/**
|
||||
* 批量更新学生审核状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentIds 学生ID列表
|
||||
* @param status 状态
|
||||
* @param approvalBy 审核人
|
||||
* @param approvalComments 审核意见
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdateApprovalStatus(Long batchId, List<Long> studentIds, String status,
|
||||
Long approvalBy, String approvalComments);
|
||||
|
||||
/**
|
||||
* 查询学生在批次中的进度信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 进度信息
|
||||
*/
|
||||
Map<String, Object> selectStudentProgress(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次完成情况统计
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 完成情况统计
|
||||
*/
|
||||
Map<String, Object> selectBatchCompletionStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询学生批次历史记录
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 历史记录
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectStudentBatchHistory(Long studentId);
|
||||
|
||||
/**
|
||||
* 根据提交状态查询学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param submissionStatus 提交状态
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectBySubmissionStatus(Long batchId, String submissionStatus);
|
||||
|
||||
/**
|
||||
* 根据审核状态查询学生列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param approvalStatus 审核状态
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgBatchStudentRelationVo> selectByApprovalStatus(Long batchId, String approvalStatus);
|
||||
|
||||
/**
|
||||
* 分页查询待审批的学生信息
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 待审批学生信息列表
|
||||
*/
|
||||
Page<XgBatchStudentRelationVo> selectPendingApprovalPage(Page<Object> page, LambdaQueryWrapper<XgBatchStudentRelation> queryWrapper);
|
||||
|
||||
/**
|
||||
* 分页查询已审批的学生信息
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 已审批学生信息列表
|
||||
*/
|
||||
Page<XgBatchStudentRelationVo> selectApprovedPage(Page<Object> page, LambdaQueryWrapper<XgBatchStudentRelation> queryWrapper);
|
||||
|
||||
/**
|
||||
* 根据批次ID和学生ID查询关系
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param studentId 学生ID
|
||||
* @return 批次学生关系
|
||||
*/
|
||||
XgBatchStudentRelation selectByBatchIdAndStudentId(Long batchId, Long studentId);
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgBusinessPeriod;
|
||||
import org.dromara.xg.domain.vo.XgBusinessPeriodVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务期间Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface XgBusinessPeriodMapper extends BaseMapperPlus<XgBusinessPeriod, XgBusinessPeriodVo> {
|
||||
|
||||
/**
|
||||
* 根据批次ID查询业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据期间类型查询业务期间
|
||||
*
|
||||
* @param periodType 期间类型
|
||||
* @return 业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectByPeriodType(String periodType);
|
||||
|
||||
/**
|
||||
* 查询当前活跃的业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 活跃业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectActivePeriods(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据目标角色查询业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param targetRole 目标角色
|
||||
* @return 业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectByTargetRole(Long batchId, String targetRole);
|
||||
|
||||
/**
|
||||
* 查询当前时间有效的业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 有效业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectCurrentValidPeriods(Long batchId);
|
||||
|
||||
/**
|
||||
* 根据批次ID和期间类型查询业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param periodType 期间类型
|
||||
* @return 业务期间
|
||||
*/
|
||||
XgBusinessPeriodVo selectByBatchIdAndPeriodType(Long batchId, String periodType);
|
||||
|
||||
/**
|
||||
* 批量更新业务期间状态
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param periodIds 期间ID列表
|
||||
* @param isActive 是否活跃
|
||||
* @return 更新数量
|
||||
*/
|
||||
int batchUpdatePeriodStatus(Long batchId, List<Long> periodIds, Integer isActive);
|
||||
|
||||
/**
|
||||
* 查询所有活跃的业务期间
|
||||
*
|
||||
* @return 活跃业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectActivePeriods();
|
||||
|
||||
/**
|
||||
* 根据批次ID查询活跃的业务期间
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 活跃业务期间列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> selectActivePeriodsByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 检查时间冲突
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 冲突数量
|
||||
*/
|
||||
int checkTimeConflict(@Param("batchId") Long batchId,
|
||||
@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
/**
|
||||
* 检查时间冲突(排除自己)
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param excludeId 排除的ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 冲突数量
|
||||
*/
|
||||
int checkTimeConflictExcludeSelf(@Param("batchId") Long batchId,
|
||||
@Param("excludeId") Long excludeId,
|
||||
@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgClassCadre;
|
||||
import org.dromara.xg.domain.vo.XgClassCadreVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 班级干部信息Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
public interface XgClassCadreMapper extends BaseMapperPlus<XgClassCadre, XgClassCadreVo> {
|
||||
|
||||
/**
|
||||
* 查询班级干部信息列表
|
||||
*
|
||||
* @param xgClassCadre 班级干部信息
|
||||
* @return 班级干部信息集合
|
||||
*/
|
||||
List<XgClassCadreVo> selectXgClassCadreList(XgClassCadre xgClassCadre);
|
||||
|
||||
/**
|
||||
* 根据班级ID查询班干部列表
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByClassId(@Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询班干部信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 班干部信息列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByStudentId(@Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 查询当前在任班干部列表
|
||||
*
|
||||
* @param classId 班级ID(可选)
|
||||
* @return 当前在任班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectCurrentCadres(@Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 根据职务编码查询班干部
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param positionCode 职务编码
|
||||
* @return 班干部信息
|
||||
*/
|
||||
XgClassCadreVo selectCadreByPosition(@Param("classId") Long classId, @Param("positionCode") String positionCode);
|
||||
|
||||
/**
|
||||
* 查询即将到期的班干部列表
|
||||
*
|
||||
* @param days 提前天数
|
||||
* @return 即将到期的班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectExpiringCadres(@Param("days") Integer days);
|
||||
|
||||
/**
|
||||
* 查询已到期的班干部列表
|
||||
*
|
||||
* @return 已到期的班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectExpiredCadres();
|
||||
|
||||
/**
|
||||
* 根据学院查询班干部统计
|
||||
*
|
||||
* @param collegeName 学院名称
|
||||
* @return 班干部统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByCollege(@Param("collegeName") String collegeName);
|
||||
|
||||
/**
|
||||
* 根据年级查询班干部统计
|
||||
*
|
||||
* @param grade 年级
|
||||
* @return 班干部统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByGrade(@Param("grade") String grade);
|
||||
|
||||
/**
|
||||
* 查询班干部任期统计
|
||||
*
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 任期统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadreTermStatistics(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
|
||||
|
||||
/**
|
||||
* 检查职务是否已被占用
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param positionCode 职务编码
|
||||
* @param excludeId 排除的记录ID
|
||||
* @return 是否已被占用
|
||||
*/
|
||||
boolean checkPositionOccupied(@Param("classId") Long classId, @Param("positionCode") String positionCode, @Param("excludeId") Long excludeId);
|
||||
|
||||
/**
|
||||
* 检查学生是否已有其他职务
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param excludeId 排除的记录ID
|
||||
* @return 是否已有其他职务
|
||||
*/
|
||||
boolean checkStudentHasOtherPosition(@Param("studentId") Long studentId, @Param("excludeId") Long excludeId);
|
||||
|
||||
/**
|
||||
* 更新班干部状态为历史记录
|
||||
*
|
||||
* @param cadreId 班干部ID
|
||||
* @return 更新结果
|
||||
*/
|
||||
int updateCadreToHistory(@Param("cadreId") Long cadreId);
|
||||
|
||||
/**
|
||||
* 批量更新班干部状态
|
||||
*
|
||||
* @param cadreIds 班干部ID列表
|
||||
* @param status 新状态
|
||||
* @return 更新结果
|
||||
*/
|
||||
int batchUpdateCadreStatus(@Param("cadreIds") List<Long> cadreIds, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* 根据职务级别查询班干部
|
||||
*
|
||||
* @param positionLevel 职务级别
|
||||
* @return 班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByPositionLevel(@Param("positionLevel") Integer positionLevel);
|
||||
|
||||
/**
|
||||
* 查询班干部工作表现统计
|
||||
*
|
||||
* @param performance 工作表现
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<XgClassCadreVo> selectCadresByPerformance(@Param("performance") String performance);
|
||||
|
||||
/**
|
||||
* 查询班级干部完整信息(包含关联数据)
|
||||
*
|
||||
* @param id 班干部ID
|
||||
* @return 班干部完整信息
|
||||
*/
|
||||
XgClassCadreVo selectCadreWithDetails(@Param("id") Long id);
|
||||
}
|
||||
+40
-16
@@ -11,46 +11,70 @@ import java.util.Map;
|
||||
* 信息采集批次Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-12
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface XgCollectionBatchMapper extends BaseMapperPlus<XgCollectionBatch, XgCollectionBatchVo> {
|
||||
|
||||
/**
|
||||
* 根据批次编号查询批次信息
|
||||
* 根据批次编码查询批次信息
|
||||
*
|
||||
* @param batchCode 批次编号
|
||||
* @param batchCode 批次编码
|
||||
* @return 批次信息
|
||||
*/
|
||||
XgCollectionBatchVo selectByBatchCode(String batchCode);
|
||||
|
||||
/**
|
||||
* 查询当前活跃的批次列表
|
||||
* 查询活跃批次列表
|
||||
*
|
||||
* @return 活跃批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectActiveBatches();
|
||||
|
||||
/**
|
||||
* 查询用户可操作的批次列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectUserAccessibleBatches(Long userId);
|
||||
|
||||
/**
|
||||
* 更新批次统计信息
|
||||
* 查询批次统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 更新数量
|
||||
* @return 统计信息
|
||||
*/
|
||||
int updateBatchStatistics(Long batchId);
|
||||
Map<String, Object> selectBatchStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次选项列表(用于下拉框)
|
||||
* 查询学年批次列表
|
||||
*
|
||||
* @param academicYear 学年
|
||||
* @return 批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectByAcademicYear(String academicYear);
|
||||
|
||||
/**
|
||||
* 查询批次选项列表
|
||||
*
|
||||
* @return 批次选项列表
|
||||
*/
|
||||
List<Map<String, Object>> selectBatchOptions();
|
||||
|
||||
/**
|
||||
* 更新批次统计信息
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param statistics 统计信息
|
||||
* @return 更新数量
|
||||
*/
|
||||
int updateBatchStatistics(Long batchId, Map<String, Object> statistics);
|
||||
|
||||
/**
|
||||
* 查询即将过期的批次
|
||||
*
|
||||
* @param days 提前天数
|
||||
* @return 即将过期的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> selectExpiringBatches(int days);
|
||||
|
||||
/**
|
||||
* 查询批次详细信息(包含统计数据)
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 批次详细信息
|
||||
*/
|
||||
XgCollectionBatchVo selectBatchWithStatistics(Long batchId);
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgDictData;
|
||||
import org.dromara.xg.domain.vo.XgDictDataVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 数据字典Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgDictDataMapper extends BaseMapperPlus<XgDictData, XgDictDataVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgNotice;
|
||||
import org.dromara.xg.domain.vo.XgNoticeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 通知公告Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgNoticeMapper extends BaseMapperPlus<XgNotice, XgNoticeVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgNoticeRead;
|
||||
import org.dromara.xg.domain.vo.XgNoticeReadVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 通知阅读记录Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgNoticeReadMapper extends BaseMapperPlus<XgNoticeRead, XgNoticeReadVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgSemester;
|
||||
import org.dromara.xg.domain.vo.XgSemesterVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学期管理Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgSemesterMapper extends BaseMapperPlus<XgSemester, XgSemesterVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgStudentInfoHistory;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoHistoryVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学生信息历史Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgStudentInfoHistoryMapper extends BaseMapperPlus<XgStudentInfoHistory, XgStudentInfoHistoryVo> {
|
||||
|
||||
}
|
||||
+8
@@ -39,6 +39,14 @@ public interface XgStudentInfoMapper extends BaseMapperPlus<XgStudentInfo, XgStu
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 根据班级ID查询学生列表
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> selectByClassId(Long classId);
|
||||
|
||||
/**
|
||||
* 查询学院学生列表
|
||||
*
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xg.mapper;
|
||||
|
||||
import org.dromara.xg.domain.XgSystemConfig;
|
||||
import org.dromara.xg.domain.vo.XgSystemConfigVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 系统配置Mapper接口
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface XgSystemConfigMapper extends BaseMapperPlus<XgSystemConfig, XgSystemConfigVo> {
|
||||
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
|
||||
/**
|
||||
* 学生信息权限控制服务接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IStudentInfoPermissionService {
|
||||
|
||||
/**
|
||||
* 检查学生是否可以修改信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 是否可以修改
|
||||
*/
|
||||
boolean canEditStudentInfo(Long studentId);
|
||||
|
||||
/**
|
||||
* 检查学生是否可以修改信息(详细信息)
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 权限检查结果
|
||||
*/
|
||||
StudentPermissionResult checkStudentPermission(Long studentId);
|
||||
|
||||
/**
|
||||
* 检查当前是否有活跃批次
|
||||
*
|
||||
* @return 当前活跃批次
|
||||
*/
|
||||
XgCollectionBatchVo getCurrentActiveBatch();
|
||||
|
||||
/**
|
||||
* 检查学生是否符合批次条件
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 是否符合条件
|
||||
*/
|
||||
boolean isStudentInBatch(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 记录学生信息修改日志
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @param operation 操作类型
|
||||
* @param description 操作描述
|
||||
*/
|
||||
void logStudentInfoChange(Long studentId, Long batchId, String operation, String description);
|
||||
|
||||
/**
|
||||
* 学生提交信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 提交结果
|
||||
*/
|
||||
boolean submitStudentInfo(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 获取学生在批次中的统计信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 统计信息
|
||||
*/
|
||||
StudentBatchStatistics getStudentBatchStatistics(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 学生权限检查结果
|
||||
*/
|
||||
class StudentPermissionResult {
|
||||
private boolean canEdit;
|
||||
private Long batchId;
|
||||
private String batchName;
|
||||
private String message;
|
||||
private String reason;
|
||||
|
||||
public StudentPermissionResult(boolean canEdit, Long batchId, String batchName, String message, String reason) {
|
||||
this.canEdit = canEdit;
|
||||
this.batchId = batchId;
|
||||
this.batchName = batchName;
|
||||
this.message = message;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
// Getters and setters
|
||||
public boolean isCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public Long getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getBatchName() {
|
||||
return batchName;
|
||||
}
|
||||
|
||||
public void setBatchName(String batchName) {
|
||||
this.batchName = batchName;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生批次统计信息
|
||||
*/
|
||||
class StudentBatchStatistics {
|
||||
private Long studentId;
|
||||
private Long batchId;
|
||||
private String batchName;
|
||||
private boolean hasSubmitted;
|
||||
private java.util.Date submitTime;
|
||||
private java.util.Date lastEditTime;
|
||||
private int editCount;
|
||||
|
||||
// Getters and setters
|
||||
public Long getStudentId() {
|
||||
return studentId;
|
||||
}
|
||||
|
||||
public void setStudentId(Long studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(Long batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getBatchName() {
|
||||
return batchName;
|
||||
}
|
||||
|
||||
public void setBatchName(String batchName) {
|
||||
this.batchName = batchName;
|
||||
}
|
||||
|
||||
public boolean isHasSubmitted() {
|
||||
return hasSubmitted;
|
||||
}
|
||||
|
||||
public void setHasSubmitted(boolean hasSubmitted) {
|
||||
this.hasSubmitted = hasSubmitted;
|
||||
}
|
||||
|
||||
public java.util.Date getSubmitTime() {
|
||||
return submitTime;
|
||||
}
|
||||
|
||||
public void setSubmitTime(java.util.Date submitTime) {
|
||||
this.submitTime = submitTime;
|
||||
}
|
||||
|
||||
public java.util.Date getLastEditTime() {
|
||||
return lastEditTime;
|
||||
}
|
||||
|
||||
public void setLastEditTime(java.util.Date lastEditTime) {
|
||||
this.lastEditTime = lastEditTime;
|
||||
}
|
||||
|
||||
public int getEditCount() {
|
||||
return editCount;
|
||||
}
|
||||
|
||||
public void setEditCount(int editCount) {
|
||||
this.editCount = editCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgAcademicYearVo;
|
||||
import org.dromara.xg.domain.bo.XgAcademicYearBo;
|
||||
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 wuzilong
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface IXgAcademicYearService {
|
||||
|
||||
/**
|
||||
* 查询学年管理
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学年管理
|
||||
*/
|
||||
XgAcademicYearVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询学年管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学年管理分页列表
|
||||
*/
|
||||
TableDataInfo<XgAcademicYearVo> queryPageList(XgAcademicYearBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的学年管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学年管理列表
|
||||
*/
|
||||
List<XgAcademicYearVo> queryList(XgAcademicYearBo bo);
|
||||
|
||||
/**
|
||||
* 新增学年管理
|
||||
*
|
||||
* @param bo 学年管理
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XgAcademicYearBo bo);
|
||||
|
||||
/**
|
||||
* 修改学年管理
|
||||
*
|
||||
* @param bo 学年管理
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XgAcademicYearBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学年管理
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据学年编码查询学年信息
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
* @return 学年信息
|
||||
*/
|
||||
XgAcademicYearVo queryByYearCode(String yearCode);
|
||||
|
||||
/**
|
||||
* 查询当前学年
|
||||
*
|
||||
* @return 当前学年
|
||||
*/
|
||||
XgAcademicYearVo queryCurrentYear();
|
||||
|
||||
/**
|
||||
* 设置当前学年
|
||||
*
|
||||
* @param yearId 学年ID
|
||||
* @return 是否设置成功
|
||||
*/
|
||||
Boolean setCurrentYear(Long yearId);
|
||||
|
||||
/**
|
||||
* 检查学年编码是否存在
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
* @param yearId 学年ID(修改时使用)
|
||||
* @return 是否存在
|
||||
*/
|
||||
Boolean checkYearCodeExists(String yearCode, Long yearId);
|
||||
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.vo.XgBatchPermissionVo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批次权限控制服务接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgBatchPermissionService {
|
||||
|
||||
/**
|
||||
* 检查用户在批次中的权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @return 权限检查结果
|
||||
*/
|
||||
BatchPermissionResult checkUserBatchPermission(Long batchId, Long userId);
|
||||
|
||||
/**
|
||||
* 检查用户是否有特定操作权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @param operation 操作类型(VIEW, EDIT, SUBMIT, APPROVE, REJECT, WITHDRAW)
|
||||
* @return 是否有权限
|
||||
*/
|
||||
boolean hasOperationPermission(Long batchId, Long userId, String operation);
|
||||
|
||||
/**
|
||||
* 获取用户在批次中的权限配置
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param userId 用户ID
|
||||
* @return 权限配置
|
||||
*/
|
||||
XgBatchPermissionVo getUserBatchPermissionConfig(Long batchId, Long userId);
|
||||
|
||||
/**
|
||||
* 批量配置批次权限
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param configs 权限配置列表
|
||||
* @return 是否配置成功
|
||||
*/
|
||||
Boolean batchConfigurePermissions(Long batchId, List<BatchPermissionConfig> configs);
|
||||
|
||||
/**
|
||||
* 获取批次权限配置列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 权限配置列表
|
||||
*/
|
||||
List<XgBatchPermissionVo> getBatchPermissionConfigs(Long batchId);
|
||||
|
||||
/**
|
||||
* 更新权限配置状态
|
||||
*
|
||||
* @param permissionId 权限ID
|
||||
* @param isActive 是否激活
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
Boolean updatePermissionStatus(Long permissionId, Boolean isActive);
|
||||
|
||||
/**
|
||||
* 复制权限配置到其他批次
|
||||
*
|
||||
* @param sourceBatchId 源批次ID
|
||||
* @param targetBatchId 目标批次ID
|
||||
* @return 是否复制成功
|
||||
*/
|
||||
Boolean copyPermissionsToOtherBatch(Long sourceBatchId, Long targetBatchId);
|
||||
|
||||
/**
|
||||
* 批次权限检查结果接口
|
||||
*/
|
||||
interface BatchPermissionResult {
|
||||
Long getBatchId();
|
||||
Long getUserId();
|
||||
boolean isHasPermission();
|
||||
String getPermissionType();
|
||||
boolean isCanView();
|
||||
boolean isCanEdit();
|
||||
boolean isCanSubmit();
|
||||
boolean isCanApprove();
|
||||
boolean isCanReject();
|
||||
boolean isCanWithdraw();
|
||||
String getMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次权限配置接口
|
||||
*/
|
||||
class BatchPermissionConfig {
|
||||
Long roleId;
|
||||
String roleName;
|
||||
String permissionType;
|
||||
boolean canView;
|
||||
boolean canEdit;
|
||||
boolean canSubmit;
|
||||
boolean canApprove;
|
||||
boolean canReject;
|
||||
boolean canWithdraw;
|
||||
LocalDateTime startTime;
|
||||
LocalDateTime endTime;
|
||||
boolean isActive;
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public String getPermissionType() {
|
||||
return permissionType;
|
||||
}
|
||||
|
||||
public boolean isCanView() {
|
||||
return canView;
|
||||
}
|
||||
|
||||
public boolean isCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public boolean isCanSubmit() {
|
||||
return canSubmit;
|
||||
}
|
||||
|
||||
public boolean isCanApprove() {
|
||||
return canApprove;
|
||||
}
|
||||
|
||||
public boolean isCanReject() {
|
||||
return canReject;
|
||||
}
|
||||
|
||||
public boolean isCanWithdraw() {
|
||||
return canWithdraw;
|
||||
}
|
||||
|
||||
public LocalDateTime getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public Boolean getCanView() {
|
||||
return canView;
|
||||
}
|
||||
|
||||
public Boolean getCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public Boolean getCanDelete() {
|
||||
return canDelete;
|
||||
}
|
||||
|
||||
public Boolean getCanApprove() {
|
||||
return canApprove;
|
||||
}
|
||||
|
||||
public Boolean getCanExport() {
|
||||
return canExport;
|
||||
}
|
||||
|
||||
public Boolean getCanImport() {
|
||||
return canImport;
|
||||
}
|
||||
|
||||
public Boolean getIsActive() {
|
||||
return isActive;
|
||||
}
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
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.XgBusinessPeriodBo;
|
||||
import org.dromara.xg.domain.vo.XgBusinessPeriodVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务期管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgBusinessPeriodService {
|
||||
|
||||
/**
|
||||
* 查询业务期管理
|
||||
*
|
||||
* @param id 业务期管理主键
|
||||
* @return 业务期管理
|
||||
*/
|
||||
XgBusinessPeriodVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务期管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 业务期管理集合
|
||||
*/
|
||||
TableDataInfo<XgBusinessPeriodVo> queryPageList(XgBusinessPeriodBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询业务期管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 业务期管理集合
|
||||
*/
|
||||
List<XgBusinessPeriodVo> queryList(XgBusinessPeriodBo bo);
|
||||
|
||||
/**
|
||||
* 新增业务期管理
|
||||
*
|
||||
* @param bo 业务期管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgBusinessPeriodBo bo);
|
||||
|
||||
/**
|
||||
* 修改业务期管理
|
||||
*
|
||||
* @param bo 业务期管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgBusinessPeriodBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除业务期管理信息
|
||||
*
|
||||
* @param ids 需要删除的业务期管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询业务期列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 业务期列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> queryByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询当前活跃的业务期
|
||||
*
|
||||
* @return 活跃的业务期列表
|
||||
*/
|
||||
List<XgBusinessPeriodVo> queryActivePeriods();
|
||||
|
||||
/**
|
||||
* 检查业务期是否开放
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 是否开放
|
||||
*/
|
||||
Boolean checkPeriodOpen(Long batchId);
|
||||
|
||||
/**
|
||||
* 开启业务期
|
||||
*
|
||||
* @param id 业务期ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean openPeriod(Long id);
|
||||
|
||||
/**
|
||||
* 关闭业务期
|
||||
*
|
||||
* @param id 业务期ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean closePeriod(Long id);
|
||||
|
||||
/**
|
||||
* 校验业务期时间是否冲突
|
||||
*
|
||||
* @param bo 业务期信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkPeriodTimeConflict(XgBusinessPeriodBo bo);
|
||||
}
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
package org.dromara.xg.service;
|
||||
|
||||
import org.dromara.xg.domain.XgClassCadre;
|
||||
import org.dromara.xg.domain.vo.XgClassCadreVo;
|
||||
import org.dromara.xg.domain.bo.XgClassCadreBo;
|
||||
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.Date;
|
||||
|
||||
/**
|
||||
* 班级干部信息Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
public interface IXgClassCadreService {
|
||||
|
||||
/**
|
||||
* 查询班级干部信息
|
||||
*
|
||||
* @param id 班级干部信息主键
|
||||
* @return 班级干部信息
|
||||
*/
|
||||
XgClassCadreVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班级干部信息列表
|
||||
*
|
||||
* @param bo 班级干部信息
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 班级干部信息集合
|
||||
*/
|
||||
TableDataInfo<XgClassCadreVo> queryPageList(XgClassCadreBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询班级干部信息列表
|
||||
*
|
||||
* @param bo 班级干部信息
|
||||
* @return 班级干部信息集合
|
||||
*/
|
||||
List<XgClassCadreVo> queryList(XgClassCadreBo bo);
|
||||
|
||||
/**
|
||||
* 新增班级干部信息
|
||||
*
|
||||
* @param bo 班级干部信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgClassCadreBo bo);
|
||||
|
||||
/**
|
||||
* 修改班级干部信息
|
||||
*
|
||||
* @param bo 班级干部信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgClassCadreBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除班级干部信息
|
||||
*
|
||||
* @param ids 需要删除的班级干部信息主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
// ==================== 业务方法 ====================
|
||||
|
||||
/**
|
||||
* 根据班级ID查询班干部列表
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByClassId(Long classId);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询班干部信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 班干部信息列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByStudentId(Long studentId);
|
||||
|
||||
/**
|
||||
* 查询当前在任班干部列表
|
||||
*
|
||||
* @param classId 班级ID(可选)
|
||||
* @return 当前在任班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryCurrentCadres(Long classId);
|
||||
|
||||
/**
|
||||
* 根据职务编码查询班干部
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param positionCode 职务编码
|
||||
* @return 班干部信息
|
||||
*/
|
||||
XgClassCadreVo queryCadreByPosition(Long classId, String positionCode);
|
||||
|
||||
/**
|
||||
* 任命班干部
|
||||
*
|
||||
* @param bo 班干部信息
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean appointCadre(XgClassCadreBo bo);
|
||||
|
||||
/**
|
||||
* 免职班干部
|
||||
*
|
||||
* @param cadreId 班干部ID
|
||||
* @param dismissalReason 免职原因
|
||||
* @param dismissalDate 免职日期
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean dismissCadre(Long cadreId, String dismissalReason, Date dismissalDate);
|
||||
|
||||
/**
|
||||
* 调任班干部
|
||||
*
|
||||
* @param cadreId 班干部ID
|
||||
* @param newPositionCode 新职务编码
|
||||
* @param newPositionName 新职务名称
|
||||
* @param transferReason 调任原因
|
||||
* @param effectiveDate 生效日期
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean transferCadre(Long cadreId, String newPositionCode, String newPositionName, String transferReason, Date effectiveDate);
|
||||
|
||||
/**
|
||||
* 续任班干部
|
||||
*
|
||||
* @param cadreId 班干部ID
|
||||
* @param newTermDuration 新任期时长(月)
|
||||
* @param renewalReason 续任原因
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean renewCadre(Long cadreId, Integer newTermDuration, String renewalReason);
|
||||
|
||||
/**
|
||||
* 班干部辞职
|
||||
*
|
||||
* @param cadreId 班干部ID
|
||||
* @param resignationReason 辞职原因
|
||||
* @param resignationDate 辞职日期
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean resignCadre(Long cadreId, String resignationReason, Date resignationDate);
|
||||
|
||||
/**
|
||||
* 查询即将到期的班干部列表
|
||||
*
|
||||
* @param days 提前天数
|
||||
* @return 即将到期的班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryExpiringCadres(Integer days);
|
||||
|
||||
/**
|
||||
* 查询已到期的班干部列表
|
||||
*
|
||||
* @return 已到期的班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryExpiredCadres();
|
||||
|
||||
/**
|
||||
* 根据学院查询班干部统计
|
||||
*
|
||||
* @param collegeName 学院名称
|
||||
* @return 班干部统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByCollege(String collegeName);
|
||||
|
||||
/**
|
||||
* 根据年级查询班干部统计
|
||||
*
|
||||
* @param grade 年级
|
||||
* @return 班干部统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByGrade(String grade);
|
||||
|
||||
/**
|
||||
* 查询班干部任期统计
|
||||
*
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 任期统计信息
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadreTermStatistics(Date startDate, Date endDate);
|
||||
|
||||
/**
|
||||
* 检查职务是否已被占用
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @param positionCode 职务编码
|
||||
* @param excludeId 排除的记录ID
|
||||
* @return 是否已被占用
|
||||
*/
|
||||
boolean checkPositionOccupied(Long classId, String positionCode, Long excludeId);
|
||||
|
||||
/**
|
||||
* 检查学生是否已有其他职务
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param excludeId 排除的记录ID
|
||||
* @return 是否已有其他职务
|
||||
*/
|
||||
boolean checkStudentHasOtherPosition(Long studentId, Long excludeId);
|
||||
|
||||
/**
|
||||
* 批量更新班干部状态
|
||||
*
|
||||
* @param cadreIds 班干部ID列表
|
||||
* @param status 新状态
|
||||
* @return 更新结果
|
||||
*/
|
||||
Boolean batchUpdateCadreStatus(List<Long> cadreIds, String status);
|
||||
|
||||
/**
|
||||
* 根据职务级别查询班干部
|
||||
*
|
||||
* @param positionLevel 职务级别
|
||||
* @return 班干部列表
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByPositionLevel(Integer positionLevel);
|
||||
|
||||
/**
|
||||
* 查询班干部工作表现统计
|
||||
*
|
||||
* @param performance 工作表现
|
||||
* @return 统计结果
|
||||
*/
|
||||
List<XgClassCadreVo> queryCadresByPerformance(String performance);
|
||||
|
||||
/**
|
||||
* 查询班级干部完整信息(包含关联数据)
|
||||
*
|
||||
* @param id 班干部ID
|
||||
* @return 班干部完整信息
|
||||
*/
|
||||
XgClassCadreVo queryCadreWithDetails(Long id);
|
||||
|
||||
/**
|
||||
* 自动处理到期班干部
|
||||
*
|
||||
* @return 处理结果
|
||||
*/
|
||||
Boolean autoProcessExpiredCadres();
|
||||
|
||||
/**
|
||||
* 发送到期提醒通知
|
||||
*
|
||||
* @param days 提前天数
|
||||
* @return 发送结果
|
||||
*/
|
||||
Boolean sendExpirationReminder(Integer days);
|
||||
|
||||
/**
|
||||
* 导出班干部信息
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 导出数据
|
||||
*/
|
||||
List<XgClassCadreVo> exportCadreList(XgClassCadreBo bo);
|
||||
|
||||
/**
|
||||
* 导入班干部信息
|
||||
*
|
||||
* @param cadreList 班干部信息列表
|
||||
* @param isUpdateSupport 是否支持更新
|
||||
* @param operName 操作人
|
||||
* @return 导入结果
|
||||
*/
|
||||
String importCadreList(List<XgClassCadreVo> cadreList, Boolean isUpdateSupport, String operName);
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
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 Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgCollectionBatchService {
|
||||
|
||||
/**
|
||||
* 查询信息采集批次
|
||||
*/
|
||||
XgCollectionBatchVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* 获取当前活跃的批次列表
|
||||
*/
|
||||
List<XgCollectionBatchVo> getActiveBatches();
|
||||
|
||||
/**
|
||||
* 发布批次
|
||||
*/
|
||||
Boolean publishBatch(Long id);
|
||||
|
||||
/**
|
||||
* 取消发布批次
|
||||
*/
|
||||
Boolean unpublishBatch(Long id);
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
Boolean completeBatch(Long id);
|
||||
|
||||
/**
|
||||
* 获取批次统计信息
|
||||
*/
|
||||
Map<String, Object> getBatchStatistics(Long id);
|
||||
|
||||
/**
|
||||
* 获取批次选项列表
|
||||
*/
|
||||
List<Map<String, Object>> getBatchOptions();
|
||||
|
||||
/**
|
||||
* 更新批次统计信息
|
||||
*/
|
||||
Boolean updateBatchStatistics(Long id);
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
Boolean copyBatch(Long sourceBatchId, XgCollectionBatchBo targetBatchBo);
|
||||
}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
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.XgDictDataBo;
|
||||
import org.dromara.xg.domain.vo.XgDictDataVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据字典Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgDictDataService {
|
||||
|
||||
/**
|
||||
* 查询数据字典
|
||||
*
|
||||
* @param id 数据字典主键
|
||||
* @return 数据字典
|
||||
*/
|
||||
XgDictDataVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询数据字典列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 数据字典集合
|
||||
*/
|
||||
TableDataInfo<XgDictDataVo> queryPageList(XgDictDataBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询数据字典列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 数据字典集合
|
||||
*/
|
||||
List<XgDictDataVo> queryList(XgDictDataBo bo);
|
||||
|
||||
/**
|
||||
* 新增数据字典
|
||||
*
|
||||
* @param bo 数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgDictDataBo bo);
|
||||
|
||||
/**
|
||||
* 修改数据字典
|
||||
*
|
||||
* @param bo 数据字典
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgDictDataBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除数据字典信息
|
||||
*
|
||||
* @param ids 需要删除的数据字典主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据列表
|
||||
*/
|
||||
List<XgDictDataVo> queryByDictType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典值查询字典标签
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
* @return 字典标签
|
||||
*/
|
||||
String getDictLabel(String dictType, String dictValue);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典标签查询字典值
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
* @return 字典值
|
||||
*/
|
||||
String getDictValue(String dictType, String dictLabel);
|
||||
|
||||
/**
|
||||
* 校验字典键值是否唯一
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
* @param id 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkDictValueUnique(String dictType, String dictValue, Long id);
|
||||
|
||||
/**
|
||||
* 校验字典标签是否唯一
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
* @param id 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkDictLabelUnique(String dictType, String dictLabel, Long id);
|
||||
|
||||
/**
|
||||
* 启用字典数据
|
||||
*
|
||||
* @param id 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean enableDictData(Long id);
|
||||
|
||||
/**
|
||||
* 禁用字典数据
|
||||
*
|
||||
* @param id 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean disableDictData(Long id);
|
||||
|
||||
/**
|
||||
* 批量更新字典数据状态
|
||||
*
|
||||
* @param ids 字典数据ID集合
|
||||
* @param status 状态
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean batchUpdateStatus(Collection<Long> ids, String status);
|
||||
|
||||
/**
|
||||
* 根据字典类型获取默认字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 默认字典数据
|
||||
*/
|
||||
XgDictDataVo getDefaultDictData(String dictType);
|
||||
|
||||
/**
|
||||
* 设置默认字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param id 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean setDefaultDictData(String dictType, Long id);
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean refreshDictCache();
|
||||
|
||||
/**
|
||||
* 获取字典数据统计
|
||||
*
|
||||
* @return 字典数据统计信息
|
||||
*/
|
||||
XgDictDataVo getDictStatistics();
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
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.XgNoticeReadBo;
|
||||
import org.dromara.xg.domain.vo.XgNoticeReadVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知阅读记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgNoticeReadService {
|
||||
|
||||
/**
|
||||
* 查询通知阅读记录
|
||||
*
|
||||
* @param id 通知阅读记录主键
|
||||
* @return 通知阅读记录
|
||||
*/
|
||||
XgNoticeReadVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询通知阅读记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 通知阅读记录集合
|
||||
*/
|
||||
TableDataInfo<XgNoticeReadVo> queryPageList(XgNoticeReadBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询通知阅读记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 通知阅读记录集合
|
||||
*/
|
||||
List<XgNoticeReadVo> queryList(XgNoticeReadBo bo);
|
||||
|
||||
/**
|
||||
* 新增通知阅读记录
|
||||
*
|
||||
* @param bo 通知阅读记录
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgNoticeReadBo bo);
|
||||
|
||||
/**
|
||||
* 修改通知阅读记录
|
||||
*
|
||||
* @param bo 通知阅读记录
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgNoticeReadBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除通知阅读记录信息
|
||||
*
|
||||
* @param ids 需要删除的通知阅读记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 记录用户阅读通知
|
||||
*
|
||||
* @param noticeId 通知ID
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean recordRead(Long noticeId, Long userId);
|
||||
|
||||
/**
|
||||
* 检查用户是否已阅读通知
|
||||
*
|
||||
* @param noticeId 通知ID
|
||||
* @param userId 用户ID
|
||||
* @return 是否已阅读
|
||||
*/
|
||||
Boolean checkUserRead(Long noticeId, Long userId);
|
||||
|
||||
/**
|
||||
* 根据通知ID查询阅读记录
|
||||
*
|
||||
* @param noticeId 通知ID
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 阅读记录集合
|
||||
*/
|
||||
TableDataInfo<XgNoticeReadVo> queryByNoticeId(Long noticeId, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询阅读记录
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 阅读记录集合
|
||||
*/
|
||||
TableDataInfo<XgNoticeReadVo> queryByUserId(Long userId, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 统计通知阅读数量
|
||||
*
|
||||
* @param noticeId 通知ID
|
||||
* @return 阅读数量
|
||||
*/
|
||||
Long countReadByNoticeId(Long noticeId);
|
||||
|
||||
/**
|
||||
* 统计用户阅读数量
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 阅读数量
|
||||
*/
|
||||
Long countReadByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 批量标记已读
|
||||
*
|
||||
* @param noticeIds 通知ID集合
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean batchMarkRead(Collection<Long> noticeIds, Long userId);
|
||||
|
||||
/**
|
||||
* 获取用户未读通知数量
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 未读数量
|
||||
*/
|
||||
Long countUnreadByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 获取通知阅读统计
|
||||
*
|
||||
* @param noticeId 通知ID
|
||||
* @return 阅读统计信息
|
||||
*/
|
||||
XgNoticeReadVo getReadStatistics(Long noticeId);
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
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.XgNoticeBo;
|
||||
import org.dromara.xg.domain.vo.XgNoticeVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知公告Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgNoticeService {
|
||||
|
||||
/**
|
||||
* 查询通知公告
|
||||
*
|
||||
* @param id 通知公告主键
|
||||
* @return 通知公告
|
||||
*/
|
||||
XgNoticeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询通知公告列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 通知公告集合
|
||||
*/
|
||||
TableDataInfo<XgNoticeVo> queryPageList(XgNoticeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询通知公告列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 通知公告集合
|
||||
*/
|
||||
List<XgNoticeVo> queryList(XgNoticeBo bo);
|
||||
|
||||
/**
|
||||
* 新增通知公告
|
||||
*
|
||||
* @param bo 通知公告
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgNoticeBo bo);
|
||||
|
||||
/**
|
||||
* 修改通知公告
|
||||
*
|
||||
* @param bo 通知公告
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgNoticeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除通知公告信息
|
||||
*
|
||||
* @param ids 需要删除的通知公告主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 发布通知公告
|
||||
*
|
||||
* @param id 通知公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean publishNotice(Long id);
|
||||
|
||||
/**
|
||||
* 撤回通知公告
|
||||
*
|
||||
* @param id 通知公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean withdrawNotice(Long id);
|
||||
|
||||
/**
|
||||
* 查询已发布的通知公告
|
||||
*
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 通知公告集合
|
||||
*/
|
||||
TableDataInfo<XgNoticeVo> queryPublishedNotices(PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询置顶通知公告
|
||||
*
|
||||
* @return 置顶通知公告列表
|
||||
*/
|
||||
List<XgNoticeVo> queryTopNotices();
|
||||
|
||||
/**
|
||||
* 设置置顶
|
||||
*
|
||||
* @param id 通知公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean setTop(Long id);
|
||||
|
||||
/**
|
||||
* 取消置顶
|
||||
*
|
||||
* @param id 通知公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean cancelTop(Long id);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询通知公告
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 通知公告列表
|
||||
*/
|
||||
List<XgNoticeVo> queryByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 增加阅读量
|
||||
*
|
||||
* @param id 通知公告ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean increaseReadCount(Long id);
|
||||
|
||||
/**
|
||||
* 校验通知标题是否唯一
|
||||
*
|
||||
* @param title 通知标题
|
||||
* @param id 通知ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkNoticeTitleUnique(String title, Long id);
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
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.XgSemesterBo;
|
||||
import org.dromara.xg.domain.vo.XgSemesterVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学期管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgSemesterService {
|
||||
|
||||
/**
|
||||
* 查询学期管理
|
||||
*
|
||||
* @param id 学期管理主键
|
||||
* @return 学期管理
|
||||
*/
|
||||
XgSemesterVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学期管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 学期管理集合
|
||||
*/
|
||||
TableDataInfo<XgSemesterVo> queryPageList(XgSemesterBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询学期管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学期管理集合
|
||||
*/
|
||||
List<XgSemesterVo> queryList(XgSemesterBo bo);
|
||||
|
||||
/**
|
||||
* 新增学期管理
|
||||
*
|
||||
* @param bo 学期管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgSemesterBo bo);
|
||||
|
||||
/**
|
||||
* 修改学期管理
|
||||
*
|
||||
* @param bo 学期管理
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgSemesterBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学期管理信息
|
||||
*
|
||||
* @param ids 需要删除的学期管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据学年ID查询学期列表
|
||||
*
|
||||
* @param academicYearId 学年ID
|
||||
* @return 学期列表
|
||||
*/
|
||||
List<XgSemesterVo> queryByAcademicYearId(Long academicYearId);
|
||||
|
||||
/**
|
||||
* 查询当前学期
|
||||
*
|
||||
* @return 当前学期
|
||||
*/
|
||||
XgSemesterVo queryCurrentSemester();
|
||||
|
||||
/**
|
||||
* 设置当前学期
|
||||
*
|
||||
* @param id 学期ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean setCurrentSemester(Long id);
|
||||
|
||||
/**
|
||||
* 查询可用的学期选项
|
||||
*
|
||||
* @return 学期选项列表
|
||||
*/
|
||||
List<XgSemesterVo> queryAvailableOptions();
|
||||
|
||||
/**
|
||||
* 校验学期名称是否唯一
|
||||
*
|
||||
* @param semesterName 学期名称
|
||||
* @param id 学期ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkSemesterNameUnique(String semesterName, Long id);
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
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.XgStudentInfoApprovalBo;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoApprovalVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生信息审核Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgStudentInfoApprovalService {
|
||||
|
||||
/**
|
||||
* 查询待审核学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 待审核学生信息列表
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoApprovalVo> queryPendingApprovalList(XgStudentInfoApprovalBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询已审核学生信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 已审核学生信息列表
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoApprovalVo> queryApprovedList(XgStudentInfoApprovalBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询学生信息审核详情
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 学生信息审核详情
|
||||
*/
|
||||
XgStudentInfoApprovalVo queryApprovalDetail(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 审批学生信息
|
||||
*/
|
||||
Boolean approveStudentInfo(Long studentId, Long batchId, String approved, String comments);
|
||||
|
||||
/**
|
||||
* 批量审批学生信息
|
||||
*/
|
||||
Boolean batchApproveStudentInfo(List<Long> studentIds, Long batchId, String approved, String comments);
|
||||
|
||||
/**
|
||||
* 撤销审批
|
||||
*/
|
||||
Boolean revokeApproval(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 获取审批历史
|
||||
*/
|
||||
List<Map<String, Object>> getApprovalHistory(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 获取审批统计
|
||||
*/
|
||||
Map<String, Object> getApprovalStatistics(Long batchId);
|
||||
|
||||
/**
|
||||
* 检查审批权限
|
||||
*/
|
||||
Boolean checkApprovalPermission(Long batchId);
|
||||
|
||||
/**
|
||||
* 导出审批结果
|
||||
*/
|
||||
List<XgStudentInfoApprovalVo> exportApprovalResult(XgStudentInfoApprovalBo bo);
|
||||
}
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
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.XgStudentInfoHistoryBo;
|
||||
import org.dromara.xg.domain.vo.XgStudentInfoHistoryVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生信息历史Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgStudentInfoHistoryService {
|
||||
|
||||
/**
|
||||
* 查询学生信息历史
|
||||
*
|
||||
* @param id 学生信息历史主键
|
||||
* @return 学生信息历史
|
||||
*/
|
||||
XgStudentInfoHistoryVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生信息历史列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 学生信息历史集合
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoHistoryVo> queryPageList(XgStudentInfoHistoryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询学生信息历史列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生信息历史集合
|
||||
*/
|
||||
List<XgStudentInfoHistoryVo> queryList(XgStudentInfoHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 新增学生信息历史
|
||||
*
|
||||
* @param bo 学生信息历史
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgStudentInfoHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 修改学生信息历史
|
||||
*
|
||||
* @param bo 学生信息历史
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgStudentInfoHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生信息历史信息
|
||||
*
|
||||
* @param ids 需要删除的学生信息历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据学生ID查询历史记录
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 历史记录集合
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoHistoryVo> queryByStudentId(Long studentId, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询历史记录
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 历史记录集合
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoHistoryVo> queryByBatchId(Long batchId, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 创建学生信息历史记录
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @param changeType 变更类型
|
||||
* @param oldData 旧数据
|
||||
* @param newData 新数据
|
||||
* @param changeReason 变更原因
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean createHistory(Long studentId, Long batchId, String changeType,
|
||||
String oldData, String newData, String changeReason);
|
||||
|
||||
/**
|
||||
* 比较学生信息变更
|
||||
*
|
||||
* @param oldData 旧数据
|
||||
* @param newData 新数据
|
||||
* @return 变更详情
|
||||
*/
|
||||
String compareStudentInfo(String oldData, String newData);
|
||||
|
||||
/**
|
||||
* 恢复学生信息到历史版本
|
||||
*
|
||||
* @param historyId 历史记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean restoreToHistory(Long historyId);
|
||||
|
||||
/**
|
||||
* 查询学生信息变更统计
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @return 变更统计
|
||||
*/
|
||||
XgStudentInfoHistoryVo getChangeStatistics(Long studentId);
|
||||
|
||||
/**
|
||||
* 批量创建历史记录
|
||||
*
|
||||
* @param historyList 历史记录列表
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean batchCreateHistory(List<XgStudentInfoHistoryBo> historyList);
|
||||
|
||||
/**
|
||||
* 根据变更类型查询历史记录
|
||||
*
|
||||
* @param changeType 变更类型
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 历史记录集合
|
||||
*/
|
||||
TableDataInfo<XgStudentInfoHistoryVo> queryByChangeType(String changeType, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 清理过期历史记录
|
||||
*
|
||||
* @param days 保留天数
|
||||
* @return 清理数量
|
||||
*/
|
||||
Long cleanExpiredHistory(Integer days);
|
||||
}
|
||||
+63
@@ -91,6 +91,14 @@ public interface IXgStudentInfoService {
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByClassCode(String classCode);
|
||||
|
||||
/**
|
||||
* 根据班级ID查询学生列表
|
||||
*
|
||||
* @param classId 班级ID
|
||||
* @return 学生列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByClassId(Long classId);
|
||||
|
||||
/**
|
||||
* 查询学院学生列表
|
||||
*
|
||||
@@ -163,4 +171,59 @@ public interface IXgStudentInfoService {
|
||||
*/
|
||||
Boolean checkIdCardExists(String idCard, Long studentId);
|
||||
|
||||
/**
|
||||
* 根据批次ID查询学生信息列表
|
||||
*
|
||||
* @param batchId 批次ID
|
||||
* @return 学生信息列表
|
||||
*/
|
||||
List<XgStudentInfoVo> queryByBatchId(Long batchId);
|
||||
|
||||
/**
|
||||
* 将学生信息关联到批次
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 是否关联成功
|
||||
*/
|
||||
Boolean associateStudentToBatch(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 批量将学生信息关联到批次
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param batchId 批次ID
|
||||
* @return 是否关联成功
|
||||
*/
|
||||
Boolean batchAssociateStudentsToBatch(List<Long> studentIds, Long batchId);
|
||||
|
||||
/**
|
||||
* 学生撤回提交
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 是否撤回成功
|
||||
*/
|
||||
Boolean withdrawSubmission(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 获取学生在批次中的进度信息
|
||||
*
|
||||
* @param studentId 学生ID
|
||||
* @param batchId 批次ID
|
||||
* @return 进度信息
|
||||
*/
|
||||
Map<String, Object> getStudentBatchProgress(Long studentId, Long batchId);
|
||||
|
||||
/**
|
||||
* 批量审核学生信息
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param batchId 批次ID
|
||||
* @param auditResult 审核结果
|
||||
* @param auditComment 审核意见
|
||||
* @return 是否审核成功
|
||||
*/
|
||||
Boolean batchAuditStudentInfo(List<Long> studentIds, Long batchId, String auditResult, String auditComment);
|
||||
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
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.XgSystemConfigBo;
|
||||
import org.dromara.xg.domain.vo.XgSystemConfigVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统配置Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
public interface IXgSystemConfigService {
|
||||
|
||||
/**
|
||||
* 查询系统配置
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 系统配置
|
||||
*/
|
||||
XgSystemConfigVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 系统配置集合
|
||||
*/
|
||||
TableDataInfo<XgSystemConfigVo> queryPageList(XgSystemConfigBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 系统配置集合
|
||||
*/
|
||||
List<XgSystemConfigVo> queryList(XgSystemConfigBo bo);
|
||||
|
||||
/**
|
||||
* 新增系统配置
|
||||
*
|
||||
* @param bo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean insertByBo(XgSystemConfigBo bo);
|
||||
|
||||
/**
|
||||
* 修改系统配置
|
||||
*
|
||||
* @param bo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean updateByBo(XgSystemConfigBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除系统配置信息
|
||||
*
|
||||
* @param ids 需要删除的系统配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据配置键查询配置值
|
||||
*
|
||||
* @param configKey 配置键
|
||||
* @return 配置值
|
||||
*/
|
||||
String getConfigValue(String configKey);
|
||||
|
||||
/**
|
||||
* 根据配置键查询配置对象
|
||||
*
|
||||
* @param configKey 配置键
|
||||
* @return 配置对象
|
||||
*/
|
||||
XgSystemConfigVo getConfigByKey(String configKey);
|
||||
|
||||
/**
|
||||
* 设置配置值
|
||||
*
|
||||
* @param configKey 配置键
|
||||
* @param configValue 配置值
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean setConfigValue(String configKey, String configValue);
|
||||
|
||||
/**
|
||||
* 批量设置配置
|
||||
*
|
||||
* @param configs 配置列表
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean batchSetConfig(List<XgSystemConfigBo> configs);
|
||||
|
||||
/**
|
||||
* 根据配置组查询配置列表
|
||||
*
|
||||
* @param configGroup 配置组
|
||||
* @return 配置列表
|
||||
*/
|
||||
List<XgSystemConfigVo> queryByGroup(String configGroup);
|
||||
|
||||
/**
|
||||
* 校验配置键是否唯一
|
||||
*
|
||||
* @param configKey 配置键
|
||||
* @param id 配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkConfigKeyUnique(String configKey, Long id);
|
||||
|
||||
/**
|
||||
* 刷新配置缓存
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean refreshCache();
|
||||
|
||||
/**
|
||||
* 重置配置为默认值
|
||||
*
|
||||
* @param configKey 配置键
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean resetToDefault(String configKey);
|
||||
|
||||
/**
|
||||
* 导出配置
|
||||
*
|
||||
* @param configGroup 配置组
|
||||
* @return 配置数据
|
||||
*/
|
||||
String exportConfig(String configGroup);
|
||||
|
||||
/**
|
||||
* 导入配置
|
||||
*
|
||||
* @param configData 配置数据
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean importConfig(String configData);
|
||||
|
||||
/**
|
||||
* 获取系统配置统计
|
||||
*
|
||||
* @return 配置统计信息
|
||||
*/
|
||||
XgSystemConfigVo getConfigStatistics();
|
||||
}
|
||||
+550
@@ -0,0 +1,550 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import org.dromara.xg.domain.XgBatchStudentRelation;
|
||||
import org.dromara.xg.domain.XgBatchPermission;
|
||||
import org.dromara.xg.domain.XgBusinessPeriod;
|
||||
import org.dromara.xg.domain.XgBatchOperationLog;
|
||||
import org.dromara.xg.domain.XgStudentInfo;
|
||||
import org.dromara.xg.domain.vo.XgCollectionBatchVo;
|
||||
import org.dromara.xg.mapper.XgCollectionBatchMapper;
|
||||
import org.dromara.xg.mapper.XgBatchStudentRelationMapper;
|
||||
import org.dromara.xg.mapper.XgBatchPermissionMapper;
|
||||
import org.dromara.xg.mapper.XgBusinessPeriodMapper;
|
||||
import org.dromara.xg.mapper.XgBatchOperationLogMapper;
|
||||
import org.dromara.xg.mapper.XgStudentInfoMapper;
|
||||
import org.dromara.xg.service.IStudentInfoPermissionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生信息权限控制服务实现类
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class StudentInfoPermissionServiceImpl implements IStudentInfoPermissionService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(StudentInfoPermissionServiceImpl.class);
|
||||
|
||||
private final XgCollectionBatchMapper collectionBatchMapper;
|
||||
private final XgBatchStudentRelationMapper batchStudentRelationMapper;
|
||||
private final XgBatchPermissionMapper batchPermissionMapper;
|
||||
private final XgBusinessPeriodMapper businessPeriodMapper;
|
||||
private final XgBatchOperationLogMapper batchOperationLogMapper;
|
||||
private final XgStudentInfoMapper studentInfoMapper;
|
||||
|
||||
/**
|
||||
* 检查学生是否可以修改信息
|
||||
*/
|
||||
@Override
|
||||
public boolean canEditStudentInfo(Long studentId) {
|
||||
try {
|
||||
StudentPermissionResult result = checkStudentPermission(studentId);
|
||||
return result.isCanEdit();
|
||||
} catch (Exception e) {
|
||||
log.error("检查学生编辑权限失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学生是否可以修改信息(详细信息)
|
||||
*/
|
||||
@Override
|
||||
public StudentPermissionResult checkStudentPermission(Long studentId) {
|
||||
StudentPermissionResult result = new StudentPermissionResult();
|
||||
result.setStudentId(studentId);
|
||||
result.setCanEdit(false);
|
||||
result.setCanSubmit(false);
|
||||
result.setCanWithdraw(false);
|
||||
|
||||
try {
|
||||
// 获取当前活跃批次
|
||||
XgCollectionBatchVo currentBatch = getCurrentActiveBatch();
|
||||
if (currentBatch == null) {
|
||||
result.setMessage("当前没有活跃的信息采集批次");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.setBatchId(currentBatch.getBatchId());
|
||||
result.setBatchName(currentBatch.getBatchName());
|
||||
|
||||
// 检查学生是否在批次中
|
||||
if (!isStudentInBatch(studentId, currentBatch.getBatchId())) {
|
||||
result.setMessage("学生不在当前批次中");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 获取当前用户信息
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
result.setMessage("用户未登录");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 获取用户角色权限
|
||||
var rolePermissions = loginUser.getRolePermission();
|
||||
|
||||
// 检查批次权限配置
|
||||
XgBatchPermission batchPermission = getBatchPermissionForUser(currentBatch.getBatchId(), loginUser.getUserId());
|
||||
if (batchPermission == null) {
|
||||
result.setMessage("用户在当前批次中没有权限配置");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 检查业务期间
|
||||
List<XgBusinessPeriod> validPeriods = getValidBusinessPeriods(currentBatch.getBatchId(), rolePermissions);
|
||||
if (validPeriods.isEmpty()) {
|
||||
result.setMessage("当前不在有效的业务期间内");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 获取学生在批次中的状态
|
||||
XgBatchStudentRelation studentRelation = getStudentBatchRelation(studentId, currentBatch.getBatchId());
|
||||
if (studentRelation == null) {
|
||||
result.setMessage("学生批次关联信息不存在");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.setSubmissionStatus(studentRelation.getSubmissionStatus());
|
||||
result.setApprovalStatus(studentRelation.getApprovalStatus());
|
||||
|
||||
// 根据权限配置和业务状态确定操作权限
|
||||
determinePermissions(result, batchPermission, studentRelation, validPeriods);
|
||||
|
||||
result.setCheckPassed(true);
|
||||
if (StringUtils.isBlank(result.getMessage())) {
|
||||
result.setMessage("权限检查通过");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("检查学生权限异常: {}", e.getMessage(), e);
|
||||
result.setMessage("权限检查异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定操作权限
|
||||
*/
|
||||
private void determinePermissions(StudentPermissionResult result, XgBatchPermission batchPermission,
|
||||
XgBatchStudentRelation studentRelation, List<XgBusinessPeriod> validPeriods) {
|
||||
|
||||
// 基础权限检查
|
||||
if (batchPermission.getCanView() != null && Boolean.TRUE.equals(batchPermission.getCanView())) {
|
||||
result.setCanView(true);
|
||||
}
|
||||
|
||||
// 编辑权限检查
|
||||
if (batchPermission.getCanEdit() != null && Boolean.TRUE.equals(batchPermission.getCanEdit())) {
|
||||
// 检查提交状态
|
||||
String submissionStatus = studentRelation.getSubmissionStatus();
|
||||
String approvalStatus = studentRelation.getApprovalStatus();
|
||||
|
||||
if ("DRAFT".equals(submissionStatus) || "WITHDRAWN".equals(submissionStatus)) {
|
||||
result.setCanEdit(true);
|
||||
} else if ("SUBMITTED".equals(submissionStatus) && "REJECTED".equals(approvalStatus)) {
|
||||
result.setCanEdit(true);
|
||||
result.setMessage("信息已被拒绝,可以重新编辑");
|
||||
}
|
||||
}
|
||||
|
||||
// 提交权限检查
|
||||
if (batchPermission.getCanSubmit() != null && Boolean.TRUE.equals(batchPermission.getCanSubmit())) {
|
||||
String submissionStatus = studentRelation.getSubmissionStatus();
|
||||
if ("DRAFT".equals(submissionStatus) || "WITHDRAWN".equals(submissionStatus)) {
|
||||
result.setCanSubmit(true);
|
||||
}
|
||||
}
|
||||
|
||||
// 撤回权限检查
|
||||
if (batchPermission.getCanWithdraw() != null && Boolean.TRUE.equals(batchPermission.getCanWithdraw())) {
|
||||
String submissionStatus = studentRelation.getSubmissionStatus();
|
||||
String approvalStatus = studentRelation.getApprovalStatus();
|
||||
if ("SUBMITTED".equals(submissionStatus) && "PENDING".equals(approvalStatus)) {
|
||||
result.setCanWithdraw(true);
|
||||
}
|
||||
}
|
||||
|
||||
// 审核权限检查(管理员和审核人员)
|
||||
if (batchPermission.getCanApprove() != null && Boolean.TRUE.equals(batchPermission.getCanApprove())) {
|
||||
String submissionStatus = studentRelation.getSubmissionStatus();
|
||||
String approvalStatus = studentRelation.getApprovalStatus();
|
||||
if ("SUBMITTED".equals(submissionStatus) && "PENDING".equals(approvalStatus)) {
|
||||
result.setCanApprove(true);
|
||||
}
|
||||
}
|
||||
|
||||
// 拒绝权限检查
|
||||
if (batchPermission.getCanReject() != null && Boolean.TRUE.equals(batchPermission.getCanReject())) {
|
||||
String submissionStatus = studentRelation.getSubmissionStatus();
|
||||
String approvalStatus = studentRelation.getApprovalStatus();
|
||||
if ("SUBMITTED".equals(submissionStatus) && "PENDING".equals(approvalStatus)) {
|
||||
result.setCanReject(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查当前是否有活跃批次
|
||||
*/
|
||||
@Override
|
||||
public XgCollectionBatchVo getCurrentActiveBatch() {
|
||||
try {
|
||||
LambdaQueryWrapper<XgCollectionBatch> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgCollectionBatch::getBatchStatus, "ACTIVE");
|
||||
lqw.eq(XgCollectionBatch::getPublishStatus, "PUBLISHED");
|
||||
lqw.le(XgCollectionBatch::getStartTime, LocalDateTime.now());
|
||||
lqw.ge(XgCollectionBatch::getEndTime, LocalDateTime.now());
|
||||
lqw.orderByDesc(XgCollectionBatch::getCreateTime);
|
||||
lqw.last("LIMIT 1");
|
||||
|
||||
XgCollectionBatch batch = collectionBatchMapper.selectOne(lqw);
|
||||
return batch != null ? MapstructUtils.convert(batch, XgCollectionBatchVo.class) : null;
|
||||
} catch (Exception e) {
|
||||
log.error("获取当前活跃批次失败: {}", e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学生是否符合批次条件
|
||||
*/
|
||||
@Override
|
||||
public boolean isStudentInBatch(Long studentId, Long batchId) {
|
||||
try {
|
||||
LambdaQueryWrapper<XgBatchStudentRelation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchStudentRelation::getBatchId, batchId);
|
||||
lqw.eq(XgBatchStudentRelation::getStudentId, studentId);
|
||||
return batchStudentRelationMapper.exists(lqw);
|
||||
} catch (Exception e) {
|
||||
log.error("检查学生批次关联失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录学生信息修改日志
|
||||
*/
|
||||
@Override
|
||||
public void logStudentInfoChange(Long studentId, Long batchId, String operation, String description) {
|
||||
try {
|
||||
XgBatchOperationLog log = new XgBatchOperationLog();
|
||||
log.setBatchId(batchId);
|
||||
log.setOperationType(operation);
|
||||
log.setOperationDescription(description);
|
||||
log.setOperatorId(LoginHelper.getUserId());
|
||||
log.setOperatorName(LoginHelper.getUsername());
|
||||
log.setOperationTime(LocalDateTime.now());
|
||||
log.setOperationResult("SUCCESS");
|
||||
log.setOperationDetails("学生ID: " + studentId + ", " + description);
|
||||
|
||||
batchOperationLogMapper.insert(log);
|
||||
} catch (Exception e) {
|
||||
log.error("记录学生信息修改日志失败: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生提交信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean submitStudentInfo(Long studentId, Long batchId) {
|
||||
try {
|
||||
// 检查权限
|
||||
StudentPermissionResult permission = checkStudentPermission(studentId);
|
||||
if (!permission.isCanSubmit()) {
|
||||
throw new ServiceException("没有提交权限: " + permission.getMessage());
|
||||
}
|
||||
|
||||
// 获取学生批次关联
|
||||
XgBatchStudentRelation studentRelation = getStudentBatchRelation(studentId, batchId);
|
||||
if (studentRelation == null) {
|
||||
throw new ServiceException("学生批次关联信息不存在");
|
||||
}
|
||||
|
||||
// 更新提交状态
|
||||
studentRelation.setSubmissionStatus("SUBMITTED");
|
||||
studentRelation.setSubmissionTime(LocalDateTime.now());
|
||||
studentRelation.setApprovalStatus("PENDING");
|
||||
studentRelation.setSubmissionCount(
|
||||
ObjectUtil.defaultIfNull(studentRelation.getSubmissionCount(), 0) + 1
|
||||
);
|
||||
|
||||
boolean flag = batchStudentRelationMapper.updateById(studentRelation) > 0;
|
||||
if (flag) {
|
||||
// 更新学生信息表的提交状态
|
||||
updateStudentInfoSubmissionStatus(studentId, "SUBMITTED");
|
||||
|
||||
// 记录操作日志
|
||||
logStudentInfoChange(studentId, batchId, "SUBMIT", "学生提交信息");
|
||||
}
|
||||
|
||||
return flag;
|
||||
} catch (Exception e) {
|
||||
log.error("学生提交信息失败: {}", e.getMessage(), e);
|
||||
throw new ServiceException("提交失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生在批次中的统计信息
|
||||
*/
|
||||
@Override
|
||||
public StudentBatchStatistics getStudentBatchStatistics(Long studentId, Long batchId) {
|
||||
StudentBatchStatistics statistics = new StudentBatchStatistics();
|
||||
statistics.setStudentId(studentId);
|
||||
statistics.setBatchId(batchId);
|
||||
|
||||
try {
|
||||
// 获取学生批次关联信息
|
||||
XgBatchStudentRelation studentRelation = getStudentBatchRelation(studentId, batchId);
|
||||
if (studentRelation != null) {
|
||||
statistics.setSubmissionStatus(studentRelation.getSubmissionStatus());
|
||||
statistics.setApprovalStatus(studentRelation.getApprovalStatus());
|
||||
statistics.setSubmissionTime(studentRelation.getSubmissionTime());
|
||||
statistics.setApprovalTime(studentRelation.getApprovalTime());
|
||||
statistics.setSubmissionCount(
|
||||
ObjectUtil.defaultIfNull(studentRelation.getSubmissionCount(), 0)
|
||||
);
|
||||
statistics.setLastEditTime(studentRelation.getLastEditTime());
|
||||
}
|
||||
|
||||
// 获取批次信息
|
||||
XgCollectionBatch batch = collectionBatchMapper.selectById(batchId);
|
||||
if (batch != null) {
|
||||
statistics.setBatchName(batch.getBatchName());
|
||||
statistics.setBatchStartTime(batch.getStartTime());
|
||||
statistics.setBatchEndTime(batch.getEndTime());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("获取学生批次统计信息失败: {}", e.getMessage(), e);
|
||||
}
|
||||
|
||||
return statistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户在批次中的权限配置
|
||||
*/
|
||||
private XgBatchPermission getBatchPermissionForUser(Long batchId, Long userId) {
|
||||
try {
|
||||
// 这里需要根据用户的角色来获取权限配置
|
||||
// 简化实现,实际应该根据用户角色查询
|
||||
LambdaQueryWrapper<XgBatchPermission> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchPermission::getBatchId, batchId);
|
||||
lqw.eq(XgBatchPermission::getIsActive, 1);
|
||||
lqw.orderByDesc(XgBatchPermission::getCreateTime);
|
||||
lqw.last("LIMIT 1");
|
||||
|
||||
return batchPermissionMapper.selectOne(lqw);
|
||||
} catch (Exception e) {
|
||||
log.error("获取用户批次权限配置失败: {}", e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取有效的业务期间
|
||||
*/
|
||||
private List<XgBusinessPeriod> getValidBusinessPeriods(Long batchId, Set<String> rolePermissions) {
|
||||
try {
|
||||
LambdaQueryWrapper<XgBusinessPeriod> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBusinessPeriod::getBatchId, batchId);
|
||||
lqw.eq(XgBusinessPeriod::getIsActive, 1);
|
||||
lqw.le(XgBusinessPeriod::getStartTime, LocalDateTime.now());
|
||||
lqw.ge(XgBusinessPeriod::getEndTime, LocalDateTime.now());
|
||||
|
||||
return businessPeriodMapper.selectList(lqw);
|
||||
} catch (Exception e) {
|
||||
log.error("获取有效业务期间失败: {}", e.getMessage(), e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生批次关联信息
|
||||
*/
|
||||
private XgBatchStudentRelation getStudentBatchRelation(Long studentId, Long batchId) {
|
||||
try {
|
||||
LambdaQueryWrapper<XgBatchStudentRelation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchStudentRelation::getBatchId, batchId);
|
||||
lqw.eq(XgBatchStudentRelation::getStudentId, studentId);
|
||||
return batchStudentRelationMapper.selectOne(lqw);
|
||||
} catch (Exception e) {
|
||||
log.error("获取学生批次关联信息失败: {}", e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新学生信息表的提交状态
|
||||
*/
|
||||
private void updateStudentInfoSubmissionStatus(Long studentId, String status) {
|
||||
try {
|
||||
XgStudentInfo studentInfo = studentInfoMapper.selectById(studentId);
|
||||
if (studentInfo != null) {
|
||||
studentInfo.setSubmissionStatus(status);
|
||||
studentInfo.setSubmissionTime(LocalDateTime.now());
|
||||
studentInfoMapper.updateById(studentInfo);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("更新学生信息提交状态失败: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生权限检查结果内部类
|
||||
*/
|
||||
public static class StudentPermissionResult implements IStudentInfoPermissionService.StudentPermissionResult {
|
||||
private Long studentId;
|
||||
private Long batchId;
|
||||
private String batchName;
|
||||
private boolean canView = false;
|
||||
private boolean canEdit = false;
|
||||
private boolean canSubmit = false;
|
||||
private boolean canWithdraw = false;
|
||||
private boolean canApprove = false;
|
||||
private boolean canReject = false;
|
||||
private String submissionStatus;
|
||||
private String approvalStatus;
|
||||
private String message;
|
||||
private boolean checkPassed = false;
|
||||
|
||||
// Getters and Setters
|
||||
@Override
|
||||
public Long getStudentId() { return studentId; }
|
||||
public void setStudentId(Long studentId) { this.studentId = studentId; }
|
||||
|
||||
@Override
|
||||
public Long getBatchId() { return batchId; }
|
||||
public void setBatchId(Long batchId) { this.batchId = batchId; }
|
||||
|
||||
@Override
|
||||
public String getBatchName() { return batchName; }
|
||||
public void setBatchName(String batchName) { this.batchName = batchName; }
|
||||
|
||||
@Override
|
||||
public boolean isCanView() { return canView; }
|
||||
public void setCanView(boolean canView) { this.canView = canView; }
|
||||
|
||||
@Override
|
||||
public boolean isCanEdit() { return canEdit; }
|
||||
public void setCanEdit(boolean canEdit) { this.canEdit = canEdit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanSubmit() { return canSubmit; }
|
||||
public void setCanSubmit(boolean canSubmit) { this.canSubmit = canSubmit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanWithdraw() { return canWithdraw; }
|
||||
public void setCanWithdraw(boolean canWithdraw) { this.canWithdraw = canWithdraw; }
|
||||
|
||||
@Override
|
||||
public boolean isCanApprove() { return canApprove; }
|
||||
public void setCanApprove(boolean canApprove) { this.canApprove = canApprove; }
|
||||
|
||||
@Override
|
||||
public boolean isCanReject() { return canReject; }
|
||||
public void setCanReject(boolean canReject) { this.canReject = canReject; }
|
||||
|
||||
@Override
|
||||
public String getSubmissionStatus() { return submissionStatus; }
|
||||
public void setSubmissionStatus(String submissionStatus) { this.submissionStatus = submissionStatus; }
|
||||
|
||||
@Override
|
||||
public String getApprovalStatus() { return approvalStatus; }
|
||||
public void setApprovalStatus(String approvalStatus) { this.approvalStatus = approvalStatus; }
|
||||
|
||||
@Override
|
||||
public String getMessage() { return message; }
|
||||
public void setMessage(String message) { this.message = message; }
|
||||
|
||||
@Override
|
||||
public boolean isCheckPassed() { return checkPassed; }
|
||||
public void setCheckPassed(boolean checkPassed) { this.checkPassed = checkPassed; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生批次统计信息内部类
|
||||
*/
|
||||
public static class StudentBatchStatistics implements IStudentInfoPermissionService.StudentBatchStatistics {
|
||||
private Long studentId;
|
||||
private Long batchId;
|
||||
private String batchName;
|
||||
private String submissionStatus;
|
||||
private String approvalStatus;
|
||||
private LocalDateTime submissionTime;
|
||||
private LocalDateTime approvalTime;
|
||||
private Integer submissionCount;
|
||||
private LocalDateTime lastEditTime;
|
||||
private LocalDateTime batchStartTime;
|
||||
private LocalDateTime batchEndTime;
|
||||
|
||||
// Getters and Setters
|
||||
@Override
|
||||
public Long getStudentId() { return studentId; }
|
||||
public void setStudentId(Long studentId) { this.studentId = studentId; }
|
||||
|
||||
@Override
|
||||
public Long getBatchId() { return batchId; }
|
||||
public void setBatchId(Long batchId) { this.batchId = batchId; }
|
||||
|
||||
@Override
|
||||
public String getBatchName() { return batchName; }
|
||||
public void setBatchName(String batchName) { this.batchName = batchName; }
|
||||
|
||||
@Override
|
||||
public String getSubmissionStatus() { return submissionStatus; }
|
||||
public void setSubmissionStatus(String submissionStatus) { this.submissionStatus = submissionStatus; }
|
||||
|
||||
@Override
|
||||
public String getApprovalStatus() { return approvalStatus; }
|
||||
public void setApprovalStatus(String approvalStatus) { this.approvalStatus = approvalStatus; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getSubmissionTime() { return submissionTime; }
|
||||
public void setSubmissionTime(LocalDateTime submissionTime) { this.submissionTime = submissionTime; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getApprovalTime() { return approvalTime; }
|
||||
public void setApprovalTime(LocalDateTime approvalTime) { this.approvalTime = approvalTime; }
|
||||
|
||||
@Override
|
||||
public Integer getSubmissionCount() { return submissionCount; }
|
||||
public void setSubmissionCount(Integer submissionCount) { this.submissionCount = submissionCount; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getLastEditTime() { return lastEditTime; }
|
||||
public void setLastEditTime(LocalDateTime lastEditTime) { this.lastEditTime = lastEditTime; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getBatchStartTime() { return batchStartTime; }
|
||||
public void setBatchStartTime(LocalDateTime batchStartTime) { this.batchStartTime = batchStartTime; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getBatchEndTime() { return batchEndTime; }
|
||||
public void setBatchEndTime(LocalDateTime batchEndTime) { this.batchEndTime = batchEndTime; }
|
||||
}
|
||||
}
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xg.domain.XgAcademicYear;
|
||||
import org.dromara.xg.domain.bo.XgAcademicYearBo;
|
||||
import org.dromara.xg.domain.vo.XgAcademicYearVo;
|
||||
import org.dromara.xg.mapper.XgAcademicYearMapper;
|
||||
import org.dromara.xg.service.IXgAcademicYearService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学年管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgAcademicYearServiceImpl implements IXgAcademicYearService {
|
||||
|
||||
private final XgAcademicYearMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询学年管理
|
||||
*
|
||||
* @param id 学年管理主键
|
||||
* @return 学年管理
|
||||
*/
|
||||
@Override
|
||||
public XgAcademicYearVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学年管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页查询条件
|
||||
* @return 学年管理集合
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgAcademicYearVo> queryPageList(XgAcademicYearBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XgAcademicYear> lqw = buildQueryWrapper(bo);
|
||||
Page<XgAcademicYearVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学年管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学年管理集合
|
||||
*/
|
||||
@Override
|
||||
public List<XgAcademicYearVo> queryList(XgAcademicYearBo bo) {
|
||||
LambdaQueryWrapper<XgAcademicYear> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XgAcademicYear> buildQueryWrapper(XgAcademicYearBo bo) {
|
||||
LambdaQueryWrapper<XgAcademicYear> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getYearName()), XgAcademicYear::getYearName, bo.getYearName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getYearCode()), XgAcademicYear::getYearCode, bo.getYearCode());
|
||||
lqw.eq(ObjectUtil.isNotNull(bo.getStartDate()), XgAcademicYear::getStartDate, bo.getStartDate());
|
||||
lqw.eq(ObjectUtil.isNotNull(bo.getEndDate()), XgAcademicYear::getEndDate, bo.getEndDate());
|
||||
lqw.eq(ObjectUtil.isNotNull(bo.getIsCurrent()), XgAcademicYear::getIsCurrent, bo.getIsCurrent());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XgAcademicYear::getStatus, bo.getStatus());
|
||||
lqw.orderByDesc(XgAcademicYear::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学年管理
|
||||
*
|
||||
* @param bo 学年管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(XgAcademicYearBo bo) {
|
||||
XgAcademicYear add = MapstructUtils.convert(bo, XgAcademicYear.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 如果设置为当前学年,需要取消其他学年的当前状态
|
||||
if (Boolean.TRUE.equals(bo.getIsCurrent())) {
|
||||
baseMapper.update(null, Wrappers.<XgAcademicYear>lambdaUpdate()
|
||||
.set(XgAcademicYear::getIsCurrent, false));
|
||||
}
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学年管理
|
||||
*
|
||||
* @param bo 学年管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(XgAcademicYearBo bo) {
|
||||
XgAcademicYear update = MapstructUtils.convert(bo, XgAcademicYear.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
// 如果设置为当前学年,需要取消其他学年的当前状态
|
||||
if (Boolean.TRUE.equals(bo.getIsCurrent())) {
|
||||
baseMapper.update(null, Wrappers.<XgAcademicYear>lambdaUpdate()
|
||||
.set(XgAcademicYear::getIsCurrent, false)
|
||||
.ne(XgAcademicYear::getId, bo.getId()));
|
||||
}
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(XgAcademicYear entity) {
|
||||
// 校验学年编码是否唯一
|
||||
if (!checkYearCodeExists(entity.getYearCode(), entity.getId())) {
|
||||
throw new RuntimeException("学年编码已存在");
|
||||
}
|
||||
|
||||
// 校验开始日期不能大于结束日期
|
||||
if (entity.getStartDate() != null && entity.getEndDate() != null
|
||||
&& entity.getStartDate().isAfter(entity.getEndDate())) {
|
||||
throw new RuntimeException("开始日期不能大于结束日期");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学年管理
|
||||
*
|
||||
* @param ids 需要删除的学年管理主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (Boolean.TRUE.equals(isValid)) {
|
||||
// 校验是否存在当前学年
|
||||
long currentCount = baseMapper.selectCount(Wrappers.<XgAcademicYear>lambdaQuery()
|
||||
.in(XgAcademicYear::getId, ids)
|
||||
.eq(XgAcademicYear::getIsCurrent, true));
|
||||
if (currentCount > 0) {
|
||||
throw new RuntimeException("不能删除当前学年");
|
||||
}
|
||||
}
|
||||
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学年编码查询学年信息
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
* @return 学年信息
|
||||
*/
|
||||
@Override
|
||||
public XgAcademicYearVo queryByYearCode(String yearCode) {
|
||||
return baseMapper.selectVoOne(Wrappers.<XgAcademicYear>lambdaQuery()
|
||||
.eq(XgAcademicYear::getYearCode, yearCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前学年
|
||||
*
|
||||
* @return 当前学年
|
||||
*/
|
||||
@Override
|
||||
public XgAcademicYearVo queryCurrentYear() {
|
||||
return baseMapper.selectVoOne(Wrappers.<XgAcademicYear>lambdaQuery()
|
||||
.eq(XgAcademicYear::getIsCurrent, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前学年
|
||||
*
|
||||
* @param yearId 学年ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean setCurrentYear(Long yearId) {
|
||||
// 先取消所有学年的当前状态
|
||||
baseMapper.update(null, Wrappers.<XgAcademicYear>lambdaUpdate()
|
||||
.set(XgAcademicYear::getIsCurrent, false));
|
||||
|
||||
// 设置指定学年为当前学年
|
||||
return baseMapper.update(null, Wrappers.<XgAcademicYear>lambdaUpdate()
|
||||
.set(XgAcademicYear::getIsCurrent, true)
|
||||
.eq(XgAcademicYear::getId, yearId)) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查学年编码是否存在
|
||||
*
|
||||
* @param yearCode 学年编码
|
||||
* @param yearId 学年ID(修改时使用)
|
||||
* @return 是否存在
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkYearCodeExists(String yearCode, Long yearId) {
|
||||
LambdaQueryWrapper<XgAcademicYear> lqw = Wrappers.<XgAcademicYear>lambdaQuery()
|
||||
.eq(XgAcademicYear::getYearCode, yearCode);
|
||||
if (ObjectUtil.isNotNull(yearId)) {
|
||||
lqw.ne(XgAcademicYear::getId, yearId);
|
||||
}
|
||||
return baseMapper.selectCount(lqw) > 0;
|
||||
}
|
||||
}
|
||||
+557
@@ -0,0 +1,557 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xg.domain.XgBatchPermission;
|
||||
import org.dromara.xg.domain.XgBusinessPeriod;
|
||||
import org.dromara.xg.domain.XgCollectionBatch;
|
||||
import org.dromara.xg.domain.vo.XgBatchPermissionVo;
|
||||
import org.dromara.xg.mapper.XgBatchPermissionMapper;
|
||||
import org.dromara.xg.mapper.XgBusinessPeriodMapper;
|
||||
import org.dromara.xg.mapper.XgCollectionBatchMapper;
|
||||
import org.dromara.xg.service.IXgBatchPermissionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 批次权限控制服务实现类
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgBatchPermissionServiceImpl implements IXgBatchPermissionService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(XgBatchPermissionServiceImpl.class);
|
||||
|
||||
private final XgBatchPermissionMapper baseMapper;
|
||||
private final XgBusinessPeriodMapper businessPeriodMapper;
|
||||
private final XgCollectionBatchMapper collectionBatchMapper;
|
||||
|
||||
/**
|
||||
* 检查用户在批次中的权限
|
||||
*/
|
||||
@Override
|
||||
public BatchPermissionResult checkUserBatchPermission(Long batchId, Long userId) {
|
||||
BatchPermissionResult result = new BatchPermissionResult();
|
||||
result.setBatchId(batchId);
|
||||
result.setUserId(userId);
|
||||
result.setHasPermission(false);
|
||||
|
||||
try {
|
||||
// 获取批次信息
|
||||
XgCollectionBatch batch = collectionBatchMapper.selectById(batchId);
|
||||
if (batch == null) {
|
||||
result.setMessage("批次不存在");
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!"ACTIVE".equals(batch.getBatchStatus())) {
|
||||
result.setMessage("批次未激活");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 获取用户角色信息
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
result.setMessage("用户未登录");
|
||||
return result;
|
||||
}
|
||||
|
||||
Set<String> rolePermissions = loginUser.getRolePermission();
|
||||
if (CollUtil.isEmpty(rolePermissions)) {
|
||||
result.setMessage("用户没有角色权限");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 查询用户在批次中的权限配置
|
||||
XgBatchPermission batchPermission = getUserBatchPermission(batchId, userId, rolePermissions);
|
||||
if (batchPermission == null) {
|
||||
result.setMessage("用户在当前批次中没有权限配置");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 检查权限是否在有效期内
|
||||
if (!isPermissionValid(batchPermission)) {
|
||||
result.setMessage("权限已过期或未生效");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 检查业务期间
|
||||
if (!isInValidBusinessPeriod(batchId, rolePermissions)) {
|
||||
result.setMessage("当前不在有效的业务期间内");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 验证权限配置的有效性
|
||||
if (batchPermission.getCanView() != null && Boolean.TRUE.equals(batchPermission.getCanView())) {
|
||||
// 可查看权限验证
|
||||
}
|
||||
if (batchPermission.getCanEdit() != null && Boolean.TRUE.equals(batchPermission.getCanEdit())) {
|
||||
// 可编辑权限验证
|
||||
}
|
||||
if (batchPermission.getCanDelete() != null && Boolean.TRUE.equals(batchPermission.getCanDelete())) {
|
||||
// 可删除权限验证
|
||||
}
|
||||
if (batchPermission.getCanExport() != null && Boolean.TRUE.equals(batchPermission.getCanExport())) {
|
||||
// 可导出权限验证
|
||||
}
|
||||
if (batchPermission.getCanImport() != null && Boolean.TRUE.equals(batchPermission.getCanImport())) {
|
||||
// 可导入权限验证
|
||||
}
|
||||
if (batchPermission.getCanApprove() != null && Boolean.TRUE.equals(batchPermission.getCanApprove())) {
|
||||
// 可审批权限验证
|
||||
}
|
||||
|
||||
// 设置权限结果
|
||||
result.setHasPermission(true);
|
||||
result.setPermissionType(batchPermission.getPermissionType());
|
||||
result.setCanView(Boolean.TRUE.equals(batchPermission.getCanView()));
|
||||
result.setCanEdit(Boolean.TRUE.equals(batchPermission.getCanEdit()));
|
||||
result.setCanSubmit(Boolean.TRUE.equals(batchPermission.getCanSubmit()));
|
||||
result.setCanApprove(Boolean.TRUE.equals(batchPermission.getCanApprove()));
|
||||
result.setCanReject(Boolean.TRUE.equals(batchPermission.getCanReject()));
|
||||
result.setCanWithdraw(Boolean.TRUE.equals(batchPermission.getCanWithdraw()));
|
||||
result.setMessage("权限检查通过");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("检查用户批次权限失败: {}", e.getMessage(), e);
|
||||
result.setMessage("权限检查异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查用户是否有特定操作权限
|
||||
*/
|
||||
@Override
|
||||
public boolean hasOperationPermission(Long batchId, Long userId, String operation) {
|
||||
try {
|
||||
BatchPermissionResult result = checkUserBatchPermission(batchId, userId);
|
||||
if (!result.isHasPermission()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return switch (operation.toUpperCase()) {
|
||||
case "VIEW" -> result.isCanView();
|
||||
case "EDIT" -> result.isCanEdit();
|
||||
case "SUBMIT" -> result.isCanSubmit();
|
||||
case "APPROVE" -> result.isCanApprove();
|
||||
case "REJECT" -> result.isCanReject();
|
||||
case "WITHDRAW" -> result.isCanWithdraw();
|
||||
default -> false;
|
||||
};
|
||||
} catch (Exception e) {
|
||||
log.error("检查操作权限失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户在批次中的权限配置
|
||||
*/
|
||||
@Override
|
||||
public XgBatchPermissionVo getUserBatchPermissionConfig(Long batchId, Long userId) {
|
||||
try {
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Set<String> rolePermissions = loginUser.getRolePermission();
|
||||
XgBatchPermission batchPermission = getUserBatchPermission(batchId, userId, rolePermissions);
|
||||
|
||||
return batchPermission != null ? MapstructUtils.convert(batchPermission, XgBatchPermissionVo.class) : null;
|
||||
} catch (Exception e) {
|
||||
log.error("获取用户批次权限配置失败: {}", e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量配置权限
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean batchConfigurePermissions(Long batchId, List<IXgBatchPermissionService.BatchPermissionConfig> configs) {
|
||||
try {
|
||||
// 验证批次是否存在
|
||||
XgCollectionBatch batch = collectionBatchMapper.selectById(batchId);
|
||||
if (batch == null) {
|
||||
throw new ServiceException("批次不存在");
|
||||
}
|
||||
|
||||
// 删除现有权限配置
|
||||
LambdaQueryWrapper<XgBatchPermission> deleteWrapper = Wrappers.lambdaQuery();
|
||||
deleteWrapper.eq(XgBatchPermission::getBatchId, batchId);
|
||||
baseMapper.delete(deleteWrapper);
|
||||
|
||||
// 批量插入新的权限配置
|
||||
for (IXgBatchPermissionService.BatchPermissionConfig config : configs) {
|
||||
XgBatchPermission permission = new XgBatchPermission();
|
||||
permission.setBatchId(batchId);
|
||||
permission.setUserId(config.getUserId());
|
||||
permission.setRoleId(config.getRoleId());
|
||||
permission.setPermissionType(config.getPermissionType());
|
||||
permission.setCanView(config.getCanView() ? Boolean.TRUE : Boolean.FALSE);
|
||||
permission.setCanEdit(config.getCanEdit() ? Boolean.TRUE : Boolean.FALSE);
|
||||
permission.setCanDelete(config.getCanDelete() ? Boolean.TRUE : Boolean.FALSE);
|
||||
permission.setCanApprove(config.getCanApprove() ? Boolean.TRUE : Boolean.FALSE);
|
||||
permission.setCanExport(config.getCanExport() ? Boolean.TRUE : Boolean.FALSE);
|
||||
permission.setCanImport(config.getCanImport() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
// 设置权限状态
|
||||
permission.setIsActive(config.getIsActive() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
baseMapper.insert(permission);
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("批量配置批次权限失败: {}", e.getMessage(), e);
|
||||
throw new ServiceException("配置权限失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次权限配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgBatchPermissionVo> getBatchPermissionConfigs(Long batchId) {
|
||||
try {
|
||||
LambdaQueryWrapper<XgBatchPermission> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchPermission::getBatchId, batchId);
|
||||
lqw.orderByDesc(XgBatchPermission::getCreateTime);
|
||||
|
||||
return baseMapper.selectList(lqw).stream()
|
||||
.map(permission -> MapstructUtils.convert(permission, XgBatchPermissionVo.class))
|
||||
.collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
log.error("获取批次权限配置列表失败: {}", e.getMessage(), e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新权限配置状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updatePermissionStatus(Long permissionId, Boolean isActive) {
|
||||
try {
|
||||
XgBatchPermission permission = baseMapper.selectById(permissionId);
|
||||
if (permission == null) {
|
||||
throw new ServiceException("权限配置不存在");
|
||||
}
|
||||
|
||||
permission.setIsActive(isActive ? 1 : 0);
|
||||
return baseMapper.updateById(permission) > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("更新权限配置状态失败: {}", e.getMessage(), e);
|
||||
throw new ServiceException("更新状态失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制权限配置到其他批次
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean copyPermissionsToOtherBatch(Long sourceBatchId, Long targetBatchId) {
|
||||
try {
|
||||
// 验证源批次和目标批次是否存在
|
||||
XgCollectionBatch sourceBatch = collectionBatchMapper.selectById(sourceBatchId);
|
||||
XgCollectionBatch targetBatch = collectionBatchMapper.selectById(targetBatchId);
|
||||
|
||||
if (sourceBatch == null || targetBatch == null) {
|
||||
throw new ServiceException("源批次或目标批次不存在");
|
||||
}
|
||||
|
||||
// 获取源批次的权限配置
|
||||
LambdaQueryWrapper<XgBatchPermission> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchPermission::getBatchId, sourceBatchId);
|
||||
List<XgBatchPermission> sourcePermissions = baseMapper.selectList(lqw);
|
||||
|
||||
if (CollUtil.isEmpty(sourcePermissions)) {
|
||||
throw new ServiceException("源批次没有权限配置");
|
||||
}
|
||||
|
||||
// 删除目标批次现有权限配置
|
||||
LambdaQueryWrapper<XgBatchPermission> deleteWrapper = Wrappers.lambdaQuery();
|
||||
deleteWrapper.eq(XgBatchPermission::getBatchId, targetBatchId);
|
||||
baseMapper.delete(deleteWrapper);
|
||||
|
||||
// 复制权限配置到目标批次
|
||||
for (XgBatchPermission sourcePermission : sourcePermissions) {
|
||||
XgBatchPermission newPermission = new XgBatchPermission();
|
||||
newPermission.setBatchId(targetBatchId);
|
||||
newPermission.setRoleId(sourcePermission.getRoleId());
|
||||
newPermission.setRoleName(sourcePermission.getRoleName());
|
||||
newPermission.setPermissionType(sourcePermission.getPermissionType());
|
||||
newPermission.setCanView(sourcePermission.getCanView());
|
||||
newPermission.setCanEdit(sourcePermission.getCanEdit());
|
||||
newPermission.setCanSubmit(sourcePermission.getCanSubmit());
|
||||
newPermission.setCanApprove(sourcePermission.getCanApprove());
|
||||
newPermission.setCanReject(sourcePermission.getCanReject());
|
||||
newPermission.setCanWithdraw(sourcePermission.getCanWithdraw());
|
||||
newPermission.setStartTime(sourcePermission.getStartTime());
|
||||
newPermission.setEndTime(sourcePermission.getEndTime());
|
||||
newPermission.setIsActive(sourcePermission.getIsActive());
|
||||
|
||||
baseMapper.insert(newPermission);
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("复制权限配置失败: {}", e.getMessage(), e);
|
||||
throw new ServiceException("复制权限配置失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户在批次中的权限配置
|
||||
*/
|
||||
private XgBatchPermission getUserBatchPermission(Long batchId, Long userId, Set<String> rolePermissions) {
|
||||
// 这里需要根据用户的角色来匹配权限配置
|
||||
// 简化实现,实际应该根据用户的具体角色来查询
|
||||
LambdaQueryWrapper<XgBatchPermission> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBatchPermission::getBatchId, batchId);
|
||||
lqw.eq(XgBatchPermission::getIsActive, 1);
|
||||
|
||||
// 根据用户角色权限匹配权限类型
|
||||
if (rolePermissions.contains("student_affairs_admin")) {
|
||||
lqw.eq(XgBatchPermission::getPermissionType, "ADMIN");
|
||||
} else if (rolePermissions.contains("college_admin")) {
|
||||
lqw.eq(XgBatchPermission::getPermissionType, "COLLEGE_ADMIN");
|
||||
} else if (rolePermissions.contains("counselor")) {
|
||||
lqw.eq(XgBatchPermission::getPermissionType, "COUNSELOR");
|
||||
} else if (rolePermissions.contains("class_teacher")) {
|
||||
lqw.eq(XgBatchPermission::getPermissionType, "CLASS_TEACHER");
|
||||
} else if (rolePermissions.contains("student")) {
|
||||
lqw.eq(XgBatchPermission::getPermissionType, "STUDENT");
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
lqw.orderByDesc(XgBatchPermission::getCreateTime);
|
||||
lqw.last("LIMIT 1");
|
||||
|
||||
return baseMapper.selectOne(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查权限是否在有效期内
|
||||
*/
|
||||
private boolean isPermissionValid(XgBatchPermission permission) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
if (permission.getStartTime() != null && now.isBefore(permission.getStartTime())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (permission.getEndTime() != null && now.isAfter(permission.getEndTime())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Boolean.TRUE.equals(permission.getIsActive());
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否在有效的业务期间内
|
||||
*/
|
||||
private boolean isInValidBusinessPeriod(Long batchId, Set<String> rolePermissions) {
|
||||
try {
|
||||
LambdaQueryWrapper<XgBusinessPeriod> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XgBusinessPeriod::getBatchId, batchId);
|
||||
lqw.eq(XgBusinessPeriod::getIsActive, 1);
|
||||
lqw.le(XgBusinessPeriod::getStartTime, LocalDateTime.now());
|
||||
lqw.ge(XgBusinessPeriod::getEndTime, LocalDateTime.now());
|
||||
|
||||
List<XgBusinessPeriod> validPeriods = businessPeriodMapper.selectList(lqw);
|
||||
|
||||
if (CollUtil.isEmpty(validPeriods)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查是否有适合当前用户角色的业务期间
|
||||
for (XgBusinessPeriod period : validPeriods) {
|
||||
String targetRoles = period.getTargetRoles();
|
||||
if (StringUtils.isBlank(targetRoles)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 检查用户角色是否匹配业务期间的目标角色
|
||||
for (String rolePermission : rolePermissions) {
|
||||
if (targetRoles.contains(rolePermission)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
log.error("检查业务期间失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查权限是否有效
|
||||
*/
|
||||
private Boolean isPermissionActive(XgBatchPermission permission) {
|
||||
return Boolean.TRUE.equals(permission.getIsActive());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取有效权限
|
||||
*/
|
||||
private Boolean getEffectivePermission(Boolean permission) {
|
||||
return permission != null ? permission : Boolean.FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次权限检查结果内部类
|
||||
*/
|
||||
public static class BatchPermissionResult implements IXgBatchPermissionService.BatchPermissionResult {
|
||||
private Long batchId;
|
||||
private Long userId;
|
||||
private boolean hasPermission = false;
|
||||
private String permissionType;
|
||||
private boolean canView = false;
|
||||
private boolean canEdit = false;
|
||||
private boolean canSubmit = false;
|
||||
private boolean canApprove = false;
|
||||
private boolean canReject = false;
|
||||
private boolean canWithdraw = false;
|
||||
private String message;
|
||||
|
||||
// Getters and Setters
|
||||
@Override
|
||||
public Long getBatchId() { return batchId; }
|
||||
public void setBatchId(Long batchId) { this.batchId = batchId; }
|
||||
|
||||
@Override
|
||||
public Long getUserId() { return userId; }
|
||||
public void setUserId(Long userId) { this.userId = userId; }
|
||||
|
||||
@Override
|
||||
public boolean isHasPermission() { return hasPermission; }
|
||||
public void setHasPermission(boolean hasPermission) { this.hasPermission = hasPermission; }
|
||||
|
||||
@Override
|
||||
public String getPermissionType() { return permissionType; }
|
||||
public void setPermissionType(String permissionType) { this.permissionType = permissionType; }
|
||||
|
||||
@Override
|
||||
public boolean isCanView() { return canView; }
|
||||
public void setCanView(boolean canView) { this.canView = canView; }
|
||||
|
||||
@Override
|
||||
public boolean isCanEdit() { return canEdit; }
|
||||
public void setCanEdit(boolean canEdit) { this.canEdit = canEdit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanSubmit() { return canSubmit; }
|
||||
public void setCanSubmit(boolean canSubmit) { this.canSubmit = canSubmit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanApprove() { return canApprove; }
|
||||
public void setCanApprove(boolean canApprove) { this.canApprove = canApprove; }
|
||||
|
||||
@Override
|
||||
public boolean isCanReject() { return canReject; }
|
||||
public void setCanReject(boolean canReject) { this.canReject = canReject; }
|
||||
|
||||
@Override
|
||||
public boolean isCanWithdraw() { return canWithdraw; }
|
||||
public void setCanWithdraw(boolean canWithdraw) { this.canWithdraw = canWithdraw; }
|
||||
|
||||
@Override
|
||||
public String getMessage() { return message; }
|
||||
public void setMessage(String message) { this.message = message; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 批次权限配置内部类
|
||||
*/
|
||||
public static class BatchPermissionConfig implements IXgBatchPermissionService.BatchPermissionConfig {
|
||||
private Long roleId;
|
||||
private String roleName;
|
||||
private String permissionType;
|
||||
private boolean canView = false;
|
||||
private boolean canEdit = false;
|
||||
private boolean canSubmit = false;
|
||||
private boolean canApprove = false;
|
||||
private boolean canReject = false;
|
||||
private boolean canWithdraw = false;
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
private boolean active = true;
|
||||
|
||||
// Getters and Setters
|
||||
@Override
|
||||
public Long getRoleId() { return roleId; }
|
||||
public void setRoleId(Long roleId) { this.roleId = roleId; }
|
||||
|
||||
@Override
|
||||
public String getRoleName() { return roleName; }
|
||||
public void setRoleName(String roleName) { this.roleName = roleName; }
|
||||
|
||||
@Override
|
||||
public String getPermissionType() { return permissionType; }
|
||||
public void setPermissionType(String permissionType) { this.permissionType = permissionType; }
|
||||
|
||||
@Override
|
||||
public boolean isCanView() { return canView; }
|
||||
public void setCanView(boolean canView) { this.canView = canView; }
|
||||
|
||||
@Override
|
||||
public boolean isCanEdit() { return canEdit; }
|
||||
public void setCanEdit(boolean canEdit) { this.canEdit = canEdit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanSubmit() { return canSubmit; }
|
||||
public void setCanSubmit(boolean canSubmit) { this.canSubmit = canSubmit; }
|
||||
|
||||
@Override
|
||||
public boolean isCanApprove() { return canApprove; }
|
||||
public void setCanApprove(boolean canApprove) { this.canApprove = canApprove; }
|
||||
|
||||
@Override
|
||||
public boolean isCanReject() { return canReject; }
|
||||
public void setCanReject(boolean canReject) { this.canReject = canReject; }
|
||||
|
||||
@Override
|
||||
public boolean isCanWithdraw() { return canWithdraw; }
|
||||
public void setCanWithdraw(boolean canWithdraw) { this.canWithdraw = canWithdraw; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getStartTime() { return startTime; }
|
||||
public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
|
||||
|
||||
@Override
|
||||
public LocalDateTime getEndTime() { return endTime; }
|
||||
public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
|
||||
|
||||
@Override
|
||||
public boolean isActive() { return active; }
|
||||
public void setActive(boolean active) { this.active = active; }
|
||||
}
|
||||
}
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
package org.dromara.xg.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xg.domain.XgBusinessPeriod;
|
||||
import org.dromara.xg.domain.bo.XgBusinessPeriodBo;
|
||||
import org.dromara.xg.domain.vo.XgBusinessPeriodVo;
|
||||
import org.dromara.xg.mapper.XgBusinessPeriodMapper;
|
||||
import org.dromara.xg.service.IXgBusinessPeriodService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务期管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XgBusinessPeriodServiceImpl implements IXgBusinessPeriodService {
|
||||
|
||||
private final XgBusinessPeriodMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询业务期管理
|
||||
*/
|
||||
@Override
|
||||
public XgBusinessPeriodVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务期管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XgBusinessPeriodVo> queryPageList(XgBusinessPeriodBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XgBusinessPeriod> lqw = buildQueryWrapper(bo);
|
||||
Page<XgBusinessPeriodVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务期管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgBusinessPeriodVo> queryList(XgBusinessPeriodBo bo) {
|
||||
LambdaQueryWrapper<XgBusinessPeriod> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XgBusinessPeriod> buildQueryWrapper(XgBusinessPeriodBo bo) {
|
||||
LambdaQueryWrapper<XgBusinessPeriod> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(ObjectUtil.isNotNull(bo.getBatchId()), XgBusinessPeriod::getBatchId, bo.getBatchId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPeriodName()), XgBusinessPeriod::getPeriodName, bo.getPeriodName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPeriodType()), XgBusinessPeriod::getPeriodType, bo.getPeriodType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTargetRole()), XgBusinessPeriod::getTargetRole, bo.getTargetRole());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XgBusinessPeriod::getStatus, bo.getStatus());
|
||||
lqw.ge(ObjectUtil.isNotNull(bo.getStartTime()), XgBusinessPeriod::getStartTime, bo.getStartTime());
|
||||
lqw.le(ObjectUtil.isNotNull(bo.getEndTime()), XgBusinessPeriod::getEndTime, bo.getEndTime());
|
||||
lqw.orderByDesc(XgBusinessPeriod::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务期管理
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(XgBusinessPeriodBo bo) {
|
||||
// 校验时间冲突
|
||||
if (checkPeriodTimeConflict(bo)) {
|
||||
throw new ServiceException("业务期间时间冲突,请重新选择时间范围");
|
||||
}
|
||||
|
||||
XgBusinessPeriod add = BeanUtil.toBean(bo, XgBusinessPeriod.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 设置创建信息
|
||||
add.setCreateBy(LoginHelper.getUserId());
|
||||
add.setCreateTime(LocalDateTime.now());
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
log.info("新增业务期成功,ID: {}, 名称: {}", add.getId(), add.getPeriodName());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务期管理
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(XgBusinessPeriodBo bo) {
|
||||
// 校验时间冲突(排除自己)
|
||||
if (checkPeriodTimeConflictExcludeSelf(bo)) {
|
||||
throw new ServiceException("业务期间时间冲突,请重新选择时间范围");
|
||||
}
|
||||
|
||||
XgBusinessPeriod update = BeanUtil.toBean(bo, XgBusinessPeriod.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
// 设置更新信息
|
||||
update.setUpdateBy(LoginHelper.getUserId());
|
||||
update.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
boolean flag = baseMapper.updateById(update) > 0;
|
||||
if (flag) {
|
||||
log.info("修改业务期成功,ID: {}, 名称: {}", update.getId(), update.getPeriodName());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XgBusinessPeriod entity) {
|
||||
if (ObjectUtil.isNull(entity.getBatchId())) {
|
||||
throw new ServiceException("批次ID不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getPeriodName())) {
|
||||
throw new ServiceException("业务期名称不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getPeriodType())) {
|
||||
throw new ServiceException("业务期类型不能为空");
|
||||
}
|
||||
if (ObjectUtil.isNull(entity.getStartTime()) || ObjectUtil.isNull(entity.getEndTime())) {
|
||||
throw new ServiceException("开始时间和结束时间不能为空");
|
||||
}
|
||||
if (entity.getStartTime().isAfter(entity.getEndTime())) {
|
||||
throw new ServiceException("开始时间不能晚于结束时间");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务期管理
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids) {
|
||||
if (ObjectUtil.isEmpty(ids)) {
|
||||
throw new ServiceException("删除的业务期ID不能为空");
|
||||
}
|
||||
|
||||
// 检查是否有正在使用的业务期
|
||||
List<XgBusinessPeriod> periods = baseMapper.selectBatchIds(ids);
|
||||
for (XgBusinessPeriod period : periods) {
|
||||
if ("ACTIVE".equals(period.getStatus())) {
|
||||
throw new ServiceException("不能删除状态为活跃的业务期:" + period.getPeriodName());
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = baseMapper.deleteBatchIds(ids) > 0;
|
||||
if (flag) {
|
||||
log.info("批量删除业务期成功,删除数量: {}", ids.size());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据批次ID查询业务期列表
|
||||
*/
|
||||
@Override
|
||||
public List<XgBusinessPeriodVo> queryByBatchId(Long batchId) {
|
||||
if (ObjectUtil.isNull(batchId)) {
|
||||
throw new ServiceException("批次ID不能为空");
|
||||
}
|
||||
return baseMapper.selectByBatchId(batchId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前活跃的业务期
|
||||
*/
|
||||
@Override
|
||||
public List<XgBusinessPeriodVo> queryActivePeriods() {
|
||||
return baseMapper.selectActivePeriods();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查业务期是否开放
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkPeriodOpen(Long batchId) {
|
||||
if (ObjectUtil.isNull(batchId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<XgBusinessPeriodVo> activePeriods = baseMapper.selectActivePeriodsByBatchId(batchId);
|
||||
if (ObjectUtil.isEmpty(activePeriods)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
return activePeriods.stream().anyMatch(period ->
|
||||
"ACTIVE".equals(period.getStatus()) &&
|
||||
now.isAfter(period.getStartTime()) &&
|
||||
now.isBefore(period.getEndTime())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启业务期
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean openPeriod(Long id) {
|
||||
if (ObjectUtil.isNull(id)) {
|
||||
throw new ServiceException("业务期ID不能为空");
|
||||
}
|
||||
|
||||
XgBusinessPeriod period = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNull(period)) {
|
||||
throw new ServiceException("业务期不存在");
|
||||
}
|
||||
|
||||
if ("ACTIVE".equals(period.getStatus())) {
|
||||
throw new ServiceException("业务期已经是开启状态");
|
||||
}
|
||||
|
||||
// 检查时间是否合理
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
if (now.isAfter(period.getEndTime())) {
|
||||
throw new ServiceException("业务期已过期,无法开启");
|
||||
}
|
||||
|
||||
period.setStatus("ACTIVE");
|
||||
period.setUpdateBy(LoginHelper.getUserId());
|
||||
period.setUpdateTime(now);
|
||||
|
||||
boolean flag = baseMapper.updateById(period) > 0;
|
||||
if (flag) {
|
||||
log.info("开启业务期成功,ID: {}, 名称: {}", id, period.getPeriodName());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭业务期
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean closePeriod(Long id) {
|
||||
if (ObjectUtil.isNull(id)) {
|
||||
throw new ServiceException("业务期ID不能为空");
|
||||
}
|
||||
|
||||
XgBusinessPeriod period = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNull(period)) {
|
||||
throw new ServiceException("业务期不存在");
|
||||
}
|
||||
|
||||
if ("CLOSED".equals(period.getStatus())) {
|
||||
throw new ServiceException("业务期已经是关闭状态");
|
||||
}
|
||||
|
||||
period.setStatus("CLOSED");
|
||||
period.setUpdateBy(LoginHelper.getUserId());
|
||||
period.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
boolean flag = baseMapper.updateById(period) > 0;
|
||||
if (flag) {
|
||||
log.info("关闭业务期成功,ID: {}, 名称: {}", id, period.getPeriodName());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验业务期时间是否冲突
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkPeriodTimeConflict(XgBusinessPeriodBo bo) {
|
||||
if (ObjectUtil.isNull(bo.getBatchId()) || ObjectUtil.isNull(bo.getStartTime()) || ObjectUtil.isNull(bo.getEndTime())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return baseMapper.checkTimeConflict(bo.getBatchId(), bo.getStartTime(), bo.getEndTime()) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验业务期时间是否冲突(排除自己)
|
||||
*/
|
||||
private Boolean checkPeriodTimeConflictExcludeSelf(XgBusinessPeriodBo bo) {
|
||||
if (ObjectUtil.isNull(bo.getBatchId()) || ObjectUtil.isNull(bo.getStartTime()) || ObjectUtil.isNull(bo.getEndTime())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return baseMapper.checkTimeConflictExcludeSelf(bo.getBatchId(), bo.getId(), bo.getStartTime(), bo.getEndTime()) > 0;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 237 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user