From ba52f7983ff22d6f68557e85760a8f761e0ccaed Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Tue, 12 Aug 2025 18:09:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=80=81=E7=89=88=E7=9A=84?= =?UTF-8?q?=E5=AD=A6=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 4 +- backend/ruoyi-admin/pom.xml | 4 +- backend/ruoyi-modules/pom.xml | 2 +- backend/ruoyi-modules/ruoyi-xg-xx/pom.xml | 110 -- .../xg/controller/XgClassInfoController.java | 268 ---- .../XgClassTeacherRelationController.java | 103 -- .../XgCollectionBatchController.java | 304 ---- .../XgStatisticsAnalysisController.java | 450 ------ .../XgStatisticsConfigController.java | 270 ---- .../controller/XgStudentInfoController.java | 492 ------- .../xg/domain/XgBatchScheduledTask.java | 68 - .../org/dromara/xg/domain/XgClassInfo.java | 346 ----- .../xg/domain/XgClassTeacherRelation.java | 81 -- .../dromara/xg/domain/XgCollectionBatch.java | 187 --- .../xg/domain/XgCollectionBatchLog.java | 95 -- .../domain/XgCollectionBatchPermission.java | 84 -- .../domain/XgCollectionBatchStatistics.java | 108 -- .../xg/domain/XgCollectionBatchStudent.java | 124 -- .../dromara/xg/domain/XgDataPermission.java | 114 -- .../dromara/xg/domain/XgStatisticsCache.java | 110 -- .../dromara/xg/domain/XgStatisticsConfig.java | 112 -- .../org/dromara/xg/domain/XgStudentInfo.java | 471 ------ .../xg/domain/XgStudentInfoSimple.java | 274 ---- .../xg/domain/bo/XgBatchScheduledTaskBo.java | 207 --- .../dromara/xg/domain/bo/XgClassInfoBo.java | 378 ----- .../domain/bo/XgClassTeacherRelationBo.java | 112 -- .../xg/domain/bo/XgCollectionBatchBo.java | 280 ---- .../xg/domain/bo/XgCollectionBatchLogBo.java | 150 -- .../bo/XgCollectionBatchPermissionBo.java | 173 --- .../bo/XgCollectionBatchStatisticsBo.java | 182 --- .../domain/bo/XgCollectionBatchStudentBo.java | 210 --- .../xg/domain/bo/XgStatisticsConfigBo.java | 121 -- .../xg/domain/bo/XgStatisticsQueryBo.java | 145 -- .../dromara/xg/domain/bo/XgStudentInfoBo.java | 645 --------- .../xg/domain/vo/XgBatchScheduledTaskVo.java | 230 --- .../dromara/xg/domain/vo/XgClassInfoVo.java | 355 ----- .../domain/vo/XgClassTeacherRelationVo.java | 117 -- .../xg/domain/vo/XgCollectionBatchLogVo.java | 171 --- .../vo/XgCollectionBatchPermissionVo.java | 180 --- .../vo/XgCollectionBatchStatisticsVo.java | 201 --- .../domain/vo/XgCollectionBatchStudentVo.java | 156 -- .../xg/domain/vo/XgCollectionBatchVo.java | 234 --- .../xg/domain/vo/XgStatisticsConfigVo.java | 130 -- .../xg/domain/vo/XgStatisticsResultVo.java | 84 -- .../dromara/xg/domain/vo/XgStudentInfoVo.java | 662 --------- .../xg/mapper/XgBatchScheduledTaskMapper.java | 278 ---- .../dromara/xg/mapper/XgClassInfoMapper.java | 106 -- .../mapper/XgClassTeacherRelationMapper.java | 33 - .../xg/mapper/XgCollectionBatchLogMapper.java | 225 --- .../xg/mapper/XgCollectionBatchMapper.java | 184 --- .../XgCollectionBatchPermissionMapper.java | 281 ---- .../XgCollectionBatchStatisticsMapper.java | 301 ---- .../XgCollectionBatchStudentMapper.java | 235 --- .../xg/mapper/XgStatisticsAnalysisMapper.java | 249 ---- .../xg/mapper/XgStatisticsConfigMapper.java | 94 -- .../xg/mapper/XgStudentInfoMapper.java | 202 --- .../dromara/xg/mapper/XgSysUserMapper.java | 26 - .../service/IXgBatchScheduledTaskService.java | 109 -- .../xg/service/IXgClassInfoService.java | 204 --- .../IXgClassTeacherRelationService.java | 95 -- .../service/IXgCollectionBatchLogService.java | 115 -- .../IXgCollectionBatchPermissionService.java | 83 -- .../xg/service/IXgCollectionBatchService.java | 159 -- .../IXgCollectionBatchStatisticsService.java | 94 -- .../IXgCollectionBatchStudentService.java | 149 -- .../service/IXgStatisticsAnalysisService.java | 201 --- .../xg/service/IXgStatisticsCacheService.java | 117 -- .../service/IXgStatisticsConfigService.java | 118 -- .../service/IXgStatisticsExportService.java | 78 - .../xg/service/IXgStudentInfoService.java | 328 ----- .../service/impl/XgClassInfoServiceImpl.java | 606 -------- .../XgClassTeacherRelationServiceImpl.java | 186 --- .../impl/XgCollectionBatchServiceImpl.java | 239 --- .../impl/XgStatisticsAnalysisServiceImpl.java | 1068 -------------- .../impl/XgStatisticsCacheServiceImpl.java | 362 ----- .../impl/XgStatisticsConfigServiceImpl.java | 283 ---- .../impl/XgStatisticsExportServiceImpl.java | 348 ----- .../impl/XgStudentInfoServiceImpl.java | 800 ---------- .../resources/mapper/xg/XgClassInfoMapper.xml | 239 --- .../xg/XgClassTeacherRelationMapper.xml | 121 -- .../mapper/xg/XgCollectionBatchLogMapper.xml | 84 -- .../mapper/xg/XgCollectionBatchMapper.xml | 297 ---- .../xg/XgCollectionBatchStudentMapper.xml | 241 --- .../mapper/xg/XgStatisticsAnalysisMapper.xml | 647 --------- .../mapper/xg/XgStatisticsConfigMapper.xml | 257 ---- .../mapper/xg/XgStudentInfoMapper.xml | 468 ------ .../resources/mapper/xg/XgSysUserMapper.xml | 41 - docs/开发文档/API/学工管理学生信息管理API.md | 1049 -------------- web/src/api/xg-xx-bak/classInfo.ts | 316 ---- web/src/api/xg-xx-bak/classInfo/types.ts | 786 ---------- web/src/api/xg-xx-bak/collectionBatch.ts | 283 ---- web/src/api/xg-xx-bak/statistics.ts | 501 ------- web/src/api/xg-xx-bak/student.ts | 454 ------ web/src/api/xg-xx-bak/types.ts | 675 --------- web/src/views/xg-xx-bak/classInfo/README.md | 246 ---- web/src/views/xg-xx-bak/classInfo/index.vue | 1288 ----------------- .../views/xg-xx-bak/collectionBatch/README.md | 307 ---- .../components/BatchActions.vue | 85 -- .../components/BatchStatusTag.vue | 75 - .../components/BatchTypeTag.vue | 65 - .../components/ProgressBar.vue | 75 - .../collectionBatch/components/SearchForm.vue | 125 -- .../xg-xx-bak/collectionBatch/detail.vue | 563 ------- .../views/xg-xx-bak/collectionBatch/form.vue | 478 ------ .../views/xg-xx-bak/collectionBatch/index.vue | 980 ------------- .../xg-xx-bak/collectionBatch/permission.vue | 542 ------- .../views/xg-xx-bak/collectionBatch/route.ts | 72 - .../xg-xx-bak/collectionBatch/statistics.vue | 719 --------- .../views/xg-xx-bak/collectionBatch/test.vue | 458 ------ .../components/CacheManageDialog.vue | 526 ------- .../components/ConfigDetailDialog.vue | 272 ---- .../components/ConfigEditDialog.vue | 310 ---- .../components/ConfigManageDialog.vue | 493 ------- .../statistics/components/ExportDialog.vue | 271 ---- .../statistics/components/StatisticsChart.vue | 521 ------- web/src/views/xg-xx-bak/statistics/index.vue | 676 --------- .../studentInfo/components/AuditDialog.vue | 449 ------ .../components/BatchOperationDialog.vue | 678 --------- .../studentInfo/components/ImportDialog.vue | 529 ------- .../components/StatisticsChartDialog.vue | 613 -------- .../components/StudentDetailDialog.vue | 756 ---------- .../components/StudentEditDialog.vue | 1249 ---------------- web/src/views/xg-xx-bak/studentInfo/index.vue | 962 ------------ 123 files changed, 5 insertions(+), 38097 deletions(-) delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/pom.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassInfoController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassTeacherRelationController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgCollectionBatchController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsAnalysisController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsConfigController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStudentInfoController.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgBatchScheduledTask.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassInfo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassTeacherRelation.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatch.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchLog.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchPermission.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStatistics.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStudent.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgDataPermission.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsCache.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsConfig.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfoSimple.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgBatchScheduledTaskBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassInfoBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassTeacherRelationBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchLogBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchPermissionBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStatisticsBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStudentBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsConfigBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsQueryBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStudentInfoBo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgBatchScheduledTaskVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassInfoVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassTeacherRelationVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchLogVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchPermissionVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStatisticsVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStudentVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsConfigVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsResultVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStudentInfoVo.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgBatchScheduledTaskMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassInfoMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassTeacherRelationMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchLogMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchPermissionMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStatisticsMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStudentMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsAnalysisMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsConfigMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStudentInfoMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgSysUserMapper.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgBatchScheduledTaskService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassInfoService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassTeacherRelationService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchLogService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchPermissionService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStatisticsService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStudentService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsAnalysisService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsCacheService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsConfigService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsExportService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStudentInfoService.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassInfoServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassTeacherRelationServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgCollectionBatchServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsAnalysisServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsCacheServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsConfigServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsExportServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStudentInfoServiceImpl.java delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassInfoMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassTeacherRelationMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchLogMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchStudentMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsAnalysisMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsConfigMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStudentInfoMapper.xml delete mode 100644 backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgSysUserMapper.xml delete mode 100644 docs/开发文档/API/学工管理学生信息管理API.md delete mode 100644 web/src/api/xg-xx-bak/classInfo.ts delete mode 100644 web/src/api/xg-xx-bak/classInfo/types.ts delete mode 100644 web/src/api/xg-xx-bak/collectionBatch.ts delete mode 100644 web/src/api/xg-xx-bak/statistics.ts delete mode 100644 web/src/api/xg-xx-bak/student.ts delete mode 100644 web/src/api/xg-xx-bak/types.ts delete mode 100644 web/src/views/xg-xx-bak/classInfo/README.md delete mode 100644 web/src/views/xg-xx-bak/classInfo/index.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/README.md delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/components/BatchActions.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/components/BatchStatusTag.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/components/BatchTypeTag.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/components/ProgressBar.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/components/SearchForm.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/detail.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/form.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/index.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/permission.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/route.ts delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/statistics.vue delete mode 100644 web/src/views/xg-xx-bak/collectionBatch/test.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/CacheManageDialog.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/ConfigDetailDialog.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/ConfigEditDialog.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/ConfigManageDialog.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/ExportDialog.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/components/StatisticsChart.vue delete mode 100644 web/src/views/xg-xx-bak/statistics/index.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/AuditDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/BatchOperationDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/ImportDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/StatisticsChartDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/StudentDetailDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/components/StudentEditDialog.vue delete mode 100644 web/src/views/xg-xx-bak/studentInfo/index.vue diff --git a/backend/pom.xml b/backend/pom.xml index 12f15997..950c890a 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -383,11 +383,11 @@ ${revision} - + org.dromara diff --git a/backend/ruoyi-admin/pom.xml b/backend/ruoyi-admin/pom.xml index 4e1232c7..9ada45ca 100644 --- a/backend/ruoyi-admin/pom.xml +++ b/backend/ruoyi-admin/pom.xml @@ -113,11 +113,11 @@ ruoyi-xg - + org.dromara diff --git a/backend/ruoyi-modules/pom.xml b/backend/ruoyi-modules/pom.xml index 250f5bfd..2983d764 100644 --- a/backend/ruoyi-modules/pom.xml +++ b/backend/ruoyi-modules/pom.xml @@ -15,7 +15,7 @@ ruoyi-demo ruoyi-workflow ruoyi-xg - ruoyi-xg-xx + ruoyi-zsjy ruoyi-hq ruoyi-aqbw diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/pom.xml b/backend/ruoyi-modules/ruoyi-xg-xx/pom.xml deleted file mode 100644 index 2c200789..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - ruoyi-modules - org.dromara - ${revision} - - 4.0.0 - - ruoyi-xg-xx - - 学工管理信息系统模块 - - - - - - - org.dromara - ruoyi-common-core - - - - org.dromara - ruoyi-common-doc - - - - org.dromara - ruoyi-common-mybatis - - - - org.dromara - ruoyi-common-log - - - - org.dromara - ruoyi-common-security - - - - org.dromara - ruoyi-common-web - - - - org.dromara - ruoyi-common-excel - - - - org.dromara - ruoyi-common-idempotent - - - - org.dromara - ruoyi-common-tenant - - - - org.dromara - ruoyi-common-social - - - - org.dromara - ruoyi-common-ratelimiter - - - - org.dromara - ruoyi-common-mail - - - - org.dromara - ruoyi-system - - - - org.dromara - ruoyi-job - - - - - org.dromara - ruoyi-generator - - - - - org.dromara - ruoyi-demo - - - - - org.dromara - ruoyi-workflow - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassInfoController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassInfoController.java deleted file mode 100644 index bb65d4d8..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassInfoController.java +++ /dev/null @@ -1,268 +0,0 @@ -package org.dromara.xg.controller; - -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import java.util.HashMap; - -import lombok.RequiredArgsConstructor; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.*; -import cn.dev33.satoken.annotation.SaCheckPermission; -import org.springframework.web.bind.annotation.*; -import org.springframework.validation.annotation.Validated; -import org.dromara.common.idempotent.annotation.RepeatSubmit; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.web.core.BaseController; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.excel.utils.ExcelUtil; -import org.dromara.xg.domain.vo.XgClassInfoVo; -import org.dromara.xg.domain.bo.XgClassInfoBo; -import org.dromara.xg.service.IXgClassInfoService; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.system.domain.vo.SysUserVo; - -/** - * 班级信息管理 - * - * @author Cursor AI - * @date 2025-01-21 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/classInfo") -public class XgClassInfoController extends BaseController { - - private final IXgClassInfoService xgClassInfoService; - - /** - * 查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:list") - @GetMapping("/list") - public TableDataInfo list(XgClassInfoBo bo, PageQuery pageQuery) { - return xgClassInfoService.queryPageList(bo, pageQuery); - } - - /** - * 导出班级信息列表 - */ - @SaCheckPermission("xg:classInfo:export") - @Log(title = "班级信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(XgClassInfoBo bo, HttpServletResponse response) { - List list = xgClassInfoService.queryList(bo); - ExcelUtil.exportExcel(list, "班级信息", XgClassInfoVo.class, response); - } - - /** - * 获取班级信息详细信息 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/{id}") - public R getInfo(@NotNull(message = "主键不能为空") - @PathVariable Long id) { - return R.ok(xgClassInfoService.queryById(id)); - } - - /** - * 新增班级信息 - */ - @SaCheckPermission("xg:classInfo:add") - @Log(title = "班级信息", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody XgClassInfoBo bo) { - return toAjax(xgClassInfoService.insertByBo(bo)); - } - - /** - * 修改班级信息 - */ - @SaCheckPermission("xg:classInfo:edit") - @Log(title = "班级信息", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R edit(@Validated(EditGroup.class) @RequestBody XgClassInfoBo bo) { - return toAjax(xgClassInfoService.updateByBo(bo)); - } - - /** - * 删除班级信息 - */ - @SaCheckPermission("xg:classInfo:remove") - @Log(title = "班级信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R remove(@NotEmpty(message = "主键不能为空") - @PathVariable Long[] ids) { - return toAjax(xgClassInfoService.deleteWithValidByIds(List.of(ids), true)); - } - - /** - * 根据班级代码查询班级信息 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByClassCode/{classCode}") - public R getByClassCode(@NotBlank(message = "班级代码不能为空") - @PathVariable String classCode) { - return R.ok(xgClassInfoService.queryByClassCode(classCode)); - } - - /** - * 根据年级查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByGrade/{grade}") - public R> getByGrade(@NotBlank(message = "年级不能为空") - @PathVariable String grade) { - return R.ok(xgClassInfoService.queryByGrade(grade)); - } - - /** - * 根据学院代码查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByCollegeCode/{collegeCode}") - public R> getByCollegeCode(@NotBlank(message = "学院代码不能为空") - @PathVariable String collegeCode) { - return R.ok(xgClassInfoService.queryByCollegeCode(collegeCode)); - } - - /** - * 根据专业代码查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByMajorCode/{majorCode}") - public R> getByMajorCode(@NotBlank(message = "专业代码不能为空") - @PathVariable String majorCode) { - return R.ok(xgClassInfoService.queryByMajorCode(majorCode)); - } - - /** - * 根据辅导员ID查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByCounselorId/{counselorId}") - public R> getByCounselorId(@NotNull(message = "辅导员ID不能为空") - @PathVariable Long counselorId) { - return R.ok(xgClassInfoService.queryByCounselorId(counselorId)); - } - - /** - * 根据班主任ID查询班级信息列表 - */ - @SaCheckPermission("xg:classInfo:query") - @GetMapping("/getByClassTeacherId/{classTeacherId}") - public R> getByClassTeacherId(@NotNull(message = "班主任ID不能为空") - @PathVariable Long classTeacherId) { - return R.ok(xgClassInfoService.queryByClassTeacherId(classTeacherId)); - } - - /** - * 获取班级可用选项列表(用于下拉框) - */ - @SaCheckPermission("xg:class:list") - @GetMapping("/options") - public R> getOptions() { - return R.ok(xgClassInfoService.getClassOptions()); - } - - /** - * 获取班主任用户列表(用于下拉框) - */ - @SaCheckPermission("xg:class:list") - @GetMapping("/teacherOptions") - public R>> getTeacherOptions() { - List userList = xgClassInfoService.getClassTeacherOptions(); - - // 将SysUserVo对象转换为前端需要的格式:{value: userId, label: nickName} - List> options = new ArrayList<>(); - if (userList != null && !userList.isEmpty()) { - for (SysUserVo user : userList) { - Map option = new HashMap<>(); - option.put("value", user.getUserId()); - option.put("label", user.getNickName()); - options.add(option); - } - } - - return R.ok(options); - } - - /** - * 启用班级 - */ - @SaCheckPermission("xg:classInfo:edit") - @Log(title = "班级信息", businessType = BusinessType.UPDATE) - @PostMapping("/enable/{id}") - public R enable(@NotNull(message = "班级ID不能为空") - @PathVariable Long id) { - return toAjax(xgClassInfoService.enableClass(id)); - } - - /** - * 禁用班级 - */ - @SaCheckPermission("xg:classInfo:edit") - @Log(title = "班级信息", businessType = BusinessType.UPDATE) - @PostMapping("/disable/{id}") - public R disable(@NotNull(message = "班级ID不能为空") - @PathVariable Long id) { - return toAjax(xgClassInfoService.disableClass(id)); - } - - // ================================ - // 统计数据接口 - 新增 - // ================================ - - /** - * 获取班级信息统计概览 - */ - @SaCheckPermission("xg:classInfo:statistics") - @GetMapping("/statistics") - public R> getStatistics() { - return R.ok(xgClassInfoService.getStatistics()); - } - - /** - * 统计各学院班级数量 - */ - @SaCheckPermission("xg:classInfo:statistics") - @GetMapping("/statistics/college") - public R>> countByCollege() { - return R.ok(xgClassInfoService.countByCollege()); - } - - /** - * 统计各年级班级数量 - */ - @SaCheckPermission("xg:classInfo:statistics") - @GetMapping("/statistics/grade") - public R>> countByGrade() { - return R.ok(xgClassInfoService.countByGrade()); - } - - /** - * 统计各专业班级数量 - */ - @SaCheckPermission("xg:classInfo:statistics") - @GetMapping("/statistics/major") - public R>> countByMajor() { - return R.ok(xgClassInfoService.countByMajor()); - } - - /** - * 统计班级状态分布 - */ - @SaCheckPermission("xg:classInfo:statistics") - @GetMapping("/statistics/status") - public R>> countByStatus() { - return R.ok(xgClassInfoService.countByStatus()); - } - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassTeacherRelationController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassTeacherRelationController.java deleted file mode 100644 index 8d20902c..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgClassTeacherRelationController.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.dromara.xg.controller; - -import java.util.List; - -import lombok.RequiredArgsConstructor; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.*; -import cn.dev33.satoken.annotation.SaCheckPermission; -import org.springframework.web.bind.annotation.*; -import org.springframework.validation.annotation.Validated; -import org.dromara.common.idempotent.annotation.RepeatSubmit; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.web.core.BaseController; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import org.dromara.common.excel.utils.ExcelUtil; -import org.dromara.xg.domain.vo.XgClassTeacherRelationVo; -import org.dromara.xg.domain.bo.XgClassTeacherRelationBo; -import org.dromara.xg.service.IXgClassTeacherRelationService; -import org.dromara.common.mybatis.core.page.TableDataInfo; - -/** - * 班级班主任关系Controller - * - * @author Cursor AI - * @date 2025-07-22 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/classTeacherRelation") -public class XgClassTeacherRelationController extends BaseController { - - private final IXgClassTeacherRelationService classTeacherRelationService; - - /** - * 查询班级班主任关系列表 - */ - @SaCheckPermission("xg:classTeacherRelation:list") - @GetMapping("/list") - public TableDataInfo list(XgClassTeacherRelationBo bo, PageQuery pageQuery) { - return classTeacherRelationService.queryPageList(bo, pageQuery); - } - - /** - * 导出班级班主任关系列表 - */ - @SaCheckPermission("xg:classTeacherRelation:export") - @Log(title = "班级班主任关系", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(XgClassTeacherRelationBo bo, HttpServletResponse response) { - List list = classTeacherRelationService.queryList(bo); - ExcelUtil.exportExcel(list, "班级班主任关系", XgClassTeacherRelationVo.class, response); - } - - /** - * 获取班级班主任关系详细信息 - * - * @param id 主键 - */ - @SaCheckPermission("xg:classTeacherRelation:query") - @GetMapping("/{id}") - public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { - return R.ok(classTeacherRelationService.queryById(id)); - } - - /** - * 新增班级班主任关系 - */ - @SaCheckPermission("xg:classTeacherRelation:add") - @Log(title = "班级班主任关系", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody XgClassTeacherRelationBo bo) { - return toAjax(classTeacherRelationService.insertByBo(bo)); - } - - /** - * 修改班级班主任关系 - */ - @SaCheckPermission("xg:classTeacherRelation:edit") - @Log(title = "班级班主任关系", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R edit(@Validated(EditGroup.class) @RequestBody XgClassTeacherRelationBo bo) { - return toAjax(classTeacherRelationService.updateByBo(bo)); - } - - /** - * 删除班级班主任关系 - * - * @param ids 主键串 - */ - @SaCheckPermission("xg:classTeacherRelation:remove") - @Log(title = "班级班主任关系", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) { - return toAjax(classTeacherRelationService.deleteWithValidByIds(List.of(ids), true)); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgCollectionBatchController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgCollectionBatchController.java deleted file mode 100644 index da41801c..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgCollectionBatchController.java +++ /dev/null @@ -1,304 +0,0 @@ -package org.dromara.xg.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.util.ObjectUtil; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import org.dromara.common.excel.core.ExcelResult; -import org.dromara.common.excel.utils.ExcelUtil; -import org.dromara.common.idempotent.annotation.RepeatSubmit; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.web.core.BaseController; -import org.dromara.xg.domain.bo.XgCollectionBatchBo; -import org.dromara.xg.domain.vo.XgCollectionBatchVo; -import org.dromara.xg.service.IXgCollectionBatchService; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次Controller - * - * @author hzdyjs - * @date 2025-01-17 - */ -@Slf4j -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/collectionBatch") -public class XgCollectionBatchController extends BaseController { - - private final IXgCollectionBatchService collectionBatchService; - - /** - * 查询信息采集批次列表 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/list") - public TableDataInfo list(XgCollectionBatchBo bo, PageQuery pageQuery) { - return collectionBatchService.queryPageList(bo, pageQuery); - } - - /** - * 导出信息采集批次列表 - */ - @SaCheckPermission("xg:collectionBatch:export") - @Log(title = "信息采集批次", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(XgCollectionBatchBo bo, HttpServletResponse response) { - List list = collectionBatchService.exportBatchData(bo); - ExcelUtil.exportExcel(list, "信息采集批次", XgCollectionBatchVo.class, response); - } - - /** - * 获取信息采集批次详细信息 - */ - @SaCheckPermission("xg:collectionBatch:query") - @GetMapping("/{batchId}") - public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long batchId) { - return R.ok(collectionBatchService.queryById(batchId)); - } - - /** - * 新增信息采集批次 - */ - @SaCheckPermission("xg:collectionBatch:add") - @Log(title = "信息采集批次", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R 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 edit(@Validated(EditGroup.class) @RequestBody XgCollectionBatchBo bo) { - return toAjax(collectionBatchService.updateByBo(bo)); - } - - /** - * 删除信息采集批次 - */ - @SaCheckPermission("xg:collectionBatch:remove") - @Log(title = "信息采集批次", businessType = BusinessType.DELETE) - @DeleteMapping("/{batchIds}") - public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] batchIds) { - return toAjax(collectionBatchService.deleteWithValidByIds(Arrays.asList(batchIds), true)); - } - - /** - * 根据编码查询批次 - */ - @SaCheckPermission("xg:collectionBatch:query") - @GetMapping("/code/{batchCode}") - public R getByCode(@PathVariable String batchCode) { - return R.ok(collectionBatchService.queryByCode(batchCode)); - } - - /** - * 查询当前用户有权限的批次列表 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/userPermission") - public R> getUserPermissionBatches(@RequestParam Long userId) { - return R.ok(collectionBatchService.queryUserPermissionBatches(userId)); - } - - /** - * 查询当前进行中的批次列表 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/active") - public R> getActiveBatches() { - return R.ok(collectionBatchService.queryActiveBatches()); - } - - /** - * 查询即将开始的批次列表 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/upcoming") - public R> getUpcomingBatches() { - return R.ok(collectionBatchService.queryUpcomingBatches()); - } - - /** - * 查询即将结束的批次列表 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/endingSoon") - public R> getEndingSoonBatches() { - return R.ok(collectionBatchService.queryEndingSoonBatches()); - } - - /** - * 启动批次 - */ - @SaCheckPermission("xg:collectionBatch:start") - @Log(title = "信息采集批次", businessType = BusinessType.UPDATE) - @PostMapping("/start/{batchId}") - public R startBatch(@PathVariable Long batchId) { - return toAjax(collectionBatchService.startBatch(batchId)); - } - - /** - * 暂停批次 - */ - @SaCheckPermission("xg:collectionBatch:pause") - @Log(title = "信息采集批次", businessType = BusinessType.UPDATE) - @PostMapping("/pause/{batchId}") - public R pauseBatch(@PathVariable Long batchId) { - return toAjax(collectionBatchService.pauseBatch(batchId)); - } - - /** - * 恢复批次 - */ - @SaCheckPermission("xg:collectionBatch:resume") - @Log(title = "信息采集批次", businessType = BusinessType.UPDATE) - @PostMapping("/resume/{batchId}") - public R resumeBatch(@PathVariable Long batchId) { - return toAjax(collectionBatchService.resumeBatch(batchId)); - } - - /** - * 结束批次 - */ - @SaCheckPermission("xg:collectionBatch:end") - @Log(title = "信息采集批次", businessType = BusinessType.UPDATE) - @PostMapping("/end/{batchId}") - public R endBatch(@PathVariable Long batchId) { - return toAjax(collectionBatchService.endBatch(batchId)); - } - - /** - * 复制批次 - */ - @SaCheckPermission("xg:collectionBatch:copy") - @Log(title = "信息采集批次", businessType = BusinessType.INSERT) - @PostMapping("/copy/{batchId}") - public R copyBatch(@PathVariable Long batchId, - @RequestParam String newBatchCode, - @RequestParam String newBatchName) { - return toAjax(collectionBatchService.copyBatch(batchId, newBatchCode, newBatchName)); - } - - /** - * 批次统计 - */ - @SaCheckPermission("xg:collectionBatch:statistics") - @GetMapping("/statistics/{batchId}") - public R> getBatchStatistics(@PathVariable Long batchId) { - return R.ok(collectionBatchService.getBatchStatistics(batchId)); - } - - /** - * 批次整体统计 - */ - @SaCheckPermission("xg:collectionBatch:statistics") - @GetMapping("/statistics/overall") - public R> getBatchOverallStatistics() { - return R.ok(collectionBatchService.getBatchOverallStatistics()); - } - - /** - * 批次完成率统计 - */ - @SaCheckPermission("xg:collectionBatch:statistics") - @GetMapping("/statistics/completion/{batchId}") - public R> getBatchCompletionStatistics(@PathVariable Long batchId) { - return R.ok(collectionBatchService.getBatchCompletionStatistics(batchId)); - } - - /** - * 批次各维度统计 - */ - @SaCheckPermission("xg:collectionBatch:statistics") - @GetMapping("/statistics/dimension/{batchId}") - public R>> getBatchDimensionStatistics(@PathVariable Long batchId, - @RequestParam String dimension) { - return R.ok(collectionBatchService.getBatchDimensionStatistics(batchId, dimension)); - } - - /** - * 批量更新批次状态 - */ - @SaCheckPermission("xg:collectionBatch:batchUpdate") - @Log(title = "信息采集批次", businessType = BusinessType.UPDATE) - @PostMapping("/batchUpdateStatus") - public R batchUpdateStatus(@RequestBody List batchIds, @RequestParam String status) { - return toAjax(collectionBatchService.batchUpdateStatus(batchIds, status)); - } - - /** - * 检查批次是否可以编辑 - */ - @SaCheckPermission("xg:collectionBatch:query") - @GetMapping("/checkEditable/{batchId}") - public R checkBatchEditable(@PathVariable Long batchId) { - return R.ok(collectionBatchService.checkBatchEditable(batchId)); - } - - /** - * 检查批次是否可以删除 - */ - @SaCheckPermission("xg:collectionBatch:query") - @GetMapping("/checkDeletable/{batchId}") - public R checkBatchDeletable(@PathVariable Long batchId) { - return R.ok(collectionBatchService.checkBatchDeletable(batchId)); - } - - /** - * 获取批次可用选项 - */ - @SaCheckPermission("xg:collectionBatch:list") - @GetMapping("/available") - public R> getAvailableBatches() { - return R.ok(collectionBatchService.getAvailableBatches()); - } - - /** - * 导入批次数据 - * - * @param file 导入文件 - * @return 结果 - */ - @SaCheckPermission("xg:collectionBatch:import") - @Log(title = "信息采集批次", businessType = BusinessType.IMPORT) - @PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R importBatchData(@RequestPart("file") MultipartFile file) throws Exception { - List batchList = ExcelUtil.importExcel(file.getInputStream(), XgCollectionBatchBo.class); - collectionBatchService.importBatchData(batchList); - return R.ok(); - } - - /** - * 获取批次数据导入模板 - */ - @SaCheckPermission("xg:collectionBatch:import") - @PostMapping("/importTemplate") - public void importTemplate(HttpServletResponse response) { - ExcelUtil.exportExcel(null, "信息采集批次数据导入模板", XgCollectionBatchBo.class, response); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsAnalysisController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsAnalysisController.java deleted file mode 100644 index 02b7958d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsAnalysisController.java +++ /dev/null @@ -1,450 +0,0 @@ -package org.dromara.xg.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.dromara.common.core.domain.R; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.web.core.BaseController; -import org.dromara.xg.domain.bo.XgStatisticsQueryBo; -import org.dromara.xg.domain.vo.XgStatisticsResultVo; -import org.dromara.xg.service.IXgStatisticsAnalysisService; -import org.dromara.xg.service.IXgStatisticsExportService; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import java.util.List; -import java.util.Map; - -/** - * 统计分析Controller - * - * @author wuzhen - * @date 2025-01-17 - */ -@Slf4j -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/statisticsAnalysis") -public class XgStatisticsAnalysisController extends BaseController { - - private final IXgStatisticsAnalysisService statisticsAnalysisService; - private final IXgStatisticsExportService statisticsExportService; - - /** - * 获取统计概览 - */ - @SaCheckPermission("xg:statistics:analysis:overview") - @GetMapping("/overview") - public R> getStatisticsOverview() { - Map result = statisticsAnalysisService.getStatisticsOverview(); - return R.ok(result); - } - - /** - * 获取统计维度选项 - */ - @SaCheckPermission("xg:statistics:analysis:dimension") - @GetMapping("/dimensionOptions") - public R>> getStatisticsDimensionOptions() { - List> result = statisticsAnalysisService.getStatisticsDimensionOptions(); - return R.ok(result); - } - - /** - * 获取学院选项 - */ - @SaCheckPermission("xg:statistics:analysis:college") - @GetMapping("/collegeOptions") - public R>> getCollegeOptions() { - List> result = statisticsAnalysisService.getCollegeOptions(); - return R.ok(result); - } - - /** - * 获取专业选项 - */ - @SaCheckPermission("xg:statistics:analysis:major") - @GetMapping("/majorOptions") - public R>> getMajorOptions(@RequestParam(required = false) String collegeCode) { - List> result = statisticsAnalysisService.getMajorOptions(collegeCode); - return R.ok(result); - } - - /** - * 获取班级选项 - */ - @SaCheckPermission("xg:statistics:analysis:class") - @GetMapping("/classOptions") - public R>> getClassOptions(@RequestParam(required = false) String collegeCode, - @RequestParam(required = false) String majorCode) { - List> result = statisticsAnalysisService.getClassOptions(collegeCode, majorCode); - return R.ok(result); - } - - /** - * 获取图表类型选项 - */ - @SaCheckPermission("xg:statistics:analysis:chart") - @GetMapping("/chartTypeOptions") - public R>> getChartTypeOptions() { - List> result = statisticsAnalysisService.getChartTypeOptions(); - return R.ok(result); - } - - /** - * 执行统计分析 - */ - @SaCheckPermission("xg:statistics:analysis:execute") - @Log(title = "统计分析", businessType = BusinessType.OTHER) - @PostMapping("/execute") - public R executeStatistics(@Validated @RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.executeStatistics(queryBo); - return R.ok(result); - } - - /** - * 按学院统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:college") - @Log(title = "按学院统计", businessType = BusinessType.OTHER) - @GetMapping("/college") - public R statisticsByCollege(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByCollege(queryBo); - return R.ok(result); - } - - /** - * 按专业统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:major") - @Log(title = "按专业统计", businessType = BusinessType.OTHER) - @GetMapping("/major") - public R statisticsByMajor(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByMajor(queryBo); - return R.ok(result); - } - - /** - * 按班级统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:class") - @Log(title = "按班级统计", businessType = BusinessType.OTHER) - @GetMapping("/class") - public R statisticsByClass(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByClass(queryBo); - return R.ok(result); - } - - /** - * 按年级统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:grade") - @Log(title = "按年级统计", businessType = BusinessType.OTHER) - @GetMapping("/grade") - public R statisticsByGrade(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByGrade(queryBo); - return R.ok(result); - } - - /** - * 按性别统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:gender") - @Log(title = "按性别统计", businessType = BusinessType.OTHER) - @GetMapping("/gender") - public R statisticsByGender(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByGender(queryBo); - return R.ok(result); - } - - /** - * 按年龄段统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:age") - @Log(title = "按年龄段统计", businessType = BusinessType.OTHER) - @GetMapping("/age") - public R statisticsByAge(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByAge(queryBo); - return R.ok(result); - } - - /** - * 按政治面貌统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:political") - @Log(title = "按政治面貌统计", businessType = BusinessType.OTHER) - @GetMapping("/political") - public R statisticsByPoliticalStatus(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByPoliticalStatus(queryBo); - return R.ok(result); - } - - /** - * 按民族统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:nationality") - @Log(title = "按民族统计", businessType = BusinessType.OTHER) - @GetMapping("/nation") - public R statisticsByNationality(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByNationality(queryBo); - return R.ok(result); - } - - /** - * 按生源地统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:source") - @Log(title = "按生源地统计", businessType = BusinessType.OTHER) - @GetMapping("/sourceRegion") - public R statisticsBySourceRegion(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsBySourceRegion(queryBo); - return R.ok(result); - } - - /** - * 按血型统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:blood") - @Log(title = "按血型统计", businessType = BusinessType.OTHER) - @GetMapping("/bloodType") - public R statisticsByBloodType(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByBloodType(queryBo); - return R.ok(result); - } - - /** - * 按宗教信仰统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:religion") - @Log(title = "按宗教信仰统计", businessType = BusinessType.OTHER) - @GetMapping("/religion") - public R statisticsByReligion(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByReligion(queryBo); - return R.ok(result); - } - - /** - * 按学籍状态统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:status") - @Log(title = "按学籍状态统计", businessType = BusinessType.OTHER) - @GetMapping("/status") - public R statisticsByStudentStatus(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByStudentStatus(queryBo); - return R.ok(result); - } - - /** - * 按培养方式统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:training") - @Log(title = "按培养方式统计", businessType = BusinessType.OTHER) - @GetMapping("/trainingType") - public R statisticsByTrainingType(XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByTrainingType(queryBo); - return R.ok(result); - } - - /** - * 按身高范围统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:height") - @Log(title = "按身高范围统计", businessType = BusinessType.OTHER) - @PostMapping("/height") - public R statisticsByHeight(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByHeight(queryBo); - return R.ok(result); - } - - /** - * 按体重范围统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:weight") - @Log(title = "按体重范围统计", businessType = BusinessType.OTHER) - @PostMapping("/weight") - public R statisticsByWeight(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByWeight(queryBo); - return R.ok(result); - } - - /** - * 多维度组合统计 - */ - @SaCheckPermission("xg:statistics:analysis:multi") - @Log(title = "多维度组合统计", businessType = BusinessType.OTHER) - @PostMapping("/multi") - public R statisticsByMultiDimensions(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByMultiDimensions(queryBo); - return R.ok(result); - } - - /** - * 按时间趋势统计学生数量 - */ - @SaCheckPermission("xg:statistics:analysis:trend") - @Log(title = "按时间趋势统计", businessType = BusinessType.OTHER) - @PostMapping("/trend") - public R statisticsByTimeTrend(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.statisticsByTimeTrend(queryBo); - return R.ok(result); - } - - /** - * 获取学生信息汇总报表 - */ - @SaCheckPermission("xg:statistics:report:student") - @Log(title = "学生信息汇总报表", businessType = BusinessType.OTHER) - @PostMapping("/report/student") - public R getStudentSummaryReport(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.getStudentSummaryReport(queryBo); - return R.ok(result); - } - - /** - * 获取班级统计报表 - */ - @SaCheckPermission("xg:statistics:report:class") - @Log(title = "班级统计报表", businessType = BusinessType.OTHER) - @PostMapping("/report/class") - public R getClassStatisticsReport(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.getClassStatisticsReport(queryBo); - return R.ok(result); - } - - /** - * 获取学院统计报表 - */ - @SaCheckPermission("xg:statistics:report:college") - @Log(title = "学院统计报表", businessType = BusinessType.OTHER) - @PostMapping("/report/college") - public R getCollegeStatisticsReport(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.getCollegeStatisticsReport(queryBo); - return R.ok(result); - } - - /** - * 获取困难学生统计报表 - */ - @SaCheckPermission("xg:statistics:report:poor") - @Log(title = "困难学生统计报表", businessType = BusinessType.OTHER) - @PostMapping("/report/poor") - public R getPoorStudentReport(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.getPoorStudentReport(queryBo); - return R.ok(result); - } - - /** - * 获取特殊群体统计报表 - */ - @SaCheckPermission("xg:statistics:report:special") - @Log(title = "特殊群体统计报表", businessType = BusinessType.OTHER) - @PostMapping("/report/special") - public R getSpecialGroupReport(@RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.getSpecialGroupReport(queryBo); - return R.ok(result); - } - - /** - * 获取统计摘要信息 - */ - @SaCheckPermission("xg:statistics:analysis:summary") - @Log(title = "统计摘要信息", businessType = BusinessType.OTHER) - @PostMapping("/summary") - public R> getStatisticsSummary(@RequestBody XgStatisticsQueryBo queryBo) { - Map result = statisticsAnalysisService.getStatisticsSummary(queryBo); - return R.ok(result); - } - - /** - * 根据配置执行统计 - */ - @SaCheckPermission("xg:statistics:analysis:config") - @Log(title = "根据配置执行统计", businessType = BusinessType.OTHER) - @PostMapping("/config/{configCode}") - public R executeStatisticsByConfig(@NotBlank(message = "配置编码不能为空") @PathVariable String configCode, - @RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.executeStatisticsByConfig(configCode, queryBo); - return R.ok(result); - } - - /** - * 生成图表数据 - */ - @SaCheckPermission("xg:statistics:chart:generate") - @Log(title = "生成图表数据", businessType = BusinessType.OTHER) - @PostMapping("/chart/{chartType}") - public R generateChartData(@NotBlank(message = "图表类型不能为空") @PathVariable String chartType, - @RequestBody XgStatisticsQueryBo queryBo) { - XgStatisticsResultVo result = statisticsAnalysisService.generateChartData(chartType, queryBo); - return R.ok(result); - } - - /** - * 导出统计结果 - */ - @SaCheckPermission("xg:statistics:analysis:export") - @Log(title = "导出统计结果", businessType = BusinessType.EXPORT) - @PostMapping("/export/{format}") - public ResponseEntity exportStatisticsResult(@NotBlank(message = "导出格式不能为空") @PathVariable String format, - @RequestBody XgStatisticsResultVo resultVo) { - byte[] data = statisticsAnalysisService.exportStatisticsResult(resultVo, format); - - String filename = statisticsExportService.getFileName(resultVo, format); - String contentType = statisticsExportService.getContentType(format); - - return ResponseEntity.ok() - .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) - .contentType(MediaType.parseMediaType(contentType)) - .body(data); - } - - /** - * 清除统计缓存 - */ - @SaCheckPermission("xg:statistics:cache:clear") - @Log(title = "清除统计缓存", businessType = BusinessType.DELETE) - @DeleteMapping("/cache/{cacheKey}") - public R clearStatisticsCache(@NotBlank(message = "缓存键不能为空") @PathVariable String cacheKey) { - return toAjax(statisticsAnalysisService.clearStatisticsCache(cacheKey)); - } - - /** - * 清除所有统计缓存 - */ - @SaCheckPermission("xg:statistics:cache:clear") - @Log(title = "清除所有统计缓存", businessType = BusinessType.DELETE) - @DeleteMapping("/cache/all") - public R clearAllStatisticsCache() { - return toAjax(statisticsAnalysisService.clearAllStatisticsCache()); - } - - /** - * 获取缓存统计信息 - */ - @SaCheckPermission("xg:statistics:cache:info") - @GetMapping("/cache/info") - public R> getCacheStatistics() { - Map result = statisticsAnalysisService.getCacheStatistics(); - return R.ok(result); - } - - /** - * 预热统计缓存 - */ - @SaCheckPermission("xg:statistics:cache:warmup") - @Log(title = "预热统计缓存", businessType = BusinessType.OTHER) - @PostMapping("/cache/warmup") - public R warmUpStatisticsCache() { - return toAjax(statisticsAnalysisService.warmUpStatisticsCache()); - } - - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsConfigController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsConfigController.java deleted file mode 100644 index 26c1aeae..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStatisticsConfigController.java +++ /dev/null @@ -1,270 +0,0 @@ -package org.dromara.xg.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.util.ObjectUtil; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import org.dromara.common.excel.core.ExcelResult; -import org.dromara.common.excel.utils.ExcelUtil; -import org.dromara.common.idempotent.annotation.RepeatSubmit; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.web.core.BaseController; -import org.dromara.xg.domain.bo.XgStatisticsConfigBo; -import org.dromara.xg.domain.vo.XgStatisticsConfigVo; -import org.dromara.xg.service.IXgStatisticsConfigService; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import java.util.Arrays; -import java.util.List; - -/** - * 统计分析配置Controller - * - * @author wuzhen - * @date 2025-01-17 - */ -@Slf4j -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/statistics/config") -public class XgStatisticsConfigController extends BaseController { - - private final IXgStatisticsConfigService statisticsConfigService; - - /** - * 查询统计分析配置列表 - */ - @SaCheckPermission("xg:statistics:config:list") - @GetMapping("/list") - public TableDataInfo list(XgStatisticsConfigBo bo, PageQuery pageQuery) { - return statisticsConfigService.queryPageList(bo, pageQuery); - } - - /** - * 查询统计分析配置列表(不分页) - */ - @SaCheckPermission("xg:statistics:config:list") - @GetMapping("/listAll") - public R> listAll(XgStatisticsConfigBo bo) { - List list = statisticsConfigService.queryList(bo); - return R.ok(list); - } - - /** - * 导出统计分析配置列表 - */ - @SaCheckPermission("xg:statistics:config:export") - @Log(title = "统计分析配置", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(XgStatisticsConfigBo bo, HttpServletResponse response) { - List list = statisticsConfigService.queryList(bo); - ExcelUtil.exportExcel(list, "统计分析配置", XgStatisticsConfigVo.class, response); - } - - /** - * 获取统计分析配置详细信息 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/{configId}") - public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long configId) { - return R.ok(statisticsConfigService.queryById(configId)); - } - - /** - * 根据配置编码获取配置信息 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/code/{configCode}") - public R getInfoByCode(@NotNull(message = "配置编码不能为空") @PathVariable String configCode) { - return R.ok(statisticsConfigService.queryByConfigCode(configCode)); - } - - /** - * 获取配置的JSON内容 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/{configId}/content") - public R getConfigContent(@NotNull(message = "主键不能为空") @PathVariable Long configId) { - return R.ok(statisticsConfigService.getConfigContent(configId)); - } - - /** - * 查询指定类型的配置列表 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/type/{configType}") - public R> getConfigsByType(@NotNull(message = "配置类型不能为空") @PathVariable String configType) { - return R.ok(statisticsConfigService.queryByConfigType(configType)); - } - - /** - * 查询启用的配置列表 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/enabled") - public R> getEnabledConfigs(@RequestParam(required = false) String configType) { - return R.ok(statisticsConfigService.queryEnabledConfigs(configType)); - } - - /** - * 查询系统配置列表 - */ - @SaCheckPermission("xg:statistics:config:query") - @GetMapping("/system") - public R> getSystemConfigs() { - return R.ok(statisticsConfigService.querySystemConfigs()); - } - - /** - * 新增统计分析配置 - */ - @SaCheckPermission("xg:statistics:config:add") - @Log(title = "统计分析配置", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody XgStatisticsConfigBo bo) { - return toAjax(statisticsConfigService.insertByBo(bo)); - } - - /** - * 修改统计分析配置 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R edit(@Validated(EditGroup.class) @RequestBody XgStatisticsConfigBo bo) { - return toAjax(statisticsConfigService.updateByBo(bo)); - } - - /** - * 更新配置的JSON内容 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/{configId}/content") - public R updateConfigContent(@NotNull(message = "主键不能为空") @PathVariable Long configId, - @RequestBody String configContent) { - return toAjax(statisticsConfigService.updateConfigContent(configId, configContent)); - } - - /** - * 删除统计分析配置 - */ - @SaCheckPermission("xg:statistics:config:remove") - @Log(title = "统计分析配置", businessType = BusinessType.DELETE) - @DeleteMapping("/{configIds}") - public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] configIds) { - return toAjax(statisticsConfigService.deleteWithValidByIds(Arrays.asList(configIds), true)); - } - - /** - * 复制配置 - */ - @SaCheckPermission("xg:statistics:config:add") - @Log(title = "统计分析配置", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping("/{configId}/copy") - public R copyConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId, - @RequestParam String newConfigName, - @RequestParam String newConfigCode) { - return toAjax(statisticsConfigService.copyConfig(configId, newConfigName, newConfigCode)); - } - - /** - * 启用配置 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @PutMapping("/{configId}/enable") - public R enableConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId) { - return toAjax(statisticsConfigService.enableConfig(configId)); - } - - /** - * 禁用配置 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @PutMapping("/{configId}/disable") - public R disableConfig(@NotNull(message = "主键不能为空") @PathVariable Long configId) { - return toAjax(statisticsConfigService.disableConfig(configId)); - } - - /** - * 更新配置排序 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @PutMapping("/{configId}/sort") - public R updateSortOrder(@NotNull(message = "主键不能为空") @PathVariable Long configId, - @RequestParam Integer sortOrder) { - return toAjax(statisticsConfigService.updateSortOrder(configId, sortOrder)); - } - - /** - * 批量更新配置状态 - */ - @SaCheckPermission("xg:statistics:config:edit") - @Log(title = "统计分析配置", businessType = BusinessType.UPDATE) - @PutMapping("/batch/status") - public R batchUpdateStatus(@RequestBody List configIds, - @RequestParam Integer isEnabled) { - return toAjax(statisticsConfigService.batchUpdateStatus(configIds, isEnabled)); - } - - /** - * 检查配置编码是否存在 - */ - @GetMapping("/checkConfigCode") - public R checkConfigCodeExists(@RequestParam String configCode, - @RequestParam(required = false) Long excludeId) { - return R.ok(statisticsConfigService.checkConfigCodeExists(configCode, excludeId)); - } - - /** - * 导入统计分析配置 - */ - @SaCheckPermission("xg:statistics:config:import") - @Log(title = "统计分析配置", businessType = BusinessType.IMPORT) - @PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception { - ExcelResult result = ExcelUtil.importExcel(file.getInputStream(), XgStatisticsConfigVo.class, false); - List voList = result.getList(); - List boList = MapstructUtils.convert(voList, XgStatisticsConfigBo.class); - for (XgStatisticsConfigBo bo : boList) { - try { - statisticsConfigService.insertByBo(bo); - } catch (Exception e) { - log.error("导入统计分析配置失败:{}", e.getMessage()); - if (!updateSupport) { - throw e; - } - } - } - return R.ok(); - } - - /** - * 获取统计分析配置导入模板 - */ - @PostMapping("/importTemplate") - public void importTemplate(HttpServletResponse response) { - ExcelUtil.exportExcel(null, "统计分析配置", XgStatisticsConfigVo.class, response); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStudentInfoController.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStudentInfoController.java deleted file mode 100644 index 62b25228..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/controller/XgStudentInfoController.java +++ /dev/null @@ -1,492 +0,0 @@ -package org.dromara.xg.controller; - -import java.util.List; -import java.util.Map; - -import lombok.RequiredArgsConstructor; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.*; -import cn.dev33.satoken.annotation.SaCheckPermission; -import org.springframework.web.bind.annotation.*; -import org.springframework.validation.annotation.Validated; -import org.dromara.common.idempotent.annotation.RepeatSubmit; -import org.dromara.common.log.annotation.Log; -import org.dromara.common.web.core.BaseController; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import org.dromara.common.log.enums.BusinessType; -import org.dromara.common.excel.utils.ExcelUtil; -import org.dromara.xg.domain.vo.XgStudentInfoVo; -import org.dromara.xg.domain.bo.XgStudentInfoBo; -import org.dromara.xg.service.IXgStudentInfoService; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.XgStudentInfo; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.apache.commons.lang3.StringUtils; - -/** - * 学生信息Controller - * - * @author Cursor AI - * @date 2025-01-14 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/xg/studentInfo") -public class XgStudentInfoController extends BaseController { - - private static final Logger log = LoggerFactory.getLogger(XgStudentInfoController.class); - - private final IXgStudentInfoService studentInfoService; - - /** - * 查询学生信息列表 - */ - @SaCheckPermission("xg:studentInfo:list") - @GetMapping("/list") - public TableDataInfo list(XgStudentInfoBo bo, PageQuery pageQuery) { - log.info("=== 学生信息分页查询开始 ==="); - log.info("查询条件: {}", bo); - log.info("分页参数: {}", pageQuery); - - // 执行分页查询 - TableDataInfo result = studentInfoService.queryPageList(bo, pageQuery); - log.info("查询结果总数: {}", result.getTotal()); - log.info("查询结果行数: {}", result.getRows() != null ? result.getRows().size() : 0); - - if (result.getRows() != null && !result.getRows().isEmpty()) { - log.info("第一条数据示例: {}", result.getRows().get(0)); - } else { - log.warn("查询结果为空!"); - } - - log.info("=== 学生信息分页查询结束 ==="); - return result; - } - - /** - * 导出学生信息列表 - */ - @SaCheckPermission("xg:studentInfo:export") - @Log(title = "学生信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(XgStudentInfoBo bo, HttpServletResponse response) { - List list = studentInfoService.exportStudentInfo(bo); - ExcelUtil.exportExcel(list, "学生信息", XgStudentInfoVo.class, response); - } - - /** - * 获取学生信息详细信息 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/{id}") - public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { - return R.ok(studentInfoService.queryById(id)); - } - - /** - * 新增学生信息 - */ - @SaCheckPermission("xg:studentInfo:add") - @Log(title = "学生信息", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody XgStudentInfoBo bo) { - boolean success = studentInfoService.insertByBo(bo); - if (success) { - return R.ok("新增成功", bo.getId()); - } - return R.fail("新增失败"); - } - - /** - * 修改学生信息 - */ - @SaCheckPermission("xg:studentInfo:edit") - @Log(title = "学生信息", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R edit(@Validated(EditGroup.class) @RequestBody XgStudentInfoBo bo) { - return toAjax(studentInfoService.updateByBo(bo)); - } - - /** - * 删除学生信息 - */ - @SaCheckPermission("xg:studentInfo:remove") - @Log(title = "学生信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) { - return toAjax(studentInfoService.deleteWithValidByIds(List.of(ids), true)); - } - - /** - * 根据学号查询学生信息 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/studentNo/{studentNo}") - public R getByStudentNo(@NotBlank(message = "学号不能为空") @PathVariable String studentNo) { - return R.ok(studentInfoService.queryByStudentNo(studentNo)); - } - - /** - * 根据身份证号查询学生信息 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/idCard/{idCard}") - public R getByIdCard(@NotBlank(message = "身份证号不能为空") @PathVariable String idCard) { - return R.ok(studentInfoService.queryByIdCard(idCard)); - } - - /** - * 查询指定班级的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/class/{classCode}") - public R> getByClassCode(@NotBlank(message = "班级代码不能为空") @PathVariable String classCode) { - return R.ok(studentInfoService.queryByClassCode(classCode)); - } - - /** - * 查询指定学院的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/college/{collegeCode}") - public R> getByCollegeCode(@NotBlank(message = "学院代码不能为空") @PathVariable String collegeCode) { - return R.ok(studentInfoService.queryByCollegeCode(collegeCode)); - } - - /** - * 查询指定辅导员的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/counselor/{counselorId}") - public R> getByCounselorId(@NotNull(message = "辅导员ID不能为空") @PathVariable Long counselorId) { - return R.ok(studentInfoService.queryByCounselorId(counselorId)); - } - - /** - * 查询指定班主任的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/classTeacher/{classTeacherId}") - public R> getByClassTeacherId(@NotNull(message = "班主任ID不能为空") @PathVariable Long classTeacherId) { - return R.ok(studentInfoService.queryByClassTeacherId(classTeacherId)); - } - - /** - * 统计各学院学生数量 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/college") - public R>> countByCollege() { - return R.ok(studentInfoService.countByCollege()); - } - - /** - * 统计各年级学生数量 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/grade") - public R>> countByGrade() { - return R.ok(studentInfoService.countByGrade()); - } - - /** - * 统计各专业学生数量 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/major") - public R>> countByMajor() { - return R.ok(studentInfoService.countByMajor()); - } - - /** - * 统计学籍状态分布 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/studentStatus") - public R>> countByStudentStatus() { - return R.ok(studentInfoService.countByStudentStatus()); - } - - /** - * 统计信息完整度分布 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/completionRate") - public R>> countByCompletionRate() { - return R.ok(studentInfoService.countByCompletionRate()); - } - - /** - * 查询信息不完整的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/incomplete") - public R> getIncompleteStudents() { - return R.ok(studentInfoService.queryIncompleteStudents()); - } - - /** - * 查询待审核的学生信息列表 - */ - @SaCheckPermission("xg:studentInfo:audit") - @GetMapping("/pendingAudit") - public R> getPendingAuditStudents() { - return R.ok(studentInfoService.queryPendingAuditStudents()); - } - - /** - * 批量更新学生信息状态 - */ - @SaCheckPermission("xg:studentInfo:edit") - @Log(title = "批量更新信息状态", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/batchUpdateInfoStatus") - public R batchUpdateInfoStatus(@RequestBody Map params) { - @SuppressWarnings("unchecked") - List studentIds = (List) params.get("studentIds"); - String infoStatus = (String) params.get("infoStatus"); - - if (studentIds == null || studentIds.isEmpty()) { - return R.fail("学生ID列表不能为空"); - } - if (infoStatus == null || infoStatus.trim().isEmpty()) { - return R.fail("信息状态不能为空"); - } - - return toAjax(studentInfoService.batchUpdateInfoStatus(studentIds, infoStatus)); - } - - /** - * 批量更新学生学籍状态 - */ - @SaCheckPermission("xg:studentInfo:edit") - @Log(title = "批量更新学籍状态", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/batchUpdateStudentStatus") - public R batchUpdateStudentStatus(@RequestBody Map params) { - @SuppressWarnings("unchecked") - List studentIds = (List) params.get("studentIds"); - String studentStatus = (String) params.get("studentStatus"); - - if (studentIds == null || studentIds.isEmpty()) { - return R.fail("学生ID列表不能为空"); - } - if (studentStatus == null || studentStatus.trim().isEmpty()) { - return R.fail("学籍状态不能为空"); - } - - return toAjax(studentInfoService.batchUpdateStudentStatus(studentIds, studentStatus)); - } - - /** - * 查询重复学号的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/duplicateStudentNo") - public R>> getDuplicateStudentNo() { - return R.ok(studentInfoService.queryDuplicateStudentNo()); - } - - /** - * 查询重复身份证号的学生列表 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/duplicateIdCard") - public R>> getDuplicateIdCard() { - return R.ok(studentInfoService.queryDuplicateIdCard()); - } - - /** - * 更新学生信息完整度 - */ - @SaCheckPermission("xg:studentInfo:edit") - @Log(title = "更新信息完整度", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/{studentId}/updateCompletionRate") - public R updateCompletionRate(@NotNull(message = "学生ID不能为空") @PathVariable Long studentId) { - return toAjax(studentInfoService.updateCompletionRate(studentId)); - } - - /** - * 批量导入学生信息 - */ - @SaCheckPermission("xg:studentInfo:import") - @Log(title = "批量导入学生信息", businessType = BusinessType.IMPORT) - @RepeatSubmit() - @PostMapping("/import") - public R importStudentInfo(@RequestBody Map params) { - @SuppressWarnings("unchecked") - List studentInfoList = (List) params.get("studentInfoList"); - Boolean isUpdateSupport = (Boolean) params.get("isUpdateSupport"); - String operName = (String) params.get("operName"); - - if (studentInfoList == null || studentInfoList.isEmpty()) { - return R.fail("导入数据不能为空"); - } - - String result = studentInfoService.importStudentInfo(studentInfoList, isUpdateSupport, operName); - return R.ok(result); - } - - /** - * 审核学生信息 - */ - @SaCheckPermission("xg:studentInfo:audit") - @Log(title = "审核学生信息", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/{studentId}/audit") - public R auditStudentInfo( - @NotNull(message = "学生ID不能为空") @PathVariable Long studentId, - @NotBlank(message = "审核状态不能为空") @RequestParam String auditStatus, - @RequestParam(required = false) String auditRemark) { - return toAjax(studentInfoService.auditStudentInfo(studentId, auditStatus, auditRemark)); - } - - /** - * 批量审核学生信息 - */ - @SaCheckPermission("xg:studentInfo:audit") - @Log(title = "批量审核学生信息", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/batchAudit") - public R batchAuditStudentInfo(@RequestBody Map params) { - @SuppressWarnings("unchecked") - List studentIds = (List) params.get("studentIds"); - String auditStatus = (String) params.get("auditStatus"); - String auditRemark = (String) params.get("auditRemark"); - - if (studentIds == null || studentIds.isEmpty()) { - return R.fail("学生ID列表不能为空"); - } - if (auditStatus == null || auditStatus.trim().isEmpty()) { - return R.fail("审核状态不能为空"); - } - - return toAjax(studentInfoService.batchAuditStudentInfo(studentIds, auditStatus, auditRemark)); - } - - /** - * 获取学生信息统计概览 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/statistics/overview") - public R> getStatisticsOverview() { - return R.ok(studentInfoService.getStatisticsOverview()); - } - - /** - * 生成学生信息报表 - */ - @SaCheckPermission("xg:studentInfo:statistics") - @GetMapping("/report/{reportType}") - public R> generateReport( - @NotBlank(message = "报表类型不能为空") @PathVariable String reportType, - @RequestParam(required = false) Map params) { - if (params == null) { - params = Map.of(); - } - return R.ok(studentInfoService.generateReport(reportType, params)); - } - - /** - * 获取我的学生信息(学生端) - */ - @SaCheckPermission("xg:studentInfo:myInfo") - @GetMapping("/myInfo") - public R getMyInfo() { - // TODO: 根据当前登录用户获取对应的学生信息 - // Long currentUserId = LoginHelper.getUserId(); - // 需要建立用户与学生的关联关系 - return R.ok(); - } - - /** - * 更新我的学生信息(学生端) - */ - @SaCheckPermission("xg:studentInfo:updateMyInfo") - @Log(title = "更新我的学生信息", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping("/myInfo") - public R updateMyInfo(@Validated(EditGroup.class) @RequestBody XgStudentInfoBo bo) { - // TODO: 校验当前用户是否有权限修改该学生信息 - return toAjax(studentInfoService.updateByBo(bo)); - } - - // ================================ - // 选项数据接口 - // ================================ - - /** - * 获取学院选项 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/options/colleges") - public R>> getCollegeOptions() { - return R.ok(studentInfoService.getCollegeOptions()); - } - - /** - * 获取专业选项 - * @param collegeCode 学院代码(可选) - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/options/majors") - public R>> getMajorOptions(@RequestParam(required = false) String collegeCode) { - return R.ok(studentInfoService.getMajorOptions(collegeCode)); - } - - /** - * 获取班级选项 - * @param majorCode 专业代码(可选) - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/options/classes") - public R>> getClassOptions(@RequestParam(required = false) String majorCode) { - return R.ok(studentInfoService.getClassOptions(majorCode)); - } - - /** - * 获取辅导员选项 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/options/counselors") - public R>> getCounselorOptions() { - return R.ok(studentInfoService.getCounselorOptions()); - } - - /** - * 获取班主任选项 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/options/classTeachers") - public R>> getClassTeacherOptions() { - return R.ok(studentInfoService.getClassTeacherOptions()); - } - - /** - * 检查学号是否存在 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/checkStudentNo") - public R checkStudentNo(@RequestParam String studentNo, @RequestParam(required = false) Long studentId) { - return R.ok(studentInfoService.checkStudentNo(studentNo, studentId)); - } - - /** - * 检查身份证号是否存在 - */ - @SaCheckPermission("xg:studentInfo:query") - @GetMapping("/checkIdCard") - public R checkIdCard(@RequestParam String idCard, @RequestParam(required = false) Long studentId) { - return R.ok(studentInfoService.checkIdCard(idCard, studentId)); - } - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgBatchScheduledTask.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgBatchScheduledTask.java deleted file mode 100644 index c51c38a4..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgBatchScheduledTask.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.mybatis.core.domain.BaseEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 信息采集批次定时任务对象 xg_batch_scheduled_task - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_batch_scheduled_task") -public class XgBatchScheduledTask extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 批次ID - */ - private Long batchId; - - /** - * 任务类型(REMIND_START,REMIND_END,AUTO_CLOSE) - */ - private String taskType; - - /** - * 执行时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date taskTime; - - /** - * 任务状态(PENDING,EXECUTED,FAILED) - */ - private String taskStatus; - - /** - * 实际执行时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date executeTime; - - /** - * 错误信息 - */ - private String errorMessage; - - /** - * 租户ID - */ - private String tenantId; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassInfo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassInfo.java deleted file mode 100644 index 9e4d2d6a..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassInfo.java +++ /dev/null @@ -1,346 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.dromara.common.mybatis.core.domain.BaseEntity; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDate; -import java.time.LocalDateTime; - -/** - * 班级信息对象 xg_class_info - * - * @author Cursor AI - * @date 2025-01-21 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_class_info") -public class XgClassInfo extends BaseEntity implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 班级ID - */ - @TableId(value = "id", type = IdType.ASSIGN_ID) - private Long id; - - /** - * 租户编号 - */ - @TableField("tenant_id") - private String tenantId; - - /** - * 班级代码 - */ - @TableField("class_code") - private String classCode; - - /** - * 班级名称 - */ - @TableField("class_name") - private String className; - - /** - * 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级 - */ - @TableField("class_type") - private String classType; - - /** - * 年级 - */ - @TableField("grade") - private String grade; - - /** - * 入学年份 - */ - @TableField("enrollment_year") - private Integer enrollmentYear; - - /** - * 毕业年份 - */ - @TableField("graduation_year") - private Integer graduationYear; - - /** - * 专业代码 - */ - @TableField("major_code") - private String majorCode; - - /** - * 专业名称 - */ - @TableField("major_name") - private String majorName; - - /** - * 培养方式:全日制、在职、函授、夜大等 - */ - @TableField("training_type") - private String trainingType; - - /** - * 学位类型:本科、专科、研究生等 - */ - @TableField("degree_type") - private String degreeType; - - /** - * 学院代码 - */ - @TableField("college_code") - private String collegeCode; - - /** - * 学院名称 - */ - @TableField("college_name") - private String collegeName; - - /** - * 辅导员ID - */ - @TableField("counselor_id") - private Long counselorId; - - /** - * 辅导员姓名 - */ - @TableField("counselor_name") - private String counselorName; - - /** - * 班主任ID - */ - @TableField("class_teacher_id") - private Long classTeacherId; - - /** - * 班主任姓名 - */ - @TableField("class_teacher_name") - private String classTeacherName; - - /** - * 班级导师ID - */ - @TableField("class_advisor_id") - private Long classAdvisorId; - - /** - * 班级导师姓名 - */ - @TableField("class_advisor_name") - private String classAdvisorName; - - /** - * 班长ID - */ - @TableField("class_monitor_id") - private Long classMonitorId; - - /** - * 班长姓名 - */ - @TableField("class_monitor_name") - private String classMonitorName; - - /** - * 副班长ID - */ - @TableField("deputy_monitor_id") - private Long deputyMonitorId; - - /** - * 副班长姓名 - */ - @TableField("deputy_monitor_name") - private String deputyMonitorName; - - /** - * 班级状态:1-正常,2-暂停,3-毕业,4-解散 - */ - @TableField("class_status") - private String classStatus; - - /** - * 是否毕业:0-未毕业,1-已毕业 - */ - @TableField("is_graduation") - private Integer isGraduation; - - /** - * 毕业日期 - */ - @TableField("graduation_date") - private LocalDate graduationDate; - - /** - * 计划容量 - */ - @TableField("planned_capacity") - private Integer plannedCapacity; - - /** - * 当前学生数量 - */ - @TableField("current_student_count") - private Integer currentStudentCount; - - /** - * 最大学生数量 - */ - @TableField("max_student_count") - private Integer maxStudentCount; - - /** - * 男生数量 - */ - @TableField("male_count") - private Integer maleCount; - - /** - * 女生数量 - */ - @TableField("female_count") - private Integer femaleCount; - - /** - * 在籍学生数量 - */ - @TableField("active_count") - private Integer activeCount; - - /** - * 转入学生数量 - */ - @TableField("transfer_in_count") - private Integer transferInCount; - - /** - * 转出学生数量 - */ - @TableField("transfer_out_count") - private Integer transferOutCount; - - /** - * 退学学生数量 - */ - @TableField("dropout_count") - private Integer dropoutCount; - - /** - * 毕业学生数量 - */ - @TableField("graduate_count") - private Integer graduateCount; - - /** - * 办公室位置 - */ - @TableField("office_location") - private String officeLocation; - - /** - * 教室位置 - */ - @TableField("class_location") - private String classLocation; - - /** - * 联系电话 - */ - @TableField("contact_phone") - private String contactPhone; - - /** - * QQ群号 - */ - @TableField("qq_group") - private String qqGroup; - - /** - * 微信群 - */ - @TableField("wechat_group") - private String wechatGroup; - - /** - * 邮箱 - */ - @TableField("email") - private String email; - - /** - * 课程安排 - */ - @TableField("class_schedule") - private String classSchedule; - - /** - * 班级文化 - */ - @TableField("class_culture") - private String classCulture; - - /** - * 班级规章制度 - */ - @TableField("class_rules") - private String classRules; - - /** - * 班级描述 - */ - @TableField("class_description") - private String classDescription; - - /** - * 最后统计更新时间 - */ - @TableField("last_count_update") - private LocalDateTime lastCountUpdate; - - /** - * 扩展字段1 - */ - @TableField("ext_field1") - private String extField1; - - /** - * 扩展字段2 - */ - @TableField("ext_field2") - private String extField2; - - /** - * 扩展字段3 - */ - @TableField("ext_field3") - private String extField3; - - /** - * 备注 - */ - @TableField("remark") - private String remark; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableField("deleted") - @TableLogic - private Integer deleted; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassTeacherRelation.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassTeacherRelation.java deleted file mode 100644 index 441636d1..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgClassTeacherRelation.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.dromara.common.mybatis.core.domain.BaseEntity; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * 班级班主任关系对象 xg_class_teacher_relation - * - * @author Cursor AI - * @date 2025-07-22 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_class_teacher_relation") -public class XgClassTeacherRelation extends BaseEntity implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.ASSIGN_ID) - private Long id; - - /** - * 班级ID - */ - @TableField("class_id") - private Long classId; - - /** - * 班主任用户ID - */ - @TableField("teacher_id") - private Long teacherId; - - /** - * 状态(0正常 1停用) - */ - @TableField("status") - private String status; - - /** - * 生效开始日期 - */ - @TableField("start_date") - private LocalDateTime startDate; - - /** - * 生效结束日期 - */ - @TableField("end_date") - private LocalDateTime endDate; - - /** - * 备注 - */ - @TableField("remark") - private String remark; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableField("deleted") - @TableLogic - private String deleted; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatch.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatch.java deleted file mode 100644 index c78d52f8..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatch.java +++ /dev/null @@ -1,187 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.tenant.core.TenantEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 信息采集批次对象 xg_collection_batch - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_collection_batch") -public class XgCollectionBatch extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID(雪花ID) - */ - @TableId(value = "id") - private Long id; - - /** - * 批次编码 - */ - private String batchCode; - - /** - * 批次名称 - */ - private String batchName; - - /** - * 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义 - */ - private String batchType; - - /** - * 学年,如2024-2025 - */ - private String academicYear; - - /** - * 学期:spring-春季,autumn-秋季 - */ - private String semester; - - /** - * 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档 - */ - private String batchStatus; - - /** - * 发布时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date publishTime; - - /** - * 开始时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; - - /** - * 结束时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; - - /** - * 归档时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date archiveTime; - - /** - * 目标学院(JSON格式) - */ - private String targetColleges; - - /** - * 目标年级(JSON格式) - */ - private String targetGrades; - - /** - * 目标专业(JSON格式) - */ - private String targetMajors; - - /** - * 必填字段(JSON格式) - */ - private String requiredFields; - - /** - * 可选字段(JSON格式) - */ - private String optionalFields; - - /** - * 审核级别配置(JSON格式) - */ - private String auditLevels; - - /** - * 总学生数 - */ - private Integer totalStudents; - - /** - * 已提交数 - */ - private Integer submittedCount; - - /** - * 已审核数 - */ - private Integer approvedCount; - - /** - * 已驳回数 - */ - private Integer rejectedCount; - - /** - * 完成率 - */ - private BigDecimal completionRate; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 审核权限(JSON格式) - */ - private String auditPermissions; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 自动提醒:0-关闭,1-开启 - */ - private Integer autoReminder; - - /** - * 提醒频率(天) - */ - private Integer reminderFrequency; - - /** - * 提交后允许修改:0-不允许,1-允许 - */ - private Integer allowModifyAfterSubmit; - - /** - * 批次描述 - */ - private String description; - - /** - * 备注信息 - */ - private String remark; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableLogic(value = "0", delval = "1") - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchLog.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchLog.java deleted file mode 100644 index f5678ed5..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchLog.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 信息采集批次操作日志对象 xg_collection_batch_log - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@TableName("xg_collection_batch_log") -public class XgCollectionBatchLog implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 批次ID - */ - private Long batchId; - - /** - * 学生ID - */ - private Long studentId; - - /** - * 操作类型(CREATE,UPDATE,SUBMIT,ADMIN_MODIFY,BATCH_PUBLISH,BATCH_CLOSE) - */ - private String operationType; - - /** - * 操作描述 - */ - private String operationDesc; - - /** - * 修改前数据(JSON格式) - */ - private String oldData; - - /** - * 修改后数据(JSON格式) - */ - private String newData; - - /** - * 操作人ID - */ - private Long operatorId; - - /** - * 操作人姓名 - */ - private String operatorName; - - /** - * 操作人类型(STUDENT,ADMIN,SYSTEM) - */ - private String operatorType; - - /** - * IP地址 - */ - private String ipAddress; - - /** - * 用户代理 - */ - private String userAgent; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 租户ID - */ - private String tenantId; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchPermission.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchPermission.java deleted file mode 100644 index f36d56df..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchPermission.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.mybatis.core.domain.BaseEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 信息采集批次权限配置对象 xg_collection_batch_permission - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_collection_batch_permission") -public class XgCollectionBatchPermission extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 批次ID - */ - private Long batchId; - - /** - * 权限类型(EDIT,VIEW,SUBMIT,ADMIN) - */ - private String permissionType; - - /** - * 角色ID - */ - private Long roleId; - - /** - * 用户ID - */ - private Long userId; - - /** - * 学院ID - */ - private Long collegeId; - - /** - * 是否授权:0-否,1-是 - */ - private Integer isGranted; - - /** - * 授权时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date grantTime; - - /** - * 过期时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date expireTime; - - /** - * 租户ID - */ - private String tenantId; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableLogic(value = "0", delval = "1") - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStatistics.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStatistics.java deleted file mode 100644 index 7d65cc94..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStatistics.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.mybatis.core.domain.BaseEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 信息采集批次统计对象 xg_collection_batch_statistics - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_collection_batch_statistics") -public class XgCollectionBatchStatistics extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 批次ID - */ - private Long batchId; - - /** - * 总学生数 - */ - private Integer totalStudents; - - /** - * 已提交学生数 - */ - private Integer submittedStudents; - - /** - * 待提交学生数 - */ - private Integer pendingStudents; - - /** - * 完成率 - */ - private BigDecimal completionRate; - - /** - * 学院ID(按学院统计时使用) - */ - private Long collegeId; - - /** - * 学院名称 - */ - private String collegeName; - - /** - * 专业ID(按专业统计时使用) - */ - private Long majorId; - - /** - * 专业名称 - */ - private String majorName; - - /** - * 班级ID(按班级统计时使用) - */ - private Long classId; - - /** - * 班级名称 - */ - private String className; - - /** - * 届别 - */ - private String grade; - - /** - * 统计类型(TOTAL,COLLEGE,MAJOR,CLASS,GRADE) - */ - private String statisticsType; - - /** - * 最后更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastUpdated; - - /** - * 租户ID - */ - private String tenantId; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStudent.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStudent.java deleted file mode 100644 index 398cf732..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgCollectionBatchStudent.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.mybatis.core.domain.BaseEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 信息采集批次学生关联对象 xg_collection_batch_student - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_collection_batch_student") -public class XgCollectionBatchStudent extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 批次ID - */ - private Long batchId; - - /** - * 学生ID - */ - private Long studentId; - - /** - * 学号 - */ - private String studentCode; - - /** - * 学生姓名 - */ - private String studentName; - - /** - * 学院ID - */ - private Long collegeId; - - /** - * 学院名称 - */ - private String collegeName; - - /** - * 专业ID - */ - private Long majorId; - - /** - * 专业名称 - */ - private String majorName; - - /** - * 班级ID - */ - private Long classId; - - /** - * 班级名称 - */ - private String className; - - /** - * 届别 - */ - private String grade; - - /** - * 是否可编辑:0-否,1-是 - */ - private Integer canEdit; - - /** - * 是否已提交:0-否,1-是 - */ - private Integer hasSubmitted; - - /** - * 提交时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date submitTime; - - /** - * 最后编辑时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastEditTime; - - /** - * 编辑次数 - */ - private Integer editCount; - - /** - * 租户ID - */ - private String tenantId; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableLogic(value = "0", delval = "1") - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgDataPermission.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgDataPermission.java deleted file mode 100644 index 5b2cda8b..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgDataPermission.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.dromara.common.mybatis.core.domain.BaseEntity; - -import java.util.Date; - -/** - * 数据权限配置对象 xg_data_permission - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_data_permission") -public class XgDataPermission extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId - private Long id; - - /** - * 租户编号 - */ - private String tenantId; - - /** - * 用户ID - */ - private Long userId; - - /** - * 用户名称 - */ - private String userName; - - /** - * 权限类型 - */ - private String permissionType; - - /** - * 权限范围 - */ - private String permissionScope; - - /** - * 范围值(JSON格式) - */ - private String scopeValues; - - /** - * 权限级别 - */ - private Integer permissionLevel; - - /** - * 是否启用:0-否,1-是 - */ - private Integer isEnabled; - - /** - * 生效时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date effectiveTime; - - /** - * 失效时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date expireTime; - - /** - * 备注信息 - */ - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 删除标志(0代表存在 1代表删除) - */ - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsCache.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsCache.java deleted file mode 100644 index 303cb046..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsCache.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.dromara.common.mybatis.core.domain.BaseEntity; - -import java.util.Date; - -/** - * 统计结果缓存对象 xg_statistics_cache - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_statistics_cache") -public class XgStatisticsCache extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId - private Long id; - - /** - * 租户编号 - */ - private String tenantId; - - /** - * 缓存键 - */ - private String cacheKey; - - /** - * 缓存类型:dimension-维度统计,report-报表,chart-图表 - */ - private String cacheType; - - /** - * 缓存内容(JSON格式) - */ - private String cacheContent; - - /** - * 缓存时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date cacheTime; - - /** - * 过期时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date expireTime; - - /** - * 是否过期:0-否,1-是 - */ - private Integer isExpired; - - /** - * 命中次数 - */ - private Integer hitCount; - - /** - * 最后命中时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastHitTime; - - /** - * 数据大小(字节) - */ - private Integer dataSize; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 删除标志(0代表存在 1代表删除) - */ - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsConfig.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsConfig.java deleted file mode 100644 index 132d1070..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStatisticsConfig.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.dromara.xg.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.dromara.common.mybatis.core.domain.BaseEntity; - -import java.util.Date; - -/** - * 统计分析配置对象 xg_statistics_config - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_statistics_config") -public class XgStatisticsConfig extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @TableId - private Long id; - - /** - * 租户编号 - */ - private String tenantId; - - /** - * 配置名称 - */ - private String configName; - - /** - * 配置编码 - */ - private String configCode; - - /** - * 配置类型:dimension-维度,report-报表,chart-图表 - */ - private String configType; - - /** - * 配置内容(JSON格式) - */ - private String configContent; - - /** - * 是否系统配置:0-否,1-是 - */ - private Integer isSystem; - - /** - * 是否启用:0-否,1-是 - */ - private Integer isEnabled; - - /** - * 排序顺序 - */ - private Integer sortOrder; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 备注信息 - */ - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 删除标志(0代表存在 1代表删除) - */ - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfo.java deleted file mode 100644 index de8fca40..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfo.java +++ /dev/null @@ -1,471 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.tenant.core.TenantEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 学生信息对象 xg_student_info - * - * @author Cursor AI - * @date 2025-01-14 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_student_info") -public class XgStudentInfo extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID(雪花ID) - */ - @TableId(value = "id") - private Long id; - - /** - * 学号 - */ - private String studentNo; - - /** - * 身份证号 - */ - private String idCard; - - /** - * 姓名 - */ - private String name; - - /** - * 英文姓名 - */ - @TableField(value = "name_english", exist = false) - private String nameEnglish; - - /** - * 曾用名 - */ - @TableField(value = "former_name", exist = false) - private String formerName; - - /** - * 姓名拼音 - */ - @TableField(value = "name_pinyin", exist = false) - private String namePinyin; - - /** - * 性别:0-男,1-女 - */ - private String gender; - - /** - * 出生日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; - - /** - * 民族 - */ - @TableField(exist = false) - private String nation; - - /** - * 政治面貌 - */ - private String politicalStatus; - - /** - * 婚姻状况:未婚、已婚、离异、丧偶 - */ - @TableField(value = "marital_status", exist = false) - private String maritalStatus; - - /** - * 宗教信仰 - */ - @TableField(exist = false) - private String religion; - - /** - * 照片URL - */ - @TableField(value = "photo_url", exist = false) - private String photoUrl; - - /** - * 学生照片存储路径 - */ - @TableField(value = "photo_path", exist = false) - private String photoPath; - - /** - * 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业 - */ - private String studentStatus; - - /** - * 入学年份 - */ - @TableField(exist = false) - private Integer enrollmentYear; - - /** - * 入学日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date enrollmentDate; - - /** - * 学制(年) - */ - @TableField(value = "school_system", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer schoolSystem; - - /** - * 学历层次 - */ - @TableField(value = "education_level", updateStrategy = FieldStrategy.NOT_EMPTY) - private String educationLevel; - - /** - * 培养方式:全日制、在职、函授、夜大等 - */ - @TableField(value = "training_type", updateStrategy = FieldStrategy.NOT_EMPTY) - private String trainingType; - - /** - * 录取类别:统招、自主招生、专项计划等 - */ - @TableField("admission_category") - private String admissionCategory; - - /** - * 生源地区(省市县) - */ - @TableField("source_region") - private String sourceRegion; - - /** - * 毕业中学 - */ - @TableField("middle_school") - private String middleSchool; - - /** - * 专业代码 - */ - private String majorCode; - - /** - * 专业名称 - */ - private String majorName; - - /** - * 班级代码 - */ - private String classCode; - - /** - * 班级名称 - */ - private String className; - - /** - * 年级 - */ - private String grade; - - /** - * 学院代码 - */ - private String collegeCode; - - /** - * 学院名称 - */ - private String collegeName; - - /** - * 辅导员ID - */ - private Long counselorId; - - /** - * 辅导员姓名 - */ - private String counselorName; - - /** - * 班主任ID - */ - private Long classTeacherId; - - /** - * 班主任姓名 - */ - private String classTeacherName; - - /** - * 手机号码 - */ - private String phone; - - /** - * 电子邮箱 - */ - private String email; - - /** - * QQ号码 - */ - private String qq; - - /** - * 微信号 - */ - private String wechat; - - /** - * 家庭地址 - */ - private String homeAddress; - - /** - * 现住址 - */ - @TableField("current_address") - private String currentAddress; - - /** - * 邮政编码 - */ - @TableField("postal_code") - private String postalCode; - - /** - * 户口类型:农业、非农业 - */ - @TableField("household_register_type") - private String householdRegisterType; - - /** - * 户籍所在地 - */ - @TableField("hukou_location") - private String hukouLocation; - - /** - * 宿舍楼栋 - */ - @TableField("dormitory_building") - private String dormitoryBuilding; - - /** - * 宿舍房间号 - */ - @TableField("dormitory_room") - private String dormitoryRoom; - - /** - * 身高(cm) - */ - private BigDecimal height; - - /** - * 体重(kg) - */ - private BigDecimal weight; - - /** - * 血型 - */ - @TableField("blood_type") - private String bloodType; - - // 紧急联系人信息字段 - @TableField(value = "emergency_contact_name", updateStrategy = FieldStrategy.NOT_EMPTY) - private String emergencyContactName; - - @TableField(value = "emergency_contact_phone", updateStrategy = FieldStrategy.NOT_EMPTY) - private String emergencyContactPhone; - - @TableField(value = "emergency_contact_relation", updateStrategy = FieldStrategy.NOT_EMPTY) - private String emergencyContactRelation; - - // 家庭信息字段 - @TableField(value = "father_name", updateStrategy = FieldStrategy.NOT_EMPTY) - private String fatherName; - - @TableField(value = "father_phone", updateStrategy = FieldStrategy.NOT_EMPTY) - private String fatherPhone; - - @TableField(value = "father_work_unit", updateStrategy = FieldStrategy.NOT_EMPTY) - private String fatherWorkUnit; - - @TableField(value = "mother_name", updateStrategy = FieldStrategy.NOT_EMPTY) - private String motherName; - - @TableField(value = "mother_phone", updateStrategy = FieldStrategy.NOT_EMPTY) - private String motherPhone; - - @TableField(value = "mother_work_unit", updateStrategy = FieldStrategy.NOT_EMPTY) - private String motherWorkUnit; - - private String guardianName; - private String guardianPhone; - private String guardianRelation; - - @TableField(value = "family_income", updateStrategy = FieldStrategy.NOT_EMPTY) - private String familyIncome; - - @TableField(value = "family_economic_status", updateStrategy = FieldStrategy.NOT_EMPTY) - private String familyEconomicStatus; - - @TableField(value = "family_members", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer familyMembers; - - // 健康信息字段 - @TableField(value = "health_status", updateStrategy = FieldStrategy.NOT_EMPTY) - private String healthStatus; - - @TableField(value = "special_condition", updateStrategy = FieldStrategy.NOT_EMPTY) - private String specialCondition; - - @TableField(value = "medical_history", updateStrategy = FieldStrategy.NOT_EMPTY) - private String medicalHistory; - - @TableField(value = "allergies", updateStrategy = FieldStrategy.NOT_EMPTY) - private String allergies; - - private String disabilityType; - private String disabilityLevel; - - // 银行信息字段 - @TableField(value = "bank_card_no", updateStrategy = FieldStrategy.NOT_EMPTY) - private String bankCardNo; - - @TableField(value = "bank_name", updateStrategy = FieldStrategy.NOT_EMPTY) - private String bankName; - - @TableField(value = "bank_branch", updateStrategy = FieldStrategy.NOT_EMPTY) - private String bankBranch; - - @TableField(value = "card_holder_name", updateStrategy = FieldStrategy.NOT_EMPTY) - private String cardHolderName; - - // 特殊标识字段 - @TableField(value = "is_poor_student", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isPoorStudent; - - @TableField(value = "is_minority", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isMinority; - - @TableField(value = "is_disabled", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isDisabled; - - @TableField(value = "is_orphan", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isOrphan; - - @TableField(value = "is_left_behind_child", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isLeftBehindChild; - - @TableField(value = "is_single_child", updateStrategy = FieldStrategy.NOT_EMPTY) - private Integer isSingleChild; - - @TableField("has_loan") - private Integer hasLoan; - - @TableField("loan_amount") - private BigDecimal loanAmount; - - // 扩展信息字段 - @TableField(value = "specialties", updateStrategy = FieldStrategy.NOT_EMPTY) - private String specialties; - - @TableField(value = "awards", updateStrategy = FieldStrategy.NOT_EMPTY) - private String awards; - - @TableField(value = "violations", updateStrategy = FieldStrategy.NOT_EMPTY) - private String violations; - - @TableField(value = "social_activities", updateStrategy = FieldStrategy.NOT_EMPTY) - private String socialActivities; - - // 状态管理字段 - /** - * 信息状态:1-正常,2-待审核,3-已审核,4-已驳回,5-已删除 - */ - @TableField("info_status") - private String infoStatus; - - /** - * 数据来源:manual-手工录入,import-批量导入,sync-同步 - */ - @TableField("data_source") - private String dataSource; - - /** - * 最后批次ID - */ - @TableField("last_batch_id") - private Long lastBatchId; - - /** - * 最后审核时间 - */ - @TableField("last_audit_time") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastAuditTime; - - /** - * 信息是否完整:0-不完整,1-完整 - */ - @TableField("is_complete") - private Integer isComplete; - - /** - * 信息完整度百分比 - */ - @TableField("completion_rate") - private BigDecimal completionRate; - - // 扩展字段 - @TableField("ext_field1") - private String extField1; - - @TableField("ext_field2") - private String extField2; - - @TableField("ext_field3") - private String extField3; - - @TableField("ext_field4") - private String extField4; - - @TableField("ext_field5") - private String extField5; - - /** - * 备注信息 - */ - private String remark; - - /** - * 删除标志(0代表存在 1代表删除) - */ - @TableLogic(value = "0", delval = "1") - private Integer deleted; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfoSimple.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfoSimple.java deleted file mode 100644 index 63120763..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/XgStudentInfoSimple.java +++ /dev/null @@ -1,274 +0,0 @@ -package org.dromara.xg.domain; - -import org.dromara.common.tenant.core.TenantEntity; -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; - -/** - * 学生信息对象(简化版 - 只包含数据库中确实存在的字段) - * - * @author Cursor AI - * @date 2025-01-16 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("xg_student_info") -public class XgStudentInfoSimple extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID(雪花ID) - */ - @TableId(value = "id") - private Long id; - - /** - * 学号 - */ - private String studentNo; - - /** - * 身份证号 - */ - private String idCard; - - /** - * 姓名 - */ - private String name; - - /** - * 性别:0-男,1-女 - */ - private String gender; - - /** - * 出生日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; - - /** - * 政治面貌 - */ - private String politicalStatus; - - /** - * 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业 - */ - private String studentStatus; - - /** - * 入学日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date enrollmentDate; - - /** - * 班级名称 - */ - private String className; - - /** - * 学院名称 - */ - private String collegeName; - - /** - * 手机号码 - */ - private String phone; - - /** - * 电子邮箱 - */ - private String email; - - /** - * QQ号码 - */ - private String qq; - - /** - * 微信号 - */ - private String wechat; - - /** - * 家庭地址 - */ - private String homeAddress; - - /** - * 身高(厘米) - */ - private BigDecimal height; - - /** - * 体重(公斤) - */ - private BigDecimal weight; - - /** - * 血型 - */ - private String bloodType; - - /** - * 健康状况 - */ - private String healthStatus; - - /** - * 过敏史 - */ - private String allergies; - - /** - * 病史 - */ - private String medicalHistory; - - /** - * 父亲姓名 - */ - private String fatherName; - - /** - * 父亲电话 - */ - private String fatherPhone; - - /** - * 父亲工作单位 - */ - private String fatherWorkUnit; - - /** - * 母亲姓名 - */ - private String motherName; - - /** - * 母亲电话 - */ - private String motherPhone; - - /** - * 母亲工作单位 - */ - private String motherWorkUnit; - - /** - * 紧急联系人姓名 - */ - private String emergencyContactName; - - /** - * 紧急联系人电话 - */ - private String emergencyContactPhone; - - /** - * 紧急联系人关系 - */ - private String emergencyContactRelation; - - /** - * 银行卡号 - */ - private String bankCardNo; - - /** - * 开户银行 - */ - private String bankName; - - /** - * 开户支行 - */ - private String bankBranch; - - /** - * 持卡人姓名 - */ - private String cardHolderName; - - /** - * 是否贫困生:0-否,1-是 - */ - private Integer isPoorStudent; - - /** - * 是否少数民族:0-否,1-是 - */ - private Integer isMinority; - - /** - * 是否残疾:0-否,1-是 - */ - private Integer isDisabled; - - /** - * 是否孤儿:0-否,1-是 - */ - private Integer isOrphan; - - /** - * 是否留守儿童:0-否,1-是 - */ - private Integer isLeftBehindChild; - - /** - * 是否独生子女:0-否,1-是 - */ - private Integer isSingleChild; - - /** - * 特长爱好 - */ - private String specialties; - - /** - * 家庭年收入 - */ - private String familyIncome; - - /** - * 社会活动 - */ - private String socialActivities; - - /** - * 获奖情况 - */ - private String awards; - - /** - * 违纪记录 - */ - private String violations; - - /** - * 宿舍楼栋 - */ - private String dormitoryBuilding; - - /** - * 宿舍房间号 - */ - private String dormitoryRoom; - - /** - * 备注信息 - */ - private String remark; -} \ No newline at end of file diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgBatchScheduledTaskBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgBatchScheduledTaskBo.java deleted file mode 100644 index 50f54465..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgBatchScheduledTaskBo.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgBatchScheduledTask; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; - -/** - * 批次定时任务业务对象 XgBatchScheduledTaskBo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgBatchScheduledTask.class, reverseConvertGenerate = false) -public class XgBatchScheduledTaskBo extends BaseEntity { - - /** - * 任务ID - */ - @NotNull(message = "任务ID不能为空", groups = { EditGroup.class }) - private Long taskId; - - /** - * 批次ID - */ - @NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long batchId; - - /** - * 任务类型 - */ - @NotBlank(message = "任务类型不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "任务类型长度不能超过50个字符") - private String taskType; - - /** - * 任务名称 - */ - @NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 200, message = "任务名称长度不能超过200个字符") - private String taskName; - - /** - * 任务描述 - */ - @Size(max = 500, message = "任务描述长度不能超过500个字符") - private String taskDescription; - - /** - * 计划执行时间 - */ - @NotNull(message = "计划执行时间不能为空", groups = { AddGroup.class, EditGroup.class }) - private Date scheduledTime; - - /** - * 实际执行时间 - */ - private Date actualExecutionTime; - - /** - * 任务状态 - */ - @NotBlank(message = "任务状态不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "任务状态长度不能超过20个字符") - private String taskStatus; - - /** - * 执行结果 - */ - @Size(max = 20, message = "执行结果长度不能超过20个字符") - private String executionResult; - - /** - * 执行次数 - */ - @Min(value = 0, message = "执行次数不能小于0") - private Integer executionCount; - - /** - * 最大重试次数 - */ - @Min(value = 0, message = "最大重试次数不能小于0") - @Max(value = 10, message = "最大重试次数不能大于10") - private Integer maxRetryCount; - - /** - * 重试间隔(分钟) - */ - @Min(value = 1, message = "重试间隔不能小于1分钟") - @Max(value = 1440, message = "重试间隔不能大于1440分钟") - private Integer retryInterval; - - /** - * 错误信息 - */ - @Size(max = 1000, message = "错误信息长度不能超过1000个字符") - private String errorMessage; - - /** - * 执行参数 - */ - @Size(max = 2000, message = "执行参数长度不能超过2000个字符") - private String executionParams; - - /** - * 执行结果详情 - */ - @Size(max = 2000, message = "执行结果详情长度不能超过2000个字符") - private String executionResultDetail; - - /** - * 是否启用 - */ - @NotNull(message = "是否启用不能为空", groups = { AddGroup.class, EditGroup.class }) - private Boolean isEnabled; - - /** - * 租户ID - */ - @NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "租户ID长度不能超过20个字符") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - private Date updateTime; - - // 查询条件字段 - /** - * 批次编码 - */ - private String batchCode; - - /** - * 批次名称 - */ - private String batchName; - - /** - * 任务类型列表 - */ - private String[] taskTypes; - - /** - * 任务状态列表 - */ - private String[] taskStatuses; - - /** - * 执行结果列表 - */ - private String[] executionResults; - - /** - * 计划执行开始时间 - */ - private Date scheduledStartTime; - - /** - * 计划执行结束时间 - */ - private Date scheduledEndTime; - - /** - * 实际执行开始时间 - */ - private Date actualStartTime; - - /** - * 实际执行结束时间 - */ - private Date actualEndTime; - - /** - * 是否需要重试 - */ - private Boolean needRetry; - - /** - * 是否超时 - */ - private Boolean isTimeout; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassInfoBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassInfoBo.java deleted file mode 100644 index 6ffdba2c..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassInfoBo.java +++ /dev/null @@ -1,378 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgClassInfo; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 班级信息业务对象 xg_class_info - * - * @author Cursor AI - * @date 2025-01-21 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgClassInfo.class, reverseConvertGenerate = false) -public class XgClassInfoBo extends BaseEntity { - - /** - * 班级ID - */ - @NotNull(message = "班级ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 班级代码 - */ - @NotBlank(message = "班级代码不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 32, message = "班级代码长度不能超过32个字符") - private String classCode; - - /** - * 班级名称 - */ - @NotBlank(message = "班级名称不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "班级名称长度不能超过100个字符") - private String className; - - /** - * 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级 - */ - private String classType; - - /** - * 年级 - */ - @NotBlank(message = "年级不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 10, message = "年级长度不能超过10个字符") - private String grade; - - /** - * 入学年份 - */ - @NotNull(message = "入学年份不能为空", groups = { AddGroup.class, EditGroup.class }) - @Min(value = 1900, message = "入学年份不能小于1900") - @Max(value = 2100, message = "入学年份不能大于2100") - private Integer enrollmentYear; - - /** - * 毕业年份 - */ - @Min(value = 1900, message = "毕业年份不能小于1900") - @Max(value = 2100, message = "毕业年份不能大于2100") - private Integer graduationYear; - - /** - * 专业代码 - */ - @Size(max = 20, message = "专业代码长度不能超过20个字符") - private String majorCode; - - /** - * 专业名称 - */ - @Size(max = 100, message = "专业名称长度不能超过100个字符") - private String majorName; - - /** - * 培养方式:全日制、在职、函授、夜大等 - */ - @Size(max = 20, message = "培养方式长度不能超过20个字符") - private String trainingType; - - /** - * 学位类型:本科、专科、研究生等 - */ - @Size(max = 20, message = "学位类型长度不能超过20个字符") - private String degreeType; - - /** - * 学院代码 - */ - @Size(max = 20, message = "学院代码长度不能超过20个字符") - private String collegeCode; - - /** - * 学院名称 - */ - @Size(max = 100, message = "学院名称长度不能超过100个字符") - private String collegeName; - - /** - * 辅导员ID - */ - private Long counselorId; - - /** - * 辅导员姓名 - */ - @Size(max = 50, message = "辅导员姓名长度不能超过50个字符") - private String counselorName; - - /** - * 班主任ID - */ - private Long classTeacherId; - - /** - * 班主任姓名 - */ - @Size(max = 50, message = "班主任姓名长度不能超过50个字符") - private String classTeacherName; - - /** - * 班级导师ID - */ - private Long classAdvisorId; - - /** - * 班级导师姓名 - */ - @Size(max = 50, message = "班级导师姓名长度不能超过50个字符") - private String classAdvisorName; - - /** - * 班长ID - */ - private Long classMonitorId; - - /** - * 班长姓名 - */ - @Size(max = 50, message = "班长姓名长度不能超过50个字符") - private String classMonitorName; - - /** - * 副班长ID - */ - private Long deputyMonitorId; - - /** - * 副班长姓名 - */ - @Size(max = 50, message = "副班长姓名长度不能超过50个字符") - private String deputyMonitorName; - - /** - * 班级状态:1-正常,2-暂停,3-毕业,4-解散 - */ - private String classStatus; - - /** - * 是否毕业:0-未毕业,1-已毕业 - */ - private Integer isGraduation; - - /** - * 毕业日期 - */ - private LocalDate graduationDate; - - /** - * 计划容量 - */ - @Min(value = 1, message = "计划容量不能小于1") - @Max(value = 200, message = "计划容量不能大于200") - private Integer plannedCapacity; - - /** - * 当前学生数量 - */ - private Integer currentStudentCount; - - /** - * 最大学生数量 - */ - @Min(value = 1, message = "最大学生数量不能小于1") - @Max(value = 200, message = "最大学生数量不能大于200") - private Integer maxStudentCount; - - /** - * 男生数量 - */ - private Integer maleCount; - - /** - * 女生数量 - */ - private Integer femaleCount; - - /** - * 在籍学生数量 - */ - private Integer activeCount; - - /** - * 转入学生数量 - */ - private Integer transferInCount; - - /** - * 转出学生数量 - */ - private Integer transferOutCount; - - /** - * 退学学生数量 - */ - private Integer dropoutCount; - - /** - * 毕业学生数量 - */ - private Integer graduateCount; - - /** - * 办公室位置 - */ - @Size(max = 200, message = "办公室位置长度不能超过200个字符") - private String officeLocation; - - /** - * 教室位置 - */ - @Size(max = 100, message = "教室位置长度不能超过100个字符") - private String classLocation; - - /** - * 联系电话 - */ - @Size(max = 20, message = "联系电话长度不能超过20个字符") - private String contactPhone; - - /** - * QQ群号 - */ - @Size(max = 20, message = "QQ群号长度不能超过20个字符") - private String qqGroup; - - /** - * 微信群 - */ - @Size(max = 100, message = "微信群长度不能超过100个字符") - private String wechatGroup; - - /** - * 邮箱 - */ - @Email(message = "邮箱格式不正确") - @Size(max = 100, message = "邮箱长度不能超过100个字符") - private String email; - - /** - * 课程安排 - */ - private String classSchedule; - - /** - * 班级文化 - */ - private String classCulture; - - /** - * 班级规章制度 - */ - private String classRules; - - /** - * 班级描述 - */ - @Size(max = 500, message = "班级描述长度不能超过500个字符") - private String classDescription; - - /** - * 最后统计更新时间 - */ - private LocalDateTime lastCountUpdate; - - /** - * 扩展字段1 - */ - @Size(max = 200, message = "扩展字段1长度不能超过200个字符") - private String extField1; - - /** - * 扩展字段2 - */ - @Size(max = 200, message = "扩展字段2长度不能超过200个字符") - private String extField2; - - /** - * 扩展字段3 - */ - @Size(max = 200, message = "扩展字段3长度不能超过200个字符") - private String extField3; - - /** - * 备注 - */ - @Size(max = 500, message = "备注长度不能超过500个字符") - private String remark; - - // ========== 查询条件字段 ========== - - /** - * 入学年份开始 - */ - private Integer enrollmentYearStart; - - /** - * 入学年份结束 - */ - private Integer enrollmentYearEnd; - - /** - * 班级代码列表(用于批量查询) - */ - private List classCodeList; - - /** - * 班级状态列表(用于批量查询) - */ - private List classStatusList; - - /** - * 学院代码列表(用于批量查询) - */ - private List collegeCodeList; - - /** - * 专业代码列表(用于批量查询) - */ - private List majorCodeList; - - /** - * 年级列表(用于批量查询) - */ - private List gradeList; - - /** - * 辅导员ID列表(用于批量查询) - */ - private List counselorIdList; - - /** - * 班主任ID列表(用于批量查询) - */ - private List classTeacherIdList; - - /** - * 创建时间开始 - */ - private String createTimeStart; - - /** - * 创建时间结束 - */ - private String createTimeEnd; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassTeacherRelationBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassTeacherRelationBo.java deleted file mode 100644 index d9a49e62..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgClassTeacherRelationBo.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgClassTeacherRelation; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.time.LocalDateTime; -import java.util.List; - -/** - * 班级班主任关系业务对象 xg_class_teacher_relation - * - * @author Cursor AI - * @date 2025-07-22 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgClassTeacherRelation.class, reverseConvertGenerate = false) -public class XgClassTeacherRelationBo extends BaseEntity { - - /** - * 主键ID - */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 班级ID - */ - @NotNull(message = "班级ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long classId; - - /** - * 班主任用户ID - */ - @NotNull(message = "班主任用户ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long teacherId; - - /** - * 状态(0正常 1停用) - */ - private String status; - - /** - * 生效开始日期 - */ - private LocalDateTime startDate; - - /** - * 生效结束日期 - */ - private LocalDateTime endDate; - - /** - * 备注 - */ - @Size(max = 500, message = "备注长度不能超过500个字符") - private String remark; - - // ========== 查询条件字段 ========== - - /** - * 班级ID列表(用于批量查询) - */ - private List classIdList; - - /** - * 班主任ID列表(用于批量查询) - */ - private List teacherIdList; - - /** - * 状态列表(用于批量查询) - */ - private List statusList; - - /** - * 创建时间开始 - */ - private String createTimeStart; - - /** - * 创建时间结束 - */ - private String createTimeEnd; - - /** - * 生效开始日期开始 - */ - private String startDateStart; - - /** - * 生效开始日期结束 - */ - private String startDateEnd; - - /** - * 生效结束日期开始 - */ - private String endDateStart; - - /** - * 生效结束日期结束 - */ - private String endDateEnd; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchBo.java deleted file mode 100644 index 49151e4e..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchBo.java +++ /dev/null @@ -1,280 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgCollectionBatch; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; -import java.math.BigDecimal; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 信息采集批次业务对象 xg_collection_batch - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgCollectionBatch.class, reverseConvertGenerate = false) -public class XgCollectionBatchBo extends BaseEntity { - - /** - * 主键ID(雪花ID) - */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 批次编码 - */ - @NotBlank(message = "批次编码不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 32, message = "批次编码长度不能超过32个字符") - private String batchCode; - - /** - * 批次名称 - */ - @NotBlank(message = "批次名称不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "批次名称长度不能超过100个字符") - private String batchName; - - /** - * 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义 - */ - @Size(max = 20, message = "批次类型长度不能超过20个字符") - private String batchType; - - /** - * 学年,如2024-2025 - */ - @NotBlank(message = "学年不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "学年长度不能超过20个字符") - private String academicYear; - - /** - * 学期:spring-春季,autumn-秋季 - */ - @Size(max = 10, message = "学期长度不能超过10个字符") - private String semester; - - /** - * 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档 - */ - @Pattern(regexp = "^[1-5]$", message = "批次状态只能为1-5") - private String batchStatus; - - /** - * 发布时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date publishTime; - - /** - * 开始时间 - */ - @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class }) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; - - /** - * 结束时间 - */ - @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class }) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; - - /** - * 归档时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date archiveTime; - - /** - * 目标学院(JSON格式) - */ - private String targetColleges; - - /** - * 目标年级(JSON格式) - */ - private String targetGrades; - - /** - * 目标专业(JSON格式) - */ - private String targetMajors; - - /** - * 必填字段(JSON格式) - */ - private String requiredFields; - - /** - * 可选字段(JSON格式) - */ - private String optionalFields; - - /** - * 审核级别配置(JSON格式) - */ - private String auditLevels; - - /** - * 总学生数 - */ - @Min(value = 0, message = "总学生数不能小于0") - private Integer totalStudents; - - /** - * 已提交数 - */ - @Min(value = 0, message = "已提交数不能小于0") - private Integer submittedCount; - - /** - * 已审核数 - */ - @Min(value = 0, message = "已审核数不能小于0") - private Integer approvedCount; - - /** - * 已驳回数 - */ - @Min(value = 0, message = "已驳回数不能小于0") - private Integer rejectedCount; - - /** - * 完成率 - */ - @DecimalMin(value = "0.0", message = "完成率不能小于0") - @DecimalMax(value = "100.0", message = "完成率不能大于100") - private BigDecimal completionRate; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 审核权限(JSON格式) - */ - private String auditPermissions; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 自动提醒:0-关闭,1-开启 - */ - @Pattern(regexp = "^[01]$", message = "自动提醒只能为0或1") - private Integer autoReminder; - - /** - * 提醒频率(天) - */ - @Min(value = 1, message = "提醒频率不能小于1天") - @Max(value = 365, message = "提醒频率不能大于365天") - private Integer reminderFrequency; - - /** - * 提交后允许修改:0-不允许,1-允许 - */ - @Pattern(regexp = "^[01]$", message = "提交后允许修改只能为0或1") - private Integer allowModifyAfterSubmit; - - /** - * 批次描述 - */ - @Size(max = 500, message = "批次描述长度不能超过500个字符") - private String description; - - /** - * 备注信息 - */ - @Size(max = 500, message = "备注信息长度不能超过500个字符") - private String remark; - - // ========== 查询条件字段 ========== - - /** - * 批次状态列表(用于批量查询) - */ - private List batchStatusList; - - /** - * 学年列表(用于批量查询) - */ - private List academicYearList; - - /** - * 批次类型列表(用于批量查询) - */ - private List batchTypeList; - - /** - * 开始时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTimeBegin; - - /** - * 开始时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTimeEnd; - - /** - * 结束时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTimeBegin; - - /** - * 结束时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTimeEnd; - - /** - * 创建时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeStart; - - /** - * 创建时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeEnd; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchLogBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchLogBo.java deleted file mode 100644 index 0321b94d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchLogBo.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgCollectionBatchLog; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; - -/** - * 信息采集批次操作日志业务对象 XgCollectionBatchLogBo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgCollectionBatchLog.class, reverseConvertGenerate = false) -public class XgCollectionBatchLogBo extends BaseEntity { - - /** - * 日志ID - */ - @NotNull(message = "日志ID不能为空", groups = { EditGroup.class }) - private Long logId; - - /** - * 批次ID - */ - @NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long batchId; - - /** - * 学生ID - */ - private Long studentId; - - /** - * 操作类型 - */ - @NotBlank(message = "操作类型不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "操作类型长度不能超过50个字符") - private String operationType; - - /** - * 操作描述 - */ - @Size(max = 500, message = "操作描述长度不能超过500个字符") - private String operationDescription; - - /** - * 操作人ID - */ - @NotNull(message = "操作人ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long operatorId; - - /** - * 操作人姓名 - */ - @NotBlank(message = "操作人姓名不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "操作人姓名长度不能超过100个字符") - private String operatorName; - - /** - * 操作时间 - */ - @NotNull(message = "操作时间不能为空", groups = { AddGroup.class, EditGroup.class }) - private Date operationTime; - - /** - * IP地址 - */ - @Size(max = 50, message = "IP地址长度不能超过50个字符") - private String ipAddress; - - /** - * 用户代理 - */ - @Size(max = 500, message = "用户代理长度不能超过500个字符") - private String userAgent; - - /** - * 操作结果 - */ - @Size(max = 20, message = "操作结果长度不能超过20个字符") - private String operationResult; - - /** - * 错误信息 - */ - @Size(max = 1000, message = "错误信息长度不能超过1000个字符") - private String errorMessage; - - /** - * 租户ID - */ - @NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "租户ID长度不能超过20个字符") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - private Date updateTime; - - // 查询条件字段 - /** - * 开始时间 - */ - private Date startTime; - - /** - * 结束时间 - */ - private Date endTime; - - /** - * 批次编码 - */ - private String batchCode; - - /** - * 学生学号 - */ - private String studentNo; - - /** - * 学生姓名 - */ - private String studentName; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchPermissionBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchPermissionBo.java deleted file mode 100644 index 20b18bf0..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchPermissionBo.java +++ /dev/null @@ -1,173 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgCollectionBatchPermission; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; - -/** - * 信息采集批次权限配置业务对象 XgCollectionBatchPermissionBo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgCollectionBatchPermission.class, reverseConvertGenerate = false) -public class XgCollectionBatchPermissionBo extends BaseEntity { - - /** - * 权限ID - */ - @NotNull(message = "权限ID不能为空", groups = { EditGroup.class }) - private Long permissionId; - - /** - * 批次ID - */ - @NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long batchId; - - /** - * 权限类型 - */ - @NotBlank(message = "权限类型不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "权限类型长度不能超过20个字符") - private String permissionType; - - /** - * 权限对象ID - */ - @NotNull(message = "权限对象ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long permissionObjectId; - - /** - * 权限对象类型 - */ - @NotBlank(message = "权限对象类型不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "权限对象类型长度不能超过20个字符") - private String permissionObjectType; - - /** - * 权限对象名称 - */ - @NotBlank(message = "权限对象名称不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "权限对象名称长度不能超过100个字符") - private String permissionObjectName; - - /** - * 权限范围 - */ - @Size(max = 100, message = "权限范围长度不能超过100个字符") - private String permissionScope; - - /** - * 权限级别 - */ - @Min(value = 1, message = "权限级别不能小于1") - @Max(value = 10, message = "权限级别不能大于10") - private Integer permissionLevel; - - /** - * 是否有效 - */ - @NotNull(message = "是否有效不能为空", groups = { AddGroup.class, EditGroup.class }) - private Boolean isActive; - - /** - * 生效时间 - */ - private Date effectiveTime; - - /** - * 失效时间 - */ - private Date expirationTime; - - /** - * 授权人ID - */ - @NotNull(message = "授权人ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long grantedBy; - - /** - * 授权时间 - */ - @NotNull(message = "授权时间不能为空", groups = { AddGroup.class, EditGroup.class }) - private Date grantedTime; - - /** - * 备注 - */ - @Size(max = 500, message = "备注长度不能超过500个字符") - private String remark; - - /** - * 租户ID - */ - @NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "租户ID长度不能超过20个字符") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - private Date updateTime; - - // 查询条件字段 - /** - * 批次编码 - */ - private String batchCode; - - /** - * 批次名称 - */ - private String batchName; - - /** - * 权限类型列表 - */ - private String[] permissionTypes; - - /** - * 权限对象类型列表 - */ - private String[] permissionObjectTypes; - - /** - * 授权人姓名 - */ - private String grantedByName; - - /** - * 开始时间 - */ - private Date startTime; - - /** - * 结束时间 - */ - private Date endTime; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStatisticsBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStatisticsBo.java deleted file mode 100644 index 394550b8..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStatisticsBo.java +++ /dev/null @@ -1,182 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgCollectionBatchStatistics; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * 信息采集批次统计业务对象 XgCollectionBatchStatisticsBo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgCollectionBatchStatistics.class, reverseConvertGenerate = false) -public class XgCollectionBatchStatisticsBo extends BaseEntity { - - /** - * 统计ID - */ - @NotNull(message = "统计ID不能为空", groups = { EditGroup.class }) - private Long statisticsId; - - /** - * 批次ID - */ - @NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long batchId; - - /** - * 统计维度 - */ - @NotBlank(message = "统计维度不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "统计维度长度不能超过50个字符") - private String statisticsDimension; - - /** - * 维度值 - */ - @NotBlank(message = "维度值不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "维度值长度不能超过100个字符") - private String dimensionValue; - - /** - * 维度名称 - */ - @Size(max = 200, message = "维度名称长度不能超过200个字符") - private String dimensionName; - - /** - * 总学生数 - */ - @NotNull(message = "总学生数不能为空", groups = { AddGroup.class, EditGroup.class }) - @Min(value = 0, message = "总学生数不能小于0") - private Integer totalStudents; - - /** - * 已提交数 - */ - @NotNull(message = "已提交数不能为空", groups = { AddGroup.class, EditGroup.class }) - @Min(value = 0, message = "已提交数不能小于0") - private Integer submittedCount; - - /** - * 未提交数 - */ - @NotNull(message = "未提交数不能为空", groups = { AddGroup.class, EditGroup.class }) - @Min(value = 0, message = "未提交数不能小于0") - private Integer notSubmittedCount; - - /** - * 完成率 - */ - @NotNull(message = "完成率不能为空", groups = { AddGroup.class, EditGroup.class }) - @DecimalMin(value = "0.00", message = "完成率不能小于0") - @DecimalMax(value = "100.00", message = "完成率不能大于100") - private BigDecimal completionRate; - - /** - * 排名 - */ - @Min(value = 1, message = "排名不能小于1") - private Integer ranking; - - /** - * 统计时间 - */ - @NotNull(message = "统计时间不能为空", groups = { AddGroup.class, EditGroup.class }) - private Date statisticsTime; - - /** - * 备注 - */ - @Size(max = 500, message = "备注长度不能超过500个字符") - private String remark; - - /** - * 租户ID - */ - @NotBlank(message = "租户ID不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "租户ID长度不能超过20个字符") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - private Date updateTime; - - // 查询条件字段 - /** - * 批次编码 - */ - private String batchCode; - - /** - * 批次名称 - */ - private String batchName; - - /** - * 统计维度列表 - */ - private String[] statisticsDimensions; - - /** - * 维度值列表 - */ - private String[] dimensionValues; - - /** - * 最小完成率 - */ - private BigDecimal minCompletionRate; - - /** - * 最大完成率 - */ - private BigDecimal maxCompletionRate; - - /** - * 开始时间 - */ - private Date startTime; - - /** - * 结束时间 - */ - private Date endTime; - - /** - * 排序字段 - */ - private String orderBy; - - /** - * 排序方向 - */ - private String sortDirection; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStudentBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStudentBo.java deleted file mode 100644 index 98366d7a..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgCollectionBatchStudentBo.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgCollectionBatchStudent; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 信息采集批次学生关联业务对象 xg_collection_batch_student - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgCollectionBatchStudent.class, reverseConvertGenerate = false) -public class XgCollectionBatchStudentBo extends BaseEntity { - - /** - * 主键ID - */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 批次ID - */ - @NotNull(message = "批次ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long batchId; - - /** - * 学生ID - */ - @NotNull(message = "学生ID不能为空", groups = { AddGroup.class, EditGroup.class }) - private Long studentId; - - /** - * 学号 - */ - @NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "学号长度不能超过50个字符") - private String studentCode; - - /** - * 学生姓名 - */ - @NotBlank(message = "学生姓名不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "学生姓名长度不能超过100个字符") - private String studentName; - - /** - * 学院ID - */ - private Long collegeId; - - /** - * 学院名称 - */ - @Size(max = 100, message = "学院名称长度不能超过100个字符") - private String collegeName; - - /** - * 专业ID - */ - private Long majorId; - - /** - * 专业名称 - */ - @Size(max = 100, message = "专业名称长度不能超过100个字符") - private String majorName; - - /** - * 班级ID - */ - private Long classId; - - /** - * 班级名称 - */ - @Size(max = 100, message = "班级名称长度不能超过100个字符") - private String className; - - /** - * 届别 - */ - @Size(max = 50, message = "届别长度不能超过50个字符") - private String grade; - - /** - * 是否可编辑:0-否,1-是 - */ - @Pattern(regexp = "^[01]$", message = "是否可编辑只能为0或1") - private Integer canEdit; - - /** - * 是否已提交:0-否,1-是 - */ - @Pattern(regexp = "^[01]$", message = "是否已提交只能为0或1") - private Integer hasSubmitted; - - /** - * 提交时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date submitTime; - - /** - * 最后编辑时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastEditTime; - - /** - * 编辑次数 - */ - @Min(value = 0, message = "编辑次数不能小于0") - private Integer editCount; - - // ========== 查询条件字段 ========== - - /** - * 批次ID列表(用于批量查询) - */ - private List batchIdList; - - /** - * 学生ID列表(用于批量查询) - */ - private List studentIdList; - - /** - * 学院ID列表(用于批量查询) - */ - private List collegeIdList; - - /** - * 专业ID列表(用于批量查询) - */ - private List majorIdList; - - /** - * 班级ID列表(用于批量查询) - */ - private List classIdList; - - /** - * 届别列表(用于批量查询) - */ - private List gradeList; - - /** - * 是否已提交列表(用于批量查询) - */ - private List hasSubmittedList; - - /** - * 提交时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date submitTimeBegin; - - /** - * 提交时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date submitTimeEnd; - - /** - * 创建时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeStart; - - /** - * 创建时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeEnd; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsConfigBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsConfigBo.java deleted file mode 100644 index c6ce168d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsConfigBo.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgStatisticsConfig; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 统计分析配置业务对象 xg_statistics_config - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgStatisticsConfig.class, reverseConvertGenerate = false) -public class XgStatisticsConfigBo extends BaseEntity { - - /** - * 主键ID - */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 租户编号 - */ - private String tenantId; - - /** - * 配置名称 - */ - @NotBlank(message = "配置名称不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 100, message = "配置名称长度不能超过100个字符") - private String configName; - - /** - * 配置编码 - */ - @NotBlank(message = "配置编码不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "配置编码长度不能超过50个字符") - private String configCode; - - /** - * 配置类型:dimension-维度,report-报表,chart-图表 - */ - @NotBlank(message = "配置类型不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 20, message = "配置类型长度不能超过20个字符") - private String configType; - - /** - * 配置内容(JSON格式) - */ - @NotBlank(message = "配置内容不能为空", groups = { AddGroup.class, EditGroup.class }) - private String configContent; - - /** - * 是否系统配置:0-否,1-是 - */ - private Integer isSystem; - - /** - * 是否启用:0-否,1-是 - */ - private Integer isEnabled; - - /** - * 排序顺序 - */ - private Integer sortOrder; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 备注信息 - */ - @Size(max = 500, message = "备注信息长度不能超过500个字符") - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 删除标志(0代表存在 1代表删除) - */ - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsQueryBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsQueryBo.java deleted file mode 100644 index aaa9e446..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStatisticsQueryBo.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; - -import java.util.Date; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 统计查询业务对象 - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@EqualsAndHashCode(callSuper = true) -public class XgStatisticsQueryBo extends BaseEntity { - - /** - * 统计类型:dimension-维度统计,report-报表,chart-图表 - */ - @NotBlank(message = "统计类型不能为空") - private String statisticsType; - - /** - * 统计维度 - */ - private String dimension; - - /** - * 统计字段 - */ - private String field; - - /** - * 分组字段 - */ - private String groupBy; - - /** - * 统计条件 - */ - private Map conditions; - - /** - * 时间范围 - 开始时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; - - /** - * 时间范围 - 结束时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; - - /** - * 学院ID列表 - */ - private List collegeIds; - - /** - * 专业ID列表 - */ - private List majorIds; - - /** - * 班级ID列表 - */ - private List classIds; - - /** - * 年级列表 - */ - private List grades; - - /** - * 性别列表 - */ - private List genders; - - /** - * 政治面貌列表 - */ - private List politicalStatuses; - - /** - * 民族列表 - */ - private List nationalities; - - /** - * 学籍状态列表 - */ - private List studentStatuses; - - /** - * 培养方式列表 - */ - private List trainingTypes; - - /** - * 是否使用缓存 - */ - private Boolean useCache; - - /** - * 缓存过期时间(分钟) - */ - private Integer cacheExpireMinutes; - - /** - * 排序字段 - */ - private String orderBy; - - /** - * 排序方式:asc-升序,desc-降序 - */ - private String orderDirection; - - /** - * 限制结果数量 - */ - private Integer limit; - - /** - * 是否需要详细数据 - */ - private Boolean needDetail; - - /** - * 是否需要汇总数据 - */ - private Boolean needSummary; - - /** - * 扩展参数 - */ - private Map extra; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStudentInfoBo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStudentInfoBo.java deleted file mode 100644 index 990c6dac..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/bo/XgStudentInfoBo.java +++ /dev/null @@ -1,645 +0,0 @@ -package org.dromara.xg.domain.bo; - -import org.dromara.xg.domain.XgStudentInfo; -import org.dromara.common.mybatis.core.domain.BaseEntity; -import org.dromara.common.core.validate.AddGroup; -import org.dromara.common.core.validate.EditGroup; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; -import java.util.Date; -import java.math.BigDecimal; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 学生信息业务对象 xg_student_info - * - * @author Cursor AI - * @date 2025-01-14 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = XgStudentInfo.class, reverseConvertGenerate = false) -public class XgStudentInfoBo extends BaseEntity { - - /** - * 主键ID(雪花ID) - */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) - private Long id; - - /** - * 学号 - */ - @NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 32, message = "学号长度不能超过32个字符") - private String studentNo; - - /** - * 身份证号 - */ - @Size(max = 18, message = "身份证号长度不能超过18个字符") - @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "身份证号格式不正确") - private String idCard; - - /** - * 姓名 - */ - @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class }) - @Size(max = 50, message = "姓名长度不能超过50个字符") - private String name; - - /** - * 英文姓名 - */ - @Size(max = 100, message = "英文姓名长度不能超过100个字符") - private String nameEnglish; - - /** - * 曾用名 - */ - @Size(max = 50, message = "曾用名长度不能超过50个字符") - private String formerName; - - /** - * 姓名拼音 - */ - @Size(max = 200, message = "姓名拼音长度不能超过200个字符") - private String namePinyin; - - /** - * 性别:0-男,1-女 - */ - @NotBlank(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class }) - @Pattern(regexp = "^[MF]$", message = "性别只能为M或F") - private String gender; - - /** - * 出生日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; - - /** - * 民族 - */ - @Size(max = 20, message = "民族长度不能超过20个字符") - private String nation; - - /** - * 政治面貌 - */ - @Size(max = 20, message = "政治面貌长度不能超过20个字符") - private String politicalStatus; - - /** - * 婚姻状况 - */ - @Size(max = 10, message = "婚姻状况长度不能超过10个字符") - private String maritalStatus; - - /** - * 宗教信仰 - */ - @Size(max = 20, message = "宗教信仰长度不能超过20个字符") - private String religion; - - /** - * 照片URL - */ - @Size(max = 500, message = "照片URL长度不能超过500个字符") - private String photoUrl; - - /** - * 学生照片存储路径 - */ - @Size(max = 500, message = "照片路径长度不能超过500个字符") - private String photoPath; - - /** - * 学籍状态:1-在籍,2-休学,3-复学,4-退学,5-毕业 - */ - @Pattern(regexp = "^[1-5]$", message = "学籍状态只能为1-5") - private String studentStatus; - - /** - * 入学年份 - */ - @Min(value = 1900, message = "入学年份不能小于1900") - @Max(value = 2100, message = "入学年份不能大于2100") - private Integer enrollmentYear; - - /** - * 入学日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd") - private Date enrollmentDate; - - /** - * 学制(年) - */ - @Min(value = 1, message = "学制不能小于1年") - @Max(value = 10, message = "学制不能大于10年") - private Integer schoolSystem; - - /** - * 学历层次 - */ - - @Size(max = 20, message = "学历层次长度不能超过20个字符") - private String educationLevel; - - /** - * 培养方式 - */ - @Size(max = 20, message = "培养方式长度不能超过20个字符") - private String trainingType; - - /** - * 录取类别 - */ - @Size(max = 20, message = "录取类别长度不能超过20个字符") - private String admissionCategory; - - /** - * 生源地区 - */ - @Size(max = 100, message = "生源地区长度不能超过100个字符") - private String sourceRegion; - - /** - * 毕业中学 - */ - @Size(max = 100, message = "毕业中学长度不能超过100个字符") - private String middleSchool; - - /** - * 专业代码 - */ - @Size(max = 20, message = "专业代码长度不能超过20个字符") - private String majorCode; - - /** - * 专业名称 - */ - @Size(max = 100, message = "专业名称长度不能超过100个字符") - private String majorName; - - /** - * 班级代码 - */ - @Size(max = 32, message = "班级代码长度不能超过32个字符") - private String classCode; - - /** - * 班级名称 - */ - @Size(max = 100, message = "班级名称长度不能超过100个字符") - private String className; - - /** - * 年级 - */ - @Size(max = 10, message = "年级长度不能超过10个字符") - private String grade; - - /** - * 学院代码 - */ - @Size(max = 20, message = "学院代码长度不能超过20个字符") - private String collegeCode; - - /** - * 学院名称 - */ - @Size(max = 100, message = "学院名称长度不能超过100个字符") - private String collegeName; - - /** - * 辅导员ID - */ - private Long counselorId; - - /** - * 辅导员姓名 - */ - @Size(max = 50, message = "辅导员姓名长度不能超过50个字符") - private String counselorName; - - /** - * 班主任ID - */ - private Long classTeacherId; - - /** - * 班主任姓名 - */ - @Size(max = 50, message = "班主任姓名长度不能超过50个字符") - private String classTeacherName; - - /** - * 手机号码 - */ - @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确") - private String phone; - - /** - * 电子邮箱 - */ - @Email(message = "电子邮箱格式不正确") - @Size(max = 100, message = "电子邮箱长度不能超过100个字符") - private String email; - - /** - * QQ号码 - */ - @Size(max = 20, message = "QQ号码长度不能超过20个字符") - private String qq; - - /** - * 微信号 - */ - @Size(max = 50, message = "微信号长度不能超过50个字符") - private String wechat; - - /** - * 家庭地址 - */ - @Size(max = 200, message = "家庭地址长度不能超过200个字符") - private String homeAddress; - - /** - * 现住址 - */ - @Size(max = 200, message = "现住址长度不能超过200个字符") - private String currentAddress; - - /** - * 邮政编码 - */ - @Pattern(regexp = "^\\d{6}$", message = "邮政编码格式不正确") - private String postalCode; - - /** - * 户口类型 - */ - @Size(max = 20, message = "户口类型长度不能超过20个字符") - private String householdRegisterType; - - /** - * 户籍所在地 - */ - @Size(max = 100, message = "户籍所在地长度不能超过100个字符") - private String hukouLocation; - - /** - * 宿舍楼栋 - */ - @Size(max = 50, message = "宿舍楼栋长度不能超过50个字符") - private String dormitoryBuilding; - - /** - * 宿舍房间号 - */ - @Size(max = 20, message = "宿舍房间号长度不能超过20个字符") - private String dormitoryRoom; - - /** - * 身高(cm) - */ - @DecimalMin(value = "50.0", message = "身高不能小于50cm") - @DecimalMax(value = "250.0", message = "身高不能大于250cm") - private BigDecimal height; - - /** - * 体重(kg) - */ - @DecimalMin(value = "20.0", message = "体重不能小于20kg") - @DecimalMax(value = "200.0", message = "体重不能大于200kg") - private BigDecimal weight; - - /** - * 血型 - */ - @Size(max = 10, message = "血型长度不能超过10个字符") - private String bloodType; - - // ===== 紧急联系人信息字段 ===== - - /** - * 紧急联系人姓名 - */ - @Size(max = 50, message = "紧急联系人姓名长度不能超过50个字符") - private String emergencyContactName; - - /** - * 紧急联系人电话 - */ - @Pattern(regexp = "^1[3-9]\\d{9}$", message = "紧急联系人电话格式不正确") - private String emergencyContactPhone; - - /** - * 紧急联系人关系 - */ - @Size(max = 20, message = "紧急联系人关系长度不能超过20个字符") - private String emergencyContactRelation; - - // ===== 家庭信息字段 ===== - - /** - * 父亲姓名 - */ - @Size(max = 50, message = "父亲姓名长度不能超过50个字符") - private String fatherName; - - /** - * 父亲电话 - */ - @Pattern(regexp = "^1[3-9]\\d{9}$", message = "父亲电话格式不正确") - private String fatherPhone; - - /** - * 父亲工作单位 - */ - @Size(max = 100, message = "父亲工作单位长度不能超过100个字符") - private String fatherWorkUnit; - - /** - * 母亲姓名 - */ - @Size(max = 50, message = "母亲姓名长度不能超过50个字符") - private String motherName; - - /** - * 母亲电话 - */ - @Pattern(regexp = "^1[3-9]\\d{9}$", message = "母亲电话格式不正确") - private String motherPhone; - - /** - * 母亲工作单位 - */ - @Size(max = 100, message = "母亲工作单位长度不能超过100个字符") - private String motherWorkUnit; - - /** - * 家庭年收入 - */ - @Size(max = 20, message = "家庭年收入长度不能超过20个字符") - private String familyIncome; - - /** - * 家庭经济状况 - */ - @Size(max = 20, message = "家庭经济状况长度不能超过20个字符") - private String familyEconomicStatus; - - /** - * 家庭成员数量 - */ - @Min(value = 1, message = "家庭成员数量不能小于1") - @Max(value = 20, message = "家庭成员数量不能大于20") - private Integer familyMembers; - - // ===== 健康信息字段 ===== - - /** - * 健康状况 - */ - @Size(max = 20, message = "健康状况长度不能超过20个字符") - private String healthStatus; - - /** - * 特殊体质或疾病 - */ - @Size(max = 200, message = "特殊体质或疾病长度不能超过200个字符") - private String specialCondition; - - /** - * 病史 - */ - @Size(max = 500, message = "病史长度不能超过500个字符") - private String medicalHistory; - - /** - * 过敏史 - */ - @Size(max = 200, message = "过敏史长度不能超过200个字符") - private String allergies; - - // ===== 银行信息字段 ===== - - /** - * 银行卡号 - */ - @Size(max = 30, message = "银行卡号长度不能超过30个字符") - private String bankCardNo; - - /** - * 开户银行 - */ - @Size(max = 100, message = "开户银行长度不能超过100个字符") - private String bankName; - - /** - * 开户支行 - */ - @Size(max = 100, message = "开户支行长度不能超过100个字符") - private String bankBranch; - - /** - * 持卡人姓名 - */ - @Size(max = 50, message = "持卡人姓名长度不能超过50个字符") - private String cardHolderName; - - // ===== 特殊标识字段 ===== - - /** - * 是否贫困生:0-否,1-是 - */ - private Integer isPoorStudent; - - /** - * 是否少数民族:0-否,1-是 - */ - private Integer isMinority; - - /** - * 是否残疾:0-否,1-是 - */ - private Integer isDisabled; - - /** - * 是否孤儿:0-否,1-是 - */ - private Integer isOrphan; - - /** - * 是否留守儿童:0-否,1-是 - */ - private Integer isLeftBehindChild; - - /** - * 是否独生子女:0-否,1-是 - */ - private Integer isSingleChild; - - // ===== 扩展信息字段 ===== - - /** - * 特长爱好 - */ - @Size(max = 1000, message = "特长爱好长度不能超过1000个字符") - private String specialties; - - /** - * 获奖情况 - */ - @Size(max = 1000, message = "获奖情况长度不能超过1000个字符") - private String awards; - - /** - * 违纪记录 - */ - @Size(max = 1000, message = "违纪记录长度不能超过1000个字符") - private String violations; - - /** - * 社会活动 - */ - @Size(max = 1000, message = "社会活动长度不能超过1000个字符") - private String socialActivities; - - // 状态字段 - /** - * 信息状态:1-正常,2-待审核,3-已审核,4-已驳回,5-已删除 - */ - @Pattern(regexp = "^[1-5]$", message = "信息状态只能为1-5") - private String infoStatus; - - /** - * 数据来源:manual-手工录入,import-批量导入,sync-同步 - */ - @Size(max = 20, message = "数据来源长度不能超过20个字符") - private String dataSource; - - /** - * 最后批次ID - */ - private Long lastBatchId; - - /** - * 最后审核时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastAuditTime; - - /** - * 信息是否完整:0-不完整,1-完整 - */ - @Pattern(regexp = "^[01]$", message = "信息是否完整只能为0或1") - private Integer isComplete; - - /** - * 信息完整度百分比 - */ - @DecimalMin(value = "0.0", message = "完整度百分比不能小于0") - @DecimalMax(value = "100.0", message = "完整度百分比不能大于100") - private BigDecimal completionRate; - - /** - * 备注信息 - */ - @Size(max = 500, message = "备注信息长度不能超过500个字符") - private String remark; - - // ========== 查询条件字段 ========== - - /** - * 学号列表(批量查询) - */ - private List studentNoIn; - - /** - * 学籍状态列表(批量查询) - */ - private List studentStatusIn; - - /** - * 信息状态列表(批量查询) - */ - private List infoStatusIn; - - /** - * 学院代码列表(批量查询) - */ - private List collegeCodeIn; - - /** - * 班级代码列表(批量查询) - */ - private List classCodeIn; - - /** - * 年级列表(批量查询) - */ - private List gradeIn; - - /** - * 辅导员ID列表(批量查询) - */ - private List counselorIdIn; - - /** - * 班主任ID列表(批量查询) - */ - private List classTeacherIdIn; - - /** - * 入学年份范围查询-开始 - */ - private Integer enrollmentYearStart; - - /** - * 入学年份范围查询-结束 - */ - private Integer enrollmentYearEnd; - - /** - * 创建时间范围查询-开始 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeStart; - - /** - * 创建时间范围查询-结束 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTimeEnd; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgBatchScheduledTaskVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgBatchScheduledTaskVo.java deleted file mode 100644 index d494038c..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgBatchScheduledTaskVo.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgBatchScheduledTask; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serializable; -import java.util.Date; - -/** - * 批次定时任务视图对象 XgBatchScheduledTaskVo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgBatchScheduledTask.class) -public class XgBatchScheduledTaskVo implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 任务ID - */ - @ExcelProperty(value = "任务ID") - private Long taskId; - - /** - * 批次ID - */ - @ExcelProperty(value = "批次ID") - private Long batchId; - - /** - * 任务类型 - */ - @ExcelProperty(value = "任务类型") - private String taskType; - - /** - * 任务名称 - */ - @ExcelProperty(value = "任务名称") - private String taskName; - - /** - * 任务描述 - */ - @ExcelProperty(value = "任务描述") - private String taskDescription; - - /** - * 计划执行时间 - */ - @ExcelProperty(value = "计划执行时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date scheduledTime; - - /** - * 实际执行时间 - */ - @ExcelProperty(value = "实际执行时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date actualExecutionTime; - - /** - * 任务状态 - */ - @ExcelProperty(value = "任务状态") - private String taskStatus; - - /** - * 执行结果 - */ - @ExcelProperty(value = "执行结果") - private String executionResult; - - /** - * 执行次数 - */ - @ExcelProperty(value = "执行次数") - private Integer executionCount; - - /** - * 最大重试次数 - */ - @ExcelProperty(value = "最大重试次数") - private Integer maxRetryCount; - - /** - * 重试间隔(分钟) - */ - @ExcelProperty(value = "重试间隔(分钟)") - private Integer retryInterval; - - /** - * 错误信息 - */ - @ExcelProperty(value = "错误信息") - private String errorMessage; - - /** - * 执行参数 - */ - @ExcelProperty(value = "执行参数") - private String executionParams; - - /** - * 执行结果详情 - */ - @ExcelProperty(value = "执行结果详情") - private String executionResultDetail; - - /** - * 是否启用 - */ - @ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Boolean isEnabled; - - /** - * 租户ID - */ - @ExcelProperty(value = "租户ID") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - // 关联字段 - /** - * 批次编码 - */ - @ExcelProperty(value = "批次编码") - private String batchCode; - - /** - * 批次名称 - */ - @ExcelProperty(value = "批次名称") - private String batchName; - - /** - * 批次类型 - */ - @ExcelProperty(value = "批次类型") - private String batchType; - - /** - * 批次状态 - */ - @ExcelProperty(value = "批次状态") - private String batchStatus; - - /** - * 学年 - */ - @ExcelProperty(value = "学年") - private String academicYear; - - /** - * 学期 - */ - @ExcelProperty(value = "学期") - private String semester; - - // 计算字段 - /** - * 执行状态描述 - */ - public String getExecutionStatusDescription() { - if ("pending".equals(taskStatus)) { - return "待执行"; - } else if ("running".equals(taskStatus)) { - return "执行中"; - } else if ("completed".equals(taskStatus)) { - return "已完成"; - } else if ("failed".equals(taskStatus)) { - return "执行失败"; - } else if ("cancelled".equals(taskStatus)) { - return "已取消"; - } - return taskStatus; - } - - /** - * 是否需要重试 - */ - public boolean isNeedRetry() { - return "failed".equals(taskStatus) && - executionCount != null && - maxRetryCount != null && - executionCount < maxRetryCount; - } - - /** - * 剩余重试次数 - */ - public int getRemainingRetryCount() { - if (executionCount == null || maxRetryCount == null) { - return 0; - } - return Math.max(0, maxRetryCount - executionCount); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassInfoVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassInfoVo.java deleted file mode 100644 index aa09eb8d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassInfoVo.java +++ /dev/null @@ -1,355 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgClassInfo; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDate; -import java.time.LocalDateTime; - -/** - * 班级信息视图对象 xg_class_info - * - * @author Cursor AI - * @date 2025-01-21 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgClassInfo.class) -public class XgClassInfoVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 班级ID - */ - @ExcelProperty(value = "班级ID") - private Long id; - - /** - * 班级代码 - */ - @ExcelProperty(value = "班级代码") - private String classCode; - - /** - * 班级名称 - */ - @ExcelProperty(value = "班级名称") - private String className; - - /** - * 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级 - */ - @ExcelProperty(value = "班级类型", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_class_type") - private String classType; - - /** - * 年级 - */ - @ExcelProperty(value = "年级") - private String grade; - - /** - * 入学年份 - */ - @ExcelProperty(value = "入学年份") - private Integer enrollmentYear; - - /** - * 毕业年份 - */ - @ExcelProperty(value = "毕业年份") - private Integer graduationYear; - - /** - * 专业代码 - */ - @ExcelProperty(value = "专业代码") - private String majorCode; - - /** - * 专业名称 - */ - @ExcelProperty(value = "专业名称") - private String majorName; - - /** - * 培养方式:全日制、在职、函授、夜大等 - */ - @ExcelProperty(value = "培养方式") - private String trainingType; - - /** - * 学位类型:本科、专科、研究生等 - */ - @ExcelProperty(value = "学位类型") - private String degreeType; - - /** - * 学院代码 - */ - @ExcelProperty(value = "学院代码") - private String collegeCode; - - /** - * 学院名称 - */ - @ExcelProperty(value = "学院名称") - private String collegeName; - - /** - * 辅导员ID - */ - private Long counselorId; - - /** - * 辅导员姓名 - */ - @ExcelProperty(value = "辅导员姓名") - private String counselorName; - - /** - * 班主任ID - */ - private Long classTeacherId; - - /** - * 班主任姓名 - */ - @ExcelProperty(value = "班主任姓名") - private String classTeacherName; - - /** - * 班级导师ID - */ - private Long classAdvisorId; - - /** - * 班级导师姓名 - */ - @ExcelProperty(value = "班级导师姓名") - private String classAdvisorName; - - /** - * 班长ID - */ - private Long classMonitorId; - - /** - * 班长姓名 - */ - @ExcelProperty(value = "班长姓名") - private String classMonitorName; - - /** - * 副班长ID - */ - private Long deputyMonitorId; - - /** - * 副班长姓名 - */ - @ExcelProperty(value = "副班长姓名") - private String deputyMonitorName; - - /** - * 班级状态:1-正常,2-暂停,3-毕业,4-解散 - */ - @ExcelProperty(value = "班级状态", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_class_status") - private String classStatus; - - /** - * 是否毕业:0-未毕业,1-已毕业 - */ - @ExcelProperty(value = "是否毕业", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=未毕业,1=已毕业") - private Integer isGraduation; - - /** - * 毕业日期 - */ - @ExcelProperty(value = "毕业日期") - @JsonFormat(pattern = "yyyy-MM-dd") - private LocalDate graduationDate; - - /** - * 计划容量 - */ - @ExcelProperty(value = "计划容量") - private Integer plannedCapacity; - - /** - * 当前学生数量 - */ - @ExcelProperty(value = "当前学生数量") - private Integer currentStudentCount; - - /** - * 最大学生数量 - */ - @ExcelProperty(value = "最大学生数量") - private Integer maxStudentCount; - - /** - * 男生数量 - */ - @ExcelProperty(value = "男生数量") - private Integer maleCount; - - /** - * 女生数量 - */ - @ExcelProperty(value = "女生数量") - private Integer femaleCount; - - /** - * 在籍学生数量 - */ - @ExcelProperty(value = "在籍学生数量") - private Integer activeCount; - - /** - * 转入学生数量 - */ - @ExcelProperty(value = "转入学生数量") - private Integer transferInCount; - - /** - * 转出学生数量 - */ - @ExcelProperty(value = "转出学生数量") - private Integer transferOutCount; - - /** - * 退学学生数量 - */ - @ExcelProperty(value = "退学学生数量") - private Integer dropoutCount; - - /** - * 毕业学生数量 - */ - @ExcelProperty(value = "毕业学生数量") - private Integer graduateCount; - - /** - * 办公室位置 - */ - @ExcelProperty(value = "办公室位置") - private String officeLocation; - - /** - * 教室位置 - */ - @ExcelProperty(value = "教室位置") - private String classLocation; - - /** - * 联系电话 - */ - @ExcelProperty(value = "联系电话") - private String contactPhone; - - /** - * QQ群号 - */ - @ExcelProperty(value = "QQ群号") - private String qqGroup; - - /** - * 微信群 - */ - @ExcelProperty(value = "微信群") - private String wechatGroup; - - /** - * 邮箱 - */ - @ExcelProperty(value = "邮箱") - private String email; - - /** - * 课程安排 - */ - private String classSchedule; - - /** - * 班级文化 - */ - private String classCulture; - - /** - * 班级规章制度 - */ - private String classRules; - - /** - * 班级描述 - */ - @ExcelProperty(value = "班级描述") - private String classDescription; - - /** - * 最后统计更新时间 - */ - @ExcelProperty(value = "最后统计更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime lastCountUpdate; - - /** - * 扩展字段1 - */ - private String extField1; - - /** - * 扩展字段2 - */ - private String extField2; - - /** - * 扩展字段3 - */ - private String extField3; - - /** - * 备注 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime updateTime; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassTeacherRelationVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassTeacherRelationVo.java deleted file mode 100644 index 3fc96249..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgClassTeacherRelationVo.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgClassTeacherRelation; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * 班级班主任关系视图对象 xg_class_teacher_relation - * - * @author Cursor AI - * @date 2025-07-22 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgClassTeacherRelation.class) -public class XgClassTeacherRelationVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @ExcelProperty(value = "主键ID") - private Long id; - - /** - * 班级ID - */ - @ExcelProperty(value = "班级ID") - private Long classId; - - /** - * 班级名称(非数据库字段) - */ - @ExcelProperty(value = "班级名称") - private String className; - - /** - * 班级代码(非数据库字段) - */ - @ExcelProperty(value = "班级代码") - private String classCode; - - /** - * 班主任用户ID - */ - @ExcelProperty(value = "班主任用户ID") - private Long teacherId; - - /** - * 班主任姓名(非数据库字段) - */ - @ExcelProperty(value = "班主任姓名") - private String teacherName; - - /** - * 状态(0正常 1停用) - */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=正常,1=停用") - private String status; - - /** - * 生效开始日期 - */ - @ExcelProperty(value = "生效开始日期") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime startDate; - - /** - * 生效结束日期 - */ - @ExcelProperty(value = "生效结束日期") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime endDate; - - /** - * 备注 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime updateTime; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchLogVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchLogVo.java deleted file mode 100644 index 39dbd147..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchLogVo.java +++ /dev/null @@ -1,171 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgCollectionBatchLog; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serializable; -import java.util.Date; - -/** - * 信息采集批次操作日志视图对象 XgCollectionBatchLogVo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgCollectionBatchLog.class) -public class XgCollectionBatchLogVo implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 日志ID - */ - @ExcelProperty(value = "日志ID") - private Long logId; - - /** - * 批次ID - */ - @ExcelProperty(value = "批次ID") - private Long batchId; - - /** - * 学生ID - */ - @ExcelProperty(value = "学生ID") - private Long studentId; - - /** - * 操作类型 - */ - @ExcelProperty(value = "操作类型") - private String operationType; - - /** - * 操作描述 - */ - @ExcelProperty(value = "操作描述") - private String operationDescription; - - /** - * 操作人ID - */ - @ExcelProperty(value = "操作人ID") - private Long operatorId; - - /** - * 操作人姓名 - */ - @ExcelProperty(value = "操作人姓名") - private String operatorName; - - /** - * 操作时间 - */ - @ExcelProperty(value = "操作时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date operationTime; - - /** - * IP地址 - */ - @ExcelProperty(value = "IP地址") - private String ipAddress; - - /** - * 用户代理 - */ - @ExcelProperty(value = "用户代理") - private String userAgent; - - /** - * 操作结果 - */ - @ExcelProperty(value = "操作结果") - private String operationResult; - - /** - * 错误信息 - */ - @ExcelProperty(value = "错误信息") - private String errorMessage; - - /** - * 租户ID - */ - @ExcelProperty(value = "租户ID") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - // 关联字段 - /** - * 批次编码 - */ - @ExcelProperty(value = "批次编码") - private String batchCode; - - /** - * 批次名称 - */ - @ExcelProperty(value = "批次名称") - private String batchName; - - /** - * 学生学号 - */ - @ExcelProperty(value = "学生学号") - private String studentNo; - - /** - * 学生姓名 - */ - @ExcelProperty(value = "学生姓名") - private String studentName; - - /** - * 学院名称 - */ - @ExcelProperty(value = "学院名称") - private String collegeName; - - /** - * 专业名称 - */ - @ExcelProperty(value = "专业名称") - private String majorName; - - /** - * 班级名称 - */ - @ExcelProperty(value = "班级名称") - private String className; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchPermissionVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchPermissionVo.java deleted file mode 100644 index 3898e879..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchPermissionVo.java +++ /dev/null @@ -1,180 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgCollectionBatchPermission; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serializable; -import java.util.Date; - -/** - * 信息采集批次权限配置视图对象 XgCollectionBatchPermissionVo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgCollectionBatchPermission.class) -public class XgCollectionBatchPermissionVo implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 权限ID - */ - @ExcelProperty(value = "权限ID") - private Long permissionId; - - /** - * 批次ID - */ - @ExcelProperty(value = "批次ID") - private Long batchId; - - /** - * 权限类型 - */ - @ExcelProperty(value = "权限类型") - private String permissionType; - - /** - * 权限对象ID - */ - @ExcelProperty(value = "权限对象ID") - private Long permissionObjectId; - - /** - * 权限对象类型 - */ - @ExcelProperty(value = "权限对象类型") - private String permissionObjectType; - - /** - * 权限对象名称 - */ - @ExcelProperty(value = "权限对象名称") - private String permissionObjectName; - - /** - * 权限范围 - */ - @ExcelProperty(value = "权限范围") - private String permissionScope; - - /** - * 权限级别 - */ - @ExcelProperty(value = "权限级别") - private Integer permissionLevel; - - /** - * 是否有效 - */ - @ExcelProperty(value = "是否有效", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Boolean isActive; - - /** - * 生效时间 - */ - @ExcelProperty(value = "生效时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date effectiveTime; - - /** - * 失效时间 - */ - @ExcelProperty(value = "失效时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date expirationTime; - - /** - * 授权人ID - */ - @ExcelProperty(value = "授权人ID") - private Long grantedBy; - - /** - * 授权时间 - */ - @ExcelProperty(value = "授权时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date grantedTime; - - /** - * 备注 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 租户ID - */ - @ExcelProperty(value = "租户ID") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - // 关联字段 - /** - * 批次编码 - */ - @ExcelProperty(value = "批次编码") - private String batchCode; - - /** - * 批次名称 - */ - @ExcelProperty(value = "批次名称") - private String batchName; - - /** - * 批次类型 - */ - @ExcelProperty(value = "批次类型") - private String batchType; - - /** - * 批次状态 - */ - @ExcelProperty(value = "批次状态") - private String batchStatus; - - /** - * 授权人姓名 - */ - @ExcelProperty(value = "授权人姓名") - private String grantedByName; - - /** - * 授权人部门 - */ - @ExcelProperty(value = "授权人部门") - private String grantedByDept; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStatisticsVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStatisticsVo.java deleted file mode 100644 index 9d91eb41..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStatisticsVo.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgCollectionBatchStatistics; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - -/** - * 信息采集批次统计视图对象 XgCollectionBatchStatisticsVo - * - * @author Lion Li - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgCollectionBatchStatistics.class) -public class XgCollectionBatchStatisticsVo implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 统计ID - */ - @ExcelProperty(value = "统计ID") - private Long statisticsId; - - /** - * 批次ID - */ - @ExcelProperty(value = "批次ID") - private Long batchId; - - /** - * 统计维度 - */ - @ExcelProperty(value = "统计维度") - private String statisticsDimension; - - /** - * 维度值 - */ - @ExcelProperty(value = "维度值") - private String dimensionValue; - - /** - * 维度名称 - */ - @ExcelProperty(value = "维度名称") - private String dimensionName; - - /** - * 总学生数 - */ - @ExcelProperty(value = "总学生数") - private Integer totalStudents; - - /** - * 已提交数 - */ - @ExcelProperty(value = "已提交数") - private Integer submittedCount; - - /** - * 未提交数 - */ - @ExcelProperty(value = "未提交数") - private Integer notSubmittedCount; - - /** - * 完成率 - */ - @ExcelProperty(value = "完成率(%)") - private BigDecimal completionRate; - - /** - * 排名 - */ - @ExcelProperty(value = "排名") - private Integer ranking; - - /** - * 统计时间 - */ - @ExcelProperty(value = "统计时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date statisticsTime; - - /** - * 备注 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 租户ID - */ - @ExcelProperty(value = "租户ID") - private String tenantId; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - // 关联字段 - /** - * 批次编码 - */ - @ExcelProperty(value = "批次编码") - private String batchCode; - - /** - * 批次名称 - */ - @ExcelProperty(value = "批次名称") - private String batchName; - - /** - * 批次类型 - */ - @ExcelProperty(value = "批次类型") - private String batchType; - - /** - * 批次状态 - */ - @ExcelProperty(value = "批次状态") - private String batchStatus; - - /** - * 学年 - */ - @ExcelProperty(value = "学年") - private String academicYear; - - /** - * 学期 - */ - @ExcelProperty(value = "学期") - private String semester; - - /** - * 开始时间 - */ - @ExcelProperty(value = "开始时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; - - /** - * 结束时间 - */ - @ExcelProperty(value = "结束时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; - - // 统计计算字段 - /** - * 完成率百分比显示 - */ - public String getCompletionRateDisplay() { - if (completionRate == null) { - return "0.00%"; - } - return completionRate.toString() + "%"; - } - - /** - * 提交进度描述 - */ - public String getProgressDescription() { - if (totalStudents == null || totalStudents == 0) { - return "无数据"; - } - return String.format("%d/%d", submittedCount != null ? submittedCount : 0, totalStudents); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStudentVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStudentVo.java deleted file mode 100644 index a0d46e9e..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchStudentVo.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgCollectionBatchStudent; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 信息采集批次学生关联视图对象 xg_collection_batch_student - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgCollectionBatchStudent.class) -public class XgCollectionBatchStudentVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @ExcelProperty(value = "ID") - private Long id; - - /** - * 批次ID - */ - @ExcelProperty(value = "批次ID") - private Long batchId; - - /** - * 学生ID - */ - @ExcelProperty(value = "学生ID") - private Long studentId; - - /** - * 学号 - */ - @ExcelProperty(value = "学号") - private String studentCode; - - /** - * 学生姓名 - */ - @ExcelProperty(value = "学生姓名") - private String studentName; - - /** - * 学院ID - */ - private Long collegeId; - - /** - * 学院名称 - */ - @ExcelProperty(value = "学院") - private String collegeName; - - /** - * 专业ID - */ - private Long majorId; - - /** - * 专业名称 - */ - @ExcelProperty(value = "专业") - private String majorName; - - /** - * 班级ID - */ - private Long classId; - - /** - * 班级名称 - */ - @ExcelProperty(value = "班级") - private String className; - - /** - * 届别 - */ - @ExcelProperty(value = "届别") - private String grade; - - /** - * 是否可编辑:0-否,1-是 - */ - @ExcelProperty(value = "是否可编辑", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=否,1=是") - private Integer canEdit; - - /** - * 是否已提交:0-否,1-是 - */ - @ExcelProperty(value = "是否已提交", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=否,1=是") - private Integer hasSubmitted; - - /** - * 提交时间 - */ - @ExcelProperty(value = "提交时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date submitTime; - - /** - * 最后编辑时间 - */ - @ExcelProperty(value = "最后编辑时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastEditTime; - - /** - * 编辑次数 - */ - @ExcelProperty(value = "编辑次数") - private Integer editCount; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchVo.java deleted file mode 100644 index 53088fdc..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgCollectionBatchVo.java +++ /dev/null @@ -1,234 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgCollectionBatch; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.math.BigDecimal; - -/** - * 信息采集批次视图对象 xg_collection_batch - * - * @author Cursor AI - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgCollectionBatch.class) -public class XgCollectionBatchVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID(雪花ID) - */ - @ExcelProperty(value = "批次ID") - private Long id; - - /** - * 批次编码 - */ - @ExcelProperty(value = "批次编码") - private String batchCode; - - /** - * 批次名称 - */ - @ExcelProperty(value = "批次名称") - private String batchName; - - /** - * 批次类型:annual-年度采集,semester-学期采集,monthly-月度采集,custom-自定义 - */ - @ExcelProperty(value = "批次类型", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_batch_type") - private String batchType; - - /** - * 学年,如2024-2025 - */ - @ExcelProperty(value = "学年") - private String academicYear; - - /** - * 学期:spring-春季,autumn-秋季 - */ - @ExcelProperty(value = "学期", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_semester") - private String semester; - - /** - * 批次状态:1-草稿,2-发布,3-进行中,4-已结束,5-已归档 - */ - @ExcelProperty(value = "批次状态", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_batch_status") - private String batchStatus; - - /** - * 发布时间 - */ - @ExcelProperty(value = "发布时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date publishTime; - - /** - * 开始时间 - */ - @ExcelProperty(value = "开始时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date startTime; - - /** - * 结束时间 - */ - @ExcelProperty(value = "结束时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date endTime; - - /** - * 归档时间 - */ - @ExcelProperty(value = "归档时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date archiveTime; - - /** - * 目标学院(JSON格式) - */ - private String targetColleges; - - /** - * 目标年级(JSON格式) - */ - private String targetGrades; - - /** - * 目标专业(JSON格式) - */ - private String targetMajors; - - /** - * 必填字段(JSON格式) - */ - private String requiredFields; - - /** - * 可选字段(JSON格式) - */ - private String optionalFields; - - /** - * 审核级别配置(JSON格式) - */ - private String auditLevels; - - /** - * 总学生数 - */ - @ExcelProperty(value = "总学生数") - private Integer totalStudents; - - /** - * 已提交数 - */ - @ExcelProperty(value = "已提交数") - private Integer submittedCount; - - /** - * 已审核数 - */ - @ExcelProperty(value = "已审核数") - private Integer approvedCount; - - /** - * 已驳回数 - */ - @ExcelProperty(value = "已驳回数") - private Integer rejectedCount; - - /** - * 完成率 - */ - @ExcelProperty(value = "完成率") - private BigDecimal completionRate; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 审核权限(JSON格式) - */ - private String auditPermissions; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 自动提醒:0-关闭,1-开启 - */ - @ExcelProperty(value = "自动提醒", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=关闭,1=开启") - private Integer autoReminder; - - /** - * 提醒频率(天) - */ - @ExcelProperty(value = "提醒频率(天)") - private Integer reminderFrequency; - - /** - * 提交后允许修改:0-不允许,1-允许 - */ - @ExcelProperty(value = "提交后允许修改", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=不允许,1=允许") - private Integer allowModifyAfterSubmit; - - /** - * 批次描述 - */ - @ExcelProperty(value = "批次描述") - private String description; - - /** - * 备注信息 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsConfigVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsConfigVo.java deleted file mode 100644 index 2296110b..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsConfigVo.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.dromara.xg.domain.vo; - -import org.dromara.xg.domain.XgStatisticsConfig; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 统计分析配置视图对象 xg_statistics_config - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgStatisticsConfig.class) -public class XgStatisticsConfigVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - @ExcelProperty(value = "配置ID") - private Long id; - - /** - * 租户编号 - */ - private String tenantId; - - /** - * 配置名称 - */ - @ExcelProperty(value = "配置名称") - private String configName; - - /** - * 配置编码 - */ - @ExcelProperty(value = "配置编码") - private String configCode; - - /** - * 配置类型:dimension-维度,report-报表,chart-图表 - */ - @ExcelProperty(value = "配置类型", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_statistics_config_type") - private String configType; - - /** - * 配置内容(JSON格式) - */ - @ExcelProperty(value = "配置内容") - private String configContent; - - /** - * 是否系统配置:0-否,1-是 - */ - @ExcelProperty(value = "是否系统配置", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isSystem; - - /** - * 是否启用:0-否,1-是 - */ - @ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isEnabled; - - /** - * 排序顺序 - */ - @ExcelProperty(value = "排序顺序") - private Integer sortOrder; - - /** - * 查看权限(JSON格式) - */ - private String viewPermissions; - - /** - * 编辑权限(JSON格式) - */ - private String editPermissions; - - /** - * 备注信息 - */ - @ExcelProperty(value = "备注信息") - private String remark; - - /** - * 创建者 - */ - private Long createBy; - - /** - * 创建时间 - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private Long updateBy; - - /** - * 更新时间 - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 删除标志(0代表存在 1代表删除) - */ - private Integer deleted; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsResultVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsResultVo.java deleted file mode 100644 index 4489dc80..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStatisticsResultVo.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.dromara.xg.domain.vo; - -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * 统计结果视图对象 - * - * @author wuzhen - * @date 2025-01-17 - */ -@Data -public class XgStatisticsResultVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 统计标题 - */ - private String title; - - /** - * 统计类型:dimension-维度统计,report-报表,chart-图表 - */ - private String type; - - /** - * 统计维度 - */ - private String dimension; - - /** - * 统计数据 - */ - private List> data; - - /** - * 总数 - */ - private Long total; - - /** - * 统计时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date statisticsTime; - - /** - * 是否来自缓存 - */ - private Boolean fromCache; - - /** - * 缓存键 - */ - private String cacheKey; - - /** - * 扩展信息 - */ - private Map extra; - - /** - * 图表配置 - */ - private Map chartConfig; - - /** - * 分组统计数据 - */ - private Map>> groupData; - - /** - * 统计摘要 - */ - private Map summary; -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStudentInfoVo.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStudentInfoVo.java deleted file mode 100644 index e30dbb67..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/domain/vo/XgStudentInfoVo.java +++ /dev/null @@ -1,662 +0,0 @@ -package org.dromara.xg.domain.vo; - -import java.util.Date; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.dromara.xg.domain.XgStudentInfo; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 学生信息视图对象 xg_student_info - * - * @author Cursor AI - * @date 2025-01-14 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = XgStudentInfo.class) -public class XgStudentInfoVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键ID(雪花ID) - */ - @ExcelProperty(value = "主键ID") - private Long id; - - /** - * 学号 - */ - @ExcelProperty(value = "学号") - private String studentNo; - - /** - * 身份证号 - */ - @ExcelProperty(value = "身份证号") - private String idCard; - - /** - * 姓名 - */ - @ExcelProperty(value = "姓名") - private String name; - - /** - * 英文姓名 - */ - @ExcelProperty(value = "英文姓名") - private String nameEnglish; - - /** - * 曾用名 - */ - @ExcelProperty(value = "曾用名") - private String formerName; - - /** - * 姓名拼音 - */ - @ExcelProperty(value = "姓名拼音") - private String namePinyin; - - /** - * 性别:0-男,1-女 - */ - @ExcelProperty(value = "性别", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_user_sex") - private String gender; - - /** - * 出生日期 - */ - @ExcelProperty(value = "出生日期") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; - - /** - * 民族 - */ - @ExcelProperty(value = "民族", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_nation") - private String nation; - - /** - * 政治面貌 - */ - @ExcelProperty(value = "政治面貌", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_political_status") - private String politicalStatus; - - /** - * 婚姻状况 - */ - @ExcelProperty(value = "婚姻状况") - private String maritalStatus; - - /** - * 宗教信仰 - */ - @ExcelProperty(value = "宗教信仰") - private String religion; - - /** - * 照片URL - */ - @ExcelProperty(value = "照片URL") - private String photoUrl; - - /** - * 学生照片存储路径 - */ - @ExcelProperty(value = "照片路径") - private String photoPath; - - /** - * 学籍状态 - */ - @ExcelProperty(value = "学籍状态", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_student_status") - private String studentStatus; - - /** - * 入学年份 - */ - @ExcelProperty(value = "入学年份") - private Integer enrollmentYear; - - /** - * 入学日期 - */ - @ExcelProperty(value = "入学日期") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date enrollmentDate; - - /** - * 学制(年) - */ - @ExcelProperty(value = "学制(年)") - private Integer schoolSystem; - - /** - * 学历层次 - */ - @ExcelProperty(value = "学历层次") - private String educationLevel; - - /** - * 培养方式 - */ - @ExcelProperty(value = "培养方式", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_training_mode") - private String trainingType; - - /** - * 录取类别 - */ - @ExcelProperty(value = "录取类别") - private String admissionCategory; - - /** - * 生源地区 - */ - @ExcelProperty(value = "生源地区") - private String sourceRegion; - - /** - * 毕业中学 - */ - @ExcelProperty(value = "毕业中学") - private String middleSchool; - - /** - * 专业代码 - */ - @ExcelProperty(value = "专业代码") - private String majorCode; - - /** - * 专业名称 - */ - @ExcelProperty(value = "专业名称") - private String majorName; - - /** - * 班级代码 - */ - @ExcelProperty(value = "班级代码") - private String classCode; - - /** - * 班级名称 - */ - @ExcelProperty(value = "班级名称") - private String className; - - /** - * 年级 - */ - @ExcelProperty(value = "年级") - private String grade; - - /** - * 学院代码 - */ - @ExcelProperty(value = "学院代码") - private String collegeCode; - - /** - * 学院名称 - */ - @ExcelProperty(value = "学院名称") - private String collegeName; - - /** - * 辅导员ID - */ - @ExcelProperty(value = "辅导员ID") - private Long counselorId; - - /** - * 辅导员姓名 - */ - @ExcelProperty(value = "辅导员") - private String counselorName; - - /** - * 班主任ID - */ - @ExcelProperty(value = "班主任ID") - private Long classTeacherId; - - /** - * 班主任姓名 - */ - @ExcelProperty(value = "班主任") - private String classTeacherName; - - /** - * 手机号码 - */ - @ExcelProperty(value = "手机号码") - private String phone; - - /** - * 电子邮箱 - */ - @ExcelProperty(value = "电子邮箱") - private String email; - - /** - * QQ号码 - */ - @ExcelProperty(value = "QQ号码") - private String qq; - - /** - * 微信号 - */ - @ExcelProperty(value = "微信号") - private String wechat; - - /** - * 家庭地址 - */ - @ExcelProperty(value = "家庭地址") - private String homeAddress; - - /** - * 现住址 - */ - @ExcelProperty(value = "现住址") - private String currentAddress; - - /** - * 邮政编码 - */ - @ExcelProperty(value = "邮政编码") - private String postalCode; - - /** - * 户口类型 - */ - @ExcelProperty(value = "户口类型") - private String householdRegisterType; - - /** - * 户口所在地 - */ - @ExcelProperty(value = "户口所在地") - private String hukouLocation; - - /** - * 宿舍楼栋 - */ - @ExcelProperty(value = "宿舍楼栋") - private String dormitoryBuilding; - - /** - * 宿舍房间号 - */ - @ExcelProperty(value = "宿舍房间号") - private String dormitoryRoom; - - /** - * 紧急联系人姓名 - */ - @ExcelProperty(value = "紧急联系人") - private String emergencyContactName; - - /** - * 紧急联系人电话 - */ - @ExcelProperty(value = "紧急联系人电话") - private String emergencyContactPhone; - - /** - * 紧急联系人关系 - */ - @ExcelProperty(value = "紧急联系人关系") - private String emergencyContactRelation; - - /** - * 父亲姓名 - */ - @ExcelProperty(value = "父亲姓名") - private String fatherName; - - /** - * 父亲电话 - */ - @ExcelProperty(value = "父亲电话") - private String fatherPhone; - - /** - * 父亲工作单位 - */ - @ExcelProperty(value = "父亲工作单位") - private String fatherWorkUnit; - - /** - * 母亲姓名 - */ - @ExcelProperty(value = "母亲姓名") - private String motherName; - - /** - * 母亲电话 - */ - @ExcelProperty(value = "母亲电话") - private String motherPhone; - - /** - * 母亲工作单位 - */ - @ExcelProperty(value = "母亲工作单位") - private String motherWorkUnit; - - /** - * 监护人姓名 - */ - @ExcelProperty(value = "监护人姓名") - private String guardianName; - - /** - * 监护人电话 - */ - @ExcelProperty(value = "监护人电话") - private String guardianPhone; - - /** - * 监护人关系 - */ - @ExcelProperty(value = "监护人关系") - private String guardianRelation; - - /** - * 家庭年收入 - */ - @ExcelProperty(value = "家庭年收入") - private String familyIncome; - - /** - * 家庭经济状况 - */ - @ExcelProperty(value = "家庭经济状况", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_family_economic") - private String familyEconomicStatus; - - /** - * 家庭成员数量 - */ - @ExcelProperty(value = "家庭成员数量") - private Integer familyMembers; - - /** - * 身高(cm) - */ - @ExcelProperty(value = "身高(cm)") - private BigDecimal height; - - /** - * 体重(kg) - */ - @ExcelProperty(value = "体重(kg)") - private BigDecimal weight; - - /** - * 血型 - */ - @ExcelProperty(value = "血型", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_blood_type") - private String bloodType; - - /** - * 健康状况 - */ - @ExcelProperty(value = "健康状况") - private String healthStatus; - - /** - * 特殊体质或疾病 - */ - @ExcelProperty(value = "特殊体质或疾病") - private String specialCondition; - - /** - * 病史 - */ - @ExcelProperty(value = "病史") - private String medicalHistory; - - /** - * 过敏史 - */ - @ExcelProperty(value = "过敏史") - private String allergies; - - /** - * 残疾类型 - */ - @ExcelProperty(value = "残疾类型") - private String disabilityType; - - /** - * 残疾等级 - */ - @ExcelProperty(value = "残疾等级") - private String disabilityLevel; - - /** - * 银行卡号 - */ - @ExcelProperty(value = "银行卡号") - private String bankCardNo; - - /** - * 开户银行 - */ - @ExcelProperty(value = "开户银行") - private String bankName; - - /** - * 开户支行 - */ - @ExcelProperty(value = "开户支行") - private String bankBranch; - - /** - * 持卡人姓名 - */ - @ExcelProperty(value = "持卡人姓名") - private String cardHolderName; - - /** - * 是否贫困生 - */ - @ExcelProperty(value = "是否贫困生", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isPoorStudent; - - /** - * 是否少数民族 - */ - @ExcelProperty(value = "是否少数民族", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isMinority; - - /** - * 是否残疾 - */ - @ExcelProperty(value = "是否残疾", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isDisabled; - - /** - * 是否孤儿 - */ - @ExcelProperty(value = "是否孤儿", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isOrphan; - - /** - * 是否留守儿童 - */ - @ExcelProperty(value = "是否留守儿童", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isLeftBehindChild; - - /** - * 是否独生子女 - */ - @ExcelProperty(value = "是否独生子女", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isSingleChild; - - /** - * 是否有助学贷款 - */ - @ExcelProperty(value = "是否有助学贷款", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer hasLoan; - - /** - * 助学贷款金额 - */ - @ExcelProperty(value = "助学贷款金额") - private BigDecimal loanAmount; - - /** - * 特长爱好 - */ - @ExcelProperty(value = "特长") - private String specialties; - - /** - * 获奖情况 - */ - @ExcelProperty(value = "获奖情况") - private String awards; - - /** - * 违纪情况 - */ - @ExcelProperty(value = "违纪情况") - private String violations; - - /** - * 社会活动 - */ - @ExcelProperty(value = "社会活动") - private String socialActivities; - - /** - * 信息状态 - */ - @ExcelProperty(value = "信息状态", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "xg_info_status") - private String infoStatus; - - /** - * 数据来源 - */ - @ExcelProperty(value = "数据来源") - private String dataSource; - - /** - * 最后修改批次ID - */ - @ExcelProperty(value = "最后修改批次ID") - private Long lastBatchId; - - /** - * 最后审核时间 - */ - @ExcelProperty(value = "最后审核时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date lastAuditTime; - - /** - * 信息是否完整 - */ - @ExcelProperty(value = "信息是否完整", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private Integer isComplete; - - /** - * 完整度百分比 - */ - @ExcelProperty(value = "完整度百分比") - private BigDecimal completionRate; - - /** - * 扩展字段1 - */ - @ExcelProperty(value = "扩展字段1") - private String extField1; - - /** - * 扩展字段2 - */ - @ExcelProperty(value = "扩展字段2") - private String extField2; - - /** - * 扩展字段3 - */ - @ExcelProperty(value = "扩展字段3") - private String extField3; - - /** - * 扩展字段4 - */ - @ExcelProperty(value = "扩展字段4") - private String extField4; - - /** - * 扩展字段5 - */ - @ExcelProperty(value = "扩展字段5") - private String extField5; - - /** - * 备注信息 - */ - @ExcelProperty(value = "备注") - private String remark; - - /** - * 创建者(VO类基础字段) - */ - private Long createBy; - - /** - * 创建时间(VO类基础字段) - */ - @ExcelProperty(value = "创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者(VO类基础字段) - */ - private Long updateBy; - - /** - * 更新时间(VO类基础字段) - */ - @ExcelProperty(value = "更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgBatchScheduledTaskMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgBatchScheduledTaskMapper.java deleted file mode 100644 index 62365126..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgBatchScheduledTaskMapper.java +++ /dev/null @@ -1,278 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgBatchScheduledTask; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; -import java.util.Date; - -/** - * 信息采集批次定时任务Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgBatchScheduledTaskMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法 - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次ID查询定时任务 - * - * @param batchId 批次ID - * @return 定时任务列表 - */ - List selectByBatchId(Long batchId); - - /** - * 根据任务类型查询定时任务 - * - * @param taskType 任务类型 - * @return 定时任务列表 - */ - List selectByTaskType(String taskType); - - /** - * 根据任务状态查询定时任务 - * - * @param taskStatus 任务状态 - * @return 定时任务列表 - */ - List selectByTaskStatus(String taskStatus); - - /** - * 根据批次ID和任务类型查询定时任务 - * - * @param batchId 批次ID - * @param taskType 任务类型 - * @return 定时任务列表 - */ - List selectByBatchAndType(@Param("batchId") Long batchId, @Param("taskType") String taskType); - - /** - * 查询待执行的定时任务 - * - * @return 待执行的定时任务列表 - */ - List selectPendingTasks(); - - /** - * 查询即将执行的定时任务(指定时间内) - * - * @param minutes 分钟数 - * @return 即将执行的定时任务列表 - */ - List selectUpcomingTasks(Integer minutes); - - /** - * 查询已过期但未执行的定时任务 - * - * @return 已过期的定时任务列表 - */ - List selectOverdueTasks(); - - /** - * 查询执行失败的定时任务 - * - * @return 执行失败的定时任务列表 - */ - List selectFailedTasks(); - - /** - * 查询指定时间范围内的定时任务 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 定时任务列表 - */ - List selectByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime); - - /** - * 查询指定批次的最新定时任务 - * - * @param batchId 批次ID - * @param limit 限制条数 - * @return 最新定时任务列表 - */ - List selectLatestByBatchId(@Param("batchId") Long batchId, @Param("limit") Integer limit); - - /** - * 批量插入定时任务 - * - * @param tasks 定时任务列表 - * @return 插入结果 - */ - int batchInsert(@Param("tasks") List tasks); - - /** - * 批量更新任务状态 - * - * @param ids 任务ID列表 - * @param taskStatus 任务状态 - * @return 更新结果 - */ - int batchUpdateStatus(@Param("ids") List ids, @Param("taskStatus") String taskStatus); - - /** - * 更新任务执行结果 - * - * @param id 任务ID - * @param taskStatus 任务状态 - * @param executeTime 执行时间 - * @param errorMessage 错误信息 - * @return 更新结果 - */ - int updateExecuteResult(@Param("id") Long id, @Param("taskStatus") String taskStatus, @Param("executeTime") Date executeTime, @Param("errorMessage") String errorMessage); - - /** - * 根据批次ID删除定时任务 - * - * @param batchId 批次ID - * @return 删除结果 - */ - int deleteByBatchId(Long batchId); - - /** - * 删除指定状态的定时任务 - * - * @param taskStatus 任务状态 - * @return 删除结果 - */ - int deleteByTaskStatus(String taskStatus); - - /** - * 删除指定时间之前的定时任务 - * - * @param beforeTime 时间点 - * @return 删除结果 - */ - int deleteBeforeTime(Date beforeTime); - - /** - * 统计指定批次的定时任务数量 - * - * @param batchId 批次ID - * @return 定时任务数量 - */ - int countByBatchId(Long batchId); - - /** - * 统计指定任务类型的数量 - * - * @param taskType 任务类型 - * @return 任务数量 - */ - int countByTaskType(String taskType); - - /** - * 统计指定任务状态的数量 - * - * @param taskStatus 任务状态 - * @return 任务数量 - */ - int countByTaskStatus(String taskStatus); - - /** - * 统计待执行的任务数量 - * - * @return 待执行任务数量 - */ - int countPendingTasks(); - - /** - * 统计执行失败的任务数量 - * - * @return 失败任务数量 - */ - int countFailedTasks(); - - /** - * 查询任务类型统计 - * - * @param batchId 批次ID(可选) - * @return 任务类型统计列表 - */ - List> selectTaskTypeStatistics(@Param("batchId") Long batchId); - - /** - * 查询任务状态统计 - * - * @param batchId 批次ID(可选) - * @return 任务状态统计列表 - */ - List> selectTaskStatusStatistics(@Param("batchId") Long batchId); - - /** - * 查询每日任务执行统计 - * - * @param batchId 批次ID(可选) - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 每日任务执行统计列表 - */ - List> selectDailyTaskStatistics( - @Param("batchId") Long batchId, - @Param("startTime") Date startTime, - @Param("endTime") Date endTime - ); - - /** - * 查询任务执行成功率统计 - * - * @param batchId 批次ID(可选) - * @return 任务执行成功率统计 - */ - Map selectTaskSuccessRateStatistics(@Param("batchId") Long batchId); - - /** - * 检查指定批次和任务类型的任务是否存在 - * - * @param batchId 批次ID - * @param taskType 任务类型 - * @return 是否存在 - */ - boolean existsByBatchAndType(@Param("batchId") Long batchId, @Param("taskType") String taskType); - - /** - * 查询需要重新执行的失败任务 - * - * @param retryCount 重试次数限制 - * @return 需要重新执行的任务列表 - */ - List selectRetryableTasks(Integer retryCount); - - /** - * 查询任务执行时间分布统计 - * - * @param batchId 批次ID(可选) - * @return 任务执行时间分布统计 - */ - List> selectTaskExecutionTimeDistribution(@Param("batchId") Long batchId); - - /** - * 清理已完成的历史任务 - * - * @param beforeTime 时间点 - * @return 清理结果 - */ - int cleanCompletedTasks(Date beforeTime); - - /** - * 重置失败任务状态为待执行 - * - * @param taskIds 任务ID列表 - * @return 重置结果 - */ - int resetFailedTasks(@Param("taskIds") List taskIds); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassInfoMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassInfoMapper.java deleted file mode 100644 index aed57614..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassInfoMapper.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgClassInfo; -import org.dromara.xg.domain.vo.XgClassInfoVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 班级信息Mapper接口 - * - * @author Cursor AI - * @date 2025-01-21 - */ -public interface XgClassInfoMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法,使用自定义ResultMap - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据班级代码查询班级信息 - * - * @param classCode 班级代码 - * @return 班级信息 - */ - XgClassInfoVo selectByClassCode(String classCode); - - /** - * 查询指定年级的班级列表 - * - * @param grade 年级 - * @return 班级列表 - */ - List selectByGrade(String grade); - - /** - * 查询指定学院的班级列表 - * - * @param collegeCode 学院代码 - * @return 班级列表 - */ - List selectByCollegeCode(String collegeCode); - - /** - * 查询指定专业的班级列表 - * - * @param majorCode 专业代码 - * @return 班级列表 - */ - List selectByMajorCode(String majorCode); - - /** - * 查询指定辅导员的班级列表 - * - * @param counselorId 辅导员ID - * @return 班级列表 - */ - List selectByCounselorId(Long counselorId); - - /** - * 查询指定班主任的班级列表 - * - * @param classTeacherId 班主任ID - * @return 班级列表 - */ - List selectByClassTeacherId(Long classTeacherId); - - /** - * 统计各学院班级数量 - * - * @return 学院班级数量统计 - */ - List> countByCollege(); - - /** - * 统计各年级班级数量 - * - * @return 年级班级数量统计 - */ - List> countByGrade(); - - /** - * 统计各专业班级数量 - * - * @return 专业班级数量统计 - */ - List> countByMajor(); - - /** - * 统计班级状态分布 - * - * @return 班级状态统计 - */ - List> countByClassStatus(); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassTeacherRelationMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassTeacherRelationMapper.java deleted file mode 100644 index 9357477f..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgClassTeacherRelationMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgClassTeacherRelation; -import org.dromara.xg.domain.vo.XgClassTeacherRelationVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import org.apache.ibatis.annotations.Param; - -/** - * 班级班主任关系Mapper接口 - * - * @author Cursor AI - * @date 2025-07-22 - */ -public interface XgClassTeacherRelationMapper extends BaseMapperPlus { - - /** - * 查询班级当前有效的班主任关系 - * - * @param classId 班级ID - * @return 班级班主任关系 - */ - XgClassTeacherRelation selectActiveRelationByClassId(@Param("classId") Long classId); - - /** - * 将班级的所有班主任关系设置为失效 - * - * @param classId 班级ID - * @param updateBy 更新者 - * @return 影响行数 - */ - int invalidateRelationsByClassId(@Param("classId") Long classId, @Param("updateBy") Long updateBy); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchLogMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchLogMapper.java deleted file mode 100644 index 560ebd53..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchLogMapper.java +++ /dev/null @@ -1,225 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgCollectionBatchLog; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; -import java.util.Date; - -/** - * 信息采集批次操作日志Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgCollectionBatchLogMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法 - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次ID查询操作日志 - * - * @param batchId 批次ID - * @return 操作日志列表 - */ - List selectByBatchId(Long batchId); - - /** - * 根据学生ID查询操作日志 - * - * @param studentId 学生ID - * @return 操作日志列表 - */ - List selectByStudentId(Long studentId); - - /** - * 根据批次ID和学生ID查询操作日志 - * - * @param batchId 批次ID - * @param studentId 学生ID - * @return 操作日志列表 - */ - List selectByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId); - - /** - * 根据操作类型查询操作日志 - * - * @param operationType 操作类型 - * @return 操作日志列表 - */ - List selectByOperationType(String operationType); - - /** - * 根据操作人查询操作日志 - * - * @param operatorId 操作人ID - * @return 操作日志列表 - */ - List selectByOperator(Long operatorId); - - /** - * 根据操作人类型查询操作日志 - * - * @param operatorType 操作人类型 - * @return 操作日志列表 - */ - List selectByOperatorType(String operatorType); - - /** - * 查询指定时间范围内的操作日志 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 操作日志列表 - */ - List selectByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime); - - /** - * 查询指定批次的最新操作日志 - * - * @param batchId 批次ID - * @param limit 限制条数 - * @return 最新操作日志列表 - */ - List selectLatestByBatchId(@Param("batchId") Long batchId, @Param("limit") Integer limit); - - /** - * 查询指定学生的最新操作日志 - * - * @param studentId 学生ID - * @param limit 限制条数 - * @return 最新操作日志列表 - */ - List selectLatestByStudentId(@Param("studentId") Long studentId, @Param("limit") Integer limit); - - /** - * 统计指定批次的操作次数 - * - * @param batchId 批次ID - * @return 操作次数 - */ - int countByBatchId(Long batchId); - - /** - * 统计指定学生的操作次数 - * - * @param studentId 学生ID - * @return 操作次数 - */ - int countByStudentId(Long studentId); - - /** - * 统计指定操作类型的次数 - * - * @param operationType 操作类型 - * @return 操作次数 - */ - int countByOperationType(String operationType); - - /** - * 统计指定时间范围内的操作次数 - * - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 操作次数 - */ - int countByTimeRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime); - - /** - * 查询操作类型统计 - * - * @param batchId 批次ID(可选) - * @return 操作类型统计列表 - */ - List> selectOperationTypeStatistics(@Param("batchId") Long batchId); - - /** - * 查询操作人统计 - * - * @param batchId 批次ID(可选) - * @return 操作人统计列表 - */ - List> selectOperatorStatistics(@Param("batchId") Long batchId); - - /** - * 查询每日操作统计 - * - * @param batchId 批次ID(可选) - * @param startTime 开始时间 - * @param endTime 结束时间 - * @return 每日操作统计列表 - */ - List> selectDailyOperationStatistics( - @Param("batchId") Long batchId, - @Param("startTime") Date startTime, - @Param("endTime") Date endTime - ); - - /** - * 批量插入操作日志 - * - * @param logs 操作日志列表 - * @return 插入结果 - */ - int batchInsert(@Param("logs") List logs); - - /** - * 删除指定时间之前的操作日志 - * - * @param beforeTime 时间点 - * @return 删除结果 - */ - int deleteBeforeTime(Date beforeTime); - - /** - * 根据批次ID删除操作日志 - * - * @param batchId 批次ID - * @return 删除结果 - */ - int deleteByBatchId(Long batchId); - - /** - * 根据学生ID删除操作日志 - * - * @param studentId 学生ID - * @return 删除结果 - */ - int deleteByStudentId(Long studentId); - - /** - * 查询异常操作日志(如频繁操作、异常IP等) - * - * @param batchId 批次ID(可选) - * @return 异常操作日志列表 - */ - List selectAbnormalOperations(@Param("batchId") Long batchId); - - /** - * 查询指定IP的操作日志 - * - * @param ipAddress IP地址 - * @return 操作日志列表 - */ - List selectByIpAddress(String ipAddress); - - /** - * 查询操作活跃度统计(按小时) - * - * @param batchId 批次ID(可选) - * @param date 日期 - * @return 小时活跃度统计 - */ - List> selectHourlyActivityStatistics(@Param("batchId") Long batchId, @Param("date") Date date); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchMapper.java deleted file mode 100644 index 911c1c78..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchMapper.java +++ /dev/null @@ -1,184 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgCollectionBatch; -import org.dromara.xg.domain.vo.XgCollectionBatchVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgCollectionBatchMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法,使用自定义ResultMap - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次编码查询批次信息 - * - * @param batchCode 批次编码 - * @return 批次信息 - */ - XgCollectionBatchVo selectByBatchCode(String batchCode); - - /** - * 查询指定学年的批次列表 - * - * @param academicYear 学年 - * @return 批次列表 - */ - List selectByAcademicYear(String academicYear); - - /** - * 查询指定状态的批次列表 - * - * @param batchStatus 批次状态 - * @return 批次列表 - */ - List selectByStatus(String batchStatus); - - /** - * 查询当前进行中的批次列表 - * - * @return 进行中的批次列表 - */ - List selectActiveBatches(); - - /** - * 查询即将开始的批次列表(未来7天内开始) - * - * @return 即将开始的批次列表 - */ - List selectUpcomingBatches(); - - /** - * 查询即将结束的批次列表(未来7天内结束) - * - * @return 即将结束的批次列表 - */ - List selectEndingSoonBatches(); - - /** - * 根据批次类型查询批次列表 - * - * @param batchType 批次类型 - * @return 批次列表 - */ - List selectByBatchType(String batchType); - - /** - * 查询批次统计信息 - * - * @param batchId 批次ID - * @return 统计信息 - */ - Map selectBatchStatistics(Long batchId); - - /** - * 查询批次完成率统计 - * - * @param batchId 批次ID - * @return 完成率统计 - */ - Map selectCompletionRateStatistics(Long batchId); - - /** - * 查询批次学院统计 - * - * @param batchId 批次ID - * @return 学院统计列表 - */ - List> selectCollegeStatistics(Long batchId); - - /** - * 查询批次专业统计 - * - * @param batchId 批次ID - * @return 专业统计列表 - */ - List> selectMajorStatistics(Long batchId); - - /** - * 查询批次班级统计 - * - * @param batchId 批次ID - * @return 班级统计列表 - */ - List> selectClassStatistics(Long batchId); - - /** - * 查询批次届别统计 - * - * @param batchId 批次ID - * @return 届别统计列表 - */ - List> selectGradeStatistics(Long batchId); - - /** - * 更新批次统计信息 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int updateBatchStatistics(Long batchId); - - /** - * 批量更新批次状态 - * - * @param batchIds 批次ID列表 - * @param batchStatus 批次状态 - * @return 更新结果 - */ - int batchUpdateStatus(@Param("batchIds") List batchIds, @Param("batchStatus") String batchStatus); - - /** - * 检查批次编码是否存在 - * - * @param batchCode 批次编码 - * @param excludeId 排除的批次ID(用于修改时检查) - * @return 是否存在 - */ - boolean existsBatchCode(@Param("batchCode") String batchCode, @Param("excludeId") Long excludeId); - - /** - * 查询用户有权限的批次列表 - * - * @param userId 用户ID - * @param roleIds 角色ID列表 - * @param collegeIds 学院ID列表 - * @return 批次列表 - */ - List selectUserAuthorizedBatches( - @Param("userId") Long userId, - @Param("roleIds") List roleIds, - @Param("collegeIds") List collegeIds - ); - - /** - * 查询需要自动提醒的批次列表 - * - * @return 需要提醒的批次列表 - */ - List selectBatchesNeedReminder(); - - /** - * 查询需要自动关闭的批次列表 - * - * @return 需要关闭的批次列表 - */ - List selectBatchesNeedAutoClose(); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchPermissionMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchPermissionMapper.java deleted file mode 100644 index 978d99dd..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchPermissionMapper.java +++ /dev/null @@ -1,281 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgCollectionBatchPermission; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次权限配置Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgCollectionBatchPermissionMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法 - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次ID查询权限配置 - * - * @param batchId 批次ID - * @return 权限配置列表 - */ - List selectByBatchId(Long batchId); - - /** - * 根据用户ID查询权限配置 - * - * @param userId 用户ID - * @return 权限配置列表 - */ - List selectByUserId(Long userId); - - /** - * 根据角色ID查询权限配置 - * - * @param roleId 角色ID - * @return 权限配置列表 - */ - List selectByRoleId(Long roleId); - - /** - * 根据学院ID查询权限配置 - * - * @param collegeId 学院ID - * @return 权限配置列表 - */ - List selectByCollegeId(Long collegeId); - - /** - * 根据权限类型查询权限配置 - * - * @param permissionType 权限类型 - * @return 权限配置列表 - */ - List selectByPermissionType(String permissionType); - - /** - * 查询指定批次和权限类型的权限配置 - * - * @param batchId 批次ID - * @param permissionType 权限类型 - * @return 权限配置列表 - */ - List selectByBatchAndPermissionType(@Param("batchId") Long batchId, @Param("permissionType") String permissionType); - - /** - * 检查用户是否有指定批次的权限 - * - * @param batchId 批次ID - * @param userId 用户ID - * @param permissionType 权限类型 - * @return 是否有权限 - */ - boolean hasUserPermission(@Param("batchId") Long batchId, @Param("userId") Long userId, @Param("permissionType") String permissionType); - - /** - * 检查角色是否有指定批次的权限 - * - * @param batchId 批次ID - * @param roleId 角色ID - * @param permissionType 权限类型 - * @return 是否有权限 - */ - boolean hasRolePermission(@Param("batchId") Long batchId, @Param("roleId") Long roleId, @Param("permissionType") String permissionType); - - /** - * 检查学院是否有指定批次的权限 - * - * @param batchId 批次ID - * @param collegeId 学院ID - * @param permissionType 权限类型 - * @return 是否有权限 - */ - boolean hasCollegePermission(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId, @Param("permissionType") String permissionType); - - /** - * 查询用户在指定批次的所有权限 - * - * @param batchId 批次ID - * @param userId 用户ID - * @return 权限类型列表 - */ - List selectUserPermissions(@Param("batchId") Long batchId, @Param("userId") Long userId); - - /** - * 查询角色在指定批次的所有权限 - * - * @param batchId 批次ID - * @param roleId 角色ID - * @return 权限类型列表 - */ - List selectRolePermissions(@Param("batchId") Long batchId, @Param("roleId") Long roleId); - - /** - * 查询学院在指定批次的所有权限 - * - * @param batchId 批次ID - * @param collegeId 学院ID - * @return 权限类型列表 - */ - List selectCollegePermissions(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId); - - /** - * 查询用户有权限的批次列表 - * - * @param userId 用户ID - * @param permissionType 权限类型 - * @return 批次ID列表 - */ - List selectUserAuthorizedBatches(@Param("userId") Long userId, @Param("permissionType") String permissionType); - - /** - * 查询角色有权限的批次列表 - * - * @param roleId 角色ID - * @param permissionType 权限类型 - * @return 批次ID列表 - */ - List selectRoleAuthorizedBatches(@Param("roleId") Long roleId, @Param("permissionType") String permissionType); - - /** - * 查询学院有权限的批次列表 - * - * @param collegeId 学院ID - * @param permissionType 权限类型 - * @return 批次ID列表 - */ - List selectCollegeAuthorizedBatches(@Param("collegeId") Long collegeId, @Param("permissionType") String permissionType); - - /** - * 批量插入权限配置 - * - * @param permissions 权限配置列表 - * @return 插入结果 - */ - int batchInsert(@Param("permissions") List permissions); - - /** - * 批量更新权限状态 - * - * @param ids 权限配置ID列表 - * @param isGranted 是否授权 - * @return 更新结果 - */ - int batchUpdateGrantStatus(@Param("ids") List ids, @Param("isGranted") Integer isGranted); - - /** - * 根据批次ID删除权限配置 - * - * @param batchId 批次ID - * @return 删除结果 - */ - int deleteByBatchId(Long batchId); - - /** - * 根据用户ID删除权限配置 - * - * @param userId 用户ID - * @return 删除结果 - */ - int deleteByUserId(Long userId); - - /** - * 根据角色ID删除权限配置 - * - * @param roleId 角色ID - * @return 删除结果 - */ - int deleteByRoleId(Long roleId); - - /** - * 根据学院ID删除权限配置 - * - * @param collegeId 学院ID - * @return 删除结果 - */ - int deleteByCollegeId(Long collegeId); - - /** - * 删除指定批次和权限类型的权限配置 - * - * @param batchId 批次ID - * @param permissionType 权限类型 - * @return 删除结果 - */ - int deleteByBatchAndPermissionType(@Param("batchId") Long batchId, @Param("permissionType") String permissionType); - - /** - * 查询即将过期的权限配置 - * - * @param days 天数 - * @return 即将过期的权限配置列表 - */ - List selectExpiringPermissions(Integer days); - - /** - * 查询已过期的权限配置 - * - * @return 已过期的权限配置列表 - */ - List selectExpiredPermissions(); - - /** - * 清理过期的权限配置 - * - * @return 清理结果 - */ - int cleanExpiredPermissions(); - - /** - * 统计指定批次的权限配置数量 - * - * @param batchId 批次ID - * @return 权限配置数量 - */ - int countByBatchId(Long batchId); - - /** - * 统计指定用户的权限配置数量 - * - * @param userId 用户ID - * @return 权限配置数量 - */ - int countByUserId(Long userId); - - /** - * 统计指定角色的权限配置数量 - * - * @param roleId 角色ID - * @return 权限配置数量 - */ - int countByRoleId(Long roleId); - - /** - * 统计指定学院的权限配置数量 - * - * @param collegeId 学院ID - * @return 权限配置数量 - */ - int countByCollegeId(Long collegeId); - - /** - * 查询权限配置统计 - * - * @param batchId 批次ID(可选) - * @return 权限配置统计列表 - */ - List> selectPermissionStatistics(@Param("batchId") Long batchId); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStatisticsMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStatisticsMapper.java deleted file mode 100644 index 474ae916..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStatisticsMapper.java +++ /dev/null @@ -1,301 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgCollectionBatchStatistics; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次统计Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgCollectionBatchStatisticsMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法 - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次ID查询统计信息 - * - * @param batchId 批次ID - * @return 统计信息列表 - */ - List selectByBatchId(Long batchId); - - /** - * 根据批次ID和统计类型查询统计信息 - * - * @param batchId 批次ID - * @param statisticsType 统计类型 - * @return 统计信息列表 - */ - List selectByBatchAndType(@Param("batchId") Long batchId, @Param("statisticsType") String statisticsType); - - /** - * 根据学院ID查询统计信息 - * - * @param collegeId 学院ID - * @return 统计信息列表 - */ - List selectByCollegeId(Long collegeId); - - /** - * 根据专业ID查询统计信息 - * - * @param majorId 专业ID - * @return 统计信息列表 - */ - List selectByMajorId(Long majorId); - - /** - * 根据班级ID查询统计信息 - * - * @param classId 班级ID - * @return 统计信息列表 - */ - List selectByClassId(Long classId); - - /** - * 根据届别查询统计信息 - * - * @param grade 届别 - * @return 统计信息列表 - */ - List selectByGrade(String grade); - - /** - * 查询指定批次的总体统计 - * - * @param batchId 批次ID - * @return 总体统计信息 - */ - XgCollectionBatchStatistics selectTotalStatistics(Long batchId); - - /** - * 查询指定批次的学院统计 - * - * @param batchId 批次ID - * @return 学院统计列表 - */ - List selectCollegeStatistics(Long batchId); - - /** - * 查询指定批次的专业统计 - * - * @param batchId 批次ID - * @return 专业统计列表 - */ - List selectMajorStatistics(Long batchId); - - /** - * 查询指定批次的班级统计 - * - * @param batchId 批次ID - * @return 班级统计列表 - */ - List selectClassStatistics(Long batchId); - - /** - * 查询指定批次的届别统计 - * - * @param batchId 批次ID - * @return 届别统计列表 - */ - List selectGradeStatistics(Long batchId); - - /** - * 查询指定学院在指定批次的统计 - * - * @param batchId 批次ID - * @param collegeId 学院ID - * @return 学院统计信息 - */ - XgCollectionBatchStatistics selectCollegeStatisticsInBatch(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId); - - /** - * 查询指定专业在指定批次的统计 - * - * @param batchId 批次ID - * @param majorId 专业ID - * @return 专业统计信息 - */ - XgCollectionBatchStatistics selectMajorStatisticsInBatch(@Param("batchId") Long batchId, @Param("majorId") Long majorId); - - /** - * 查询指定班级在指定批次的统计 - * - * @param batchId 批次ID - * @param classId 班级ID - * @return 班级统计信息 - */ - XgCollectionBatchStatistics selectClassStatisticsInBatch(@Param("batchId") Long batchId, @Param("classId") Long classId); - - /** - * 查询指定届别在指定批次的统计 - * - * @param batchId 批次ID - * @param grade 届别 - * @return 届别统计信息 - */ - XgCollectionBatchStatistics selectGradeStatisticsInBatch(@Param("batchId") Long batchId, @Param("grade") String grade); - - /** - * 刷新指定批次的统计数据 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshBatchStatistics(Long batchId); - - /** - * 刷新指定批次的总体统计 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshTotalStatistics(Long batchId); - - /** - * 刷新指定批次的学院统计 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshCollegeStatistics(Long batchId); - - /** - * 刷新指定批次的专业统计 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshMajorStatistics(Long batchId); - - /** - * 刷新指定批次的班级统计 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshClassStatistics(Long batchId); - - /** - * 刷新指定批次的届别统计 - * - * @param batchId 批次ID - * @return 更新结果 - */ - int refreshGradeStatistics(Long batchId); - - /** - * 批量插入统计数据 - * - * @param statistics 统计数据列表 - * @return 插入结果 - */ - int batchInsert(@Param("statistics") List statistics); - - /** - * 批量更新统计数据 - * - * @param statistics 统计数据列表 - * @return 更新结果 - */ - int batchUpdate(@Param("statistics") List statistics); - - /** - * 根据批次ID删除统计数据 - * - * @param batchId 批次ID - * @return 删除结果 - */ - int deleteByBatchId(Long batchId); - - /** - * 根据学院ID删除统计数据 - * - * @param collegeId 学院ID - * @return 删除结果 - */ - int deleteByCollegeId(Long collegeId); - - /** - * 根据专业ID删除统计数据 - * - * @param majorId 专业ID - * @return 删除结果 - */ - int deleteByMajorId(Long majorId); - - /** - * 根据班级ID删除统计数据 - * - * @param classId 班级ID - * @return 删除结果 - */ - int deleteByClassId(Long classId); - - /** - * 查询完成率排名 - * - * @param batchId 批次ID - * @param type 排名类型(COLLEGE,MAJOR,CLASS,GRADE) - * @param limit 限制条数 - * @return 排名列表 - */ - List selectCompletionRateRanking(@Param("batchId") Long batchId, @Param("type") String type, @Param("limit") Integer limit); - - /** - * 查询完成率低于指定值的统计 - * - * @param batchId 批次ID - * @param completionRate 完成率阈值 - * @return 统计列表 - */ - List selectLowCompletionRateStatistics(@Param("batchId") Long batchId, @Param("completionRate") Double completionRate); - - /** - * 查询需要重新计算的统计记录 - * - * @return 需要重新计算的统计记录列表 - */ - List selectNeedRecalculateStatistics(); - - /** - * 统计指定批次的统计记录数量 - * - * @param batchId 批次ID - * @return 统计记录数量 - */ - int countByBatchId(Long batchId); - - /** - * 检查统计数据是否存在 - * - * @param batchId 批次ID - * @param statisticsType 统计类型 - * @param targetId 目标ID(学院ID、专业ID、班级ID等) - * @return 是否存在 - */ - boolean existsStatistics(@Param("batchId") Long batchId, @Param("statisticsType") String statisticsType, @Param("targetId") Long targetId); - - /** - * 查询统计数据概览 - * - * @param batchId 批次ID - * @return 统计数据概览 - */ - Map selectStatisticsOverview(Long batchId); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStudentMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStudentMapper.java deleted file mode 100644 index ade391b0..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgCollectionBatchStudentMapper.java +++ /dev/null @@ -1,235 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgCollectionBatchStudent; -import org.dromara.xg.domain.vo.XgCollectionBatchStudentVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次学生关联Mapper接口 - * - * @author Cursor AI - * @date 2025-01-17 - */ -public interface XgCollectionBatchStudentMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法,使用自定义ResultMap - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据批次ID和学生ID查询关联信息 - * - * @param batchId 批次ID - * @param studentId 学生ID - * @return 关联信息 - */ - XgCollectionBatchStudentVo selectByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId); - - /** - * 查询指定批次的学生列表 - * - * @param batchId 批次ID - * @return 学生列表 - */ - List selectByBatchId(Long batchId); - - /** - * 查询指定学生参与的批次列表 - * - * @param studentId 学生ID - * @return 批次学生关联列表 - */ - List selectByStudentId(Long studentId); - - /** - * 查询指定批次已提交的学生列表 - * - * @param batchId 批次ID - * @return 已提交的学生列表 - */ - List selectSubmittedByBatchId(Long batchId); - - /** - * 查询指定批次未提交的学生列表 - * - * @param batchId 批次ID - * @return 未提交的学生列表 - */ - List selectNotSubmittedByBatchId(Long batchId); - - /** - * 查询指定学院在指定批次的学生列表 - * - * @param batchId 批次ID - * @param collegeId 学院ID - * @return 学生列表 - */ - List selectByBatchAndCollege(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId); - - /** - * 查询指定专业在指定批次的学生列表 - * - * @param batchId 批次ID - * @param majorId 专业ID - * @return 学生列表 - */ - List selectByBatchAndMajor(@Param("batchId") Long batchId, @Param("majorId") Long majorId); - - /** - * 查询指定班级在指定批次的学生列表 - * - * @param batchId 批次ID - * @param classId 班级ID - * @return 学生列表 - */ - List selectByBatchAndClass(@Param("batchId") Long batchId, @Param("classId") Long classId); - - /** - * 查询指定届别在指定批次的学生列表 - * - * @param batchId 批次ID - * @param grade 届别 - * @return 学生列表 - */ - List selectByBatchAndGrade(@Param("batchId") Long batchId, @Param("grade") String grade); - - /** - * 批量插入批次学生关联 - * - * @param batchStudents 批次学生关联列表 - * @return 插入结果 - */ - int batchInsert(@Param("batchStudents") List batchStudents); - - /** - * 批量更新学生提交状态 - * - * @param batchId 批次ID - * @param studentIds 学生ID列表 - * @param hasSubmitted 是否已提交 - * @return 更新结果 - */ - int batchUpdateSubmitStatus(@Param("batchId") Long batchId, @Param("studentIds") List studentIds, @Param("hasSubmitted") Integer hasSubmitted); - - /** - * 批量更新学生编辑权限 - * - * @param batchId 批次ID - * @param studentIds 学生ID列表 - * @param canEdit 是否可编辑 - * @return 更新结果 - */ - int batchUpdateEditPermission(@Param("batchId") Long batchId, @Param("studentIds") List studentIds, @Param("canEdit") Integer canEdit); - - /** - * 统计指定批次的学生数量 - * - * @param batchId 批次ID - * @return 学生数量 - */ - int countByBatchId(Long batchId); - - /** - * 统计指定批次已提交的学生数量 - * - * @param batchId 批次ID - * @return 已提交学生数量 - */ - int countSubmittedByBatchId(Long batchId); - - /** - * 统计指定批次未提交的学生数量 - * - * @param batchId 批次ID - * @return 未提交学生数量 - */ - int countNotSubmittedByBatchId(Long batchId); - - /** - * 统计指定学院在指定批次的学生数量 - * - * @param batchId 批次ID - * @param collegeId 学院ID - * @return 学生数量 - */ - int countByBatchAndCollege(@Param("batchId") Long batchId, @Param("collegeId") Long collegeId); - - /** - * 统计指定专业在指定批次的学生数量 - * - * @param batchId 批次ID - * @param majorId 专业ID - * @return 学生数量 - */ - int countByBatchAndMajor(@Param("batchId") Long batchId, @Param("majorId") Long majorId); - - /** - * 统计指定班级在指定批次的学生数量 - * - * @param batchId 批次ID - * @param classId 班级ID - * @return 学生数量 - */ - int countByBatchAndClass(@Param("batchId") Long batchId, @Param("classId") Long classId); - - /** - * 根据批次ID删除所有学生关联 - * - * @param batchId 批次ID - * @return 删除结果 - */ - int deleteByBatchId(Long batchId); - - /** - * 根据学生ID删除所有批次关联 - * - * @param studentId 学生ID - * @return 删除结果 - */ - int deleteByStudentId(Long studentId); - - /** - * 检查学生是否已在指定批次中 - * - * @param batchId 批次ID - * @param studentId 学生ID - * @return 是否存在 - */ - boolean existsByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId); - - /** - * 查询学生在指定批次的提交状态 - * - * @param batchId 批次ID - * @param studentId 学生ID - * @return 提交状态 - */ - Integer getSubmitStatusByBatchAndStudent(@Param("batchId") Long batchId, @Param("studentId") Long studentId); - - /** - * 查询需要提醒的学生列表(未提交且在提醒范围内) - * - * @param batchId 批次ID - * @return 需要提醒的学生列表 - */ - List selectStudentsNeedReminder(Long batchId); - - /** - * 查询超时未提交的学生列表 - * - * @param batchId 批次ID - * @return 超时未提交的学生列表 - */ - List selectOverdueStudents(Long batchId); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsAnalysisMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsAnalysisMapper.java deleted file mode 100644 index 0a72bd7f..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsAnalysisMapper.java +++ /dev/null @@ -1,249 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgStudentInfo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; -import java.util.Date; - -/** - * 统计分析Mapper接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface XgStatisticsAnalysisMapper extends BaseMapperPlus { - - /** - * 统计学生总数 - */ - Long countTotalStudents(); - - /** - * 统计学院总数 - */ - Long countTotalColleges(); - - /** - * 统计专业总数 - */ - Long countTotalMajors(); - - /** - * 统计班级总数 - */ - Long countTotalClasses(); - - /** - * 获取学院选项 - */ - List> getCollegeOptions(); - - /** - * 获取专业选项 - */ - List> getMajorOptions(@Param("collegeCode") String collegeCode); - - /** - * 获取班级选项 - */ - List> getClassOptions(@Param("collegeCode") String collegeCode, @Param("majorCode") String majorCode); - - /** - * 按学院统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByCollege(@Param("conditions") Map conditions); - - /** - * 按专业统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByMajor(@Param("conditions") Map conditions); - - /** - * 按班级统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByClass(@Param("conditions") Map conditions); - - /** - * 按年级统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByGrade(@Param("conditions") Map conditions); - - /** - * 按性别统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByGender(@Param("conditions") Map conditions); - - /** - * 按年龄段统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByAge(@Param("conditions") Map conditions); - - /** - * 按政治面貌统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByPoliticalStatus(@Param("conditions") Map conditions); - - /** - * 按民族统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByNationality(@Param("conditions") Map conditions); - - /** - * 按生源地统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsBySourceRegion(@Param("conditions") Map conditions); - - /** - * 按血型统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByBloodType(@Param("conditions") Map conditions); - - /** - * 按宗教信仰统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByReligion(@Param("conditions") Map conditions); - - /** - * 按学籍状态统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByStudentStatus(@Param("conditions") Map conditions); - - /** - * 按培养方式统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByTrainingType(@Param("conditions") Map conditions); - - /** - * 按身高范围统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByHeight(@Param("conditions") Map conditions); - - /** - * 按体重范围统计学生数量 - * - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByWeight(@Param("conditions") Map conditions); - - /** - * 多维度组合统计 - * - * @param dimensions 统计维度列表 - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByMultiDimensions(@Param("dimensions") List dimensions, @Param("conditions") Map conditions); - - /** - * 按时间趋势统计学生数量 - * - * @param timeField 时间字段 - * @param timeFormat 时间格式 - * @param conditions 查询条件 - * @return 统计结果 - */ - List> statisticsByTimeTrend(@Param("timeField") String timeField, @Param("timeFormat") String timeFormat, @Param("conditions") Map conditions); - - /** - * 获取学生信息汇总报表 - * - * @param conditions 查询条件 - * @return 汇总报表数据 - */ - List> getStudentSummaryReport(@Param("conditions") Map conditions); - - /** - * 获取班级统计报表 - * - * @param conditions 查询条件 - * @return 班级统计报表数据 - */ - List> getClassStatisticsReport(@Param("conditions") Map conditions); - - /** - * 获取学院统计报表 - * - * @param conditions 查询条件 - * @return 学院统计报表数据 - */ - List> getCollegeStatisticsReport(@Param("conditions") Map conditions); - - /** - * 获取困难学生统计报表 - * - * @param conditions 查询条件 - * @return 困难学生统计报表数据 - */ - List> getPoorStudentReport(@Param("conditions") Map conditions); - - /** - * 获取特殊群体统计报表 - * - * @param conditions 查询条件 - * @return 特殊群体统计报表数据 - */ - List> getSpecialGroupReport(@Param("conditions") Map conditions); - - /** - * 获取统计摘要信息 - * - * @param conditions 查询条件 - * @return 统计摘要信息 - */ - Map getStatisticsSummary(@Param("conditions") Map conditions); - - /** - * 自定义SQL统计查询 - * - * @param sqlTemplate SQL模板 - * @param conditions 查询条件 - * @return 统计结果 - */ - List> customStatisticsQuery(@Param("sqlTemplate") String sqlTemplate, @Param("conditions") Map conditions); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsConfigMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsConfigMapper.java deleted file mode 100644 index 51a92a29..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStatisticsConfigMapper.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgStatisticsConfig; -import org.dromara.xg.domain.vo.XgStatisticsConfigVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 统计分析配置Mapper接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface XgStatisticsConfigMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法,使用自定义ResultMap - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据配置编码查询配置信息 - * - * @param configCode 配置编码 - * @return 配置信息 - */ - XgStatisticsConfigVo selectByConfigCode(String configCode); - - /** - * 查询指定类型的配置列表 - * - * @param configType 配置类型 - * @return 配置列表 - */ - List selectByConfigType(String configType); - - /** - * 查询启用的配置列表 - * - * @param configType 配置类型(可选) - * @return 配置列表 - */ - List selectEnabledConfigs(@Param("configType") String configType); - - /** - * 查询系统配置列表 - * - * @return 系统配置列表 - */ - List selectSystemConfigs(); - - /** - * 查询用户自定义配置列表 - * - * @param userId 用户ID - * @return 用户自定义配置列表 - */ - List selectUserConfigs(@Param("userId") Long userId); - - /** - * 根据权限查询可访问的配置列表 - * - * @param userId 用户ID - * @param roles 用户角色列表 - * @return 可访问的配置列表 - */ - List selectAccessibleConfigs(@Param("userId") Long userId, @Param("roles") List roles); - - /** - * 更新配置排序 - * - * @param configId 配置ID - * @param sortOrder 排序值 - * @return 更新结果 - */ - int updateSortOrder(@Param("configId") Long configId, @Param("sortOrder") Integer sortOrder); - - /** - * 批量更新配置状态 - * - * @param configIds 配置ID列表 - * @param isEnabled 是否启用 - * @return 更新结果 - */ - int batchUpdateStatus(@Param("configIds") List configIds, @Param("isEnabled") Integer isEnabled); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStudentInfoMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStudentInfoMapper.java deleted file mode 100644 index f525b0dc..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgStudentInfoMapper.java +++ /dev/null @@ -1,202 +0,0 @@ -package org.dromara.xg.mapper; - -import org.dromara.xg.domain.XgStudentInfo; -import org.dromara.xg.domain.vo.XgStudentInfoVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * 学生信息Mapper接口 - * - * @author Cursor AI - * @date 2025-01-14 - */ -public interface XgStudentInfoMapper extends BaseMapperPlus { - - /** - * 重写分页查询方法,使用自定义ResultMap - * - * @param page 分页参数 - * @param wrapper 查询条件 - * @return 分页结果 - */ -

> P selectVoPage(IPage page, @Param("ew") Wrapper wrapper); - - /** - * 根据学号查询学生信息 - * - * @param studentNo 学号 - * @return 学生信息 - */ - XgStudentInfoVo selectByStudentNo(String studentNo); - - /** - * 根据身份证号查询学生信息 - * - * @param idCard 身份证号 - * @return 学生信息 - */ - XgStudentInfoVo selectByIdCard(String idCard); - - /** - * 查询指定班级的学生列表 - * - * @param classCode 班级代码 - * @return 学生列表 - */ - List selectByClassCode(String classCode); - - /** - * 查询指定学院的学生列表 - * - * @param collegeCode 学院代码 - * @return 学生列表 - */ - List selectByCollegeCode(String collegeCode); - - /** - * 查询指定辅导员的学生列表 - * - * @param counselorId 辅导员ID - * @return 学生列表 - */ - List selectByCounselorId(Long counselorId); - - /** - * 查询指定班主任的学生列表 - * - * @param classTeacherId 班主任ID - * @return 学生列表 - */ - List selectByClassTeacherId(Long classTeacherId); - - /** - * 统计各学院学生数量 - * - * @return 学院学生数量统计 - */ - List> countByCollege(); - - /** - * 统计各年级学生数量 - * - * @return 年级学生数量统计 - */ - List> countByGrade(); - - /** - * 统计各专业学生数量 - * - * @return 专业学生数量统计 - */ - List> countByMajor(); - - /** - * 统计学籍状态分布 - * - * @return 学籍状态统计 - */ - List> countByStudentStatus(); - - /** - * 统计信息完整度分布 - * - * @return 信息完整度统计 - */ - List> countByCompletionRate(); - - /** - * 查询信息不完整的学生列表 - * - * @return 信息不完整的学生列表 - */ - List selectIncompleteStudents(); - - /** - * 查询待审核的学生信息列表 - * - * @return 待审核的学生信息列表 - */ - List selectPendingAuditStudents(); - - /** - * 批量更新学生信息状态 - * - * @param studentIds 学生ID列表 - * @param infoStatus 信息状态 - * @param updateBy 更新者 - * @return 更新数量 - */ - int batchUpdateInfoStatus(List studentIds, String infoStatus, Long updateBy); - - /** - * 批量更新学生学籍状态 - * - * @param studentIds 学生ID列表 - * @param studentStatus 学籍状态 - * @param updateBy 更新者 - * @return 更新数量 - */ - int batchUpdateStudentStatus(List studentIds, String studentStatus, Long updateBy); - - /** - * 查询重复学号的学生列表 - * - * @return 重复学号的学生列表 - */ - List> selectDuplicateStudentNo(); - - /** - * 查询重复身份证号的学生列表 - * - * @return 重复身份证号的学生列表 - */ - List> selectDuplicateIdCard(); - - // ================================ - // 选项数据查询方法 - // ================================ - - /** - * 查询学院选项 - * - * @return 学院选项列表 - */ - List> selectCollegeOptions(); - - /** - * 查询专业选项 - * - * @param collegeCode 学院代码(可选) - * @return 专业选项列表 - */ - List> selectMajorOptions(@Param("collegeCode") String collegeCode); - - /** - * 查询班级选项 - * - * @param majorCode 专业代码(可选) - * @return 班级选项列表 - */ - List> selectClassOptions(@Param("majorCode") String majorCode); - - /** - * 查询辅导员选项 - * - * @return 辅导员选项列表 - */ - List> selectCounselorOptions(); - - /** - * 查询班主任选项 - * - * @return 班主任选项列表 - */ - List> selectClassTeacherOptions(); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgSysUserMapper.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgSysUserMapper.java deleted file mode 100644 index f8d7be77..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/mapper/XgSysUserMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.dromara.xg.mapper; - -import org.apache.ibatis.annotations.Param; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; -import org.dromara.system.domain.SysUser; -import org.dromara.system.domain.vo.SysUserVo; - -import java.util.List; - -/** - * 系统用户Mapper接口扩展 - * - * @author Cursor AI - * @date 2025-07-22 - */ -public interface XgSysUserMapper extends BaseMapperPlus { - - /** - * 查询班主任角色的用户列表 - * - * @param roleKey 角色标识 - * @return 用户列表 - */ - List selectUsersByRoleKey(@Param("roleKey") String roleKey); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgBatchScheduledTaskService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgBatchScheduledTaskService.java deleted file mode 100644 index c8d3f648..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgBatchScheduledTaskService.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgBatchScheduledTaskBo; -import org.dromara.xg.domain.vo.XgBatchScheduledTaskVo; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 批次定时任务Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgBatchScheduledTaskService { - - /** - * 查询批次定时任务 - */ - XgBatchScheduledTaskVo queryById(Long taskId); - - /** - * 查询批次定时任务列表 - */ - TableDataInfo queryPageList(XgBatchScheduledTaskBo bo, PageQuery pageQuery); - - /** - * 查询批次定时任务列表 - */ - List queryList(XgBatchScheduledTaskBo bo); - - /** - * 新增批次定时任务 - */ - Boolean insertByBo(XgBatchScheduledTaskBo bo); - - /** - * 修改批次定时任务 - */ - Boolean updateByBo(XgBatchScheduledTaskBo bo); - - /** - * 校验并批量删除批次定时任务信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 查询待执行的任务 - */ - List queryPendingTasks(); - - /** - * 查询正在执行的任务 - */ - List queryRunningTasks(); - - /** - * 查询已完成的任务 - */ - List queryCompletedTasks(); - - /** - * 查询失败的任务 - */ - List queryFailedTasks(); - - /** - * 执行任务 - */ - Boolean executeTask(Long taskId); - - /** - * 重试任务 - */ - Boolean retryTask(Long taskId); - - /** - * 停止任务 - */ - Boolean stopTask(Long taskId); - - /** - * 批量执行任务 - */ - Boolean batchExecuteTasks(List taskIds); - - /** - * 更新任务执行结果 - */ - Boolean updateTaskResult(Long taskId, String status, String result); - - /** - * 统计任务执行情况 - */ - Map getTaskStatistics(Long batchId); - - /** - * 清理历史任务 - */ - Boolean cleanHistoryTasks(Integer keepDays); - - /** - * 导出任务数据 - */ - List exportTaskData(XgBatchScheduledTaskBo bo); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassInfoService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassInfoService.java deleted file mode 100644 index 46f02e67..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassInfoService.java +++ /dev/null @@ -1,204 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.vo.XgClassInfoVo; -import org.dromara.xg.domain.bo.XgClassInfoBo; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.system.domain.SysUser; -import org.dromara.system.domain.vo.SysUserVo; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 班级信息Service接口 - * - * @author Cursor AI - * @date 2025-01-21 - */ -public interface IXgClassInfoService { - - /** - * 查询班级信息 - * - * @param id 班级信息主键 - * @return 班级信息 - */ - XgClassInfoVo queryById(Long id); - - /** - * 查询班级信息列表 - * - * @param bo 班级信息 - * @return 班级信息集合 - */ - TableDataInfo queryPageList(XgClassInfoBo bo, PageQuery pageQuery); - - /** - * 查询班级信息列表 - * - * @param bo 班级信息 - * @return 班级信息集合 - */ - List queryList(XgClassInfoBo bo); - - /** - * 新增班级信息 - * - * @param bo 班级信息 - * @return 结果 - */ - Boolean insertByBo(XgClassInfoBo bo); - - /** - * 修改班级信息 - * - * @param bo 班级信息 - * @return 结果 - */ - Boolean updateByBo(XgClassInfoBo bo); - - /** - * 校验并批量删除班级信息信息 - * - * @param ids 需要删除的班级信息主键集合 - * @param isValid 是否校验,true-删除前校验,false-不校验 - * @return 结果 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据班级代码查询班级信息 - * - * @param classCode 班级代码 - * @return 班级信息 - */ - XgClassInfoVo queryByClassCode(String classCode); - - /** - * 根据年级查询班级信息列表 - * - * @param grade 年级 - * @return 班级信息集合 - */ - List queryByGrade(String grade); - - /** - * 根据学院代码查询班级信息列表 - * - * @param collegeCode 学院代码 - * @return 班级信息集合 - */ - List queryByCollegeCode(String collegeCode); - - /** - * 根据专业代码查询班级信息列表 - * - * @param majorCode 专业代码 - * @return 班级信息集合 - */ - List queryByMajorCode(String majorCode); - - /** - * 根据辅导员ID查询班级信息列表 - * - * @param counselorId 辅导员ID - * @return 班级信息集合 - */ - List queryByCounselorId(Long counselorId); - - /** - * 根据班主任ID查询班级信息列表 - * - * @param classTeacherId 班主任ID - * @return 班级信息集合 - */ - List queryByClassTeacherId(Long classTeacherId); - - /** - * 获取班级可用选项列表(用于下拉框) - * - * @return 班级选项集合 - */ - List getClassOptions(); - - /** - * 更新班级学生统计数据 - * - * @param classId 班级ID - * @return 结果 - */ - Boolean updateStudentCount(Long classId); - - /** - * 批量更新班级学生统计数据 - * - * @param classIds 班级ID集合 - * @return 结果 - */ - Boolean batchUpdateStudentCount(Collection classIds); - - /** - * 启用班级 - * - * @param id 班级ID - * @return 结果 - */ - Boolean enableClass(Long id); - - /** - * 禁用班级 - * - * @param id 班级ID - * @return 结果 - */ - Boolean disableClass(Long id); - - /** - * 获取班主任用户列表 - * - * @return 班主任用户列表 - */ - List getClassTeacherOptions(); - - // ================================ - // 统计数据接口 - 新增 - // ================================ - - /** - * 获取班级信息统计概览 - * - * @return 统计概览数据 - */ - Map getStatistics(); - - /** - * 统计各学院班级数量 - * - * @return 学院班级数量统计 - */ - List> countByCollege(); - - /** - * 统计各年级班级数量 - * - * @return 年级班级数量统计 - */ - List> countByGrade(); - - /** - * 统计各专业班级数量 - * - * @return 专业班级数量统计 - */ - List> countByMajor(); - - /** - * 统计班级状态分布 - * - * @return 班级状态统计 - */ - List> countByStatus(); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassTeacherRelationService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassTeacherRelationService.java deleted file mode 100644 index 5623c523..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgClassTeacherRelationService.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.XgClassTeacherRelation; -import org.dromara.xg.domain.bo.XgClassTeacherRelationBo; -import org.dromara.xg.domain.vo.XgClassTeacherRelationVo; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; - -import java.util.Collection; -import java.util.List; - -/** - * 班级班主任关系Service接口 - * - * @author Cursor AI - * @date 2025-07-22 - */ -public interface IXgClassTeacherRelationService { - - /** - * 查询班级班主任关系 - * - * @param id 班级班主任关系主键 - * @return 班级班主任关系 - */ - XgClassTeacherRelationVo queryById(Long id); - - /** - * 查询班级班主任关系列表 - * - * @param bo 班级班主任关系 - * @return 班级班主任关系集合 - */ - TableDataInfo queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery); - - /** - * 查询班级班主任关系列表 - * - * @param bo 班级班主任关系 - * @return 班级班主任关系集合 - */ - List queryList(XgClassTeacherRelationBo bo); - - /** - * 新增班级班主任关系 - * - * @param bo 班级班主任关系 - * @return 结果 - */ - Boolean insertByBo(XgClassTeacherRelationBo bo); - - /** - * 修改班级班主任关系 - * - * @param bo 班级班主任关系 - * @return 结果 - */ - Boolean updateByBo(XgClassTeacherRelationBo bo); - - /** - * 校验并批量删除班级班主任关系信息 - * - * @param ids 需要删除的班级班主任关系主键集合 - * @param isValid 是否校验,true-删除前校验,false-不校验 - * @return 结果 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 创建班级班主任关系 - * - * @param classId 班级ID - * @param teacherId 班主任ID - * @return 结果 - */ - boolean createClassTeacherRelation(Long classId, Long teacherId); - - /** - * 更新班级班主任关系 - * - * @param classId 班级ID - * @param teacherId 班主任ID - * @return 结果 - */ - boolean updateClassTeacherRelation(Long classId, Long teacherId); - - /** - * 获取班级当前班主任 - * - * @param classId 班级ID - * @return 班级班主任关系 - */ - XgClassTeacherRelation getActiveTeacherByClassId(Long classId); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchLogService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchLogService.java deleted file mode 100644 index 17e415dd..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchLogService.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgCollectionBatchLogBo; -import org.dromara.xg.domain.vo.XgCollectionBatchLogVo; - -import java.util.Collection; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * 批次操作日志Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgCollectionBatchLogService { - - /** - * 查询批次操作日志 - */ - XgCollectionBatchLogVo queryById(Long logId); - - /** - * 查询批次操作日志列表 - */ - TableDataInfo queryPageList(XgCollectionBatchLogBo bo, PageQuery pageQuery); - - /** - * 查询批次操作日志列表 - */ - List queryList(XgCollectionBatchLogBo bo); - - /** - * 新增批次操作日志 - */ - Boolean insertByBo(XgCollectionBatchLogBo bo); - - /** - * 修改批次操作日志 - */ - Boolean updateByBo(XgCollectionBatchLogBo bo); - - /** - * 校验并批量删除批次操作日志信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据批次ID查询操作日志 - */ - List queryLogsByBatchId(Long batchId); - - /** - * 根据学生ID查询操作日志 - */ - List queryLogsByStudentId(Long studentId); - - /** - * 根据操作类型查询操作日志 - */ - List queryLogsByOperationType(String operationType); - - /** - * 根据操作人查询操作日志 - */ - List queryLogsByOperator(Long operatorId); - - /** - * 查询指定时间范围内的操作日志 - */ - List queryLogsByTimeRange(Date startTime, Date endTime); - - /** - * 记录批次操作日志 - */ - Boolean recordBatchLog(Long batchId, String operationType, String operationContent, String operationResult); - - /** - * 记录学生操作日志 - */ - Boolean recordStudentLog(Long batchId, Long studentId, String operationType, String operationContent, String operationResult); - - /** - * 批量记录操作日志 - */ - Boolean batchRecordLogs(List logList); - - /** - * 统计操作次数(按操作类型) - */ - List> countOperationsByType(Long batchId); - - /** - * 统计操作次数(按操作人) - */ - List> countOperationsByOperator(Long batchId); - - /** - * 统计操作次数(按时间) - */ - List> countOperationsByTime(Long batchId, String timeType); - - /** - * 清理历史日志 - */ - Boolean cleanHistoryLogs(Date beforeTime); - - /** - * 导出日志数据 - */ - List exportLogData(XgCollectionBatchLogBo bo); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchPermissionService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchPermissionService.java deleted file mode 100644 index fab77d68..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchPermissionService.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgCollectionBatchPermissionBo; -import org.dromara.xg.domain.vo.XgCollectionBatchPermissionVo; - -import java.util.Collection; -import java.util.List; - -/** - * 批次权限配置Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgCollectionBatchPermissionService { - - /** - * 查询批次权限配置 - */ - XgCollectionBatchPermissionVo queryById(Long permissionId); - - /** - * 查询批次权限配置列表 - */ - TableDataInfo queryPageList(XgCollectionBatchPermissionBo bo, PageQuery pageQuery); - - /** - * 查询批次权限配置列表 - */ - List queryList(XgCollectionBatchPermissionBo bo); - - /** - * 新增批次权限配置 - */ - Boolean insertByBo(XgCollectionBatchPermissionBo bo); - - /** - * 修改批次权限配置 - */ - Boolean updateByBo(XgCollectionBatchPermissionBo bo); - - /** - * 校验并批量删除批次权限配置信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 检查用户是否有批次权限 - */ - Boolean checkUserPermission(Long batchId, Long userId, String permissionType); - - /** - * 检查角色是否有批次权限 - */ - Boolean checkRolePermission(Long batchId, Long roleId, String permissionType); - - /** - * 检查学院是否有批次权限 - */ - Boolean checkCollegePermission(Long batchId, String collegeCode, String permissionType); - - /** - * 批量配置用户权限 - */ - Boolean batchConfigUserPermission(Long batchId, List userIds, String permissionType, String status); - - /** - * 批量配置角色权限 - */ - Boolean batchConfigRolePermission(Long batchId, List roleIds, String permissionType, String status); - - /** - * 批量配置学院权限 - */ - Boolean batchConfigCollegePermission(Long batchId, List collegeCodes, String permissionType, String status); - - /** - * 清理过期权限 - */ - Boolean cleanExpiredPermissions(); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchService.java deleted file mode 100644 index 78e30775..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchService.java +++ /dev/null @@ -1,159 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgCollectionBatchBo; -import org.dromara.xg.domain.vo.XgCollectionBatchVo; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 信息采集批次Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgCollectionBatchService { - - /** - * 查询信息采集批次 - */ - XgCollectionBatchVo queryById(Long batchId); - - /** - * 查询信息采集批次列表 - */ - TableDataInfo queryPageList(XgCollectionBatchBo bo, PageQuery pageQuery); - - /** - * 查询信息采集批次列表 - */ - List queryList(XgCollectionBatchBo bo); - - /** - * 新增信息采集批次 - */ - Boolean insertByBo(XgCollectionBatchBo bo); - - /** - * 修改信息采集批次 - */ - Boolean updateByBo(XgCollectionBatchBo bo); - - /** - * 校验并批量删除信息采集批次信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据编码查询批次 - */ - XgCollectionBatchVo queryByCode(String batchCode); - - /** - * 查询当前用户有权限的批次列表 - */ - List queryUserPermissionBatches(Long userId); - - /** - * 查询当前进行中的批次列表 - */ - List queryActiveBatches(); - - /** - * 查询即将开始的批次列表 - */ - List queryUpcomingBatches(); - - /** - * 查询即将结束的批次列表 - */ - List queryEndingSoonBatches(); - - /** - * 查询需要提醒的批次列表 - */ - List queryBatchesNeedReminder(); - - /** - * 查询需要自动关闭的批次列表 - */ - List queryBatchesNeedAutoClose(); - - /** - * 启动批次 - */ - Boolean startBatch(Long batchId); - - /** - * 暂停批次 - */ - Boolean pauseBatch(Long batchId); - - /** - * 恢复批次 - */ - Boolean resumeBatch(Long batchId); - - /** - * 结束批次 - */ - Boolean endBatch(Long batchId); - - /** - * 复制批次 - */ - Boolean copyBatch(Long batchId, String newBatchCode, String newBatchName); - - /** - * 批次统计 - */ - Map getBatchStatistics(Long batchId); - - /** - * 批次整体统计 - */ - Map getBatchOverallStatistics(); - - /** - * 批次完成率统计 - */ - Map getBatchCompletionStatistics(Long batchId); - - /** - * 批次各维度统计 - */ - List> getBatchDimensionStatistics(Long batchId, String dimension); - - /** - * 批量更新批次状态 - */ - Boolean batchUpdateStatus(List batchIds, String status); - - /** - * 检查批次是否可以编辑 - */ - Boolean checkBatchEditable(Long batchId); - - /** - * 检查批次是否可以删除 - */ - Boolean checkBatchDeletable(Long batchId); - - /** - * 获取批次可用选项 - */ - List getAvailableBatches(); - - /** - * 导出批次数据 - */ - List exportBatchData(XgCollectionBatchBo bo); - - /** - * 批次数据导入 - */ - Boolean importBatchData(List batchList); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStatisticsService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStatisticsService.java deleted file mode 100644 index 44d68d78..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStatisticsService.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgCollectionBatchStatisticsBo; -import org.dromara.xg.domain.vo.XgCollectionBatchStatisticsVo; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 批次统计Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgCollectionBatchStatisticsService { - - /** - * 查询批次统计 - */ - XgCollectionBatchStatisticsVo queryById(Long statisticsId); - - /** - * 查询批次统计列表 - */ - TableDataInfo queryPageList(XgCollectionBatchStatisticsBo bo, PageQuery pageQuery); - - /** - * 查询批次统计列表 - */ - List queryList(XgCollectionBatchStatisticsBo bo); - - /** - * 新增批次统计 - */ - Boolean insertByBo(XgCollectionBatchStatisticsBo bo); - - /** - * 修改批次统计 - */ - Boolean updateByBo(XgCollectionBatchStatisticsBo bo); - - /** - * 校验并批量删除批次统计信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 刷新批次统计(按批次) - */ - Boolean refreshBatchStatistics(Long batchId); - - /** - * 刷新批次统计(按学院) - */ - Boolean refreshCollegeStatistics(Long batchId, String collegeCode); - - /** - * 刷新批次统计(按专业) - */ - Boolean refreshMajorStatistics(Long batchId, String majorCode); - - /** - * 刷新批次统计(按班级) - */ - Boolean refreshClassStatistics(Long batchId, String classCode); - - /** - * 刷新批次统计(按届别) - */ - Boolean refreshGradeStatistics(Long batchId, String grade); - - /** - * 获取完成率排名 - */ - List getCompletionRanking(Long batchId, String dimension, Integer limit); - - /** - * 获取低完成率统计 - */ - List getLowCompletionStatistics(Long batchId, String dimension, Double threshold); - - /** - * 批量刷新统计 - */ - Boolean batchRefreshStatistics(List batchIds); - - /** - * 导出统计数据 - */ - List exportStatisticsData(XgCollectionBatchStatisticsBo bo); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStudentService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStudentService.java deleted file mode 100644 index 054f5b35..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgCollectionBatchStudentService.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgCollectionBatchStudentBo; -import org.dromara.xg.domain.vo.XgCollectionBatchStudentVo; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 批次学生关联Service接口 - * - * @author hzdyjs - * @date 2025-01-17 - */ -public interface IXgCollectionBatchStudentService { - - /** - * 查询批次学生关联 - */ - XgCollectionBatchStudentVo queryById(Long id); - - /** - * 查询批次学生关联列表 - */ - TableDataInfo queryPageList(XgCollectionBatchStudentBo bo, PageQuery pageQuery); - - /** - * 查询批次学生关联列表 - */ - List queryList(XgCollectionBatchStudentBo bo); - - /** - * 新增批次学生关联 - */ - Boolean insertByBo(XgCollectionBatchStudentBo bo); - - /** - * 修改批次学生关联 - */ - Boolean updateByBo(XgCollectionBatchStudentBo bo); - - /** - * 校验并批量删除批次学生关联信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据批次ID查询学生列表 - */ - List queryStudentsByBatchId(Long batchId); - - /** - * 根据学生ID查询批次列表 - */ - List queryBatchesByStudentId(Long studentId); - - /** - * 查询批次已提交学生列表 - */ - List querySubmittedStudents(Long batchId); - - /** - * 查询批次未提交学生列表 - */ - List queryUnsubmittedStudents(Long batchId); - - /** - * 按学院查询批次学生 - */ - List queryStudentsByCollege(Long batchId, String collegeCode); - - /** - * 按专业查询批次学生 - */ - List queryStudentsByMajor(Long batchId, String majorCode); - - /** - * 按班级查询批次学生 - */ - List queryStudentsByClass(Long batchId, String classCode); - - /** - * 按届别查询批次学生 - */ - List queryStudentsByGrade(Long batchId, String grade); - - /** - * 批量添加学生到批次 - */ - Boolean batchAddStudents(Long batchId, List studentIds); - - /** - * 批量从批次移除学生 - */ - Boolean batchRemoveStudents(Long batchId, List studentIds); - - /** - * 批量更新提交状态 - */ - Boolean batchUpdateSubmitStatus(List ids, String submitStatus); - - /** - * 批量更新编辑权限 - */ - Boolean batchUpdateEditPermission(List ids, String editPermission); - - /** - * 学生提交信息 - */ - Boolean submitStudentInfo(Long batchId, Long studentId, String submitData); - - /** - * 学生撤销提交 - */ - Boolean revokeSubmit(Long batchId, Long studentId); - - /** - * 统计批次学生数量(按学院) - */ - List> countStudentsByCollege(Long batchId); - - /** - * 统计批次学生数量(按专业) - */ - List> countStudentsByMajor(Long batchId); - - /** - * 统计批次学生数量(按班级) - */ - List> countStudentsByClass(Long batchId); - - /** - * 统计批次学生数量(按届别) - */ - List> countStudentsByGrade(Long batchId); - - /** - * 导出批次学生数据 - */ - List exportStudentData(XgCollectionBatchStudentBo bo); - - /** - * 批次学生数据导入 - */ - Boolean importStudentData(List studentList); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsAnalysisService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsAnalysisService.java deleted file mode 100644 index 29028278..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsAnalysisService.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.bo.XgStatisticsQueryBo; -import org.dromara.xg.domain.vo.XgStatisticsResultVo; - -import java.util.List; -import java.util.Map; - -/** - * 统计分析Service接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface IXgStatisticsAnalysisService { - - /** - * 获取统计概览 - */ - Map getStatisticsOverview(); - - /** - * 获取统计维度选项 - */ - List> getStatisticsDimensionOptions(); - - /** - * 获取学院选项 - */ - List> getCollegeOptions(); - - /** - * 获取专业选项 - */ - List> getMajorOptions(String collegeCode); - - /** - * 获取班级选项 - */ - List> getClassOptions(String collegeCode, String majorCode); - - /** - * 获取图表类型选项 - */ - List> getChartTypeOptions(); - - /** - * 执行统计分析 - */ - XgStatisticsResultVo executeStatistics(XgStatisticsQueryBo queryBo); - - /** - * 按学院统计学生数量 - */ - XgStatisticsResultVo statisticsByCollege(XgStatisticsQueryBo queryBo); - - /** - * 按专业统计学生数量 - */ - XgStatisticsResultVo statisticsByMajor(XgStatisticsQueryBo queryBo); - - /** - * 按班级统计学生数量 - */ - XgStatisticsResultVo statisticsByClass(XgStatisticsQueryBo queryBo); - - /** - * 按年级统计学生数量 - */ - XgStatisticsResultVo statisticsByGrade(XgStatisticsQueryBo queryBo); - - /** - * 按性别统计学生数量 - */ - XgStatisticsResultVo statisticsByGender(XgStatisticsQueryBo queryBo); - - /** - * 按年龄段统计学生数量 - */ - XgStatisticsResultVo statisticsByAge(XgStatisticsQueryBo queryBo); - - /** - * 按政治面貌统计学生数量 - */ - XgStatisticsResultVo statisticsByPoliticalStatus(XgStatisticsQueryBo queryBo); - - /** - * 按民族统计学生数量 - */ - XgStatisticsResultVo statisticsByNationality(XgStatisticsQueryBo queryBo); - - /** - * 按生源地统计学生数量 - */ - XgStatisticsResultVo statisticsBySourceRegion(XgStatisticsQueryBo queryBo); - - /** - * 按血型统计学生数量 - */ - XgStatisticsResultVo statisticsByBloodType(XgStatisticsQueryBo queryBo); - - /** - * 按宗教信仰统计学生数量 - */ - XgStatisticsResultVo statisticsByReligion(XgStatisticsQueryBo queryBo); - - /** - * 按学籍状态统计学生数量 - */ - XgStatisticsResultVo statisticsByStudentStatus(XgStatisticsQueryBo queryBo); - - /** - * 按培养方式统计学生数量 - */ - XgStatisticsResultVo statisticsByTrainingType(XgStatisticsQueryBo queryBo); - - /** - * 按身高范围统计学生数量 - */ - XgStatisticsResultVo statisticsByHeight(XgStatisticsQueryBo queryBo); - - /** - * 按体重范围统计学生数量 - */ - XgStatisticsResultVo statisticsByWeight(XgStatisticsQueryBo queryBo); - - /** - * 多维度组合统计 - */ - XgStatisticsResultVo statisticsByMultiDimensions(XgStatisticsQueryBo queryBo); - - /** - * 按时间趋势统计学生数量 - */ - XgStatisticsResultVo statisticsByTimeTrend(XgStatisticsQueryBo queryBo); - - /** - * 获取学生信息汇总报表 - */ - XgStatisticsResultVo getStudentSummaryReport(XgStatisticsQueryBo queryBo); - - /** - * 获取班级统计报表 - */ - XgStatisticsResultVo getClassStatisticsReport(XgStatisticsQueryBo queryBo); - - /** - * 获取学院统计报表 - */ - XgStatisticsResultVo getCollegeStatisticsReport(XgStatisticsQueryBo queryBo); - - /** - * 获取困难学生统计报表 - */ - XgStatisticsResultVo getPoorStudentReport(XgStatisticsQueryBo queryBo); - - /** - * 获取特殊群体统计报表 - */ - XgStatisticsResultVo getSpecialGroupReport(XgStatisticsQueryBo queryBo); - - /** - * 获取统计摘要信息 - */ - Map getStatisticsSummary(XgStatisticsQueryBo queryBo); - - /** - * 根据配置执行统计 - */ - XgStatisticsResultVo executeStatisticsByConfig(String configCode, XgStatisticsQueryBo queryBo); - - /** - * 生成图表数据 - */ - XgStatisticsResultVo generateChartData(String chartType, XgStatisticsQueryBo queryBo); - - /** - * 导出统计结果 - */ - byte[] exportStatisticsResult(XgStatisticsResultVo resultVo, String exportFormat); - - /** - * 清除统计缓存 - */ - Boolean clearStatisticsCache(String cacheKey); - - /** - * 清除所有统计缓存 - */ - Boolean clearAllStatisticsCache(); - - /** - * 获取缓存统计信息 - */ - Map getCacheStatistics(); - - /** - * 预热统计缓存 - */ - Boolean warmUpStatisticsCache(); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsCacheService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsCacheService.java deleted file mode 100644 index b557358c..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsCacheService.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.vo.XgStatisticsResultVo; - -import java.util.Map; - -/** - * 统计缓存Service接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface IXgStatisticsCacheService { - - /** - * 获取缓存的统计结果 - * - * @param cacheKey 缓存键 - * @return 统计结果,如果不存在则返回null - */ - XgStatisticsResultVo getCachedResult(String cacheKey); - - /** - * 缓存统计结果 - * - * @param cacheKey 缓存键 - * @param result 统计结果 - * @param expireMinutes 过期时间(分钟) - */ - void cacheResult(String cacheKey, XgStatisticsResultVo result, Integer expireMinutes); - - /** - * 删除缓存 - * - * @param cacheKey 缓存键 - * @return 是否删除成功 - */ - Boolean deleteCache(String cacheKey); - - /** - * 清除所有统计缓存 - * - * @return 是否清除成功 - */ - Boolean clearAllCache(); - - /** - * 获取缓存统计信息 - * - * @return 缓存统计信息 - */ - Map getCacheStatistics(); - - /** - * 检查缓存是否存在 - * - * @param cacheKey 缓存键 - * @return 是否存在 - */ - Boolean existsCache(String cacheKey); - - /** - * 设置缓存过期时间 - * - * @param cacheKey 缓存键 - * @param expireMinutes 过期时间(分钟) - * @return 是否设置成功 - */ - Boolean expireCache(String cacheKey, Integer expireMinutes); - - /** - * 获取缓存剩余过期时间 - * - * @param cacheKey 缓存键 - * @return 剩余过期时间(秒),-1表示永不过期,-2表示不存在 - */ - Long getCacheExpire(String cacheKey); - - /** - * 批量删除缓存 - * - * @param pattern 缓存键模式(支持通配符) - * @return 删除的缓存数量 - */ - Long deleteCacheByPattern(String pattern); - - /** - * 预热缓存 - * - * @return 是否预热成功 - */ - Boolean warmUpCache(); - - /** - * 生成缓存键 - * - * @param statisticsType 统计类型 - * @param dimension 统计维度 - * @param conditionsHash 条件哈希值 - * @return 缓存键 - */ - String generateCacheKey(String statisticsType, String dimension, String conditionsHash); - - /** - * 更新缓存命中统计 - * - * @param cacheKey 缓存键 - */ - void updateCacheHitStats(String cacheKey); - - /** - * 获取缓存命中率 - * - * @return 缓存命中率(百分比) - */ - Double getCacheHitRate(); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsConfigService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsConfigService.java deleted file mode 100644 index 15baa17e..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsConfigService.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.xg.domain.bo.XgStatisticsConfigBo; -import org.dromara.xg.domain.vo.XgStatisticsConfigVo; - -import java.util.Collection; -import java.util.List; - -/** - * 统计分析配置Service接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface IXgStatisticsConfigService { - - /** - * 查询统计分析配置 - */ - XgStatisticsConfigVo queryById(Long configId); - - /** - * 查询统计分析配置列表 - */ - TableDataInfo queryPageList(XgStatisticsConfigBo bo, PageQuery pageQuery); - - /** - * 查询统计分析配置列表 - */ - List queryList(XgStatisticsConfigBo bo); - - /** - * 新增统计分析配置 - */ - Boolean insertByBo(XgStatisticsConfigBo bo); - - /** - * 修改统计分析配置 - */ - Boolean updateByBo(XgStatisticsConfigBo bo); - - /** - * 校验并批量删除统计分析配置信息 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据配置编码查询配置信息 - */ - XgStatisticsConfigVo queryByConfigCode(String configCode); - - /** - * 查询指定类型的配置列表 - */ - List queryByConfigType(String configType); - - /** - * 查询启用的配置列表 - */ - List queryEnabledConfigs(String configType); - - /** - * 查询系统配置列表 - */ - List querySystemConfigs(); - - /** - * 查询用户自定义配置列表 - */ - List queryUserConfigs(Long userId); - - /** - * 根据权限查询可访问的配置列表 - */ - List queryAccessibleConfigs(Long userId, List roles); - - /** - * 更新配置排序 - */ - Boolean updateSortOrder(Long configId, Integer sortOrder); - - /** - * 批量更新配置状态 - */ - Boolean batchUpdateStatus(List configIds, Integer isEnabled); - - /** - * 复制配置 - */ - Boolean copyConfig(Long configId, String newConfigName, String newConfigCode); - - /** - * 启用配置 - */ - Boolean enableConfig(Long configId); - - /** - * 禁用配置 - */ - Boolean disableConfig(Long configId); - - /** - * 检查配置编码是否存在 - */ - Boolean checkConfigCodeExists(String configCode, Long excludeId); - - /** - * 获取配置的JSON内容 - */ - String getConfigContent(Long configId); - - /** - * 更新配置的JSON内容 - */ - Boolean updateConfigContent(Long configId, String configContent); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsExportService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsExportService.java deleted file mode 100644 index df415bd6..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStatisticsExportService.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.vo.XgStatisticsResultVo; - -/** - * 统计导出Service接口 - * - * @author wuzhen - * @date 2025-01-17 - */ -public interface IXgStatisticsExportService { - - /** - * 导出统计结果到Excel - * - * @param resultVo 统计结果 - * @return Excel文件字节数组 - */ - byte[] exportToExcel(XgStatisticsResultVo resultVo); - - /** - * 导出统计结果到PDF - * - * @param resultVo 统计结果 - * @return PDF文件字节数组 - */ - byte[] exportToPdf(XgStatisticsResultVo resultVo); - - /** - * 导出统计结果到CSV - * - * @param resultVo 统计结果 - * @return CSV文件字节数组 - */ - byte[] exportToCsv(XgStatisticsResultVo resultVo); - - /** - * 导出统计结果到Word - * - * @param resultVo 统计结果 - * @return Word文件字节数组 - */ - byte[] exportToWord(XgStatisticsResultVo resultVo); - - /** - * 导出统计结果到指定格式 - * - * @param resultVo 统计结果 - * @param format 导出格式(excel、pdf、csv、word) - * @return 文件字节数组 - */ - byte[] exportToFormat(XgStatisticsResultVo resultVo, String format); - - /** - * 获取导出文件的Content-Type - * - * @param format 导出格式 - * @return Content-Type - */ - String getContentType(String format); - - /** - * 获取导出文件的文件名 - * - * @param resultVo 统计结果 - * @param format 导出格式 - * @return 文件名 - */ - String getFileName(XgStatisticsResultVo resultVo, String format); - - /** - * 检查导出格式是否支持 - * - * @param format 导出格式 - * @return 是否支持 - */ - Boolean isSupportedFormat(String format); -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStudentInfoService.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStudentInfoService.java deleted file mode 100644 index 4bf696d6..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/IXgStudentInfoService.java +++ /dev/null @@ -1,328 +0,0 @@ -package org.dromara.xg.service; - -import org.dromara.xg.domain.vo.XgStudentInfoVo; -import org.dromara.xg.domain.bo.XgStudentInfoBo; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 学生信息Service接口 - * - * @author Cursor AI - * @date 2025-01-14 - */ -public interface IXgStudentInfoService { - - /** - * 查询学生信息 - * - * @param id 主键 - * @return 学生信息 - */ - XgStudentInfoVo queryById(Long id); - - /** - * 分页查询学生信息列表 - * - * @param bo 查询条件 - * @param pageQuery 分页参数 - * @return 学生信息分页列表 - */ - TableDataInfo queryPageList(XgStudentInfoBo bo, PageQuery pageQuery); - - /** - * 查询符合条件的学生信息列表 - * - * @param bo 查询条件 - * @return 学生信息列表 - */ - List queryList(XgStudentInfoBo bo); - - /** - * 新增学生信息 - * - * @param bo 学生信息 - * @return 是否新增成功 - */ - Boolean insertByBo(XgStudentInfoBo bo); - - /** - * 修改学生信息 - * - * @param bo 学生信息 - * @return 是否修改成功 - */ - Boolean updateByBo(XgStudentInfoBo bo); - - /** - * 校验并批量删除学生信息 - * - * @param ids 待删除的主键集合 - * @param isValid 是否进行有效性校验 - * @return 是否删除成功 - */ - Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - - /** - * 根据学号查询学生信息 - * - * @param studentNo 学号 - * @return 学生信息 - */ - XgStudentInfoVo queryByStudentNo(String studentNo); - - /** - * 根据身份证号查询学生信息 - * - * @param idCard 身份证号 - * @return 学生信息 - */ - XgStudentInfoVo queryByIdCard(String idCard); - - /** - * 查询指定班级的学生列表 - * - * @param classCode 班级代码 - * @return 学生列表 - */ - List queryByClassCode(String classCode); - - /** - * 查询指定学院的学生列表 - * - * @param collegeCode 学院代码 - * @return 学生列表 - */ - List queryByCollegeCode(String collegeCode); - - /** - * 查询指定辅导员的学生列表 - * - * @param counselorId 辅导员ID - * @return 学生列表 - */ - List queryByCounselorId(Long counselorId); - - /** - * 查询指定班主任的学生列表 - * - * @param classTeacherId 班主任ID - * @return 学生列表 - */ - List queryByClassTeacherId(Long classTeacherId); - - /** - * 统计各学院学生数量 - * - * @return 学院学生数量统计 - */ - List> countByCollege(); - - /** - * 统计各年级学生数量 - * - * @return 年级学生数量统计 - */ - List> countByGrade(); - - /** - * 统计各专业学生数量 - * - * @return 专业学生数量统计 - */ - List> countByMajor(); - - /** - * 统计学籍状态分布 - * - * @return 学籍状态统计 - */ - List> countByStudentStatus(); - - /** - * 统计信息完整度分布 - * - * @return 信息完整度统计 - */ - List> countByCompletionRate(); - - /** - * 查询信息不完整的学生列表 - * - * @return 信息不完整的学生列表 - */ - List queryIncompleteStudents(); - - /** - * 查询待审核的学生信息列表 - * - * @return 待审核的学生信息列表 - */ - List queryPendingAuditStudents(); - - // ================================ - // 选项数据接口 - // ================================ - - /** - * 获取学院选项 - * - * @return 学院选项列表 - */ - List> getCollegeOptions(); - - /** - * 获取专业选项 - * - * @param collegeCode 学院代码(可选) - * @return 专业选项列表 - */ - List> getMajorOptions(String collegeCode); - - /** - * 获取班级选项 - * - * @param majorCode 专业代码(可选) - * @return 班级选项列表 - */ - List> getClassOptions(String majorCode); - - /** - * 获取辅导员选项 - * - * @return 辅导员选项列表 - */ - List> getCounselorOptions(); - - /** - * 获取班主任选项 - * - * @return 班主任选项列表 - */ - List> getClassTeacherOptions(); - - /** - * 检查学号是否存在 - * - * @param studentNo 学号 - * @param studentId 学生ID(编辑时排除自己) - * @return 是否存在 - */ - Boolean checkStudentNo(String studentNo, Long studentId); - - /** - * 检查身份证号是否存在 - * - * @param idCard 身份证号 - * @param studentId 学生ID(编辑时排除自己) - * @return 是否存在 - */ - Boolean checkIdCard(String idCard, Long studentId); - - /** - * 批量更新学生信息状态 - * - * @param studentIds 学生ID列表 - * @param infoStatus 信息状态 - * @return 是否成功 - */ - Boolean batchUpdateInfoStatus(List studentIds, String infoStatus); - - /** - * 批量更新学生学籍状态 - * - * @param studentIds 学生ID列表 - * @param studentStatus 学籍状态 - * @return 是否成功 - */ - Boolean batchUpdateStudentStatus(List studentIds, String studentStatus); - - /** - * 查询重复学号的学生列表 - * - * @return 重复学号的学生列表 - */ - List> queryDuplicateStudentNo(); - - /** - * 查询重复身份证号的学生列表 - * - * @return 重复身份证号的学生列表 - */ - List> queryDuplicateIdCard(); - - /** - * 计算学生信息完整度 - * - * @param studentInfo 学生信息 - * @return 完整度百分比 - */ - Double calculateCompletionRate(XgStudentInfoVo studentInfo); - - /** - * 更新学生信息完整度 - * - * @param studentId 学生ID - * @return 是否成功 - */ - Boolean updateCompletionRate(Long studentId); - - /** - * 批量导入学生信息 - * - * @param studentInfoList 学生信息列表 - * @param isUpdateSupport 是否支持更新 - * @param operName 操作人员名称 - * @return 导入结果 - */ - String importStudentInfo(List studentInfoList, Boolean isUpdateSupport, String operName); - - /** - * 导出学生信息 - * - * @param bo 查询条件 - * @return 学生信息列表 - */ - List exportStudentInfo(XgStudentInfoBo bo); - - /** - * 审核学生信息 - * - * @param studentId 学生ID - * @param auditStatus 审核状态 - * @param auditRemark 审核备注 - * @return 是否成功 - */ - Boolean auditStudentInfo(Long studentId, String auditStatus, String auditRemark); - - /** - * 批量审核学生信息 - * - * @param studentIds 学生ID列表 - * @param auditStatus 审核状态 - * @param auditRemark 审核备注 - * @return 是否成功 - */ - Boolean batchAuditStudentInfo(List studentIds, String auditStatus, String auditRemark); - - /** - * 获取学生信息统计概览 - * - * @return 统计概览数据 - */ - Map getStatisticsOverview(); - - /** - * 生成学生信息报表 - * - * @param reportType 报表类型 - * @param params 报表参数 - * @return 报表数据 - */ - Map generateReport(String reportType, Map params); - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassInfoServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassInfoServiceImpl.java deleted file mode 100644 index 17a56324..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassInfoServiceImpl.java +++ /dev/null @@ -1,606 +0,0 @@ -package org.dromara.xg.service.impl; - -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.RequiredArgsConstructor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.dromara.xg.domain.bo.XgClassInfoBo; -import org.dromara.xg.domain.vo.XgClassInfoVo; -import org.dromara.xg.domain.XgClassInfo; -import org.dromara.xg.mapper.XgClassInfoMapper; -import org.dromara.xg.mapper.XgSysUserMapper; -import org.dromara.xg.service.IXgClassInfoService; -import org.dromara.xg.service.IXgClassTeacherRelationService; -import org.dromara.system.domain.vo.SysUserVo; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.time.LocalDateTime; - -/** - * 班级信息Service业务层处理 - * - * @author Cursor AI - * @date 2025-01-21 - */ -@RequiredArgsConstructor -@Service -public class XgClassInfoServiceImpl implements IXgClassInfoService { - - private static final Logger log = LoggerFactory.getLogger(XgClassInfoServiceImpl.class); - - private final XgClassInfoMapper baseMapper; - private final XgSysUserMapper sysUserMapper; - private final IXgClassTeacherRelationService classTeacherRelationService; - - /** - * 查询班级信息 - */ - @Override - public XgClassInfoVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 查询班级信息列表 - */ - @Override - public TableDataInfo queryPageList(XgClassInfoBo bo, PageQuery pageQuery) { - log.info("=== 班级信息分页查询开始 ==="); - log.info("查询条件: {}", bo); - log.info("分页参数: {}", pageQuery); - - // 构建查询条件 - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - log.info("Service构建的Lambda查询条件: {}", lqw.getTargetSql()); - - // 执行分页查询 - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - log.info("Mapper查询结果 - 总数: {}, 当前页记录数: {}", result.getTotal(), result.getRecords().size()); - - if (!result.getRecords().isEmpty()) { - log.info("第一条记录详情: {}", result.getRecords().get(0)); - } else { - log.warn("Mapper查询结果为空!"); - } - - TableDataInfo tableDataInfo = TableDataInfo.build(result); - log.info("最终返回结果 - 总数: {}, 行数: {}", tableDataInfo.getTotal(), tableDataInfo.getRows().size()); - log.info("=== 班级信息分页查询结束 ==="); - - return tableDataInfo; - } - - /** - * 查询班级信息列表 - */ - @Override - public List queryList(XgClassInfoBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper buildQueryWrapper(XgClassInfoBo bo) { - Map params = bo.getParams(); - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(StringUtils.isNotBlank(bo.getClassCode()), XgClassInfo::getClassCode, bo.getClassCode()); - lqw.like(StringUtils.isNotBlank(bo.getClassName()), XgClassInfo::getClassName, bo.getClassName()); - lqw.eq(StringUtils.isNotBlank(bo.getClassType()), XgClassInfo::getClassType, bo.getClassType()); - lqw.eq(StringUtils.isNotBlank(bo.getGrade()), XgClassInfo::getGrade, bo.getGrade()); - lqw.eq(bo.getEnrollmentYear() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYear()); - lqw.ge(bo.getEnrollmentYearStart() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYearStart()); - lqw.le(bo.getEnrollmentYearEnd() != null, XgClassInfo::getEnrollmentYear, bo.getEnrollmentYearEnd()); - lqw.eq(bo.getGraduationYear() != null, XgClassInfo::getGraduationYear, bo.getGraduationYear()); - lqw.eq(StringUtils.isNotBlank(bo.getMajorCode()), XgClassInfo::getMajorCode, bo.getMajorCode()); - lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XgClassInfo::getMajorName, bo.getMajorName()); - lqw.eq(StringUtils.isNotBlank(bo.getCollegeCode()), XgClassInfo::getCollegeCode, bo.getCollegeCode()); - lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XgClassInfo::getCollegeName, bo.getCollegeName()); - lqw.eq(bo.getCounselorId() != null, XgClassInfo::getCounselorId, bo.getCounselorId()); - lqw.eq(bo.getClassTeacherId() != null, XgClassInfo::getClassTeacherId, bo.getClassTeacherId()); - lqw.eq(StringUtils.isNotBlank(bo.getClassStatus()), XgClassInfo::getClassStatus, bo.getClassStatus()); - lqw.eq(bo.getIsGraduation() != null, XgClassInfo::getIsGraduation, bo.getIsGraduation()); - - if (bo.getClassCodeList() != null && !bo.getClassCodeList().isEmpty()) { - lqw.in(XgClassInfo::getClassCode, bo.getClassCodeList()); - } - if (bo.getClassStatusList() != null && !bo.getClassStatusList().isEmpty()) { - lqw.in(XgClassInfo::getClassStatus, bo.getClassStatusList()); - } - if (bo.getCollegeCodeList() != null && !bo.getCollegeCodeList().isEmpty()) { - lqw.in(XgClassInfo::getCollegeCode, bo.getCollegeCodeList()); - } - if (bo.getMajorCodeList() != null && !bo.getMajorCodeList().isEmpty()) { - lqw.in(XgClassInfo::getMajorCode, bo.getMajorCodeList()); - } - if (bo.getGradeList() != null && !bo.getGradeList().isEmpty()) { - lqw.in(XgClassInfo::getGrade, bo.getGradeList()); - } - if (bo.getCounselorIdList() != null && !bo.getCounselorIdList().isEmpty()) { - lqw.in(XgClassInfo::getCounselorId, bo.getCounselorIdList()); - } - if (bo.getClassTeacherIdList() != null && !bo.getClassTeacherIdList().isEmpty()) { - lqw.in(XgClassInfo::getClassTeacherId, bo.getClassTeacherIdList()); - } - return lqw; - } - - /** - * 新增班级信息 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean insertByBo(XgClassInfoBo bo) { - XgClassInfo add = MapstructUtils.convert(bo, XgClassInfo.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - - // 如果指定了班主任,创建班级班主任关系 - if (add.getClassTeacherId() != null) { - classTeacherRelationService.createClassTeacherRelation(add.getId(), add.getClassTeacherId()); - } - } - return flag; - } - - /** - * 修改班级信息 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean updateByBo(XgClassInfoBo bo) { - // 获取原班级信息 - XgClassInfo oldClass = baseMapper.selectById(bo.getId()); - - // 转换更新数据 - XgClassInfo update = MapstructUtils.convert(bo, XgClassInfo.class); - validEntityBeforeSave(update); - boolean flag = baseMapper.updateById(update) > 0; - - // 处理班主任关系变更 - if (flag && update.getClassTeacherId() != null) { - // 如果班主任发生变化,更新班级班主任关系 - if (oldClass == null || !update.getClassTeacherId().equals(oldClass.getClassTeacherId())) { - classTeacherRelationService.updateClassTeacherRelation(update.getId(), update.getClassTeacherId()); - } - } - - return flag; - } - - /** - * 保存前的数据校验 - */ - private void validEntityBeforeSave(XgClassInfo entity) { - // 校验班级代码唯一性 - if (StringUtils.isNotBlank(entity.getClassCode())) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getClassCode, entity.getClassCode()); - lqw.ne(entity.getId() != null, XgClassInfo::getId, entity.getId()); - XgClassInfo existEntity = baseMapper.selectOne(lqw); - if (existEntity != null) { - throw new RuntimeException("班级代码已存在,请重新输入"); - } - } - - // 设置默认值 - if (entity.getClassType() == null) { - entity.setClassType("regular"); - } - if (entity.getClassStatus() == null) { - entity.setClassStatus("1"); - } - if (entity.getIsGraduation() == null) { - entity.setIsGraduation(0); - } - if (entity.getPlannedCapacity() == null) { - entity.setPlannedCapacity(50); - } - if (entity.getMaxStudentCount() == null) { - entity.setMaxStudentCount(entity.getPlannedCapacity()); - } - if (entity.getCurrentStudentCount() == null) { - entity.setCurrentStudentCount(0); - } - if (entity.getMaleCount() == null) { - entity.setMaleCount(0); - } - if (entity.getFemaleCount() == null) { - entity.setFemaleCount(0); - } - if (entity.getActiveCount() == null) { - entity.setActiveCount(0); - } - if (entity.getTransferInCount() == null) { - entity.setTransferInCount(0); - } - if (entity.getTransferOutCount() == null) { - entity.setTransferOutCount(0); - } - if (entity.getDropoutCount() == null) { - entity.setDropoutCount(0); - } - if (entity.getGraduateCount() == null) { - entity.setGraduateCount(0); - } - } - - /** - * 批量删除班级信息 - */ - @Override - public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if (isValid) { - // 校验是否存在学生关联 - // TODO: 添加学生关联校验逻辑 - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 根据班级代码查询班级信息 - */ - @Override - public XgClassInfoVo queryByClassCode(String classCode) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getClassCode, classCode); - return baseMapper.selectVoOne(lqw); - } - - /** - * 根据年级查询班级信息列表 - */ - @Override - public List queryByGrade(String grade) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getGrade, grade); - return baseMapper.selectVoList(lqw); - } - - /** - * 根据学院代码查询班级信息列表 - */ - @Override - public List queryByCollegeCode(String collegeCode) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getCollegeCode, collegeCode); - return baseMapper.selectVoList(lqw); - } - - /** - * 根据专业代码查询班级信息列表 - */ - @Override - public List queryByMajorCode(String majorCode) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getMajorCode, majorCode); - return baseMapper.selectVoList(lqw); - } - - /** - * 根据辅导员ID查询班级信息列表 - */ - @Override - public List queryByCounselorId(Long counselorId) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getCounselorId, counselorId); - return baseMapper.selectVoList(lqw); - } - - /** - * 根据班主任ID查询班级信息列表 - */ - @Override - public List queryByClassTeacherId(Long classTeacherId) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgClassInfo::getClassTeacherId, classTeacherId); - return baseMapper.selectVoList(lqw); - } - - /** - * 获取班级可用选项列表(用于下拉框) - */ - @Override - public List getClassOptions() { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.select(XgClassInfo::getId, XgClassInfo::getClassCode, XgClassInfo::getClassName); - lqw.eq(XgClassInfo::getClassStatus, "1"); - lqw.orderByAsc(XgClassInfo::getGrade); - return baseMapper.selectVoList(lqw); - } - - /** - * 获取班主任用户列表 - */ - @Override - public List getClassTeacherOptions() { - log.info("开始查询班主任角色用户列表,roleKey=head_teacher"); - try { - // 查询班主任角色的用户列表 - List userList = sysUserMapper.selectUsersByRoleKey("head_teacher"); // head_teacher是班主任角色的role_key - - // 打印详细的结果信息 - if (userList != null && !userList.isEmpty()) { - log.info("查询班主任角色用户成功,找到 {} 个班主任用户", userList.size()); - for (int i = 0; i < userList.size(); i++) { - SysUserVo user = userList.get(i); - log.info("班主任用户[{}]: userId={}, userName={}, nickName={}", - i+1, user.getUserId(), user.getUserName(), user.getNickName()); - - // 确保userId和nickName字段不为空,这些字段将用作前端的value和label - if (user.getUserId() == null) { - log.warn("班主任用户[{}]的userId为空", i+1); - } - if (user.getNickName() == null || user.getNickName().isEmpty()) { - log.warn("班主任用户[{}]的nickName为空", i+1); - // 如果昵称为空,使用用户名代替 - if (user.getUserName() != null && !user.getUserName().isEmpty()) { - user.setNickName(user.getUserName()); - log.info("班主任用户[{}]的nickName为空,使用userName代替: {}", i+1, user.getUserName()); - } - } - } - } else { - log.warn("没有找到班主任角色(head_teacher)的用户,请检查角色配置和用户分配"); - } - return userList; - } catch (Exception e) { - log.error("查询班主任角色用户异常", e); - return new ArrayList<>(); - } - } - - /** - * 更新班级学生统计数据 - */ - @Override - public Boolean updateStudentCount(Long classId) { - // TODO: 实现班级学生统计数据更新逻辑 - return true; - } - - /** - * 批量更新班级学生统计数据 - */ - @Override - public Boolean batchUpdateStudentCount(Collection classIds) { - if (classIds == null || classIds.isEmpty()) { - return false; - } - for (Long classId : classIds) { - updateStudentCount(classId); - } - return true; - } - - /** - * 启用班级 - */ - @Override - public Boolean enableClass(Long id) { - XgClassInfo update = new XgClassInfo(); - update.setId(id); - update.setClassStatus("1"); - return baseMapper.updateById(update) > 0; - } - - /** - * 禁用班级 - */ - @Override - public Boolean disableClass(Long id) { - XgClassInfo update = new XgClassInfo(); - update.setId(id); - update.setClassStatus("2"); - return baseMapper.updateById(update) > 0; - } - - /** - * 获取班级信息统计概览 - */ - @Override - public Map getStatistics() { - Map result = new HashMap<>(); - - // 班级总数 - LambdaQueryWrapper totalLqw = Wrappers.lambdaQuery(); - long totalCount = baseMapper.selectCount(totalLqw); - result.put("totalCount", totalCount); - - // 正常班级数量 - LambdaQueryWrapper normalLqw = Wrappers.lambdaQuery(); - normalLqw.eq(XgClassInfo::getClassStatus, "1"); - long normalCount = baseMapper.selectCount(normalLqw); - result.put("normalCount", normalCount); - - // 暂停班级数量 - LambdaQueryWrapper pausedLqw = Wrappers.lambdaQuery(); - pausedLqw.eq(XgClassInfo::getClassStatus, "2"); - long pausedCount = baseMapper.selectCount(pausedLqw); - result.put("pausedCount", pausedCount); - - // 毕业班级数量 - LambdaQueryWrapper graduatedLqw = Wrappers.lambdaQuery(); - graduatedLqw.eq(XgClassInfo::getClassStatus, "3"); - long graduatedCount = baseMapper.selectCount(graduatedLqw); - result.put("graduatedCount", graduatedCount); - - // 解散班级数量 - LambdaQueryWrapper disbandedLqw = Wrappers.lambdaQuery(); - disbandedLqw.eq(XgClassInfo::getClassStatus, "4"); - long disbandedCount = baseMapper.selectCount(disbandedLqw); - result.put("disbandedCount", disbandedCount); - - // 学生总数 - LambdaQueryWrapper studentLqw = Wrappers.lambdaQuery(); - List classList = baseMapper.selectList(studentLqw); - int totalStudents = classList.stream().mapToInt(XgClassInfo::getCurrentStudentCount).sum(); - result.put("totalStudents", totalStudents); - - // 男生总数 - int totalMale = classList.stream().mapToInt(XgClassInfo::getMaleCount).sum(); - result.put("totalMale", totalMale); - - // 女生总数 - int totalFemale = classList.stream().mapToInt(XgClassInfo::getFemaleCount).sum(); - result.put("totalFemale", totalFemale); - - return result; - } - - /** - * 统计各学院班级数量 - */ - @Override - public List> countByCollege() { - List> result = new ArrayList<>(); - - // 查询所有学院 - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.select(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName); - lqw.groupBy(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName); - List collegeList = baseMapper.selectList(lqw); - - // 统计各学院班级数量 - for (XgClassInfo college : collegeList) { - if (StringUtils.isBlank(college.getCollegeCode())) { - continue; - } - - LambdaQueryWrapper countLqw = Wrappers.lambdaQuery(); - countLqw.eq(XgClassInfo::getCollegeCode, college.getCollegeCode()); - long count = baseMapper.selectCount(countLqw); - - Map item = new HashMap<>(); - item.put("collegeCode", college.getCollegeCode()); - item.put("collegeName", college.getCollegeName()); - item.put("count", count); - result.add(item); - } - - return result; - } - - /** - * 统计各年级班级数量 - */ - @Override - public List> countByGrade() { - List> result = new ArrayList<>(); - - // 查询所有年级 - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.select(XgClassInfo::getGrade); - lqw.groupBy(XgClassInfo::getGrade); - List gradeList = baseMapper.selectList(lqw); - - // 统计各年级班级数量 - for (XgClassInfo grade : gradeList) { - if (StringUtils.isBlank(grade.getGrade())) { - continue; - } - - LambdaQueryWrapper countLqw = Wrappers.lambdaQuery(); - countLqw.eq(XgClassInfo::getGrade, grade.getGrade()); - long count = baseMapper.selectCount(countLqw); - - Map item = new HashMap<>(); - item.put("grade", grade.getGrade()); - item.put("count", count); - result.add(item); - } - - return result; - } - - /** - * 统计各专业班级数量 - */ - @Override - public List> countByMajor() { - List> result = new ArrayList<>(); - - // 查询所有专业 - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.select(XgClassInfo::getMajorCode, XgClassInfo::getMajorName); - lqw.groupBy(XgClassInfo::getMajorCode, XgClassInfo::getMajorName); - List majorList = baseMapper.selectList(lqw); - - // 统计各专业班级数量 - for (XgClassInfo major : majorList) { - if (StringUtils.isBlank(major.getMajorCode())) { - continue; - } - - LambdaQueryWrapper countLqw = Wrappers.lambdaQuery(); - countLqw.eq(XgClassInfo::getMajorCode, major.getMajorCode()); - long count = baseMapper.selectCount(countLqw); - - Map item = new HashMap<>(); - item.put("majorCode", major.getMajorCode()); - item.put("majorName", major.getMajorName()); - item.put("count", count); - result.add(item); - } - - return result; - } - - /** - * 统计班级状态分布 - */ - @Override - public List> countByStatus() { - List> result = new ArrayList<>(); - - // 正常班级数量 - Map normal = new HashMap<>(); - normal.put("status", "1"); - normal.put("name", "正常"); - LambdaQueryWrapper normalLqw = Wrappers.lambdaQuery(); - normalLqw.eq(XgClassInfo::getClassStatus, "1"); - normal.put("value", baseMapper.selectCount(normalLqw)); - result.add(normal); - - // 暂停班级数量 - Map paused = new HashMap<>(); - paused.put("status", "2"); - paused.put("name", "暂停"); - LambdaQueryWrapper pausedLqw = Wrappers.lambdaQuery(); - pausedLqw.eq(XgClassInfo::getClassStatus, "2"); - paused.put("value", baseMapper.selectCount(pausedLqw)); - result.add(paused); - - // 毕业班级数量 - Map graduated = new HashMap<>(); - graduated.put("status", "3"); - graduated.put("name", "毕业"); - LambdaQueryWrapper graduatedLqw = Wrappers.lambdaQuery(); - graduatedLqw.eq(XgClassInfo::getClassStatus, "3"); - graduated.put("value", baseMapper.selectCount(graduatedLqw)); - result.add(graduated); - - // 解散班级数量 - Map disbanded = new HashMap<>(); - disbanded.put("status", "4"); - disbanded.put("name", "解散"); - LambdaQueryWrapper disbandedLqw = Wrappers.lambdaQuery(); - disbandedLqw.eq(XgClassInfo::getClassStatus, "4"); - disbanded.put("value", baseMapper.selectCount(disbandedLqw)); - result.add(disbanded); - - return result; - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassTeacherRelationServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassTeacherRelationServiceImpl.java deleted file mode 100644 index bf23b776..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgClassTeacherRelationServiceImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -package org.dromara.xg.service.impl; - -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.dromara.xg.domain.XgClassTeacherRelation; -import org.dromara.xg.domain.bo.XgClassTeacherRelationBo; -import org.dromara.xg.domain.vo.XgClassTeacherRelationVo; -import org.dromara.xg.mapper.XgClassTeacherRelationMapper; -import org.dromara.xg.service.IXgClassTeacherRelationService; -import org.dromara.common.satoken.utils.LoginHelper; - -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; -import java.util.Collection; - -/** - * 班级班主任关系Service业务层处理 - * - * @author Cursor AI - * @date 2025-07-22 - */ -@RequiredArgsConstructor -@Service -public class XgClassTeacherRelationServiceImpl implements IXgClassTeacherRelationService { - - private final XgClassTeacherRelationMapper baseMapper; - - /** - * 查询班级班主任关系 - * - * @param id 班级班主任关系主键 - * @return 班级班主任关系 - */ - @Override - public XgClassTeacherRelationVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 查询班级班主任关系列表 - * - * @param bo 班级班主任关系 - * @return 班级班主任关系 - */ - @Override - public TableDataInfo queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 查询班级班主任关系列表 - * - * @param bo 班级班主任关系 - * @return 班级班主任关系 - */ - @Override - public List queryList(XgClassTeacherRelationBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper buildQueryWrapper(XgClassTeacherRelationBo bo) { - Map params = bo.getParams(); - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(bo.getClassId() != null, XgClassTeacherRelation::getClassId, bo.getClassId()); - lqw.eq(bo.getTeacherId() != null, XgClassTeacherRelation::getTeacherId, bo.getTeacherId()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XgClassTeacherRelation::getStatus, bo.getStatus()); - lqw.eq(bo.getStartDate() != null, XgClassTeacherRelation::getStartDate, bo.getStartDate()); - lqw.eq(bo.getEndDate() != null, XgClassTeacherRelation::getEndDate, bo.getEndDate()); - return lqw; - } - - /** - * 新增班级班主任关系 - * - * @param bo 班级班主任关系 - * @return 结果 - */ - @Override - public Boolean insertByBo(XgClassTeacherRelationBo bo) { - XgClassTeacherRelation add = MapstructUtils.convert(bo, XgClassTeacherRelation.class); - // 设置默认值 - if (StringUtils.isBlank(add.getStatus())) { - add.setStatus("0"); // 默认状态为正常 - } - if (add.getStartDate() == null) { - add.setStartDate(LocalDateTime.now()); // 默认开始时间为当前时间 - } - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 修改班级班主任关系 - * - * @param bo 班级班主任关系 - * @return 结果 - */ - @Override - public Boolean updateByBo(XgClassTeacherRelationBo bo) { - XgClassTeacherRelation update = MapstructUtils.convert(bo, XgClassTeacherRelation.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 保存前的数据校验 - * - * @param entity 实体类数据 - */ - private void validEntityBeforeSave(XgClassTeacherRelation entity) { - // 校验逻辑 - } - - /** - * 批量删除班级班主任关系 - * - * @param ids 需要删除的班级班主任关系主键 - * @return 结果 - */ - @Override - public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if (isValid) { - // 校验是否允许删除 - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 创建班级班主任关系 - * - * @param classId 班级ID - * @param teacherId 班主任ID - * @return 结果 - */ - @Override - public boolean createClassTeacherRelation(Long classId, Long teacherId) { - XgClassTeacherRelationBo bo = new XgClassTeacherRelationBo(); - bo.setClassId(classId); - bo.setTeacherId(teacherId); - bo.setStatus("0"); // 正常状态 - bo.setStartDate(LocalDateTime.now()); - return insertByBo(bo); - } - - /** - * 更新班级班主任关系 - * - * @param classId 班级ID - * @param teacherId 班主任ID - * @return 结果 - */ - @Override - public boolean updateClassTeacherRelation(Long classId, Long teacherId) { - // 将当前班级的所有班主任关系设置为失效 - baseMapper.invalidateRelationsByClassId(classId, LoginHelper.getUserId()); - - // 创建新的班主任关系 - return createClassTeacherRelation(classId, teacherId); - } - - /** - * 获取班级当前班主任 - * - * @param classId 班级ID - * @return 班级班主任关系 - */ - @Override - public XgClassTeacherRelation getActiveTeacherByClassId(Long classId) { - return baseMapper.selectActiveRelationByClassId(classId); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgCollectionBatchServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgCollectionBatchServiceImpl.java deleted file mode 100644 index c349d195..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgCollectionBatchServiceImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -package org.dromara.xg.service.impl; - -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.dromara.xg.domain.bo.XgCollectionBatchBo; -import org.dromara.xg.domain.vo.XgCollectionBatchVo; -import org.dromara.xg.domain.XgCollectionBatch; -import org.dromara.xg.mapper.XgCollectionBatchMapper; -import org.dromara.xg.service.IXgCollectionBatchService; - -import java.util.List; -import java.util.Collection; -import java.util.Map; - -/** - * 信息采集批次Service业务层处理 - * - * @author Lion Li - * @date 2025-01-17 - */ -@RequiredArgsConstructor -@Service -public class XgCollectionBatchServiceImpl implements IXgCollectionBatchService { - - private final XgCollectionBatchMapper baseMapper; - - /** - * 查询信息采集批次 - */ - @Override - public XgCollectionBatchVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 查询信息采集批次列表 - */ - @Override - public TableDataInfo queryPageList(XgCollectionBatchBo bo, PageQuery pageQuery) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 查询信息采集批次列表 - */ - @Override - public List queryList(XgCollectionBatchBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - /** - * 新增信息采集批次 - */ - @Override - public Boolean insertByBo(XgCollectionBatchBo bo) { - XgCollectionBatch add = MapstructUtils.convert(bo, XgCollectionBatch.class); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 修改信息采集批次 - */ - @Override - public Boolean updateByBo(XgCollectionBatchBo bo) { - XgCollectionBatch update = MapstructUtils.convert(bo, XgCollectionBatch.class); - return baseMapper.updateById(update) > 0; - } - - /** - * 删除信息采集批次 - */ - @Override - public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if (isValid) { - // TODO: 添加删除验证逻辑 - } - return baseMapper.deleteByIds(ids) > 0; - } - - /** - * 构建查询条件 - */ - private LambdaQueryWrapper buildQueryWrapper(XgCollectionBatchBo bo) { - Map params = bo.getParams(); - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.like(bo.getBatchCode() != null, XgCollectionBatch::getBatchCode, bo.getBatchCode()); - lqw.like(bo.getBatchName() != null, XgCollectionBatch::getBatchName, bo.getBatchName()); - lqw.eq(bo.getBatchType() != null, XgCollectionBatch::getBatchType, bo.getBatchType()); - lqw.eq(bo.getAcademicYear() != null, XgCollectionBatch::getAcademicYear, bo.getAcademicYear()); - lqw.eq(bo.getSemester() != null, XgCollectionBatch::getSemester, bo.getSemester()); - lqw.eq(bo.getBatchStatus() != null, XgCollectionBatch::getBatchStatus, bo.getBatchStatus()); - return lqw; - } - - // 以下是暂时返回空结果的方法,避免编译错误 - @Override - public List exportBatchData(XgCollectionBatchBo bo) { - return queryList(bo); - } - - @Override - public XgCollectionBatchVo queryByCode(String batchCode) { - // TODO: 实现按编码查询 - return null; - } - - @Override - public List queryUserPermissionBatches(Long userId) { - // TODO: 实现用户权限批次查询 - return List.of(); - } - - @Override - public List queryActiveBatches() { - // TODO: 实现活跃批次查询 - return List.of(); - } - - @Override - public List queryUpcomingBatches() { - // TODO: 实现即将开始批次查询 - return List.of(); - } - - @Override - public List queryEndingSoonBatches() { - // TODO: 实现即将结束批次查询 - return List.of(); - } - - @Override - public List queryBatchesNeedReminder() { - // TODO: 实现需要提醒的批次查询 - return List.of(); - } - - @Override - public List queryBatchesNeedAutoClose() { - // TODO: 实现需要自动关闭的批次查询 - return List.of(); - } - - @Override - public Boolean startBatch(Long batchId) { - // TODO: 实现启动批次 - return true; - } - - @Override - public Boolean pauseBatch(Long batchId) { - // TODO: 实现暂停批次 - return true; - } - - @Override - public Boolean resumeBatch(Long batchId) { - // TODO: 实现恢复批次 - return true; - } - - @Override - public Boolean endBatch(Long batchId) { - // TODO: 实现结束批次 - return true; - } - - @Override - public Boolean copyBatch(Long batchId, String newBatchCode, String newBatchName) { - // TODO: 实现复制批次 - return true; - } - - @Override - public Map getBatchStatistics(Long batchId) { - // TODO: 实现批次统计 - return Map.of(); - } - - @Override - public Map getBatchOverallStatistics() { - // TODO: 实现整体统计 - return Map.of(); - } - - @Override - public Map getBatchCompletionStatistics(Long batchId) { - // TODO: 实现完成率统计 - return Map.of(); - } - - @Override - public List> getBatchDimensionStatistics(Long batchId, String dimension) { - // TODO: 实现维度统计 - return List.of(); - } - - @Override - public Boolean batchUpdateStatus(List batchIds, String status) { - // TODO: 实现批量更新状态 - return true; - } - - @Override - public Boolean checkBatchEditable(Long batchId) { - // TODO: 实现编辑检查 - return true; - } - - @Override - public Boolean checkBatchDeletable(Long batchId) { - // TODO: 实现删除检查 - return true; - } - - @Override - public List getAvailableBatches() { - // TODO: 实现可用批次查询 - return List.of(); - } - - @Override - public Boolean importBatchData(List batchList) { - // TODO: 实现批次数据导入 - return true; - } -} \ No newline at end of file diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsAnalysisServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsAnalysisServiceImpl.java deleted file mode 100644 index cdd47dda..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsAnalysisServiceImpl.java +++ /dev/null @@ -1,1068 +0,0 @@ -package org.dromara.xg.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONUtil; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.dromara.xg.domain.bo.XgStatisticsQueryBo; -import org.dromara.xg.domain.vo.XgStatisticsResultVo; -import org.dromara.xg.domain.vo.XgStatisticsConfigVo; -import org.dromara.xg.mapper.XgStatisticsAnalysisMapper; -import org.dromara.xg.service.IXgStatisticsAnalysisService; -import org.dromara.xg.service.IXgStatisticsConfigService; -import org.dromara.xg.service.IXgStatisticsCacheService; -import org.dromara.xg.service.IXgStatisticsExportService; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * 统计分析Service业务层处理 - * - * @author wuzhen - * @date 2025-01-17 - */ -@Slf4j -@RequiredArgsConstructor -@Service -public class XgStatisticsAnalysisServiceImpl implements IXgStatisticsAnalysisService { - - private final XgStatisticsAnalysisMapper statisticsAnalysisMapper; - private final IXgStatisticsConfigService statisticsConfigService; - private final IXgStatisticsCacheService statisticsCacheService; - private final IXgStatisticsExportService statisticsExportService; - - /** - * 获取统计概览 - */ - @Override - public Map getStatisticsOverview() { - Map overview = new HashMap<>(); - try { - // 获取学生总数 - Long totalStudents = statisticsAnalysisMapper.countTotalStudents(); - overview.put("totalStudents", totalStudents); - - // 获取学院总数 - Long totalColleges = statisticsAnalysisMapper.countTotalColleges(); - overview.put("totalColleges", totalColleges); - - // 获取专业总数 - Long totalMajors = statisticsAnalysisMapper.countTotalMajors(); - overview.put("totalMajors", totalMajors); - - // 获取班级总数 - Long totalClasses = statisticsAnalysisMapper.countTotalClasses(); - overview.put("totalClasses", totalClasses); - - log.info("获取统计概览成功:{}", overview); - } catch (Exception e) { - log.error("获取统计概览失败", e); - } - return overview; - } - - /** - * 获取统计维度选项 - */ - @Override - public List> getStatisticsDimensionOptions() { - List> options = new ArrayList<>(); - - // 添加维度选项(使用统一的下划线命名) - options.add(createOption("college", "学院")); - options.add(createOption("major", "专业")); - options.add(createOption("class", "班级")); - options.add(createOption("grade", "年级")); - options.add(createOption("gender", "性别")); - options.add(createOption("age", "年龄")); - options.add(createOption("political_status", "政治面貌")); - options.add(createOption("nationality", "民族")); - options.add(createOption("source_region", "生源地")); - options.add(createOption("blood_type", "血型")); - options.add(createOption("religion", "宗教信仰")); - options.add(createOption("student_status", "学籍状态")); - options.add(createOption("training_type", "培养方式")); - - return options; - } - - /** - * 获取学院选项 - */ - @Override - public List> getCollegeOptions() { - try { - return statisticsAnalysisMapper.getCollegeOptions(); - } catch (Exception e) { - log.error("获取学院选项失败", e); - return new ArrayList<>(); - } - } - - /** - * 获取专业选项 - */ - @Override - public List> getMajorOptions(String collegeCode) { - try { - return statisticsAnalysisMapper.getMajorOptions(collegeCode); - } catch (Exception e) { - log.error("获取专业选项失败", e); - return new ArrayList<>(); - } - } - - /** - * 获取班级选项 - */ - @Override - public List> getClassOptions(String collegeCode, String majorCode) { - try { - return statisticsAnalysisMapper.getClassOptions(collegeCode, majorCode); - } catch (Exception e) { - log.error("获取班级选项失败", e); - return new ArrayList<>(); - } - } - - /** - * 获取图表类型选项 - */ - @Override - public List> getChartTypeOptions() { - List> options = new ArrayList<>(); - - options.add(createOption("bar", "柱状图")); - options.add(createOption("pie", "饼图")); - options.add(createOption("line", "折线图")); - options.add(createOption("doughnut", "环形图")); - - return options; - } - - /** - * 创建选项对象 - */ - private Map createOption(String value, String label) { - Map option = new HashMap<>(); - option.put("value", value); - option.put("label", label); - return option; - } - - /** - * 执行统计分析 - */ - @Override - public XgStatisticsResultVo executeStatistics(XgStatisticsQueryBo queryBo) { - log.info("执行统计分析,统计类型:{}, 维度:{}", queryBo.getStatisticsType(), queryBo.getDimension()); - - // 根据统计类型和维度选择对应的统计方法 - switch (queryBo.getStatisticsType()) { - case "dimension": - return executeDimensionStatistics(queryBo); - case "report": - return executeReportStatistics(queryBo); - case "chart": - return executeChartStatistics(queryBo); - default: - throw new IllegalArgumentException("不支持的统计类型:" + queryBo.getStatisticsType()); - } - } - - /** - * 执行维度统计 - */ - private XgStatisticsResultVo executeDimensionStatistics(XgStatisticsQueryBo queryBo) { - String dimension = queryBo.getDimension(); - - switch (dimension) { - case "college": - return statisticsByCollege(queryBo); - case "major": - return statisticsByMajor(queryBo); - case "class": - return statisticsByClass(queryBo); - case "grade": - return statisticsByGrade(queryBo); - case "gender": - return statisticsByGender(queryBo); - case "age": - return statisticsByAge(queryBo); - case "political_status": // 统一使用下划线命名 - return statisticsByPoliticalStatus(queryBo); - case "nationality": - return statisticsByNationality(queryBo); - case "source_region": // 统一使用下划线命名 - return statisticsBySourceRegion(queryBo); - case "blood_type": // 统一使用下划线命名 - return statisticsByBloodType(queryBo); - case "religion": - return statisticsByReligion(queryBo); - case "student_status": // 统一使用下划线命名 - return statisticsByStudentStatus(queryBo); - case "training_type": // 统一使用下划线命名 - return statisticsByTrainingType(queryBo); - case "height": - return statisticsByHeight(queryBo); - case "weight": - return statisticsByWeight(queryBo); - case "multi": - return statisticsByMultiDimensions(queryBo); - case "time_trend": - return statisticsByTimeTrend(queryBo); - default: - throw new IllegalArgumentException("不支持的统计维度:" + dimension); - } - } - - /** - * 执行报表统计 - */ - private XgStatisticsResultVo executeReportStatistics(XgStatisticsQueryBo queryBo) { - String dimension = queryBo.getDimension(); - - switch (dimension) { - case "student_summary": - return getStudentSummaryReport(queryBo); - case "class_statistics": - return getClassStatisticsReport(queryBo); - case "college_statistics": - return getCollegeStatisticsReport(queryBo); - case "poor_student": - return getPoorStudentReport(queryBo); - case "special_group": - return getSpecialGroupReport(queryBo); - default: - throw new IllegalArgumentException("不支持的报表类型:" + dimension); - } - } - - /** - * 执行图表统计 - */ - private XgStatisticsResultVo executeChartStatistics(XgStatisticsQueryBo queryBo) { - // 根据图表类型生成对应的图表数据 - return generateChartData(queryBo.getDimension(), queryBo); - } - - /** - * 按学院统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByCollege(XgStatisticsQueryBo queryBo) { - log.info("按学院统计学生数量"); - - // 检查缓存 - if (queryBo.getUseCache() != null && queryBo.getUseCache()) { - String conditionsHash = generateConditionsHash(queryBo); - String cacheKey = statisticsCacheService.generateCacheKey("dimension", "college", conditionsHash); - - XgStatisticsResultVo cachedResult = statisticsCacheService.getCachedResult(cacheKey); - if (cachedResult != null) { - return cachedResult; - } - } - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByCollege(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按学院统计学生数量"); - result.setType("dimension"); - result.setDimension("college"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - // 构建摘要信息 - Map summary = new HashMap<>(); - summary.put("total_colleges", data.size()); - summary.put("total_students", calculateTotal(data)); - summary.put("avg_students_per_college", data.size() > 0 ? calculateTotal(data) / data.size() : 0); - result.setSummary(summary); - - // 缓存结果 - if (queryBo.getUseCache() != null && queryBo.getUseCache()) { - String conditionsHash = generateConditionsHash(queryBo); - String cacheKey = statisticsCacheService.generateCacheKey("dimension", "college", conditionsHash); - Integer expireMinutes = queryBo.getCacheExpireMinutes() != null ? queryBo.getCacheExpireMinutes() : 30; - statisticsCacheService.cacheResult(cacheKey, result, expireMinutes); - } - - return result; - } - - /** - * 按专业统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByMajor(XgStatisticsQueryBo queryBo) { - log.info("按专业统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByMajor(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按专业统计学生数量"); - result.setType("dimension"); - result.setDimension("major"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - // 构建摘要信息 - Map summary = new HashMap<>(); - summary.put("total_majors", data.size()); - summary.put("total_students", calculateTotal(data)); - summary.put("avg_students_per_major", data.size() > 0 ? calculateTotal(data) / data.size() : 0); - result.setSummary(summary); - - return result; - } - - /** - * 按班级统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByClass(XgStatisticsQueryBo queryBo) { - log.info("按班级统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByClass(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按班级统计学生数量"); - result.setType("dimension"); - result.setDimension("class"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - // 构建摘要信息 - Map summary = new HashMap<>(); - summary.put("total_classes", data.size()); - summary.put("total_students", calculateTotal(data)); - summary.put("avg_students_per_class", data.size() > 0 ? calculateTotal(data) / data.size() : 0); - result.setSummary(summary); - - return result; - } - - /** - * 按年级统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByGrade(XgStatisticsQueryBo queryBo) { - log.info("按年级统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByGrade(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按年级统计学生数量"); - result.setType("dimension"); - result.setDimension("grade"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按性别统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByGender(XgStatisticsQueryBo queryBo) { - log.info("按性别统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByGender(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按性别统计学生数量"); - result.setType("dimension"); - result.setDimension("gender"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - // 计算性别比例 - Map summary = new HashMap<>(); - long totalStudents = calculateTotal(data); - summary.put("total_students", totalStudents); - - if (totalStudents > 0) { - for (Map item : data) { - String gender = (String) item.get("gender"); - Long count = (Long) item.get("count"); - double ratio = (double) count / totalStudents * 100; - summary.put(gender + "_ratio", String.format("%.2f%%", ratio)); - } - } - result.setSummary(summary); - - return result; - } - - /** - * 按年龄段统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByAge(XgStatisticsQueryBo queryBo) { - log.info("按年龄段统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByAge(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按年龄段统计学生数量"); - result.setType("dimension"); - result.setDimension("age"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按政治面貌统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByPoliticalStatus(XgStatisticsQueryBo queryBo) { - log.info("按政治面貌统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByPoliticalStatus(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按政治面貌统计学生数量"); - result.setType("dimension"); - result.setDimension("political_status"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按民族统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByNationality(XgStatisticsQueryBo queryBo) { - log.info("按民族统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByNationality(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按民族统计学生数量"); - result.setType("dimension"); - result.setDimension("nationality"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按生源地统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsBySourceRegion(XgStatisticsQueryBo queryBo) { - log.info("按生源地统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsBySourceRegion(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按生源地统计学生数量"); - result.setType("dimension"); - result.setDimension("source_region"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按血型统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByBloodType(XgStatisticsQueryBo queryBo) { - log.info("按血型统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByBloodType(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按血型统计学生数量"); - result.setType("dimension"); - result.setDimension("blood_type"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按宗教信仰统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByReligion(XgStatisticsQueryBo queryBo) { - log.info("按宗教信仰统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByReligion(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按宗教信仰统计学生数量"); - result.setType("dimension"); - result.setDimension("religion"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按学籍状态统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByStudentStatus(XgStatisticsQueryBo queryBo) { - log.info("按学籍状态统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByStudentStatus(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按学籍状态统计学生数量"); - result.setType("dimension"); - result.setDimension("student_status"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按培养方式统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByTrainingType(XgStatisticsQueryBo queryBo) { - log.info("按培养方式统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByTrainingType(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按培养方式统计学生数量"); - result.setType("dimension"); - result.setDimension("training_type"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按身高范围统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByHeight(XgStatisticsQueryBo queryBo) { - log.info("按身高范围统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByHeight(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按身高范围统计学生数量"); - result.setType("dimension"); - result.setDimension("height"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 按体重范围统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByWeight(XgStatisticsQueryBo queryBo) { - log.info("按体重范围统计学生数量"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.statisticsByWeight(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按体重范围统计学生数量"); - result.setType("dimension"); - result.setDimension("weight"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 多维度组合统计 - */ - @Override - public XgStatisticsResultVo statisticsByMultiDimensions(XgStatisticsQueryBo queryBo) { - log.info("多维度组合统计"); - - Map conditions = buildConditions(queryBo); - List dimensions = Arrays.asList("gender", "grade", "college"); // 默认维度 - if (queryBo.getExtra() != null && queryBo.getExtra().containsKey("dimensions")) { - dimensions = (List) queryBo.getExtra().get("dimensions"); - } - - List> data = statisticsAnalysisMapper.statisticsByMultiDimensions(dimensions, conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("多维度组合统计"); - result.setType("dimension"); - result.setDimension("multi"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - // 按维度分组数据 - Map>> groupData = new HashMap<>(); - for (String dimension : dimensions) { - List> groupItems = data.stream() - .collect(Collectors.groupingBy(item -> (String) item.get(dimension))) - .entrySet().stream() - .map(entry -> { - Map groupItem = new HashMap<>(); - groupItem.put("name", entry.getKey()); - groupItem.put("count", entry.getValue().stream().mapToLong(item -> (Long) item.get("count")).sum()); - return groupItem; - }) - .collect(Collectors.toList()); - groupData.put(dimension, groupItems); - } - result.setGroupData(groupData); - - return result; - } - - /** - * 按时间趋势统计学生数量 - */ - @Override - public XgStatisticsResultVo statisticsByTimeTrend(XgStatisticsQueryBo queryBo) { - log.info("按时间趋势统计学生数量"); - - Map conditions = buildConditions(queryBo); - String timeField = "create_time"; // 默认时间字段 - String timeFormat = "%Y-%m"; // 默认按月统计 - - if (queryBo.getExtra() != null) { - timeField = (String) queryBo.getExtra().getOrDefault("timeField", timeField); - timeFormat = (String) queryBo.getExtra().getOrDefault("timeFormat", timeFormat); - } - - List> data = statisticsAnalysisMapper.statisticsByTimeTrend(timeField, timeFormat, conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("按时间趋势统计学生数量"); - result.setType("dimension"); - result.setDimension("time_trend"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取学生信息汇总报表 - */ - @Override - public XgStatisticsResultVo getStudentSummaryReport(XgStatisticsQueryBo queryBo) { - log.info("获取学生信息汇总报表"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.getStudentSummaryReport(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("学生信息汇总报表"); - result.setType("report"); - result.setDimension("student_summary"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取班级统计报表 - */ - @Override - public XgStatisticsResultVo getClassStatisticsReport(XgStatisticsQueryBo queryBo) { - log.info("获取班级统计报表"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.getClassStatisticsReport(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("班级统计报表"); - result.setType("report"); - result.setDimension("class_statistics"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取学院统计报表 - */ - @Override - public XgStatisticsResultVo getCollegeStatisticsReport(XgStatisticsQueryBo queryBo) { - log.info("获取学院统计报表"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.getCollegeStatisticsReport(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("学院统计报表"); - result.setType("report"); - result.setDimension("college_statistics"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取困难学生统计报表 - */ - @Override - public XgStatisticsResultVo getPoorStudentReport(XgStatisticsQueryBo queryBo) { - log.info("获取困难学生统计报表"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.getPoorStudentReport(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("困难学生统计报表"); - result.setType("report"); - result.setDimension("poor_student"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取特殊群体统计报表 - */ - @Override - public XgStatisticsResultVo getSpecialGroupReport(XgStatisticsQueryBo queryBo) { - log.info("获取特殊群体统计报表"); - - Map conditions = buildConditions(queryBo); - List> data = statisticsAnalysisMapper.getSpecialGroupReport(conditions); - - XgStatisticsResultVo result = new XgStatisticsResultVo(); - result.setTitle("特殊群体统计报表"); - result.setType("report"); - result.setDimension("special_group"); - result.setData(data); - result.setTotal(calculateTotal(data)); - result.setStatisticsTime(new Date()); - result.setFromCache(false); - - return result; - } - - /** - * 获取统计摘要信息 - */ - @Override - public Map getStatisticsSummary(XgStatisticsQueryBo queryBo) { - log.info("获取统计摘要信息"); - - Map conditions = buildConditions(queryBo); - return statisticsAnalysisMapper.getStatisticsSummary(conditions); - } - - /** - * 根据配置执行统计 - */ - @Override - public XgStatisticsResultVo executeStatisticsByConfig(String configCode, XgStatisticsQueryBo queryBo) { - log.info("根据配置执行统计,配置编码:{}", configCode); - - XgStatisticsConfigVo config = statisticsConfigService.queryByConfigCode(configCode); - if (config == null) { - throw new IllegalArgumentException("配置不存在:" + configCode); - } - - // 解析配置内容 - Map configContent = JSONUtil.toBean(config.getConfigContent(), Map.class); - - // 根据配置设置查询参数 - queryBo.setStatisticsType(config.getConfigType()); - queryBo.setDimension((String) configContent.get("dimension")); - - if (configContent.containsKey("conditions")) { - queryBo.setConditions((Map) configContent.get("conditions")); - } - - return executeStatistics(queryBo); - } - - /** - * 生成图表数据 - */ - @Override - public XgStatisticsResultVo generateChartData(String chartType, XgStatisticsQueryBo queryBo) { - log.info("生成图表数据,图表类型:{}", chartType); - - // 根据图表类型执行相应的统计 - XgStatisticsResultVo result = executeStatistics(queryBo); - - // 构建图表配置 - Map chartConfig = new HashMap<>(); - chartConfig.put("type", chartType); - chartConfig.put("title", result.getTitle()); - chartConfig.put("data", result.getData()); - - // 根据图表类型设置特定配置 - switch (chartType) { - case "pie": - chartConfig.put("series", buildPieSeriesConfig(result.getData())); - break; - case "bar": - chartConfig.put("xAxis", buildBarXAxisConfig(result.getData())); - chartConfig.put("series", buildBarSeriesConfig(result.getData())); - break; - case "line": - chartConfig.put("xAxis", buildLineXAxisConfig(result.getData())); - chartConfig.put("series", buildLineSeriesConfig(result.getData())); - break; - default: - break; - } - - result.setChartConfig(chartConfig); - return result; - } - - /** - * 导出统计结果 - */ - @Override - public byte[] exportStatisticsResult(XgStatisticsResultVo resultVo, String exportFormat) { - log.info("导出统计结果,格式:{}", exportFormat); - return statisticsExportService.exportToFormat(resultVo, exportFormat); - } - - /** - * 清除统计缓存 - */ - @Override - public Boolean clearStatisticsCache(String cacheKey) { - log.info("清除统计缓存,缓存键:{}", cacheKey); - return statisticsCacheService.deleteCache(cacheKey); - } - - /** - * 清除所有统计缓存 - */ - @Override - public Boolean clearAllStatisticsCache() { - log.info("清除所有统计缓存"); - return statisticsCacheService.clearAllCache(); - } - - /** - * 获取缓存统计信息 - */ - @Override - public Map getCacheStatistics() { - log.info("获取缓存统计信息"); - return statisticsCacheService.getCacheStatistics(); - } - - /** - * 预热统计缓存 - */ - @Override - public Boolean warmUpStatisticsCache() { - log.info("预热统计缓存"); - return statisticsCacheService.warmUpCache(); - } - - // ==================== 私有辅助方法 ==================== - - /** - * 构建查询条件 - */ - private Map buildConditions(XgStatisticsQueryBo queryBo) { - Map conditions = new HashMap<>(); - - // 基础条件 - if (queryBo.getConditions() != null) { - conditions.putAll(queryBo.getConditions()); - } - - // 时间范围 - if (queryBo.getStartTime() != null) { - conditions.put("startTime", queryBo.getStartTime()); - } - if (queryBo.getEndTime() != null) { - conditions.put("endTime", queryBo.getEndTime()); - } - - // 学院、专业、班级 - if (CollUtil.isNotEmpty(queryBo.getCollegeIds())) { - conditions.put("collegeIds", queryBo.getCollegeIds()); - } - if (CollUtil.isNotEmpty(queryBo.getMajorIds())) { - conditions.put("majorIds", queryBo.getMajorIds()); - } - if (CollUtil.isNotEmpty(queryBo.getClassIds())) { - conditions.put("classIds", queryBo.getClassIds()); - } - - // 其他条件 - if (CollUtil.isNotEmpty(queryBo.getGrades())) { - conditions.put("grades", queryBo.getGrades()); - } - if (CollUtil.isNotEmpty(queryBo.getGenders())) { - conditions.put("genders", queryBo.getGenders()); - } - if (CollUtil.isNotEmpty(queryBo.getPoliticalStatuses())) { - conditions.put("politicalStatuses", queryBo.getPoliticalStatuses()); - } - if (CollUtil.isNotEmpty(queryBo.getNationalities())) { - conditions.put("nationalities", queryBo.getNationalities()); - } - if (CollUtil.isNotEmpty(queryBo.getStudentStatuses())) { - conditions.put("studentStatuses", queryBo.getStudentStatuses()); - } - if (CollUtil.isNotEmpty(queryBo.getTrainingTypes())) { - conditions.put("trainingTypes", queryBo.getTrainingTypes()); - } - - return conditions; - } - - /** - * 计算总数 - */ - private Long calculateTotal(List> data) { - return data.stream() - .mapToLong(item -> { - Object count = item.get("count"); - if (count instanceof Number) { - return ((Number) count).longValue(); - } - return 0L; - }) - .sum(); - } - - /** - * 构建饼图系列配置 - */ - private List> buildPieSeriesConfig(List> data) { - List> series = new ArrayList<>(); - for (Map item : data) { - Map seriesItem = new HashMap<>(); - seriesItem.put("name", item.get("name")); - seriesItem.put("value", item.get("count")); - series.add(seriesItem); - } - return series; - } - - /** - * 构建柱状图X轴配置 - */ - private List buildBarXAxisConfig(List> data) { - return data.stream() - .map(item -> (String) item.get("name")) - .collect(Collectors.toList()); - } - - /** - * 构建柱状图系列配置 - */ - private List buildBarSeriesConfig(List> data) { - return data.stream() - .map(item -> item.get("count")) - .collect(Collectors.toList()); - } - - /** - * 构建折线图X轴配置 - */ - private List buildLineXAxisConfig(List> data) { - return buildBarXAxisConfig(data); - } - - /** - * 构建折线图系列配置 - */ - private List buildLineSeriesConfig(List> data) { - return buildBarSeriesConfig(data); - } - - - - /** - * 生成条件哈希值 - */ - private String generateConditionsHash(XgStatisticsQueryBo queryBo) { - Map conditions = buildConditions(queryBo); - String conditionsStr = JSONUtil.toJsonStr(conditions); - return cn.hutool.crypto.digest.MD5.create().digestHex(conditionsStr); - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsCacheServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsCacheServiceImpl.java deleted file mode 100644 index 80669653..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsCacheServiceImpl.java +++ /dev/null @@ -1,362 +0,0 @@ -package org.dromara.xg.service.impl; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.digest.MD5; -import cn.hutool.json.JSONUtil; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.dromara.common.redis.utils.RedisUtils; -import org.dromara.xg.domain.vo.XgStatisticsResultVo; -import org.dromara.xg.service.IXgStatisticsCacheService; -import org.springframework.stereotype.Service; - -import java.time.Duration; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.atomic.AtomicLong; - -/** - * 统计缓存Service业务层处理 - * - * @author wuzhen - * @date 2025-01-17 - */ -@Slf4j -@RequiredArgsConstructor -@Service -public class XgStatisticsCacheServiceImpl implements IXgStatisticsCacheService { - - private static final String CACHE_PREFIX = "xg:statistics:"; - private static final String CACHE_STATS_PREFIX = "xg:statistics:stats:"; - private static final String CACHE_HIT_COUNT_KEY = "xg:statistics:hit:count"; - private static final String CACHE_MISS_COUNT_KEY = "xg:statistics:miss:count"; - private static final Integer DEFAULT_EXPIRE_MINUTES = 30; - - // 缓存命中统计 - private final AtomicLong hitCount = new AtomicLong(0); - private final AtomicLong missCount = new AtomicLong(0); - - /** - * 获取缓存的统计结果 - */ - @Override - public XgStatisticsResultVo getCachedResult(String cacheKey) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - String cachedData = RedisUtils.getCacheObject(fullKey); - - if (StrUtil.isNotBlank(cachedData)) { - log.debug("缓存命中,缓存键:{}", cacheKey); - hitCount.incrementAndGet(); - updateCacheHitStats(cacheKey); - - XgStatisticsResultVo result = JSONUtil.toBean(cachedData, XgStatisticsResultVo.class); - result.setFromCache(true); - result.setCacheKey(cacheKey); - return result; - } else { - log.debug("缓存未命中,缓存键:{}", cacheKey); - missCount.incrementAndGet(); - return null; - } - } catch (Exception e) { - log.error("获取缓存失败,缓存键:{}", cacheKey, e); - missCount.incrementAndGet(); - return null; - } - } - - /** - * 缓存统计结果 - */ - @Override - public void cacheResult(String cacheKey, XgStatisticsResultVo result, Integer expireMinutes) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - String jsonData = JSONUtil.toJsonStr(result); - - int expire = expireMinutes != null ? expireMinutes : DEFAULT_EXPIRE_MINUTES; - RedisUtils.setCacheObject(fullKey, jsonData, Duration.ofMinutes(expire)); - - // 记录缓存统计信息 - recordCacheStats(cacheKey, jsonData.length(), expire); - - log.debug("缓存统计结果成功,缓存键:{}, 过期时间:{}分钟", cacheKey, expire); - } catch (Exception e) { - log.error("缓存统计结果失败,缓存键:{}", cacheKey, e); - } - } - - /** - * 删除缓存 - */ - @Override - public Boolean deleteCache(String cacheKey) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - boolean result = RedisUtils.deleteObject(fullKey); - - // 删除缓存统计信息 - String statsKey = CACHE_STATS_PREFIX + cacheKey; - RedisUtils.deleteObject(statsKey); - - log.debug("删除缓存{},缓存键:{}", result ? "成功" : "失败", cacheKey); - return result; - } catch (Exception e) { - log.error("删除缓存失败,缓存键:{}", cacheKey, e); - return false; - } - } - - /** - * 清除所有统计缓存 - */ - @Override - public Boolean clearAllCache() { - try { - // 删除所有统计缓存 - Collection keys = RedisUtils.keys(CACHE_PREFIX + "*"); - if (!keys.isEmpty()) { - RedisUtils.deleteObject(keys); - } - - // 删除所有缓存统计信息 - Collection statsKeys = RedisUtils.keys(CACHE_STATS_PREFIX + "*"); - if (!statsKeys.isEmpty()) { - RedisUtils.deleteObject(statsKeys); - } - - // 重置命中统计 - hitCount.set(0); - missCount.set(0); - RedisUtils.deleteObject(CACHE_HIT_COUNT_KEY); - RedisUtils.deleteObject(CACHE_MISS_COUNT_KEY); - - log.info("清除所有统计缓存成功,共清除{}个缓存", keys.size()); - return true; - } catch (Exception e) { - log.error("清除所有统计缓存失败", e); - return false; - } - } - - /** - * 获取缓存统计信息 - */ - @Override - public Map getCacheStatistics() { - Map stats = new HashMap<>(); - - try { - // 获取缓存总数 - Collection keys = RedisUtils.keys(CACHE_PREFIX + "*"); - stats.put("total_cache_count", keys.size()); - - // 获取命中统计 - long totalHits = hitCount.get(); - long totalMisses = missCount.get(); - long totalRequests = totalHits + totalMisses; - - stats.put("hit_count", totalHits); - stats.put("miss_count", totalMisses); - stats.put("total_requests", totalRequests); - - // 计算命中率 - double hitRate = totalRequests > 0 ? (double) totalHits / totalRequests * 100 : 0.0; - stats.put("hit_rate", Math.round(hitRate * 100.0) / 100.0); - - // 计算缓存总大小 - long totalSize = 0; - for (String key : keys) { - try { - String statsKey = key.replace(CACHE_PREFIX, CACHE_STATS_PREFIX); - Map cacheStats = RedisUtils.getCacheObject(statsKey); - if (cacheStats != null && cacheStats.containsKey("size")) { - totalSize += (Integer) cacheStats.get("size"); - } - } catch (Exception e) { - log.warn("获取缓存大小失败,键:{}", key, e); - } - } - stats.put("total_size_bytes", totalSize); - stats.put("total_size_mb", Math.round(totalSize / 1024.0 / 1024.0 * 100.0) / 100.0); - - // 获取过期缓存数量 - long expiredCount = 0; - for (String key : keys) { - Long expire = RedisUtils.getTimeToLive(key); - if (expire != null && expire <= 0) { - expiredCount++; - } - } - stats.put("expired_count", expiredCount); - - } catch (Exception e) { - log.error("获取缓存统计信息失败", e); - } - - return stats; - } - - /** - * 检查缓存是否存在 - */ - @Override - public Boolean existsCache(String cacheKey) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - return RedisUtils.hasKey(fullKey); - } catch (Exception e) { - log.error("检查缓存是否存在失败,缓存键:{}", cacheKey, e); - return false; - } - } - - /** - * 设置缓存过期时间 - */ - @Override - public Boolean expireCache(String cacheKey, Integer expireMinutes) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - return RedisUtils.expire(fullKey, Duration.ofMinutes(expireMinutes)); - } catch (Exception e) { - log.error("设置缓存过期时间失败,缓存键:{}", cacheKey, e); - return false; - } - } - - /** - * 获取缓存剩余过期时间 - */ - @Override - public Long getCacheExpire(String cacheKey) { - try { - String fullKey = CACHE_PREFIX + cacheKey; - return RedisUtils.getTimeToLive(fullKey); - } catch (Exception e) { - log.error("获取缓存剩余过期时间失败,缓存键:{}", cacheKey, e); - return -2L; - } - } - - /** - * 批量删除缓存 - */ - @Override - public Long deleteCacheByPattern(String pattern) { - try { - String fullPattern = CACHE_PREFIX + pattern; - Collection keys = RedisUtils.keys(fullPattern); - - if (!keys.isEmpty()) { - RedisUtils.deleteObject(keys); - - // 删除对应的统计信息 - Collection statsKeys = keys.stream() - .map(key -> key.replace(CACHE_PREFIX, CACHE_STATS_PREFIX)) - .collect(java.util.stream.Collectors.toList()); - RedisUtils.deleteObject(statsKeys); - - log.info("批量删除缓存成功,模式:{}, 删除数量:{}", pattern, keys.size()); - return (long) keys.size(); - } - - return 0L; - } catch (Exception e) { - log.error("批量删除缓存失败,模式:{}", pattern, e); - return 0L; - } - } - - /** - * 预热缓存 - */ - @Override - public Boolean warmUpCache() { - try { - log.info("开始预热统计缓存"); - - // 这里可以预热一些常用的统计查询 - // 例如:性别统计、学院统计、年级统计等 - - // 预热逻辑可以根据实际需要实现 - // 比如调用统计服务的常用方法,让结果自动缓存 - - log.info("统计缓存预热完成"); - return true; - } catch (Exception e) { - log.error("预热统计缓存失败", e); - return false; - } - } - - /** - * 生成缓存键 - */ - @Override - public String generateCacheKey(String statisticsType, String dimension, String conditionsHash) { - String keyContent = statisticsType + ":" + dimension + ":" + conditionsHash; - return MD5.create().digestHex(keyContent); - } - - /** - * 更新缓存命中统计 - */ - @Override - public void updateCacheHitStats(String cacheKey) { - try { - String statsKey = CACHE_STATS_PREFIX + cacheKey; - Map stats = RedisUtils.getCacheObject(statsKey); - - if (stats == null) { - stats = new HashMap<>(); - stats.put("hit_count", 1); - stats.put("last_hit_time", System.currentTimeMillis()); - } else { - int hitCount = (Integer) stats.getOrDefault("hit_count", 0); - stats.put("hit_count", hitCount + 1); - stats.put("last_hit_time", System.currentTimeMillis()); - } - - RedisUtils.setCacheObject(statsKey, stats, Duration.ofHours(24)); - } catch (Exception e) { - log.warn("更新缓存命中统计失败,缓存键:{}", cacheKey, e); - } - } - - /** - * 获取缓存命中率 - */ - @Override - public Double getCacheHitRate() { - long totalHits = hitCount.get(); - long totalMisses = missCount.get(); - long totalRequests = totalHits + totalMisses; - - if (totalRequests == 0) { - return 0.0; - } - - return Math.round((double) totalHits / totalRequests * 10000.0) / 100.0; - } - - /** - * 记录缓存统计信息 - */ - private void recordCacheStats(String cacheKey, int dataSize, int expireMinutes) { - try { - String statsKey = CACHE_STATS_PREFIX + cacheKey; - Map stats = new HashMap<>(); - stats.put("cache_time", System.currentTimeMillis()); - stats.put("size", dataSize); - stats.put("expire_minutes", expireMinutes); - stats.put("hit_count", 0); - - RedisUtils.setCacheObject(statsKey, stats, Duration.ofHours(24)); - } catch (Exception e) { - log.warn("记录缓存统计信息失败,缓存键:{}", cacheKey, e); - } - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsConfigServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsConfigServiceImpl.java deleted file mode 100644 index 20d8d0d3..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsConfigServiceImpl.java +++ /dev/null @@ -1,283 +0,0 @@ -package org.dromara.xg.service.impl; - -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.dromara.xg.domain.bo.XgStatisticsConfigBo; -import org.dromara.xg.domain.vo.XgStatisticsConfigVo; -import org.dromara.xg.domain.XgStatisticsConfig; -import org.dromara.xg.mapper.XgStatisticsConfigMapper; -import org.dromara.xg.service.IXgStatisticsConfigService; - -import java.util.List; -import java.util.Collection; - -/** - * 统计分析配置Service业务层处理 - * - * @author wuzhen - * @date 2025-01-17 - */ -@RequiredArgsConstructor -@Service -public class XgStatisticsConfigServiceImpl implements IXgStatisticsConfigService { - - private final XgStatisticsConfigMapper baseMapper; - - /** - * 查询统计分析配置 - */ - @Override - public XgStatisticsConfigVo queryById(Long configId) { - return baseMapper.selectVoById(configId); - } - - /** - * 查询统计分析配置列表 - */ - @Override - public TableDataInfo queryPageList(XgStatisticsConfigBo bo, PageQuery pageQuery) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 查询统计分析配置列表 - */ - @Override - public List queryList(XgStatisticsConfigBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper buildQueryWrapper(XgStatisticsConfigBo bo) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getConfigName()), XgStatisticsConfig::getConfigName, bo.getConfigName()); - lqw.eq(StringUtils.isNotBlank(bo.getConfigCode()), XgStatisticsConfig::getConfigCode, bo.getConfigCode()); - lqw.eq(StringUtils.isNotBlank(bo.getConfigType()), XgStatisticsConfig::getConfigType, bo.getConfigType()); - lqw.eq(bo.getIsSystem() != null, XgStatisticsConfig::getIsSystem, bo.getIsSystem()); - lqw.eq(bo.getIsEnabled() != null, XgStatisticsConfig::getIsEnabled, bo.getIsEnabled()); - lqw.orderByAsc(XgStatisticsConfig::getSortOrder); - lqw.orderByDesc(XgStatisticsConfig::getCreateTime); - return lqw; - } - - /** - * 新增统计分析配置 - */ - @Override - public Boolean insertByBo(XgStatisticsConfigBo bo) { - XgStatisticsConfig add = MapstructUtils.convert(bo, XgStatisticsConfig.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 修改统计分析配置 - */ - @Override - public Boolean updateByBo(XgStatisticsConfigBo bo) { - XgStatisticsConfig update = MapstructUtils.convert(bo, XgStatisticsConfig.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 保存前的数据校验 - */ - private void validEntityBeforeSave(XgStatisticsConfig entity) { - // 校验配置编码唯一性 - if (checkConfigCodeExists(entity.getConfigCode(), entity.getId())) { - throw new RuntimeException("配置编码已存在:" + entity.getConfigCode()); - } - // 设置默认值 - if (entity.getIsSystem() == null) { - entity.setIsSystem(0); - } - if (entity.getIsEnabled() == null) { - entity.setIsEnabled(1); - } - if (entity.getSortOrder() == null) { - entity.setSortOrder(0); - } - } - - /** - * 批量删除统计分析配置 - */ - @Override - public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if (isValid) { - // 校验是否存在系统配置 - long systemConfigCount = baseMapper.selectCount( - Wrappers.lambdaQuery() - .in(XgStatisticsConfig::getId, ids) - .eq(XgStatisticsConfig::getIsSystem, 1) - ); - if (systemConfigCount > 0) { - throw new RuntimeException("不能删除系统配置"); - } - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 根据配置编码查询配置信息 - */ - @Override - public XgStatisticsConfigVo queryByConfigCode(String configCode) { - return baseMapper.selectByConfigCode(configCode); - } - - /** - * 查询指定类型的配置列表 - */ - @Override - public List queryByConfigType(String configType) { - return baseMapper.selectByConfigType(configType); - } - - /** - * 查询启用的配置列表 - */ - @Override - public List queryEnabledConfigs(String configType) { - return baseMapper.selectEnabledConfigs(configType); - } - - /** - * 查询系统配置列表 - */ - @Override - public List querySystemConfigs() { - return baseMapper.selectSystemConfigs(); - } - - /** - * 查询用户自定义配置列表 - */ - @Override - public List queryUserConfigs(Long userId) { - return baseMapper.selectUserConfigs(userId); - } - - /** - * 根据权限查询可访问的配置列表 - */ - @Override - public List queryAccessibleConfigs(Long userId, List roles) { - return baseMapper.selectAccessibleConfigs(userId, roles); - } - - /** - * 更新配置排序 - */ - @Override - public Boolean updateSortOrder(Long configId, Integer sortOrder) { - return baseMapper.updateSortOrder(configId, sortOrder) > 0; - } - - /** - * 批量更新配置状态 - */ - @Override - public Boolean batchUpdateStatus(List configIds, Integer isEnabled) { - return baseMapper.batchUpdateStatus(configIds, isEnabled) > 0; - } - - /** - * 复制配置 - */ - @Override - public Boolean copyConfig(Long configId, String newConfigName, String newConfigCode) { - XgStatisticsConfig original = baseMapper.selectById(configId); - if (original == null) { - throw new RuntimeException("原配置不存在"); - } - - // 检查新配置编码是否存在 - if (checkConfigCodeExists(newConfigCode, null)) { - throw new RuntimeException("新配置编码已存在:" + newConfigCode); - } - - XgStatisticsConfig copy = new XgStatisticsConfig(); - copy.setConfigName(newConfigName); - copy.setConfigCode(newConfigCode); - copy.setConfigType(original.getConfigType()); - copy.setConfigContent(original.getConfigContent()); - copy.setIsSystem(0); // 复制的配置不是系统配置 - copy.setIsEnabled(1); - copy.setSortOrder(original.getSortOrder()); - copy.setViewPermissions(original.getViewPermissions()); - copy.setEditPermissions(original.getEditPermissions()); - copy.setRemark("复制自:" + original.getConfigName()); - - return baseMapper.insert(copy) > 0; - } - - /** - * 启用配置 - */ - @Override - public Boolean enableConfig(Long configId) { - XgStatisticsConfig config = new XgStatisticsConfig(); - config.setId(configId); - config.setIsEnabled(1); - return baseMapper.updateById(config) > 0; - } - - /** - * 禁用配置 - */ - @Override - public Boolean disableConfig(Long configId) { - XgStatisticsConfig config = new XgStatisticsConfig(); - config.setId(configId); - config.setIsEnabled(0); - return baseMapper.updateById(config) > 0; - } - - /** - * 检查配置编码是否存在 - */ - @Override - public Boolean checkConfigCodeExists(String configCode, Long excludeId) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgStatisticsConfig::getConfigCode, configCode); - if (excludeId != null) { - lqw.ne(XgStatisticsConfig::getId, excludeId); - } - return baseMapper.selectCount(lqw) > 0; - } - - /** - * 获取配置的JSON内容 - */ - @Override - public String getConfigContent(Long configId) { - XgStatisticsConfig config = baseMapper.selectById(configId); - return config != null ? config.getConfigContent() : null; - } - - /** - * 更新配置的JSON内容 - */ - @Override - public Boolean updateConfigContent(Long configId, String configContent) { - XgStatisticsConfig config = new XgStatisticsConfig(); - config.setId(configId); - config.setConfigContent(configContent); - return baseMapper.updateById(config) > 0; - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsExportServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsExportServiceImpl.java deleted file mode 100644 index df6e888d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStatisticsExportServiceImpl.java +++ /dev/null @@ -1,348 +0,0 @@ -package org.dromara.xg.service.impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.StrUtil; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.poi.ss.usermodel.*; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.dromara.xg.domain.vo.XgStatisticsResultVo; -import org.dromara.xg.service.IXgStatisticsExportService; -import org.springframework.stereotype.Service; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * 统计导出Service业务层处理 - * - * @author wuzhen - * @date 2025-01-17 - */ -@Slf4j -@RequiredArgsConstructor -@Service -public class XgStatisticsExportServiceImpl implements IXgStatisticsExportService { - - private static final List SUPPORTED_FORMATS = Arrays.asList("excel", "pdf", "csv", "word"); - - /** - * 导出统计结果到Excel - */ - @Override - public byte[] exportToExcel(XgStatisticsResultVo resultVo) { - log.info("导出统计结果到Excel,标题:{}", resultVo.getTitle()); - - try (XSSFWorkbook workbook = new XSSFWorkbook(); - ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { - - Sheet sheet = workbook.createSheet("统计结果"); - - // 创建标题样式 - CellStyle titleStyle = createTitleStyle(workbook); - CellStyle headerStyle = createHeaderStyle(workbook); - CellStyle dataStyle = createDataStyle(workbook); - - int rowIndex = 0; - - // 创建标题行 - Row titleRow = sheet.createRow(rowIndex++); - Cell titleCell = titleRow.createCell(0); - titleCell.setCellValue(resultVo.getTitle()); - titleCell.setCellStyle(titleStyle); - - // 合并标题行 - sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(0, 0, 0, 2)); - - // 创建空行 - rowIndex++; - - // 创建统计信息行 - Row infoRow = sheet.createRow(rowIndex++); - infoRow.createCell(0).setCellValue("统计时间:" + DateUtil.formatDateTime(resultVo.getStatisticsTime())); - infoRow.createCell(1).setCellValue("统计类型:" + resultVo.getType()); - infoRow.createCell(2).setCellValue("总计:" + resultVo.getTotal()); - - // 创建空行 - rowIndex++; - - // 创建表头 - Row headerRow = sheet.createRow(rowIndex++); - headerRow.createCell(0).setCellValue("项目"); - headerRow.createCell(1).setCellValue("数量"); - headerRow.createCell(2).setCellValue("占比"); - - // 设置表头样式 - for (int i = 0; i < 3; i++) { - headerRow.getCell(i).setCellStyle(headerStyle); - } - - // 填充数据 - List> data = resultVo.getData(); - if (data != null && !data.isEmpty()) { - for (Map item : data) { - Row dataRow = sheet.createRow(rowIndex++); - - // 项目名称 - Cell nameCell = dataRow.createCell(0); - nameCell.setCellValue(String.valueOf(item.get("name"))); - nameCell.setCellStyle(dataStyle); - - // 数量 - Cell countCell = dataRow.createCell(1); - Object count = item.get("count"); - if (count instanceof Number) { - countCell.setCellValue(((Number) count).doubleValue()); - } else { - countCell.setCellValue(String.valueOf(count)); - } - countCell.setCellStyle(dataStyle); - - // 占比 - Cell ratioCell = dataRow.createCell(2); - if (count instanceof Number && resultVo.getTotal() > 0) { - double ratio = ((Number) count).doubleValue() / resultVo.getTotal() * 100; - ratioCell.setCellValue(String.format("%.2f%%", ratio)); - } else { - ratioCell.setCellValue("0.00%"); - } - ratioCell.setCellStyle(dataStyle); - } - } - - // 自动调整列宽 - for (int i = 0; i < 3; i++) { - sheet.autoSizeColumn(i); - } - - workbook.write(outputStream); - return outputStream.toByteArray(); - - } catch (IOException e) { - log.error("导出Excel失败", e); - throw new RuntimeException("导出Excel失败", e); - } - } - - /** - * 导出统计结果到PDF - */ - @Override - public byte[] exportToPdf(XgStatisticsResultVo resultVo) { - log.info("导出统计结果到PDF,标题:{}", resultVo.getTitle()); - - // TODO: 实现PDF导出功能 - // 可以使用iText或其他PDF库来实现 - - // 临时返回空数组,实际实现时需要生成PDF内容 - return new byte[0]; - } - - /** - * 导出统计结果到CSV - */ - @Override - public byte[] exportToCsv(XgStatisticsResultVo resultVo) { - log.info("导出统计结果到CSV,标题:{}", resultVo.getTitle()); - - try { - StringBuilder csvContent = new StringBuilder(); - - // 添加BOM头,解决中文乱码问题 - csvContent.append('\ufeff'); - - // 添加标题 - csvContent.append(resultVo.getTitle()).append("\n"); - csvContent.append("统计时间,").append(DateUtil.formatDateTime(resultVo.getStatisticsTime())).append("\n"); - csvContent.append("统计类型,").append(resultVo.getType()).append("\n"); - csvContent.append("总计,").append(resultVo.getTotal()).append("\n"); - csvContent.append("\n"); - - // 添加表头 - csvContent.append("项目,数量,占比\n"); - - // 添加数据 - List> data = resultVo.getData(); - if (data != null && !data.isEmpty()) { - for (Map item : data) { - String name = String.valueOf(item.get("name")); - Object count = item.get("count"); - - // 处理包含逗号的字段 - if (name.contains(",")) { - name = "\"" + name + "\""; - } - - csvContent.append(name).append(","); - csvContent.append(count).append(","); - - // 计算占比 - if (count instanceof Number && resultVo.getTotal() > 0) { - double ratio = ((Number) count).doubleValue() / resultVo.getTotal() * 100; - csvContent.append(String.format("%.2f%%", ratio)); - } else { - csvContent.append("0.00%"); - } - csvContent.append("\n"); - } - } - - return csvContent.toString().getBytes("UTF-8"); - - } catch (Exception e) { - log.error("导出CSV失败", e); - throw new RuntimeException("导出CSV失败", e); - } - } - - /** - * 导出统计结果到Word - */ - @Override - public byte[] exportToWord(XgStatisticsResultVo resultVo) { - log.info("导出统计结果到Word,标题:{}", resultVo.getTitle()); - - // TODO: 实现Word导出功能 - // 可以使用Apache POI的XWPF来实现 - - // 临时返回空数组,实际实现时需要生成Word内容 - return new byte[0]; - } - - /** - * 导出统计结果到指定格式 - */ - @Override - public byte[] exportToFormat(XgStatisticsResultVo resultVo, String format) { - if (!isSupportedFormat(format)) { - throw new IllegalArgumentException("不支持的导出格式:" + format); - } - - switch (format.toLowerCase()) { - case "excel": - return exportToExcel(resultVo); - case "pdf": - return exportToPdf(resultVo); - case "csv": - return exportToCsv(resultVo); - case "word": - return exportToWord(resultVo); - default: - throw new IllegalArgumentException("不支持的导出格式:" + format); - } - } - - /** - * 获取导出文件的Content-Type - */ - @Override - public String getContentType(String format) { - switch (format.toLowerCase()) { - case "excel": - return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; - case "pdf": - return "application/pdf"; - case "csv": - return "text/csv"; - case "word": - return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; - default: - return "application/octet-stream"; - } - } - - /** - * 获取导出文件的文件名 - */ - @Override - public String getFileName(XgStatisticsResultVo resultVo, String format) { - String baseFileName = "statistics_" + DateUtil.format(new Date(), "yyyyMMdd_HHmmss"); - - if (StrUtil.isNotBlank(resultVo.getDimension())) { - baseFileName += "_" + resultVo.getDimension(); - } - - switch (format.toLowerCase()) { - case "excel": - return baseFileName + ".xlsx"; - case "pdf": - return baseFileName + ".pdf"; - case "csv": - return baseFileName + ".csv"; - case "word": - return baseFileName + ".docx"; - default: - return baseFileName + ".dat"; - } - } - - /** - * 检查导出格式是否支持 - */ - @Override - public Boolean isSupportedFormat(String format) { - return format != null && SUPPORTED_FORMATS.contains(format.toLowerCase()); - } - - // ==================== 私有辅助方法 ==================== - - /** - * 创建标题样式 - */ - private CellStyle createTitleStyle(Workbook workbook) { - CellStyle style = workbook.createCellStyle(); - Font font = workbook.createFont(); - font.setBold(true); - font.setFontHeightInPoints((short) 16); - style.setFont(font); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - return style; - } - - /** - * 创建表头样式 - */ - private CellStyle createHeaderStyle(Workbook workbook) { - CellStyle style = workbook.createCellStyle(); - Font font = workbook.createFont(); - font.setBold(true); - font.setFontHeightInPoints((short) 12); - style.setFont(font); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - - // 设置边框 - style.setBorderTop(BorderStyle.THIN); - style.setBorderBottom(BorderStyle.THIN); - style.setBorderLeft(BorderStyle.THIN); - style.setBorderRight(BorderStyle.THIN); - - // 设置背景色 - style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); - style.setFillPattern(FillPatternType.SOLID_FOREGROUND); - - return style; - } - - /** - * 创建数据样式 - */ - private CellStyle createDataStyle(Workbook workbook) { - CellStyle style = workbook.createCellStyle(); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - - // 设置边框 - style.setBorderTop(BorderStyle.THIN); - style.setBorderBottom(BorderStyle.THIN); - style.setBorderLeft(BorderStyle.THIN); - style.setBorderRight(BorderStyle.THIN); - - return style; - } -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStudentInfoServiceImpl.java b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStudentInfoServiceImpl.java deleted file mode 100644 index 998efa8d..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/java/org/dromara/xg/service/impl/XgStudentInfoServiceImpl.java +++ /dev/null @@ -1,800 +0,0 @@ -package org.dromara.xg.service.impl; - -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateUtil; -import lombok.RequiredArgsConstructor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; -import org.dromara.xg.domain.bo.XgStudentInfoBo; -import org.dromara.xg.domain.vo.XgStudentInfoVo; -import org.dromara.xg.domain.XgStudentInfo; -import org.dromara.xg.mapper.XgStudentInfoMapper; -import org.dromara.xg.service.IXgStudentInfoService; -import org.dromara.common.satoken.utils.LoginHelper; -import org.dromara.common.core.exception.ServiceException; -import org.dromara.common.core.service.UserService; -import org.dromara.xg.domain.bo.XgStudentInfoBo; -import cn.hutool.core.util.ObjectUtil; - -import java.util.List; -import java.util.Collection; -import java.util.Date; -import java.util.Map; -import java.util.HashMap; -import java.math.BigDecimal; -import java.util.stream.Collectors; - -/** - * 学生信息Service业务层处理 - * - * @author Cursor AI - * @date 2025-01-14 - */ -@RequiredArgsConstructor -@Service -public class XgStudentInfoServiceImpl implements IXgStudentInfoService { - - private static final Logger log = LoggerFactory.getLogger(XgStudentInfoServiceImpl.class); - - private final XgStudentInfoMapper baseMapper; - private final UserService userService; - - /** - * 查询学生信息 - * - * @param id 主键 - * @return 学生信息 - */ - @Override - public XgStudentInfoVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 分页查询学生信息列表 - * - * @param bo 查询条件 - * @param pageQuery 分页参数 - * @return 学生信息分页列表 - */ - @Override - public TableDataInfo queryPageList(XgStudentInfoBo bo, PageQuery pageQuery) { - log.info("=== Service层分页查询开始 ==="); - log.info("Service接收到的查询条件: {}", bo); - log.info("Service接收到的分页参数: {}", pageQuery); - - // 构建查询条件 - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - log.info("Service构建的Lambda查询条件: {}", lqw.getTargetSql()); - - // 执行分页查询 - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - log.info("Mapper查询结果 - 总数: {}, 当前页记录数: {}", result.getTotal(), result.getRecords().size()); - - if (!result.getRecords().isEmpty()) { - log.info("第一条记录详情: {}", result.getRecords().get(0)); - } else { - log.warn("Mapper查询结果为空!"); - } - - TableDataInfo tableDataInfo = TableDataInfo.build(result); - log.info("最终返回结果 - 总数: {}, 行数: {}", tableDataInfo.getTotal(), tableDataInfo.getRows().size()); - log.info("=== Service层分页查询结束 ==="); - - return tableDataInfo; - } - - /** - * 查询符合条件的学生信息列表 - * - * @param bo 查询条件 - * @return 学生信息列表 - */ - @Override - public List queryList(XgStudentInfoBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - /** - * 构建查询条件 - */ - private LambdaQueryWrapper buildQueryWrapper(XgStudentInfoBo query) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(query.getStudentNo()), XgStudentInfo::getStudentNo, query.getStudentNo()); - lqw.like(StringUtils.isNotBlank(query.getName()), XgStudentInfo::getName, query.getName()); - lqw.eq(StringUtils.isNotBlank(query.getGender()), XgStudentInfo::getGender, query.getGender()); - lqw.eq(StringUtils.isNotBlank(query.getIdCard()), XgStudentInfo::getIdCard, query.getIdCard()); - lqw.eq(StringUtils.isNotBlank(query.getPhone()), XgStudentInfo::getPhone, query.getPhone()); - lqw.eq(StringUtils.isNotBlank(query.getEmail()), XgStudentInfo::getEmail, query.getEmail()); - lqw.eq(StringUtils.isNotBlank(query.getNation()), XgStudentInfo::getNation, query.getNation()); - lqw.eq(StringUtils.isNotBlank(query.getPoliticalStatus()), XgStudentInfo::getPoliticalStatus, query.getPoliticalStatus()); - lqw.eq(StringUtils.isNotBlank(query.getStudentStatus()), XgStudentInfo::getStudentStatus, query.getStudentStatus()); - lqw.eq(StringUtils.isNotBlank(query.getGrade()), XgStudentInfo::getGrade, query.getGrade()); - lqw.eq(StringUtils.isNotBlank(query.getInfoStatus()), XgStudentInfo::getInfoStatus, query.getInfoStatus()); - lqw.eq(StringUtils.isNotBlank(query.getDataSource()), XgStudentInfo::getDataSource, query.getDataSource()); - - // 学院查询条件 - 支持学院ID和学院代码 - if (StringUtils.isNotBlank(query.getCollegeCode())) { - // 如果传入的是数字,认为是学院ID,需要转换为学院代码 - if (query.getCollegeCode().matches("\\d+")) { - // 通过学院ID查询学院代码 - String collegeCode = getCollegeCodeById(Long.parseLong(query.getCollegeCode())); - if (StringUtils.isNotBlank(collegeCode)) { - lqw.eq(XgStudentInfo::getCollegeCode, collegeCode); - } - } else { - // 直接使用学院代码 - lqw.eq(XgStudentInfo::getCollegeCode, query.getCollegeCode()); - } - } - - // 专业查询条件 - 支持专业ID和专业代码 - if (StringUtils.isNotBlank(query.getMajorCode())) { - // 如果传入的是数字,认为是专业ID,需要转换为专业代码 - if (query.getMajorCode().matches("\\d+")) { - // 通过专业ID查询专业代码 - String majorCode = getMajorCodeById(Long.parseLong(query.getMajorCode())); - if (StringUtils.isNotBlank(majorCode)) { - lqw.eq(XgStudentInfo::getMajorCode, majorCode); - } - } else { - // 直接使用专业代码 - lqw.eq(XgStudentInfo::getMajorCode, query.getMajorCode()); - } - } - - // 班级查询条件 - 支持班级ID和班级代码 - if (StringUtils.isNotBlank(query.getClassCode())) { - // 如果传入的是数字,认为是班级ID,需要转换为班级代码 - if (query.getClassCode().matches("\\d+")) { - // 通过班级ID查询班级代码 - String classCode = getClassCodeById(Long.parseLong(query.getClassCode())); - if (StringUtils.isNotBlank(classCode)) { - lqw.eq(XgStudentInfo::getClassCode, classCode); - } - } else { - // 直接使用班级代码 - lqw.eq(XgStudentInfo::getClassCode, query.getClassCode()); - } - } - - lqw.eq(ObjectUtil.isNotNull(query.getCounselorId()), XgStudentInfo::getCounselorId, query.getCounselorId()); - lqw.eq(ObjectUtil.isNotNull(query.getClassTeacherId()), XgStudentInfo::getClassTeacherId, query.getClassTeacherId()); - lqw.between(ObjectUtil.isNotNull(query.getParams()) && query.getParams().get("beginTime") != null && query.getParams().get("endTime") != null, - XgStudentInfo::getCreateTime, query.getParams().get("beginTime"), query.getParams().get("endTime")); - return lqw; - } - - /** - * 根据学院ID获取学院代码 - */ - private String getCollegeCodeById(Long collegeId) { - try { - // 直接执行SQL查询学院代码 - List> result = baseMapper.selectMaps( - Wrappers.lambdaQuery() - .select(XgStudentInfo::getCollegeCode) - .isNotNull(XgStudentInfo::getCollegeCode) - .last("AND EXISTS (SELECT 1 FROM xg_college_info WHERE id = " + collegeId + " AND college_code = xg_student_info.college_code AND deleted = 0) LIMIT 1") - ); - if (!result.isEmpty()) { - return (String) result.get(0).get("college_code"); - } - } catch (Exception e) { - log.warn("根据学院ID获取学院代码失败: {}", collegeId, e); - } - return null; - } - - /** - * 根据专业ID获取专业代码 - */ - private String getMajorCodeById(Long majorId) { - try { - // 直接执行SQL查询专业代码 - List> result = baseMapper.selectMaps( - Wrappers.lambdaQuery() - .select(XgStudentInfo::getMajorCode) - .isNotNull(XgStudentInfo::getMajorCode) - .last("AND EXISTS (SELECT 1 FROM xg_major_info WHERE id = " + majorId + " AND major_code = xg_student_info.major_code AND deleted = 0) LIMIT 1") - ); - if (!result.isEmpty()) { - return (String) result.get(0).get("major_code"); - } - } catch (Exception e) { - log.warn("根据专业ID获取专业代码失败: {}", majorId, e); - } - return null; - } - - /** - * 根据班级ID获取班级代码 - */ - private String getClassCodeById(Long classId) { - try { - // 直接执行SQL查询班级代码 - List> result = baseMapper.selectMaps( - Wrappers.lambdaQuery() - .select(XgStudentInfo::getClassCode) - .isNotNull(XgStudentInfo::getClassCode) - .last("AND EXISTS (SELECT 1 FROM xg_class_info WHERE id = " + classId + " AND class_code = xg_student_info.class_code AND deleted = 0) LIMIT 1") - ); - if (!result.isEmpty()) { - return (String) result.get(0).get("class_code"); - } - } catch (Exception e) { - log.warn("根据班级ID获取班级代码失败: {}", classId, e); - } - return null; - } - - /** - * 新增学生信息 - * - * @param bo 学生信息 - * @return 是否新增成功 - */ - @Override - public Boolean insertByBo(XgStudentInfoBo bo) { - XgStudentInfo add = MapstructUtils.convert(bo, XgStudentInfo.class); - validEntityBeforeSave(add); - - // 计算完整度 - XgStudentInfoVo studentInfoVo = MapstructUtils.convert(add, XgStudentInfoVo.class); - Double completionRate = calculateCompletionRate(studentInfoVo); - add.setCompletionRate(BigDecimal.valueOf(completionRate)); - add.setIsComplete(completionRate >= 90.0 ? 1 : 0); - - // 设置默认值 - if (StringUtils.isBlank(add.getStudentStatus())) { - add.setStudentStatus("1"); // 默认在籍 - } - if (StringUtils.isBlank(add.getInfoStatus())) { - add.setInfoStatus("1"); // 默认正常 - } - if (StringUtils.isBlank(add.getDataSource())) { - add.setDataSource("manual"); // 默认手工录入 - } - - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 修改学生信息 - * - * @param bo 学生信息 - * @return 是否修改成功 - */ - @Override - public Boolean updateByBo(XgStudentInfoBo bo) { - XgStudentInfo update = MapstructUtils.convert(bo, XgStudentInfo.class); - validEntityBeforeSave(update); - - // 重新计算完整度 - XgStudentInfoVo studentInfoVo = MapstructUtils.convert(update, XgStudentInfoVo.class); - Double completionRate = calculateCompletionRate(studentInfoVo); - update.setCompletionRate(BigDecimal.valueOf(completionRate)); - update.setIsComplete(completionRate >= 90.0 ? 1 : 0); - - return baseMapper.updateById(update) > 0; - } - - /** - * 保存前的数据校验 - */ - private void validEntityBeforeSave(XgStudentInfo entity) { - // 校验学号唯一性 - if (StringUtils.isNotBlank(entity.getStudentNo())) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgStudentInfo::getStudentNo, entity.getStudentNo()); - lqw.ne(entity.getId() != null, XgStudentInfo::getId, entity.getId()); - if (baseMapper.selectCount(lqw) > 0) { - throw new ServiceException("学号已存在"); - } - } - - // 校验身份证号唯一性 - if (StringUtils.isNotBlank(entity.getIdCard())) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgStudentInfo::getIdCard, entity.getIdCard()); - lqw.ne(entity.getId() != null, XgStudentInfo::getId, entity.getId()); - if (baseMapper.selectCount(lqw) > 0) { - throw new ServiceException("身份证号已存在"); - } - } - } - - /** - * 校验并批量删除学生信息 - * - * @param ids 待删除的主键集合 - * @param isValid 是否进行有效性校验 - * @return 是否删除成功 - */ - @Override - public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if (isValid) { - // 可以添加删除前的业务校验 - // 例如:检查学生是否有关联的成绩、奖惩记录等 - } - return baseMapper.deleteByIds(ids) > 0; - } - - /** - * 根据学号查询学生信息 - * - * @param studentNo 学号 - * @return 学生信息 - */ - @Override - public XgStudentInfoVo queryByStudentNo(String studentNo) { - return baseMapper.selectByStudentNo(studentNo); - } - - /** - * 根据身份证号查询学生信息 - * - * @param idCard 身份证号 - * @return 学生信息 - */ - @Override - public XgStudentInfoVo queryByIdCard(String idCard) { - return baseMapper.selectByIdCard(idCard); - } - - /** - * 查询指定班级的学生列表 - * - * @param classCode 班级代码 - * @return 学生列表 - */ - @Override - public List queryByClassCode(String classCode) { - return baseMapper.selectByClassCode(classCode); - } - - /** - * 查询指定学院的学生列表 - * - * @param collegeCode 学院代码 - * @return 学生列表 - */ - @Override - public List queryByCollegeCode(String collegeCode) { - return baseMapper.selectByCollegeCode(collegeCode); - } - - /** - * 查询指定辅导员的学生列表 - * - * @param counselorId 辅导员ID - * @return 学生列表 - */ - @Override - public List queryByCounselorId(Long counselorId) { - return baseMapper.selectByCounselorId(counselorId); - } - - /** - * 查询指定班主任的学生列表 - * - * @param classTeacherId 班主任ID - * @return 学生列表 - */ - @Override - public List queryByClassTeacherId(Long classTeacherId) { - return baseMapper.selectByClassTeacherId(classTeacherId); - } - - /** - * 统计各学院学生数量 - * - * @return 学院学生数量统计 - */ - @Override - public List> countByCollege() { - return baseMapper.countByCollege(); - } - - /** - * 统计各年级学生数量 - * - * @return 年级学生数量统计 - */ - @Override - public List> countByGrade() { - return baseMapper.countByGrade(); - } - - /** - * 统计各专业学生数量 - * - * @return 专业学生数量统计 - */ - @Override - public List> countByMajor() { - return baseMapper.countByMajor(); - } - - /** - * 统计学籍状态分布 - * - * @return 学籍状态统计 - */ - @Override - public List> countByStudentStatus() { - return baseMapper.countByStudentStatus(); - } - - /** - * 统计信息完整度分布 - * - * @return 信息完整度统计 - */ - @Override - public List> countByCompletionRate() { - return baseMapper.countByCompletionRate(); - } - - /** - * 查询信息不完整的学生列表 - * - * @return 信息不完整的学生列表 - */ - @Override - public List queryIncompleteStudents() { - return baseMapper.selectIncompleteStudents(); - } - - /** - * 查询待审核的学生信息列表 - * - * @return 待审核的学生信息列表 - */ - @Override - public List queryPendingAuditStudents() { - return baseMapper.selectPendingAuditStudents(); - } - - /** - * 批量更新学生信息状态 - * - * @param studentIds 学生ID列表 - * @param infoStatus 信息状态 - * @return 是否成功 - */ - @Override - public Boolean batchUpdateInfoStatus(List studentIds, String infoStatus) { - Long updateBy = LoginHelper.getUserId(); - return baseMapper.batchUpdateInfoStatus(studentIds, infoStatus, updateBy) > 0; - } - - /** - * 批量更新学生学籍状态 - * - * @param studentIds 学生ID列表 - * @param studentStatus 学籍状态 - * @return 是否成功 - */ - @Override - public Boolean batchUpdateStudentStatus(List studentIds, String studentStatus) { - Long updateBy = LoginHelper.getUserId(); - return baseMapper.batchUpdateStudentStatus(studentIds, studentStatus, updateBy) > 0; - } - - /** - * 查询重复学号的学生列表 - * - * @return 重复学号的学生列表 - */ - @Override - public List> queryDuplicateStudentNo() { - return baseMapper.selectDuplicateStudentNo(); - } - - /** - * 查询重复身份证号的学生列表 - * - * @return 重复身份证号的学生列表 - */ - @Override - public List> queryDuplicateIdCard() { - return baseMapper.selectDuplicateIdCard(); - } - - /** - * 计算学生信息完整度 - * - * @param studentInfo 学生信息 - * @return 完整度百分比 - */ - @Override - public Double calculateCompletionRate(XgStudentInfoVo studentInfo) { - if (studentInfo == null) { - return 0.0; - } - - int totalFields = 50; // 总字段数(可根据实际需要调整) - int completedFields = 0; - - // 基本信息字段(必填) - if (StringUtils.isNotBlank(studentInfo.getStudentNo())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getGender())) completedFields++; - if (studentInfo.getBirthDate() != null) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getIdCard())) completedFields++; - - // 学籍信息字段 - if (StringUtils.isNotBlank(studentInfo.getStudentStatus())) completedFields++; - if (studentInfo.getEnrollmentYear() != null) completedFields++; - if (studentInfo.getEnrollmentDate() != null) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getCollegeCode())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getMajorCode())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getClassCode())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getGrade())) completedFields++; - - // 联系信息字段 - if (StringUtils.isNotBlank(studentInfo.getPhone())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getEmail())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getHomeAddress())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getCurrentAddress())) completedFields++; - - // 家庭信息字段 - if (StringUtils.isNotBlank(studentInfo.getFatherName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getFatherPhone())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getMotherName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getMotherPhone())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getEmergencyContactName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getEmergencyContactPhone())) completedFields++; - - // 其他重要信息字段 - if (StringUtils.isNotBlank(studentInfo.getNation())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getPoliticalStatus())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getTrainingType())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getSourceRegion())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getMiddleSchool())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getFamilyEconomicStatus())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getHealthStatus())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getBloodType())) completedFields++; - if (studentInfo.getHeight() != null) completedFields++; - if (studentInfo.getWeight() != null) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getBankCardNo())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getBankName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getDormitoryBuilding())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getDormitoryRoom())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getCounselorName())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getClassTeacherName())) completedFields++; - - // 可选信息字段 - if (StringUtils.isNotBlank(studentInfo.getNameEnglish())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getQq())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getWechat())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getReligion())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getMaritalStatus())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getSpecialties())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getAwards())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getViolations())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getSocialActivities())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getPhotoUrl())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getPostalCode())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getHouseholdRegisterType())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getHukouLocation())) completedFields++; - if (StringUtils.isNotBlank(studentInfo.getAdmissionCategory())) completedFields++; - - return Math.round((double) completedFields / totalFields * 100 * 100.0) / 100.0; - } - - /** - * 更新学生信息完整度 - * - * @param studentId 学生ID - * @return 是否成功 - */ - @Override - public Boolean updateCompletionRate(Long studentId) { - XgStudentInfoVo studentInfo = baseMapper.selectVoById(studentId); - if (studentInfo == null) { - return false; - } - - Double completionRate = calculateCompletionRate(studentInfo); - - XgStudentInfo update = new XgStudentInfo(); - update.setId(studentId); - update.setCompletionRate(BigDecimal.valueOf(completionRate)); - update.setIsComplete(completionRate >= 90.0 ? 1 : 0); - update.setUpdateBy(LoginHelper.getUserId()); - update.setUpdateTime(new Date()); - - return baseMapper.updateById(update) > 0; - } - - // 其他方法将在下一部分实现... - - @Override - public String importStudentInfo(List studentInfoList, Boolean isUpdateSupport, String operName) { - // TODO: 实现批量导入功能 - return "导入功能待实现"; - } - - @Override - public List exportStudentInfo(XgStudentInfoBo bo) { - return queryList(bo); - } - - @Override - public Boolean auditStudentInfo(Long studentId, String auditStatus, String auditRemark) { - // TODO: 实现审核功能 - return true; - } - - @Override - public Boolean batchAuditStudentInfo(List studentIds, String auditStatus, String auditRemark) { - // TODO: 实现批量审核功能 - return true; - } - - @Override - public Map getStatisticsOverview() { - Map result = new HashMap<>(); - - // 总学生数 - LambdaQueryWrapper totalLqw = Wrappers.lambdaQuery(); - long totalCount = baseMapper.selectCount(totalLqw); - result.put("totalCount", totalCount); - - // 在籍学生数 - LambdaQueryWrapper activeLqw = Wrappers.lambdaQuery(); - activeLqw.eq(XgStudentInfo::getStudentStatus, "1"); - long activeCount = baseMapper.selectCount(activeLqw); - result.put("activeCount", activeCount); - - // 信息完整学生数 - LambdaQueryWrapper completeLqw = Wrappers.lambdaQuery(); - completeLqw.eq(XgStudentInfo::getIsComplete, 1); - long completeCount = baseMapper.selectCount(completeLqw); - result.put("completeCount", completeCount); - - // 待审核学生数 - LambdaQueryWrapper pendingLqw = Wrappers.lambdaQuery(); - pendingLqw.eq(XgStudentInfo::getInfoStatus, "2"); - long pendingCount = baseMapper.selectCount(pendingLqw); - result.put("pendingCount", pendingCount); - - return result; - } - - @Override - public Map generateReport(String reportType, Map params) { - Map result = new HashMap<>(); - - switch (reportType) { - case "college": - result.put("data", countByCollege()); - break; - case "grade": - result.put("data", countByGrade()); - break; - case "major": - result.put("data", countByMajor()); - break; - case "status": - result.put("data", countByStudentStatus()); - break; - case "completion": - result.put("data", countByCompletionRate()); - break; - default: - result.put("data", new HashMap<>()); - } - - result.put("reportType", reportType); - result.put("generateTime", new Date()); - - return result; - } - - // ================================ - // 选项数据接口实现 - // ================================ - - /** - * 获取学院选项 - * - * @return 学院选项列表 - */ - @Override - public List> getCollegeOptions() { - return baseMapper.selectCollegeOptions(); - } - - /** - * 获取专业选项 - * - * @param collegeCode 学院代码(可选) - * @return 专业选项列表 - */ - @Override - public List> getMajorOptions(String collegeCode) { - return baseMapper.selectMajorOptions(collegeCode); - } - - /** - * 获取班级选项 - * - * @param majorCode 专业代码(可选) - * @return 班级选项列表 - */ - @Override - public List> getClassOptions(String majorCode) { - return baseMapper.selectClassOptions(majorCode); - } - - /** - * 获取辅导员选项 - * - * @return 辅导员选项列表 - */ - @Override - public List> getCounselorOptions() { - return baseMapper.selectCounselorOptions(); - } - - /** - * 获取班主任选项 - * - * @return 班主任选项列表 - */ - @Override - public List> getClassTeacherOptions() { - return baseMapper.selectClassTeacherOptions(); - } - - /** - * 检查学号是否存在 - * - * @param studentNo 学号 - * @param studentId 学生ID(编辑时排除自己) - * @return 是否存在 - */ - @Override - public Boolean checkStudentNo(String studentNo, Long studentId) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgStudentInfo::getStudentNo, studentNo); - if (studentId != null) { - lqw.ne(XgStudentInfo::getId, studentId); - } - return baseMapper.selectCount(lqw) > 0; - } - - /** - * 检查身份证号是否存在 - * - * @param idCard 身份证号 - * @param studentId 学生ID(编辑时排除自己) - * @return 是否存在 - */ - @Override - public Boolean checkIdCard(String idCard, Long studentId) { - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(XgStudentInfo::getIdCard, idCard); - if (studentId != null) { - lqw.ne(XgStudentInfo::getId, studentId); - } - return baseMapper.selectCount(lqw) > 0; - } - -} diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassInfoMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassInfoMapper.xml deleted file mode 100644 index abc0a5ab..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassInfoMapper.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, class_code, class_name, class_type, grade, enrollment_year, graduation_year, - major_code, major_name, training_type, degree_type, college_code, college_name, - counselor_id, counselor_name, class_teacher_id, class_teacher_name, - class_advisor_id, class_advisor_name, class_monitor_id, class_monitor_name, - deputy_monitor_id, deputy_monitor_name, class_status, is_graduation, graduation_date, - planned_capacity, current_student_count, max_student_count, male_count, female_count, - active_count, transfer_in_count, transfer_out_count, dropout_count, graduate_count, - office_location, class_location, contact_phone, qq_group, wechat_group, email, - class_schedule, class_culture, class_rules, class_description, last_count_update, - ext_field1, ext_field2, ext_field3, remark, create_by, create_time, update_by, update_time - from xg_class_info - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassTeacherRelationMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassTeacherRelationMapper.xml deleted file mode 100644 index 4690976e..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgClassTeacherRelationMapper.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select r.id, r.class_id, c.class_name, c.class_code, r.teacher_id, - u.nick_name as teacher_name, r.status, r.start_date, r.end_date, - r.remark, r.create_by, r.create_time, r.update_by, r.update_time - from xg_class_teacher_relation r - left join xg_class_info c on c.id = r.class_id - left join sys_user u on u.user_id = r.teacher_id - - - - - - - - update xg_class_teacher_relation - set status = '1', - end_date = now(), - update_by = #{updateBy}, - update_time = now() - where class_id = #{classId} - and status = '0' - and deleted = '0' - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchLogMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchLogMapper.xml deleted file mode 100644 index 8f8ed5e5..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchLogMapper.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - select id, batch_id, student_id, operation_type, operation_desc, old_data, new_data, - operator_id, operator_name, operator_type, ip_address, user_agent, create_time, tenant_id - from xg_collection_batch_log - - - - - - - - - - - - - - - - - insert into xg_collection_batch_log ( - batch_id, student_id, operation_type, operation_desc, old_data, new_data, - operator_id, operator_name, operator_type, ip_address, user_agent, create_time, tenant_id - ) values - - ( - #{item.batchId}, #{item.studentId}, #{item.operationType}, #{item.operationDesc}, - #{item.oldData}, #{item.newData}, #{item.operatorId}, #{item.operatorName}, - #{item.operatorType}, #{item.ipAddress}, #{item.userAgent}, #{item.createTime}, #{item.tenantId} - ) - - - - - - delete from xg_collection_batch_log where batch_id = #{batchId} - - - - - delete from xg_collection_batch_log where student_id = #{studentId} - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchMapper.xml deleted file mode 100644 index 7eb705ba..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchMapper.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted, - batch_code, batch_name, batch_type, academic_year, semester, batch_status, - publish_time, start_time, end_time, archive_time, target_colleges, target_grades, - target_majors, required_fields, optional_fields, audit_levels, total_students, - submitted_count, approved_count, rejected_count, completion_rate, edit_permissions, - audit_permissions, view_permissions, auto_reminder, reminder_frequency, - allow_modify_after_submit, description, remark - from xg_collection_batch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - update xg_collection_batch - set total_students = ( - select count(*) - from xg_collection_batch_student - where batch_id = #{batchId} and deleted = 0 - ), - submitted_count = ( - select count(*) - from xg_collection_batch_student - where batch_id = #{batchId} and has_submitted = 1 and deleted = 0 - ), - completion_rate = ( - select round( - sum(case when has_submitted = 1 then 1 else 0 end) * 100.0 / count(*), 2 - ) - from xg_collection_batch_student - where batch_id = #{batchId} and deleted = 0 - ), - update_time = now() - where id = #{batchId} - - - - - update xg_collection_batch - set batch_status = #{batchStatus}, update_time = now() - where id in - - #{batchId} - - - - - - - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchStudentMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchStudentMapper.xml deleted file mode 100644 index 2f0ad1f1..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgCollectionBatchStudentMapper.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, batch_id, student_id, student_code, student_name, college_id, college_name, - major_id, major_name, class_id, class_name, grade, can_edit, has_submitted, - submit_time, last_edit_time, edit_count, tenant_id, create_by, create_time, - update_by, update_time, deleted - from xg_collection_batch_student - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert into xg_collection_batch_student ( - batch_id, student_id, student_code, student_name, college_id, college_name, - major_id, major_name, class_id, class_name, grade, can_edit, has_submitted, - submit_time, last_edit_time, edit_count, tenant_id, create_by, create_time, - update_by, update_time, deleted - ) values - - ( - #{item.batchId}, #{item.studentId}, #{item.studentCode}, #{item.studentName}, - #{item.collegeId}, #{item.collegeName}, #{item.majorId}, #{item.majorName}, - #{item.classId}, #{item.className}, #{item.grade}, #{item.canEdit}, - #{item.hasSubmitted}, #{item.submitTime}, #{item.lastEditTime}, #{item.editCount}, - #{item.tenantId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, - #{item.updateTime}, #{item.deleted} - ) - - - - - - update xg_collection_batch_student - set has_submitted = #{hasSubmitted}, - submit_time = case when #{hasSubmitted} = 1 then now() else null end, - update_time = now() - where batch_id = #{batchId} and deleted = 0 - and student_id in - - #{studentId} - - - - - - update xg_collection_batch_student - set can_edit = #{canEdit}, update_time = now() - where batch_id = #{batchId} and deleted = 0 - and student_id in - - #{studentId} - - - - - - - - - - - - - - - - - - - - - - - - update xg_collection_batch_student - set deleted = 1, update_time = now() - where batch_id = #{batchId} - - - - - update xg_collection_batch_student - set deleted = 1, update_time = now() - where student_id = #{studentId} - - - - - - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsAnalysisMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsAnalysisMapper.xml deleted file mode 100644 index ef8f54fc..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsAnalysisMapper.xml +++ /dev/null @@ -1,647 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - s.deleted = 0 - - and s.create_time >= #{conditions.startTime} - - - and s.create_time <= #{conditions.endTime} - - - and c.college_code in - - (select college_code from xg_college_info where id = #{collegeId}) - - - - and c.major_code in - - (select major_code from xg_major_info where id = #{majorId}) - - - - and c.id in - - #{classId} - - - - and s.grade in - - #{grade} - - - - and s.gender in - - #{gender} - - - - and s.political_status in - - #{politicalStatus} - - - - and s.nation in - - #{nationality} - - - - and s.student_status in - - #{studentStatus} - - - - and s.training_type in - - #{trainingType} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsConfigMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsConfigMapper.xml deleted file mode 100644 index 2e0a439a..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStatisticsConfigMapper.xml +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - select id, tenant_id, config_name, config_code, config_type, config_content, is_system, is_enabled, sort_order, view_permissions, edit_permissions, remark, create_by, create_time, update_by, update_time, deleted - from xg_statistics_config - - - - - - - - - - - - - - - - - - - - update xg_statistics_config - set sort_order = #{sortOrder}, update_time = now() - where id = #{configId} and deleted = 0 - - - - update xg_statistics_config - set is_enabled = #{isEnabled}, update_time = now() - where id in - - #{configId} - - and deleted = 0 - - - - insert into xg_statistics_config - - tenant_id, - config_name, - config_code, - config_type, - config_content, - is_system, - is_enabled, - sort_order, - view_permissions, - edit_permissions, - remark, - create_by, - create_time, - update_by, - update_time, - deleted - - - #{tenantId}, - #{configName}, - #{configCode}, - #{configType}, - #{configContent}, - #{isSystem}, - #{isEnabled}, - #{sortOrder}, - #{viewPermissions}, - #{editPermissions}, - #{remark}, - #{createBy}, - now(), - #{updateBy}, - now(), - 0 - - - - - update xg_statistics_config - - tenant_id = #{tenantId}, - config_name = #{configName}, - config_code = #{configCode}, - config_type = #{configType}, - config_content = #{configContent}, - is_system = #{isSystem}, - is_enabled = #{isEnabled}, - sort_order = #{sortOrder}, - view_permissions = #{viewPermissions}, - edit_permissions = #{editPermissions}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = now() - - where id = #{id} and deleted = 0 - - - - update xg_statistics_config set deleted = 1 where id = #{id} - - - - update xg_statistics_config set deleted = 1 where id in - - #{id} - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStudentInfoMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStudentInfoMapper.xml deleted file mode 100644 index facefc83..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgStudentInfoMapper.xml +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UPDATE xg_student_info - SET info_status = #{infoStatus}, - update_by = #{updateBy}, - update_time = NOW() - WHERE id IN - - #{id} - - AND deleted = 0 - - - - - UPDATE xg_student_info - SET student_status = #{studentStatus}, - update_by = #{updateBy}, - update_time = NOW() - WHERE id IN - - #{id} - - AND deleted = 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgSysUserMapper.xml b/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgSysUserMapper.xml deleted file mode 100644 index fac5bbc4..00000000 --- a/backend/ruoyi-modules/ruoyi-xg-xx/src/main/resources/mapper/xg/XgSysUserMapper.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/开发文档/API/学工管理学生信息管理API.md b/docs/开发文档/API/学工管理学生信息管理API.md deleted file mode 100644 index 462cc3fa..00000000 --- a/docs/开发文档/API/学工管理学生信息管理API.md +++ /dev/null @@ -1,1049 +0,0 @@ -# 学工管理学生信息管理API文档 - -## 1. 文档说明 - -### 1.1 API基础信息 -- **模块名称**: 学工管理 - 学生信息管理 -- **模块代码**: ruoyi-xg-xx -- **基础路径**: `/xg/studentInfo` -- **权限前缀**: `xg:studentInfo` -- **版本**: 1.1.0 -- **更新时间**: 2025-01-12(新增选项接口) - -### 1.2 通用规范 -- **请求方式**: 支持GET、POST、PUT、DELETE -- **数据格式**: JSON -- **字符编码**: UTF-8 -- **认证方式**: Bearer Token -- **权限控制**: Sa-Token + 数据权限 - -### 1.3 响应格式 -```json -{ - "code": 200, - "msg": "操作成功", - "data": {}, - "timestamp": "2025-01-12T10:00:00" -} -``` - -## 2. 学生信息管理接口 - -### 2.1 查询学生信息列表 -- **接口路径**: GET `/xg/studentInfo/list` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 分页查询学生信息列表,支持多条件筛选 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| pageNum | integer | 否 | 页码,默认1 | -| pageSize | integer | 否 | 每页大小,默认10 | -| studentNo | string | 否 | 学号 | -| name | string | 否 | 姓名(模糊查询) | -| idCard | string | 否 | 身份证号 | -| gender | string | 否 | 性别:0-男,1-女 | -| studentStatus | string | 否 | 学籍状态 | -| enrollmentYear | integer | 否 | 入学年份 | -| majorCode | string | 否 | 专业代码 | -| majorName | string | 否 | 专业名称(模糊查询) | -| classCode | string | 否 | 班级代码 | -| className | string | 否 | 班级名称(模糊查询) | -| collegeCode | string | 否 | 学院代码 | -| collegeName | string | 否 | 学院名称(模糊查询) | -| phone | string | 否 | 联系电话(模糊查询) | -| infoStatus | string | 否 | 信息状态 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "rows": [ - { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "birthDate": "2000-01-01", - "idCard": "110101199901010001", - "phone": "13800138000", - "email": "zhangsan@example.com", - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院", - "enrollmentYear": 2023, - "studentStatus": "1", - "infoStatus": "1", - "createTime": "2025-01-12 10:00:00", - "updateTime": "2025-01-12 10:00:00" - } - ], - "total": 1 -} -``` - -### 2.2 获取学生信息详情 -- **接口路径**: GET `/xg/studentInfo/{id}` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 根据ID获取学生详细信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| id | long | 是 | 学生ID | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "namePinyin": "zhangsan", - "gender": "M", - "birthDate": "2000-01-01", - "nation": "汉族", - "politicalStatus": "团员", - "idCard": "110101199901010001", - "phone": "13800138000", - "email": "zhangsan@example.com", - "qq": "123456789", - "wechat": "zhangsan_wx", - "dormBuilding": "1号楼", - "dormRoom": "101", - "homeAddress": "北京市朝阳区xxx", - "emergencyContact": "张父", - "emergencyPhone": "13900139000", - "emergencyRelation": "父亲", - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院", - "counselorName": "李老师", - "classTeacherName": "王老师", - "enrollmentYear": 2023, - "enrollmentDate": "2023-09-01", - "schoolSystem": 4, - "educationLevel": "本科", - "trainingType": "全日制", - "studentStatus": "1", - "infoStatus": "1", - "dataSource": "1", - "createTime": "2025-01-12 10:00:00", - "updateTime": "2025-01-12 10:00:00" - } -} -``` - -### 2.3 根据学号查询学生信息 -- **接口路径**: GET `/xg/studentInfo/byStudentNo/{studentNo}` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 根据学号查询学生信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| studentNo | string | 是 | 学号 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "classCode": "CS2023001", - "className": "计算机2023-1班" - } -} -``` - -### 2.4 根据身份证号查询学生信息 -- **接口路径**: GET `/xg/studentInfo/byIdCard/{idCard}` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 根据身份证号查询学生信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| idCard | string | 是 | 身份证号 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "idCard": "110101199901010001", - "gender": "M", - "classCode": "CS2023001", - "className": "计算机2023-1班" - } -} -``` - -### 2.5 查询班级学生列表 -- **接口路径**: GET `/xg/studentInfo/byClass/{classCode}` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 根据班级代码查询学生列表 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| classCode | string | 是 | 班级代码 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "phone": "13800138000", - "email": "zhangsan@example.com" - } - ] -} -``` - -### 2.6 查询学院学生列表 -- **接口路径**: GET `/xg/studentInfo/byCollege/{collegeCode}` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 根据学院代码查询学生列表 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| collegeCode | string | 是 | 学院代码 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院" - } - ] -} -``` - -### 2.7 新增学生信息 -- **接口路径**: POST `/xg/studentInfo` -- **权限标识**: `xg:studentInfo:add` -- **功能描述**: 新增学生信息 - -#### 请求参数 -```json -{ - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "birthDate": "2000-01-01", - "idCard": "110101199901010001", - "phone": "13800138000", - "email": "zhangsan@example.com", - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院", - "enrollmentYear": 2023, - "enrollmentDate": "2023-09-01", - "schoolSystem": 4, - "educationLevel": "本科", - "trainingType": "全日制", - "studentStatus": "1", - "nation": "汉族", - "politicalStatus": "团员", - "dormBuilding": "1号楼", - "dormRoom": "101", - "homeAddress": "北京市朝阳区xxx", - "emergencyContact": "张父", - "emergencyPhone": "13900139000", - "emergencyRelation": "父亲" -} -``` - -#### 响应数据 -```json -{ - "code": 200, - "msg": "新增成功", - "data": 1 -} -``` - -### 2.8 修改学生信息 -- **接口路径**: PUT `/xg/studentInfo` -- **权限标识**: `xg:studentInfo:edit` -- **功能描述**: 修改学生信息 - -#### 请求参数 -```json -{ - "id": 1, - "studentNo": "2023001001", - "name": "张三", - "gender": "M", - "birthDate": "2000-01-01", - "idCard": "110101199901010001", - "phone": "13800138000", - "email": "zhangsan@example.com", - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "classCode": "CS2023001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院" -} -``` - -#### 响应数据 -```json -{ - "code": 200, - "msg": "修改成功" -} -``` - -### 2.9 删除学生信息 -- **接口路径**: DELETE `/xg/studentInfo/{ids}` -- **权限标识**: `xg:studentInfo:remove` -- **功能描述**: 删除学生信息(支持批量删除) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| ids | string | 是 | 学生ID,多个用逗号分隔 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "删除成功" -} -``` - -### 2.10 导出学生信息 -- **接口路径**: POST `/xg/studentInfo/export` -- **权限标识**: `xg:studentInfo:export` -- **功能描述**: 导出学生信息Excel文件 - -#### 请求参数 -```json -{ - "studentNo": "2023001001", - "name": "张三", - "classCode": "CS2023001", - "collegeCode": "CS", - "enrollmentYear": 2023 -} -``` - -#### 响应数据 -- 直接返回Excel文件流 - -### 2.11 批量导入学生信息 -- **接口路径**: POST `/xg/studentInfo/importData` -- **权限标识**: `xg:studentInfo:import` -- **功能描述**: 批量导入学生信息 - -#### 请求参数 -- **Content-Type**: multipart/form-data -- **file**: Excel文件 -- **updateSupport**: 是否更新已存在数据(true/false) - -#### 响应数据 -```json -{ - "code": 200, - "msg": "导入成功: 10条, 失败: 0条", - "data": "导入成功: 10条, 失败: 0条
详细信息:
1、学号 2023001001 导入成功
2、学号 2023001002 导入成功" -} -``` - -### 2.12 获取导入模板 -- **接口路径**: POST `/xg/studentInfo/importTemplate` -- **权限标识**: `xg:studentInfo:import` -- **功能描述**: 下载学生信息导入模板 - -#### 响应数据 -- 直接返回Excel模板文件流 - -### 2.13 批量更新学生信息状态 -- **接口路径**: PUT `/xg/studentInfo/batchUpdateStatus` -- **权限标识**: `xg:studentInfo:edit` -- **功能描述**: 批量更新学生信息状态 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| ids | string | 是 | 学生ID,多个用逗号分隔 | -| infoStatus | string | 是 | 信息状态:1-正常,2-待审核,3-审核中,4-已驳回,5-已锁定 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "更新成功" -} -``` - -### 2.14 提交学生信息审核 -- **接口路径**: POST `/xg/studentInfo/submitAudit` -- **权限标识**: `xg:studentInfo:audit` -- **功能描述**: 提交学生信息审核 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| studentId | long | 是 | 学生ID | -| batchId | long | 是 | 批次ID | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "提交审核成功" -} -``` - -### 2.15 审核学生信息 -- **接口路径**: POST `/xg/studentInfo/audit` -- **权限标识**: `xg:studentInfo:audit` -- **功能描述**: 审核学生信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| studentId | long | 是 | 学生ID | -| auditResult | string | 是 | 审核结果:PASS-通过,REJECT-驳回 | -| auditComment | string | 否 | 审核意见 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "审核成功" -} -``` - -### 2.16 查询学生统计信息 -- **接口路径**: GET `/xg/studentInfo/statistics` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 查询学生统计信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| collegeCode | string | 否 | 学院代码 | -| classCode | string | 否 | 班级代码 | -| enrollmentYear | integer | 否 | 入学年份 | -| studentStatus | string | 否 | 学籍状态 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "collegeCode": "CS", - "collegeName": "计算机学院", - "totalCount": 120, - "maleCount": 80, - "femaleCount": 40, - "activeCount": 115, - "suspendedCount": 3, - "graduatedCount": 2, - "poorFamilyCount": 15, - "minorityCount": 8, - "disabledCount": 2, - "orphanCount": 1 - } - ] -} -``` - -### 2.17 检查学号是否存在 -- **接口路径**: GET `/xg/studentInfo/checkStudentNo` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 检查学号是否已存在 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| studentNo | string | 是 | 学号 | -| studentId | long | 否 | 学生ID(修改时排除自己) | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": false -} -``` - -### 2.18 检查身份证号是否存在 -- **接口路径**: GET `/xg/studentInfo/checkIdCard` -- **权限标识**: `xg:studentInfo:query` -- **功能描述**: 检查身份证号是否已存在 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| idCard | string | 是 | 身份证号 | -| studentId | long | 否 | 学生ID(修改时排除自己) | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": false -} -``` - -### 2.19 获取学院选项列表 -- **接口路径**: GET `/xg/studentInfo/collegeOptions` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 获取学院选项列表(用于下拉框) -- **更新时间**: 2025-01-12(新增) - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "value": "CS", - "label": "计算机学院", - "code": "CS" - }, - { - "value": "EE", - "label": "电子信息学院", - "code": "EE" - }, - { - "value": "ME", - "label": "机械工程学院", - "code": "ME" - } - ] -} -``` - -### 2.20 获取班级选项列表 -- **接口路径**: GET `/xg/studentInfo/classOptions` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 获取班级选项列表(用于下拉框),支持按学院过滤 -- **更新时间**: 2025-01-12(新增) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| collegeCode | string | 否 | 学院代码(用于过滤) | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "value": "CS2023001", - "label": "计算机2023-1班", - "code": "CS2023001", - "collegeCode": "CS", - "collegeName": "计算机学院" - }, - { - "value": "CS2023002", - "label": "计算机2023-2班", - "code": "CS2023002", - "collegeCode": "CS", - "collegeName": "计算机学院" - } - ] -} -``` - -### 2.21 获取专业选项列表 -- **接口路径**: GET `/xg/studentInfo/majorOptions` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 获取专业选项列表(用于下拉框),支持按学院过滤 -- **更新时间**: 2025-01-12(新增) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| collegeCode | string | 否 | 学院代码(用于过滤) | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "value": "CS001", - "label": "计算机科学与技术", - "code": "CS001", - "collegeCode": "CS", - "collegeName": "计算机学院" - }, - { - "value": "CS002", - "label": "软件工程", - "code": "CS002", - "collegeCode": "CS", - "collegeName": "计算机学院" - } - ] -} -``` - -### 2.22 获取学生选项列表 -- **接口路径**: GET `/xg/studentInfo/studentOptions` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 获取学生选项列表(用于下拉选择),支持多种过滤条件 -- **更新时间**: 2025-01-12(新增) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| name | string | 否 | 姓名(模糊查询) | -| classCode | string | 否 | 班级代码(过滤) | -| collegeCode | string | 否 | 学院代码(过滤) | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "value": 1, - "label": "张三(2023001001)", - "studentNo": "2023001001", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院" - }, - { - "value": 2, - "label": "李四(2023001002)", - "studentNo": "2023001002", - "className": "计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院" - } - ] -} -``` - -### 2.23 获取部门下拉树结构 -- **接口路径**: GET `/system/user/deptTree` -- **权限标识**: `xg:studentInfo:list` -- **功能描述**: 获取部门下拉树结构数据 -- **更新时间**: 2025-07-24(更新:添加deptId参数) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| deptId | integer | 否 | 部门ID,用于筛选特定部门下的数据,默认不传则获取所有部门 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "id": 101, - "label": "计算机学院", - "children": [ - { - "id": 1001, - "label": "计算机科学与技术专业" - }, - { - "id": 1002, - "label": "软件工程专业" - } - ] - }, - { - "id": 102, - "label": "电子信息学院", - "children": [ - { - "id": 2001, - "label": "电子信息工程专业" - } - ] - } - ] -} -``` - -## 3. 班级信息管理接口 - -### 3.1 查询班级信息列表 -- **接口路径**: GET `/xg/classInfo/list` -- **权限标识**: `xg:classInfo:list` -- **功能描述**: 分页查询班级信息列表 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| pageNum | integer | 否 | 页码,默认1 | -| pageSize | integer | 否 | 每页大小,默认10 | -| classCode | string | 否 | 班级代码 | -| className | string | 否 | 班级名称(模糊查询) | -| collegeCode | string | 否 | 学院代码 | -| majorCode | string | 否 | 专业代码 | -| grade | string | 否 | 年级 | -| classStatus | string | 否 | 班级状态 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "rows": [ - { - "id": 1, - "classCode": "CS2023001", - "className": "计算机2023-1班", - "classType": "本科", - "grade": "2023", - "enrollmentYear": 2023, - "graduationYear": 2027, - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "collegeCode": "CS", - "collegeName": "计算机学院", - "counselorName": "李老师", - "classTeacherName": "王老师", - "classStatus": "1", - "currentStudentCount": 30, - "maxStudentCount": 35, - "maleCount": 18, - "femaleCount": 12 - } - ], - "total": 1 -} -``` - -### 3.2 获取班级信息详情 -- **接口路径**: GET `/xg/classInfo/{id}` -- **权限标识**: `xg:classInfo:query` -- **功能描述**: 根据ID获取班级详细信息 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| id | long | 是 | 班级ID | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": { - "id": 1, - "classCode": "CS2023001", - "className": "计算机2023-1班", - "classType": "本科", - "grade": "2023", - "enrollmentYear": 2023, - "graduationYear": 2027, - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "collegeCode": "CS", - "collegeName": "计算机学院", - "counselorId": 1, - "counselorName": "李老师", - "classTeacherId": 2, - "classTeacherName": "王老师", - "classStatus": "1", - "currentStudentCount": 30, - "maxStudentCount": 35, - "maleCount": 18, - "femaleCount": 12, - "classDescription": "计算机科学与技术专业2023级1班", - "classNotes": "班级备注信息", - "createTime": "2025-01-12 10:00:00", - "updateTime": "2025-01-12 10:00:00" - } -} -``` - -### 3.3 新增班级信息 -- **接口路径**: POST `/xg/classInfo` -- **权限标识**: `xg:classInfo:add` -- **功能描述**: 新增班级信息 - -#### 请求参数 -```json -{ - "classCode": "CS2023001", - "className": "计算机2023-1班", - "classType": "本科", - "grade": "2023", - "enrollmentYear": 2023, - "graduationYear": 2027, - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "collegeCode": "CS", - "collegeName": "计算机学院", - "counselorId": 1, - "counselorName": "李老师", - "classTeacherId": 2, - "classTeacherName": "王老师", - "maxStudentCount": 35, - "classDescription": "计算机科学与技术专业2023级1班" -} -``` - -#### 响应数据 -```json -{ - "code": 200, - "msg": "新增成功", - "data": 1 -} -``` - -### 3.4 修改班级信息 -- **接口路径**: PUT `/xg/classInfo` -- **权限标识**: `xg:classInfo:edit` -- **功能描述**: 修改班级信息 - -#### 请求参数 -```json -{ - "id": 1, - "classCode": "CS2023001", - "className": "计算机2023-1班", - "classType": "本科", - "grade": "2023", - "enrollmentYear": 2023, - "graduationYear": 2027, - "majorCode": "CS001", - "majorName": "计算机科学与技术", - "collegeCode": "CS", - "collegeName": "计算机学院", - "counselorId": 1, - "counselorName": "李老师", - "classTeacherId": 2, - "classTeacherName": "王老师", - "maxStudentCount": 35, - "classDescription": "计算机科学与技术专业2023级1班" -} -``` - -#### 响应数据 -```json -{ - "code": 200, - "msg": "修改成功" -} -``` - -### 3.5 删除班级信息 -- **接口路径**: DELETE `/xg/classInfo/{ids}` -- **权限标识**: `xg:classInfo:remove` -- **功能描述**: 删除班级信息(支持批量删除) - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| ids | string | 是 | 班级ID,多个用逗号分隔 | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "删除成功" -} -``` - -### 3.6 查询班级选项列表 -- **接口路径**: GET `/xg/classInfo/options` -- **权限标识**: `xg:classInfo:query` -- **功能描述**: 查询班级选项列表(用于下拉框) - -#### 响应数据 -```json -{ - "code": 200, - "msg": "查询成功", - "data": [ - { - "value": 1, - "code": "CS2023001", - "label": "计算机2023-1班", - "text": "CS2023001 - 计算机2023-1班", - "collegeCode": "CS", - "collegeName": "计算机学院", - "grade": "2023", - "enrollmentYear": 2023 - } - ] -} -``` - -### 3.7 更新班级人数统计 -- **接口路径**: PUT `/xg/classInfo/updateStudentCount/{classId}` -- **权限标识**: `xg:classInfo:edit` -- **功能描述**: 更新班级人数统计 - -#### 请求参数 -| 参数名 | 类型 | 必填 | 说明 | -|--------|------|------|------| -| classId | long | 是 | 班级ID | - -#### 响应数据 -```json -{ - "code": 200, - "msg": "更新成功" -} -``` - -## 4. 错误码说明 - -| 错误码 | 说明 | -|--------|------| -| 200 | 操作成功 | -| 400 | 请求参数错误 | -| 401 | 未授权 | -| 403 | 无权限 | -| 404 | 资源不存在 | -| 500 | 服务器内部错误 | - -## 5. 数据字典 - -### 5.1 性别字典 (xg_student_gender) -| 字典值 | 字典标签 | -|--------|----------| -| M | 男 | -| F | 女 | - -### 5.2 学籍状态字典 (xg_student_status) -| 字典值 | 字典标签 | -|--------|----------| -| 1 | 在籍 | -| 2 | 休学 | -| 3 | 复学 | -| 4 | 退学 | -| 5 | 毕业 | -| 6 | 肄业 | -| 7 | 转学 | -| 8 | 其他 | - -### 5.3 信息状态字典 (xg_info_status) -| 字典值 | 字典标签 | -|--------|----------| -| 1 | 正常 | -| 2 | 待审核 | -| 3 | 审核中 | -| 4 | 已驳回 | -| 5 | 已锁定 | - -### 5.4 政治面貌字典 (xg_political_status) -| 字典值 | 字典标签 | -|--------|----------| -| 01 | 中共党员 | -| 02 | 中共预备党员 | -| 03 | 共青团员 | -| 04 | 民革党员 | -| 05 | 民盟盟员 | -| 06 | 民建会员 | -| 07 | 民进会员 | -| 08 | 农工党党员 | -| 09 | 致公党党员 | -| 10 | 九三学社社员 | -| 11 | 台盟盟员 | -| 12 | 无党派人士 | -| 13 | 群众 | - -### 5.5 数据来源字典 (xg_data_source) -| 字典值 | 字典标签 | -|--------|----------| -| 1 | 学生录入 | -| 2 | 批量导入 | -| 3 | 系统迁移 | -| 4 | 第三方同步 | - -## 6. 权限说明 - -### 6.1 数据权限控制 -- **超级管理员**: 可查看所有学生信息 -- **学工管理员**: 可查看所有学生信息 -- **二级学院管理员**: 只能查看本学院学生信息 -- **辅导员**: 只能查看负责班级的学生信息 -- **班主任**: 只能查看负责班级的学生信息 -- **学生**: 只能查看自己的信息 - -### 6.2 操作权限控制 -- **新增**: 学工管理员、二级学院管理员 -- **修改**: 学工管理员、二级学院管理员、辅导员、班主任(限制范围) -- **删除**: 学工管理员、二级学院管理员 -- **导入**: 学工管理员、二级学院管理员 -- **导出**: 学工管理员、二级学院管理员、辅导员、班主任 -- **审核**: 学工管理员、二级学院管理员 - -## 7. 注意事项 - -1. 所有接口都需要Bearer Token认证 -2. 删除操作为逻辑删除,不会物理删除数据 -3. 学号和身份证号必须唯一 -4. 批量操作建议单次不超过1000条记录 -5. 导入文件大小限制为10MB -6. 支持多租户数据隔离 -7. 所有时间字段使用yyyy-MM-dd HH:mm:ss格式 -8. 数据权限按照用户角色自动过滤 - ---- - -**文档更新时间**: 2025-01-12 -**文档版本**: 1.1.0 -**维护人员**: Cursor AI -**更新说明**: 新增4个选项接口,修复前端路由参数类型错误问题 \ No newline at end of file diff --git a/web/src/api/xg-xx-bak/classInfo.ts b/web/src/api/xg-xx-bak/classInfo.ts deleted file mode 100644 index 736c1b22..00000000 --- a/web/src/api/xg-xx-bak/classInfo.ts +++ /dev/null @@ -1,316 +0,0 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; -import { ClassInfoVO, ClassInfoQuery, ClassInfoForm, OptionData } from './classInfo/types'; -import { getToken } from '@/utils/auth'; -import { DeptTreeVO, DeptVO } from '@/api/system/dept/types'; -import { treeselect as deptTreeselect, listDeptExcludeChild } from '@/api/system/dept'; - -// 通用类型定义 -interface TableDataInfo { - code: number; - msg: string; - rows: T[]; - total: number; -} - -interface R { - code: number; - msg: string; - data: T; -} - -/** - * 查询班级信息列表 - */ -export const listClassInfo = (query: ClassInfoQuery): AxiosPromise> => { - return request({ - url: '/xg/classInfo/list', - method: 'get', - params: query - }); -}; - -/** - * 查询班级信息详细 - */ -export const getClassInfo = (id: string | number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/' + id, - method: 'get' - }); -}; - -/** - * 新增班级信息 - */ -export const addClassInfo = (data: ClassInfoForm): AxiosPromise> => { - return request({ - url: '/xg/classInfo', - method: 'post', - data: data - }); -}; - -/** - * 修改班级信息 - */ -export const updateClassInfo = (data: ClassInfoForm): AxiosPromise> => { - return request({ - url: '/xg/classInfo', - method: 'put', - data: data - }); -}; - -/** - * 删除班级信息 - */ -export const delClassInfo = (id: string | number | Array): AxiosPromise> => { - return request({ - url: '/xg/classInfo/' + id, - method: 'delete' - }); -}; - -/** - * 导出班级信息 - */ -export const exportClassInfo = (query: ClassInfoQuery): AxiosPromise => { - return request({ - url: '/xg/classInfo/export', - method: 'post', - data: query - }); -}; - -/** - * 根据班级代码查询班级信息 - */ -export const getClassInfoByCode = (classCode: string): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByClassCode/' + classCode, - method: 'get' - }); -}; - -/** - * 根据年级查询班级信息列表 - */ -export const getClassInfoByGrade = (grade: string): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByGrade/' + grade, - method: 'get' - }); -}; - -/** - * 根据学院代码查询班级信息列表 - */ -export const getClassInfoByCollege = (collegeCode: string): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByCollegeCode/' + collegeCode, - method: 'get' - }); -}; - -/** - * 根据专业代码查询班级信息列表 - */ -export const getClassInfoByMajor = (majorCode: string): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByMajorCode/' + majorCode, - method: 'get' - }); -}; - -/** - * 根据辅导员ID查询班级信息列表 - */ -export const getClassInfoByCounselor = (counselorId: number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByCounselorId/' + counselorId, - method: 'get' - }); -}; - -/** - * 根据班主任ID查询班级信息列表 - */ -export const getClassInfoByClassTeacher = (classTeacherId: number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getByClassTeacherId/' + classTeacherId, - method: 'get' - }); -}; - -/** - * 获取班级选项列表(用于下拉框) - */ -export const getClassOptions = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/getClassOptions', // 修正路径:从 /options 改为 /getClassOptions - method: 'get' - }); -}; - -/** - * 更新班级学生统计 - */ -export const updateStudentCount = (classId: number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/updateStudentCount/' + classId, - method: 'post' // 修正HTTP方法:从 put 改为 post - }); -}; - -/** - * 批量更新班级学生统计 - */ -export const batchUpdateStudentCount = (classIds: number[]): AxiosPromise> => { - return request({ - url: '/xg/classInfo/batchUpdateStudentCount', - method: 'post', // 修正HTTP方法:从 put 改为 post - data: classIds - }); -}; - -/** - * 启用班级 - */ -export const enableClass = (id: number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/enable/' + id, - method: 'post' // 修正HTTP方法:从 put 改为 post - }); -}; - -/** - * 禁用班级 - */ -export const disableClass = (id: number): AxiosPromise> => { - return request({ - url: '/xg/classInfo/disable/' + id, - method: 'post' // 修正HTTP方法:从 put 改为 post - }); -}; - -// ================================ -// 统计数据接口 - 新增 -// ================================ - -/** - * 获取班级信息统计概览 - */ -export const getClassStatistics = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/statistics', - method: 'get' - }); -}; - -/** - * 统计各学院班级数量 - */ -export const countClassByCollege = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/statistics/college', - method: 'get' - }); -}; - -/** - * 统计各年级班级数量 - */ -export const countClassByGrade = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/statistics/grade', - method: 'get' - }); -}; - -/** - * 统计各专业班级数量 - */ -export const countClassByMajor = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/statistics/major', - method: 'get' - }); -}; - -/** - * 统计班级状态分布 - */ -export const countClassByStatus = (): AxiosPromise> => { - return request({ - url: '/xg/classInfo/statistics/status', - method: 'get' - }); -}; - -/** - * 获取学院选项 - */ -export const getCollegeOptions = (): AxiosPromise> => { - return request({ - url: '/xg/studentInfo/options/colleges', - method: 'get' - }); -}; - -/** - * 从系统部门获取学院选项(二级学院) - */ -export const getDeptCollegeOptions = (): AxiosPromise => { - console.log('直接调用部门树API,避免treeselect参数问题'); - return request({ - url: '/system/dept/treeselect', - method: 'get' - }); -}; - -/** - * 从系统部门获取专业选项(学院的下级部门) - */ -export const getDeptMajorOptions = (deptId: string | number): AxiosPromise => { - // 确保deptId是有效的数字ID - if (!deptId || isNaN(Number(deptId))) { - console.error('Invalid deptId:', deptId); - return Promise.reject(new Error('无效的部门ID')); - } - - // 直接调用接口,不使用封装的系统API - const numericDeptId = Number(deptId); - console.log('直接调用部门API,使用数字ID:', numericDeptId); - - return request({ - url: '/system/dept/list/exclude/' + numericDeptId, - method: 'get' - }); -}; - -/** - * 获取辅导员选项 - */ -export const getCounselorOptions = (): AxiosPromise> => { - return request({ - url: '/xg/studentInfo/options/counselors', - method: 'get' - }); -}; - -/** - * 获取班主任选项列表 - */ -export const getClassTeacherOptions = (): AxiosPromise> => { - console.log('调用班主任API: /xg/classInfo/teacherOptions'); - return request({ - url: '/xg/classInfo/teacherOptions', - method: 'get', - headers: { - // 确保请求带有认证信息 - 'Authorization': 'Bearer ' + getToken(), - 'clientid': import.meta.env.VITE_APP_CLIENT_ID - } - }); -}; diff --git a/web/src/api/xg-xx-bak/classInfo/types.ts b/web/src/api/xg-xx-bak/classInfo/types.ts deleted file mode 100644 index 0a9c2977..00000000 --- a/web/src/api/xg-xx-bak/classInfo/types.ts +++ /dev/null @@ -1,786 +0,0 @@ -/** - * 班级信息管理模块 - 类型定义 - */ - -/** - * 班级信息 VO - */ -export interface ClassInfoVO { - /** - * 主键ID - */ - id: string | number; - - /** - * 租户编号 - */ - tenantId?: string; - - /** - * 班级代码 - */ - classCode: string; - - /** - * 班级名称 - */ - className: string; - - /** - * 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级 - */ - classType?: string; - - /** - * 年级 - */ - grade: string; - - /** - * 入学年份 - */ - enrollmentYear: number; - - /** - * 毕业年份 - */ - graduationYear?: number; - - /** - * 专业代码 - */ - majorCode?: string; - - /** - * 专业名称 - */ - majorName?: string; - - /** - * 培养方式:全日制、在职、函授、夜大等 - */ - trainingType?: string; - - /** - * 学位类型:本科、专科、研究生等 - */ - degreeType?: string; - - /** - * 学院代码 - */ - collegeCode?: string; - - /** - * 学院名称 - */ - collegeName?: string; - - /** - * 辅导员ID - */ - counselorId?: string | number; - - /** - * 辅导员姓名 - */ - counselorName?: string; - - /** - * 班主任ID - */ - classTeacherId?: string | number; - - /** - * 班主任姓名 - */ - classTeacherName?: string; - - /** - * 班级导师ID - */ - classAdvisorId?: string | number; - - /** - * 班级导师姓名 - */ - classAdvisorName?: string; - - /** - * 班长ID - */ - classMonitorId?: string | number; - - /** - * 班长姓名 - */ - classMonitorName?: string; - - /** - * 副班长ID - */ - deputyMonitorId?: string | number; - - /** - * 副班长姓名 - */ - deputyMonitorName?: string; - - /** - * 班级状态:1-正常,2-暂停,3-毕业,4-解散 - */ - classStatus?: string; - - /** - * 是否毕业:0-未毕业,1-已毕业 - */ - isGraduation?: number; - - /** - * 毕业日期 - */ - graduationDate?: string; - - /** - * 计划容量 - */ - plannedCapacity?: number; - - /** - * 当前学生数量 - */ - currentStudentCount?: number; - - /** - * 最大学生数量 - */ - maxStudentCount?: number; - - /** - * 男生数量 - */ - maleCount?: number; - - /** - * 女生数量 - */ - femaleCount?: number; - - /** - * 在籍学生数量 - */ - activeCount?: number; - - /** - * 转入学生数量 - */ - transferInCount?: number; - - /** - * 转出学生数量 - */ - transferOutCount?: number; - - /** - * 退学学生数量 - */ - dropoutCount?: number; - - /** - * 毕业学生数量 - */ - graduateCount?: number; - - /** - * 办公室位置 - */ - officeLocation?: string; - - /** - * 教室位置 - */ - classLocation?: string; - - /** - * 联系电话 - */ - contactPhone?: string; - - /** - * QQ群号 - */ - qqGroup?: string; - - /** - * 微信群 - */ - wechatGroup?: string; - - /** - * 邮箱 - */ - email?: string; - - /** - * 课程安排 - */ - classSchedule?: string; - - /** - * 班级文化 - */ - classCulture?: string; - - /** - * 班级规章制度 - */ - classRules?: string; - - /** - * 班级描述 - */ - classDescription?: string; - - /** - * 最后统计更新时间 - */ - lastCountUpdate?: string; - - /** - * 扩展字段1 - */ - extField1?: string; - - /** - * 扩展字段2 - */ - extField2?: string; - - /** - * 扩展字段3 - */ - extField3?: string; - - /** - * 备注 - */ - remark?: string; - - /** - * 创建者 - */ - createBy?: string | number; - - /** - * 创建时间 - */ - createTime?: string; - - /** - * 更新者 - */ - updateBy?: string | number; - - /** - * 更新时间 - */ - updateTime?: string; -} - -/** - * 班级信息查询对象 - */ -export interface ClassInfoQuery { - /** - * 当前页数 - */ - pageNum?: number; - - /** - * 每页显示记录数 - */ - pageSize?: number; - - /** - * 班级代码 - */ - classCode?: string; - - /** - * 班级名称 - */ - className?: string; - - /** - * 班级类型 - */ - classType?: string; - - /** - * 年级 - */ - grade?: string; - - /** - * 入学年份 - */ - enrollmentYear?: number; - - /** - * 毕业年份 - */ - graduationYear?: number; - - /** - * 学院代码 - */ - collegeCode?: string; - - /** - * 学院名称 - */ - collegeName?: string; - - /** - * 专业代码 - */ - majorCode?: string; - - /** - * 专业名称 - */ - majorName?: string; - - /** - * 班主任ID - */ - classTeacherId?: string | number; - - /** - * 班主任姓名 - */ - classTeacherName?: string; - - /** - * 辅导员ID - */ - counselorId?: string | number; - - /** - * 辅导员姓名 - */ - counselorName?: string; - - /** - * 班级状态 - */ - classStatus?: string; - - /** - * 班级代码列表(批量查询) - */ - classCodeList?: string[]; - - /** - * 班级状态列表(批量查询) - */ - classStatusList?: string[]; - - /** - * 入学年份开始 - */ - enrollmentYearStart?: number; - - /** - * 入学年份结束 - */ - enrollmentYearEnd?: number; - - /** - * 创建时间开始 - */ - createTimeStart?: string; - - /** - * 创建时间结束 - */ - createTimeEnd?: string; -} - -/** - * 班级信息表单对象 - */ -export interface ClassInfoForm { - /** - * 主键ID - */ - id?: string | number; - - /** - * 班级代码 - */ - classCode?: string; - - /** - * 班级名称 - */ - className?: string; - - /** - * 班级类型 - */ - classType?: string; - - /** - * 年级 - */ - grade?: string; - - /** - * 入学年份 - */ - enrollmentYear?: number; - - /** - * 毕业年份 - */ - graduationYear?: number; - - /** - * 专业代码 - */ - majorCode?: string; - - /** - * 专业名称 - */ - majorName?: string; - - /** - * 培养方式 - */ - trainingType?: string; - - /** - * 学位类型 - */ - degreeType?: string; - - /** - * 学院代码 - */ - collegeCode?: string; - - /** - * 学院名称 - */ - collegeName?: string; - - /** - * 辅导员ID - */ - counselorId?: string | number; - - /** - * 辅导员姓名 - */ - counselorName?: string; - - /** - * 班主任ID - */ - classTeacherId?: string | number; - - /** - * 班主任姓名 - */ - classTeacherName?: string; - - /** - * 班级导师ID - */ - classAdvisorId?: string | number; - - /** - * 班级导师姓名 - */ - classAdvisorName?: string; - - /** - * 班长ID - */ - classMonitorId?: string | number; - - /** - * 班长姓名 - */ - classMonitorName?: string; - - /** - * 副班长ID - */ - deputyMonitorId?: string | number; - - /** - * 副班长姓名 - */ - deputyMonitorName?: string; - - /** - * 班级状态 - */ - classStatus?: string; - - /** - * 是否毕业 - */ - isGraduation?: number; - - /** - * 毕业日期 - */ - graduationDate?: string; - - /** - * 计划容量 - */ - plannedCapacity?: number; - - /** - * 当前学生数量 - */ - currentStudentCount?: number; - - /** - * 最大学生数量 - */ - maxStudentCount?: number; - - /** - * 男生数量 - */ - maleCount?: number; - - /** - * 女生数量 - */ - femaleCount?: number; - - /** - * 在籍学生数量 - */ - activeCount?: number; - - /** - * 转入学生数量 - */ - transferInCount?: number; - - /** - * 转出学生数量 - */ - transferOutCount?: number; - - /** - * 退学学生数量 - */ - dropoutCount?: number; - - /** - * 毕业学生数量 - */ - graduateCount?: number; - - /** - * 办公室位置 - */ - officeLocation?: string; - - /** - * 教室位置 - */ - classLocation?: string; - - /** - * 联系电话 - */ - contactPhone?: string; - - /** - * QQ群号 - */ - qqGroup?: string; - - /** - * 微信群 - */ - wechatGroup?: string; - - /** - * 邮箱 - */ - email?: string; - - /** - * 课程安排 - */ - classSchedule?: string; - - /** - * 班级文化 - */ - classCulture?: string; - - /** - * 班级规章制度 - */ - classRules?: string; - - /** - * 班级描述 - */ - classDescription?: string; - - /** - * 最后统计更新时间 - */ - lastCountUpdate?: string; - - /** - * 扩展字段1 - */ - extField1?: string; - - /** - * 扩展字段2 - */ - extField2?: string; - - /** - * 扩展字段3 - */ - extField3?: string; - - /** - * 备注 - */ - remark?: string; -} - -/** - * 班级统计数据 - */ -export interface ClassStatisticsData { - /** - * 总班级数 - */ - totalCount: number; - - /** - * 正常班级数 - */ - activeCount: number; - - /** - * 已毕业班级数 - */ - graduatedCount: number; - - /** - * 暂停班级数 - */ - suspendedCount: number; - - /** - * 解散班级数 - */ - dissolvedCount: number; - - /** - * 总学生数 - */ - totalStudentCount: number; - - /** - * 平均班级人数 - */ - averageClassSize: number; -} - -/** - * 班级选项数据 - */ -export interface OptionData { - /** - * 值 - */ - value: string | number; - - /** - * 标签 - */ - label: string; - - /** - * 是否禁用 - */ - disabled?: boolean; - - /** - * 扩展数据 - */ - data?: any; -} - -/** - * 班级图表数据 - */ -export interface ClassChartData { - /** - * 类别 - */ - category: string; - - /** - * 数值 - */ - value: number; - - /** - * 颜色 - */ - color?: string; - - /** - * 百分比 - */ - percentage?: number; -} - -/** - * 批量操作结果 - */ -export interface BatchOperationResult { - /** - * 总数 - */ - total: number; - - /** - * 成功数 - */ - success: number; - - /** - * 失败数 - */ - failed: number; - - /** - * 失败的记录 - */ - failedRecords?: Array<{ - id: string | number; - reason: string; - }>; -} diff --git a/web/src/api/xg-xx-bak/collectionBatch.ts b/web/src/api/xg-xx-bak/collectionBatch.ts deleted file mode 100644 index 7307e899..00000000 --- a/web/src/api/xg-xx-bak/collectionBatch.ts +++ /dev/null @@ -1,283 +0,0 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; -import { CollectionBatchVO, CollectionBatchForm, CollectionBatchQuery } from './types'; - -/** - * 查询信息采集批次列表 - */ -export const listCollectionBatch = (query?: CollectionBatchQuery): AxiosPromise => { - return request({ - url: '/xg/collectionBatch/list', - method: 'get', - params: query - }); -}; - -/** - * 查询信息采集批次详细 - */ -export const getCollectionBatch = (id: string | number): AxiosPromise => { - return request({ - url: `/xg/collectionBatch/${id}`, - method: 'get' - }); -}; - -/** - * 根据批次编码查询批次信息 - */ -export const getCollectionBatchByCode = (batchCode: string): AxiosPromise => { - return request({ - url: `/xg/collectionBatch/code/${batchCode}`, - method: 'get' - }); -}; - -/** - * 新增信息采集批次 - */ -export const addCollectionBatch = (data: CollectionBatchForm) => { - return request({ - url: '/xg/collectionBatch', - method: 'post', - data: data - }); -}; - -/** - * 修改信息采集批次 - */ -export const updateCollectionBatch = (data: CollectionBatchForm) => { - return request({ - url: '/xg/collectionBatch', - method: 'put', - data: data - }); -}; - -/** - * 删除信息采集批次 - */ -export const delCollectionBatch = (ids: string | number | Array) => { - return request({ - url: `/xg/collectionBatch/${ids}`, - method: 'delete' - }); -}; - -/** - * 导出信息采集批次 - */ -export const exportCollectionBatch = (query?: CollectionBatchQuery) => { - return request({ - url: '/xg/collectionBatch/export', - method: 'post', - data: query - }); -}; - -/** - * 查询用户权限内的批次列表 - */ -export const getUserPermissionBatches = (): AxiosPromise => { - return request({ - url: '/xg/collectionBatch/userPermission', - method: 'get' - }); -}; - -/** - * 查询活跃的批次列表 - */ -export const getActiveBatches = (): AxiosPromise => { - return request({ - url: '/xg/collectionBatch/active', - method: 'get' - }); -}; - -/** - * 查询即将开始的批次列表 - */ -export const getUpcomingBatches = (): AxiosPromise => { - return request({ - url: '/xg/collectionBatch/upcoming', - method: 'get' - }); -}; - -/** - * 查询即将结束的批次列表 - */ -export const getEndingSoonBatches = (): AxiosPromise => { - return request({ - url: '/xg/collectionBatch/endingSoon', - method: 'get' - }); -}; - -/** - * 开始批次 - */ -export const startBatch = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/start/${batchId}`, - method: 'post' - }); -}; - -/** - * 暂停批次 - */ -export const pauseBatch = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/pause/${batchId}`, - method: 'post' - }); -}; - -/** - * 恢复批次 - */ -export const resumeBatch = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/resume/${batchId}`, - method: 'post' - }); -}; - -/** - * 结束批次 - */ -export const endBatch = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/end/${batchId}`, - method: 'post' - }); -}; - -/** - * 复制批次 - */ -export const copyBatch = (batchId: string | number, newBatchCode: string, newBatchName: string) => { - return request({ - url: `/xg/collectionBatch/copy/${batchId}`, - method: 'post', - data: { - newBatchCode, - newBatchName - } - }); -}; - -/** - * 获取批次统计信息 - */ -export const getBatchStatistics = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/statistics/${batchId}`, - method: 'get' - }); -}; - -/** - * 获取整体统计信息 - */ -export const getOverallStatistics = () => { - return request({ - url: '/xg/collectionBatch/statistics/overall', - method: 'get' - }); -}; - -/** - * 获取批次完成度统计 - */ -export const getBatchCompletionStatistics = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/statistics/completion/${batchId}`, - method: 'get' - }); -}; - -/** - * 获取批次多维度统计 - */ -export const getBatchDimensionStatistics = (batchId: string | number, dimension: string) => { - return request({ - url: `/xg/collectionBatch/statistics/dimension/${batchId}`, - method: 'get', - params: { dimension } - }); -}; - -/** - * 批量更新批次状态 - */ -export const batchUpdateStatus = (batchIds: Array, status: string) => { - return request({ - url: '/xg/collectionBatch/batchUpdateStatus', - method: 'post', - data: { - batchIds, - status - } - }); -}; - -/** - * 检查批次是否可编辑 - */ -export const checkBatchEditable = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/checkEditable/${batchId}`, - method: 'get' - }); -}; - -/** - * 检查批次是否可删除 - */ -export const checkBatchDeletable = (batchId: string | number) => { - return request({ - url: `/xg/collectionBatch/checkDeletable/${batchId}`, - method: 'get' - }); -}; - -/** - * 获取可用批次选项 - */ -export const getAvailableBatches = () => { - return request({ - url: '/xg/collectionBatch/available', - method: 'get' - }); -}; - -/** - * 导入批次数据 - */ -export const importBatchData = (file: File) => { - const formData = new FormData(); - formData.append('file', file); - return request({ - url: '/xg/collectionBatch/import', - method: 'post', - data: formData, - headers: { - 'Content-Type': 'multipart/form-data' - } - }); -}; - -/** - * 下载批次数据导入模板 - */ -export const downloadBatchTemplate = () => { - return request({ - url: '/xg/collectionBatch/importTemplate', - method: 'post', - responseType: 'blob' - }); -}; diff --git a/web/src/api/xg-xx-bak/statistics.ts b/web/src/api/xg-xx-bak/statistics.ts deleted file mode 100644 index 4ea8d282..00000000 --- a/web/src/api/xg-xx-bak/statistics.ts +++ /dev/null @@ -1,501 +0,0 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; - -// ========== 统计分析相关类型定义 ========== - -// 统计查询参数 -export interface StatisticsQuery { - pageNum?: number; - pageSize?: number; - configName?: string; - configType?: string; - dimensionType?: string; - isEnabled?: boolean; - createTime?: string[]; -} - -// 统计分析查询参数 -export interface StatisticsAnalysisQuery { - statisticsType?: string; - dimension?: string; - field?: string; - groupBy?: string; - conditions?: Record; - startTime?: string; - endTime?: string; - collegeIds?: number[]; - majorIds?: number[]; - classIds?: number[]; - grades?: string[]; - genders?: string[]; - politicalStatuses?: string[]; - nationalities?: string[]; - studentStatuses?: string[]; - trainingTypes?: string[]; - useCache?: boolean; -} - -// 统计配置视图对象 -export interface StatisticsConfigVo { - id?: number; - configName?: string; - configType?: string; - dimensionType?: string; - queryConditions?: string; - displaySettings?: string; - chartType?: string; - isEnabled?: boolean; - sortOrder?: number; - remark?: string; - createBy?: number; - createTime?: string; - updateBy?: number; - updateTime?: string; -} - -// 统计配置业务对象 -export interface StatisticsConfigBo { - id?: number; - configName?: string; - configType?: string; - dimensionType?: string; - queryConditions?: string; - displaySettings?: string; - chartType?: string; - isEnabled?: boolean; - sortOrder?: number; - remark?: string; -} - -// 统计结果视图对象 -export interface StatisticsResultVo { - title?: string; - type?: string; - dimension?: string; - data?: Array>; - total?: number; - statisticsTime?: string; - fromCache?: boolean; - cacheKey?: string; - extra?: Record; - chartConfig?: Record; - groupData?: Record>>; - summary?: Record; -} - -// 统计报表视图对象 -export interface StatisticsReportVo { - reportType?: string; - title?: string; - description?: string; - data?: Array>; - summary?: Record; - generateTime?: string; - metadata?: { - total: number; - conditions: Record; - }; -} - -// 统计缓存信息 -export interface StatisticsCacheInfo { - key?: string; - hitCount?: number; - missCount?: number; - hitRate?: number; - size?: number; - lastAccessTime?: string; - createTime?: string; - expireTime?: string; -} - -// 导出参数 -export interface StatisticsExportQuery { - dimension?: string; - format?: 'excel' | 'csv'; - includeChart?: boolean; - conditions?: Record; - reportType?: string; -} - -// ========== 统计配置管理API ========== - -// 查询统计配置列表 -export function listStatisticsConfig(query: StatisticsQuery): AxiosPromise { - return request({ - url: '/xg/statisticsConfig/list', - method: 'get', - params: query - }); -} - -// 获取统计配置详情 -export function getStatisticsConfig(id: number): AxiosPromise { - return request({ - url: `/xg/statisticsConfig/${id}`, - method: 'get' - }); -} - -// 新增统计配置 -export function addStatisticsConfig(data: StatisticsConfigBo): AxiosPromise { - return request({ - url: '/xg/statisticsConfig', - method: 'post', - data: data - }); -} - -// 修改统计配置 -export function updateStatisticsConfig(data: StatisticsConfigBo): AxiosPromise { - return request({ - url: '/xg/statisticsConfig', - method: 'put', - data: data - }); -} - -// 删除统计配置 -export function delStatisticsConfig(ids: number[]): AxiosPromise { - return request({ - url: `/xg/statisticsConfig/${ids}`, - method: 'delete' - }); -} - -// 导出统计配置 -export function exportStatisticsConfig(query: StatisticsQuery): AxiosPromise { - return request({ - url: '/xg/statisticsConfig/export', - method: 'post', - data: query - }); -} - -// 启用/禁用统计配置 -export function changeStatisticsConfigStatus(id: number, status: boolean): AxiosPromise { - return request({ - url: `/xg/statisticsConfig/changeStatus`, - method: 'put', - data: { id, isEnabled: status } - }); -} - -// ========== 统计分析API ========== - -// 获取统计概览 -export function getStatisticsOverview(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/overview', - method: 'get' - }); -} - -// 按维度统计 - 学院统计 -export function getCollegeStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/college', - method: 'get', - params: query - }); -} - -// 按维度统计 - 专业统计 -export function getMajorStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/major', - method: 'get', - params: query - }); -} - -// 按维度统计 - 班级统计 -export function getClassStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/class', - method: 'get', - params: query - }); -} - -// 按维度统计 - 年级统计 -export function getGradeStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/grade', - method: 'get', - params: query - }); -} - -// 按维度统计 - 性别统计 -export function getGenderStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/gender', - method: 'get', - params: query - }); -} - -// 按维度统计 - 年龄统计 -export function getAgeStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/age', - method: 'get', - params: query - }); -} - -// 按维度统计 - 政治面貌统计 -export function getPoliticalStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/political', - method: 'get', - params: query - }); -} - -// 按维度统计 - 民族统计 -export function getNationStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/nation', - method: 'get', - params: query - }); -} - -// 按维度统计 - 生源地统计 -export function getSourceRegionStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/sourceRegion', - method: 'get', - params: query - }); -} - -// 按维度统计 - 血型统计 -export function getBloodTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/bloodType', - method: 'get', - params: query - }); -} - -// 按维度统计 - 宗教信仰统计 -export function getReligionStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/religion', - method: 'get', - params: query - }); -} - -// 按维度统计 - 学籍状态统计 -export function getStudentStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/studentStatus', - method: 'get', - params: query - }); -} - -// 按维度统计 - 培养方式统计 -export function getTrainingTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/trainingType', - method: 'get', - params: query - }); -} - -// 高级统计 - 身高统计 -export function getHeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/height', - method: 'get', - params: query - }); -} - -// 高级统计 - 体重统计 -export function getWeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/weight', - method: 'get', - params: query - }); -} - -// 多维度组合统计 -export function getMultiDimensionStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/multiDimension', - method: 'post', - data: query - }); -} - -// 时间趋势统计 -export function getTimeTrendStatistics(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/timeTrend', - method: 'get', - params: query - }); -} - -// ========== 统计报表API ========== - -// 生成学生信息汇总报表 -export function generateStudentSummaryReport(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/report/studentSummary', - method: 'post', - data: query - }); -} - -// 生成班级统计报表 -export function generateClassStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/report/classStatistics', - method: 'post', - data: query - }); -} - -// 生成学院统计报表 -export function generateCollegeStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/report/collegeStatistics', - method: 'post', - data: query - }); -} - -// 生成困难学生统计报表 -export function generateDifficultStudentReport(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/report/difficultStudent', - method: 'post', - data: query - }); -} - -// 生成特殊群体统计报表 -export function generateSpecialGroupReport(query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/report/specialGroup', - method: 'post', - data: query - }); -} - -// ========== 统计导出API ========== - -// 导出统计结果 -export function exportStatisticsResult(query: StatisticsExportQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/export', - method: 'post', - data: query, - responseType: 'blob' - }); -} - -// 导出统计报表 -export function exportStatisticsReport(query: StatisticsExportQuery): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/exportReport', - method: 'post', - data: query, - responseType: 'blob' - }); -} - -// ========== 统计缓存API ========== - -// 获取缓存统计信息 -export function getCacheStatistics(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/cache/info', - method: 'get' - }); -} - -// 清空统计缓存 -export function clearStatisticsCache(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/cache/clear', - method: 'delete' - }); -} - -// 预热统计缓存 -export function warmupStatisticsCache(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/cache/warmup', - method: 'post' - }); -} - -// ========== 辅助API ========== - -// 获取统计维度选项 -export function getStatisticsDimensionOptions(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/dimensionOptions', - method: 'get' - }); -} - -// 获取图表类型选项 -export function getChartTypeOptions(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/chartTypeOptions', - method: 'get' - }); -} - -// 获取学院选项 -export function getCollegeOptions(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/collegeOptions', - method: 'get' - }); -} - -// 获取专业选项 -export function getMajorOptions(collegeCode?: string): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/majorOptions', - method: 'get', - params: { collegeCode } - }); -} - -// 获取班级选项 -export function getClassOptions(majorCode?: string): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/classOptions', - method: 'get', - params: { majorCode } - }); -} - -// 获取年级选项 -export function getGradeOptions(): AxiosPromise { - return request({ - url: '/xg/statisticsAnalysis/gradeOptions', - method: 'get' - }); -} - -// 执行统计配置 -export function executeStatisticsConfig(configId: number, query: StatisticsAnalysisQuery): AxiosPromise { - return request({ - url: `/xg/statisticsAnalysis/executeConfig/${configId}`, - method: 'post', - data: query - }); -} diff --git a/web/src/api/xg-xx-bak/student.ts b/web/src/api/xg-xx-bak/student.ts deleted file mode 100644 index 349b051b..00000000 --- a/web/src/api/xg-xx-bak/student.ts +++ /dev/null @@ -1,454 +0,0 @@ -import request from '@/utils/request'; -import { AxiosPromise } from 'axios'; -import { getToken } from '@/utils/auth'; - -// 学生信息数据类型 -export interface StudentInfo { - id?: number; - studentNo?: string; - name?: string; - nameEnglish?: string; - formerName?: string; - namePinyin?: string; - gender?: string; - birthDate?: string; - idCard?: string; - phone?: string; - email?: string; - nation?: string; - politicalStatus?: string; - maritalStatus?: string; - religion?: string; - photoUrl?: string; - photoPath?: string; - majorCode?: string; - majorName?: string; - classCode?: string; - className?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; - enrollmentYear?: number; - enrollmentDate?: string; - schoolSystem?: number; - educationLevel?: string; - trainingType?: string; - admissionCategory?: string; - sourceRegion?: string; - middleSchool?: string; - studentStatus?: string; - infoStatus?: string; - counselorName?: string; - classTeacherName?: string; - qq?: string; - wechat?: string; - dormitoryBuilding?: string; - dormitoryRoom?: string; - homeAddress?: string; - currentAddress?: string; - postalCode?: string; - householdRegisterType?: string; - hukouLocation?: string; - height?: number; - weight?: number; - bloodType?: string; - healthStatus?: string; - specialCondition?: string; - medicalHistory?: string; - allergies?: string; - disabilityType?: string; - disabilityLevel?: string; - emergencyContactName?: string; - emergencyContactPhone?: string; - emergencyContactRelation?: string; - fatherName?: string; - fatherPhone?: string; - fatherWorkUnit?: string; - motherName?: string; - motherPhone?: string; - motherWorkUnit?: string; - guardianName?: string; - guardianPhone?: string; - guardianRelation?: string; - familyIncome?: string; - familyEconomicStatus?: string; - familyMembers?: number; - bankCardNo?: string; - bankName?: string; - bankBranch?: string; - cardHolderName?: string; - isPoorStudent?: number; - isMinority?: number; - isDisabled?: number; - isOrphan?: number; - isLeftBehindChild?: number; - isSingleChild?: number; - hasLoan?: number; - loanAmount?: number; - specialties?: string; - awards?: string; - violations?: string; - socialActivities?: string; - dataSource?: string; - lastAuditTime?: string; - isComplete?: number; - completionRate?: number; - extField1?: string; - extField2?: string; - extField3?: string; - extField4?: string; - extField5?: string; - remark?: string; - createTime?: string; - updateTime?: string; -} - -// 查询参数类型 -export interface StudentQuery { - pageNum?: number; - pageSize?: number; - studentNo?: string; - name?: string; - gender?: string; - idCard?: string; - majorCode?: string; - majorName?: string; - classCode?: string; - className?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; - enrollmentYear?: number; - studentStatus?: string; - infoStatus?: string; - counselorId?: number; - classTeacherId?: number; -} - -// 统计数据类型 -export interface StatisticsData { - totalCount?: number; - activeCount?: number; - completeCount?: number; - pendingCount?: number; - maleCount?: number; - femaleCount?: number; -} - -// 选项数据类型 -export interface OptionData { - value: string | number; - label: string; - code?: string; - [key: string]: any; -} - -// 查询学生信息列表 -export function listStudents(query: StudentQuery): AxiosPromise { - return request({ - url: '/xg/studentInfo/list', - method: 'get', - params: query - }); -} - -// 获取学生信息详情 -export function getStudent(id: number): AxiosPromise { - return request({ - url: `/xg/studentInfo/${id}`, - method: 'get' - }); -} - -// 根据学号查询学生信息 -export function getStudentByNo(studentNo: string): AxiosPromise { - return request({ - url: `/xg/studentInfo/studentNo/${studentNo}`, - method: 'get' - }); -} - -// 根据身份证号查询学生信息 -export function getStudentByIdCard(idCard: string): AxiosPromise { - return request({ - url: `/xg/studentInfo/idCard/${idCard}`, - method: 'get' - }); -} - -// 根据班级代码查询学生列表 -export function getStudentsByClass(classCode: string): AxiosPromise { - return request({ - url: `/xg/studentInfo/class/${classCode}`, - method: 'get' - }); -} - -// 根据学院代码查询学生列表 -export function getStudentsByCollege(collegeCode: string): AxiosPromise { - return request({ - url: `/xg/studentInfo/college/${collegeCode}`, - method: 'get' - }); -} - -// 新增学生信息 -export function addStudent(data: StudentInfo): AxiosPromise { - return request({ - url: '/xg/studentInfo', - method: 'post', - data: data - }); -} - -// 修改学生信息 -export function updateStudent(data: StudentInfo): AxiosPromise { - return request({ - url: '/xg/studentInfo', - method: 'put', - data: data - }); -} - -// 删除学生信息 -export function delStudent(ids: number[]): AxiosPromise { - return request({ - url: `/xg/studentInfo/${ids.join(',')}`, - method: 'delete' - }); -} - -// 导出学生信息 -export function exportStudents(query: StudentQuery): AxiosPromise { - return request({ - url: '/xg/studentInfo/export', - method: 'post', - data: query, - responseType: 'blob' - }); -} - -// 批量导入学生信息 -export function importStudents(data: any): AxiosPromise { - return request({ - url: '/xg/studentInfo/import', - method: 'post', - data: data - }); -} - -// 获取导入模板 -export function getImportTemplate(): AxiosPromise { - return request({ - url: '/xg/studentInfo/importTemplate', - method: 'post', - responseType: 'blob' - }); -} - -// 批量更新学生信息状态 -export function batchUpdateInfoStatus(studentIds: number[], infoStatus: string): AxiosPromise { - return request({ - url: '/xg/studentInfo/batchUpdateInfoStatus', - method: 'put', - data: { studentIds, infoStatus } - }); -} - -// 批量更新学生学籍状态 -export function batchUpdateStudentStatus(studentIds: number[], studentStatus: string): AxiosPromise { - return request({ - url: '/xg/studentInfo/batchUpdateStudentStatus', - method: 'put', - data: { studentIds, studentStatus } - }); -} - -// 审核学生信息 -export function auditStudent(studentId: number, auditStatus: string, auditRemark?: string): AxiosPromise { - return request({ - url: `/xg/studentInfo/${studentId}/audit`, - method: 'put', - params: { auditStatus, auditRemark } - }); -} - -// 批量审核学生信息 -export function batchAuditStudents(studentIds: number[], auditStatus: string, auditRemark?: string): AxiosPromise { - return request({ - url: '/xg/studentInfo/batchAudit', - method: 'put', - data: { studentIds, auditStatus, auditRemark } - }); -} - -// ================================ -// 统计相关接口 -// ================================ - -// 获取统计概览 -export function getStatisticsOverview(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/overview', - method: 'get' - }); -} - -// 统计各学院学生数量 -export function getCollegeStatistics(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/college', - method: 'get' - }); -} - -// 统计各年级学生数量 -export function getGradeStatistics(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/grade', - method: 'get' - }); -} - -// 统计各专业学生数量 -export function getMajorStatistics(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/major', - method: 'get' - }); -} - -// 统计学籍状态分布 -export function getStudentStatusStatistics(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/studentStatus', - method: 'get' - }); -} - -// 统计信息完整度分布 -export function getCompletionRateStatistics(): AxiosPromise { - return request({ - url: '/xg/studentInfo/statistics/completionRate', - method: 'get' - }); -} - -// 查询信息不完整的学生列表 -export function getIncompleteStudents(): AxiosPromise { - return request({ - url: '/xg/studentInfo/incomplete', - method: 'get' - }); -} - -// 查询待审核的学生列表 -export function getPendingAuditStudents(): AxiosPromise { - return request({ - url: '/xg/studentInfo/pendingAudit', - method: 'get' - }); -} - -// 生成学生信息报表 -export function generateReport(reportType: string, params?: any): AxiosPromise { - return request({ - url: `/xg/studentInfo/report/${reportType}`, - method: 'get', - params: params - }); -} - -// ================================ -// 选项数据接口 -// ================================ - -// 获取学院选项 -export function getCollegeOptions(): AxiosPromise { - return request({ - url: '/xg/studentInfo/options/colleges', - method: 'get' - }); -} - -// 获取专业选项 -export function getMajorOptions(collegeCode?: string): AxiosPromise { - return request({ - url: '/xg/studentInfo/options/majors', - method: 'get', - params: { collegeCode } - }); -} - -// 获取班级选项 -export function getClassOptions(majorCode?: string): AxiosPromise { - return request({ - url: '/xg/studentInfo/options/classes', - method: 'get', - params: { majorCode } - }); -} - -// 获取辅导员选项 -export function getCounselorOptions(): AxiosPromise { - return request({ - url: '/xg/studentInfo/options/counselors', - method: 'get' - }); -} - -// 获取班主任选项 -export function getClassTeacherOptions(): AxiosPromise { - console.log('调用班主任API: /xg/classInfo/teacherOptions'); - return request({ - url: '/xg/classInfo/teacherOptions', - method: 'get', - headers: { - // 确保请求带有认证信息 - 'Authorization': 'Bearer ' + getToken(), - 'clientid': import.meta.env.VITE_APP_CLIENT_ID - } - }); -} - -// 检查学号是否存在 -export function checkStudentNo(studentNo: string, studentId?: number): AxiosPromise { - return request({ - url: '/xg/studentInfo/checkStudentNo', - method: 'get', - params: { studentNo, studentId } - }); -} - -// 检查身份证号是否存在 -export function checkIdCard(idCard: string, studentId?: number): AxiosPromise { - return request({ - url: '/xg/studentInfo/checkIdCard', - method: 'get', - params: { idCard, studentId } - }); -} - -// 查询重复学号的学生列表 -export function getDuplicateStudentNo(): AxiosPromise { - return request({ - url: '/xg/studentInfo/duplicateStudentNo', - method: 'get' - }); -} - -// 查询重复身份证号的学生列表 -export function getDuplicateIdCard(): AxiosPromise { - return request({ - url: '/xg/studentInfo/duplicateIdCard', - method: 'get' - }); -} - -// 更新学生信息完整度 -export function updateCompletionRate(studentId: number): AxiosPromise { - return request({ - url: `/xg/studentInfo/${studentId}/updateCompletionRate`, - method: 'put' - }); -} diff --git a/web/src/api/xg-xx-bak/types.ts b/web/src/api/xg-xx-bak/types.ts deleted file mode 100644 index b0a798ae..00000000 --- a/web/src/api/xg-xx-bak/types.ts +++ /dev/null @@ -1,675 +0,0 @@ -// 学生信息管理模块类型定义 - -// ========== 信息采集批次管理相关类型 ========== - -// 信息采集批次VO -export interface CollectionBatchVO { - id?: number; - batchCode?: string; - batchName?: string; - batchType?: string; - academicYear?: string; - semester?: string; - batchStatus?: string; - publishTime?: string; - startTime?: string; - endTime?: string; - archiveTime?: string; - targetColleges?: string; - targetGrades?: string; - targetMajors?: string; - requiredFields?: string; - optionalFields?: string; - auditLevels?: string; - totalStudents?: number; - submittedCount?: number; - approvedCount?: number; - rejectedCount?: number; - completionRate?: number; - // 新增统计字段 - studentCount?: number; // 兼容性字段,映射到 totalStudents - pendingCount?: number; // 待提交数量 - description?: string; - editPermissions?: string; - auditPermissions?: string; - viewPermissions?: string; - autoReminder?: number; - reminderFrequency?: number; - allowModifyAfterSubmit?: number; - createTime?: string; - updateTime?: string; - createBy?: number; - updateBy?: number; -} - -// 信息采集批次表单 -export interface CollectionBatchForm { - id?: number; - batchCode?: string; - batchName?: string; - batchType?: string; - academicYear?: string; - semester?: string; - batchStatus?: string; - publishTime?: string; - startTime?: string; - endTime?: string; - archiveTime?: string; - targetColleges?: string; - targetGrades?: string; - targetMajors?: string; - requiredFields?: string; - optionalFields?: string; - auditLevels?: string; - description?: string; - editPermissions?: string; - auditPermissions?: string; - viewPermissions?: string; - autoReminder?: number; - reminderFrequency?: number; - allowModifyAfterSubmit?: number; -} - -// 信息采集批次查询参数 -export interface CollectionBatchQuery { - pageNum?: number; - pageSize?: number; - batchCode?: string; - batchName?: string; - batchType?: string; - academicYear?: string; - semester?: string; - batchStatus?: string; - targetColleges?: string; - targetGrades?: string; - targetMajors?: string; - publishTimeStart?: string; - publishTimeEnd?: string; - startTimeStart?: string; - startTimeEnd?: string; - endTimeStart?: string; - endTimeEnd?: string; - description?: string; -} - -// 批次统计信息 -export interface BatchStatistics { - totalBatches?: number; - activeBatches?: number; - completedBatches?: number; - draftBatches?: number; - totalStudents?: number; - submittedCount?: number; - approvedCount?: number; - rejectedCount?: number; - completionRate?: number; - averageCompletionTime?: number; -} - -// 批次完成度统计 -export interface BatchCompletionStatistics { - batchId?: number; - batchName?: string; - totalStudents?: number; - submittedCount?: number; - approvedCount?: number; - rejectedCount?: number; - pendingCount?: number; - completionRate?: number; - submitRate?: number; - approvalRate?: number; - collegeStatistics?: CollegeCompletionStatistics[]; -} - -// 学院完成度统计 -export interface CollegeCompletionStatistics { - collegeId?: number; - collegeName?: string; - totalStudents?: number; - submittedCount?: number; - approvedCount?: number; - rejectedCount?: number; - pendingCount?: number; - completionRate?: number; - submitRate?: number; - approvalRate?: number; -} - -// 批次多维度统计 -export interface BatchDimensionStatistics { - dimension?: string; - dimensionName?: string; - items?: DimensionStatisticsItem[]; -} - -// 维度统计项 -export interface DimensionStatisticsItem { - key?: string; - label?: string; - count?: number; - percentage?: number; -} - -// ========== 学生信息相关类型 ========== - -// 学生信息完整数据结构 -export interface StudentInfoVo { - id?: number; - studentNo?: string; - idCard?: string; - name?: string; - nameEnglish?: string; - formerName?: string; - namePinyin?: string; - gender?: string; - birthDate?: string; - nation?: string; - politicalStatus?: string; - maritalStatus?: string; - religion?: string; - photoUrl?: string; - photoPath?: string; - studentStatus?: string; - enrollmentYear?: number; - enrollmentDate?: string; - schoolSystem?: number; - educationLevel?: string; - trainingType?: string; - majorCode?: string; - majorName?: string; - classCode?: string; - className?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; - counselorId?: number; - counselorName?: string; - classTeacherId?: number; - classTeacherName?: string; - phone?: string; - email?: string; - qq?: string; - wechat?: string; - dormBuilding?: string; - dormRoom?: string; - homeAddress?: string; - emergencyContact?: string; - emergencyPhone?: string; - emergencyRelation?: string; - fatherName?: string; - fatherPhone?: string; - fatherJob?: string; - motherName?: string; - motherPhone?: string; - motherJob?: string; - familyIncome?: string; - familyMembers?: number; - height?: number; - weight?: number; - bloodType?: string; - healthStatus?: string; - allergies?: string; - medicalHistory?: string; - bankCardNo?: string; - bankName?: string; - bankBranch?: string; - cardholderName?: string; - isFromPoorFamily?: boolean; - isMinority?: boolean; - isDisabled?: boolean; - isOrphan?: boolean; - isLeftBehind?: boolean; - isOnlyChild?: boolean; - specialTalents?: string; - awards?: string; - violations?: string; - socialActivities?: string; - infoStatus?: string; - dataSource?: string; - lastBatchId?: number; - lastAuditTime?: string; - isComplete?: boolean; - completionRate?: number; - remark?: string; - createBy?: number; - createTime?: string; - updateBy?: number; - updateTime?: string; - createDept?: number; - tenantId?: string; - deleted?: boolean; -} - -// 学生信息查询参数 -export interface StudentQueryBo { - pageNum?: number; - pageSize?: number; - studentNo?: string; - name?: string; - gender?: string; - idCard?: string; - nation?: string; - politicalStatus?: string; - majorCode?: string; - majorName?: string; - classCode?: string; - className?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; - enrollmentYear?: number; - studentStatus?: string; - infoStatus?: string; - counselorId?: number; - classTeacherId?: number; - phone?: string; - email?: string; - dormBuilding?: string; - dormRoom?: string; - isFromPoorFamily?: boolean; - isMinority?: boolean; - isDisabled?: boolean; - isOrphan?: boolean; - isComplete?: boolean; - completionRateMin?: number; - completionRateMax?: number; - createTimeBegin?: string; - createTimeEnd?: string; - updateTimeBegin?: string; - updateTimeEnd?: string; -} - -// 学生信息新增/编辑参数 -export interface StudentInfoBo { - id?: number; - studentNo?: string; - idCard?: string; - name?: string; - nameEnglish?: string; - formerName?: string; - namePinyin?: string; - gender?: string; - birthDate?: string; - nation?: string; - politicalStatus?: string; - maritalStatus?: string; - religion?: string; - photoUrl?: string; - photoPath?: string; - studentStatus?: string; - enrollmentYear?: number; - enrollmentDate?: string; - schoolSystem?: number; - educationLevel?: string; - trainingType?: string; - majorCode?: string; - majorName?: string; - classCode?: string; - className?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; - counselorId?: number; - counselorName?: string; - classTeacherId?: number; - classTeacherName?: string; - phone?: string; - email?: string; - qq?: string; - wechat?: string; - dormBuilding?: string; - dormRoom?: string; - homeAddress?: string; - emergencyContact?: string; - emergencyPhone?: string; - emergencyRelation?: string; - fatherName?: string; - fatherPhone?: string; - fatherJob?: string; - motherName?: string; - motherPhone?: string; - motherJob?: string; - familyIncome?: string; - familyMembers?: number; - height?: number; - weight?: number; - bloodType?: string; - healthStatus?: string; - allergies?: string; - medicalHistory?: string; - bankCardNo?: string; - bankName?: string; - bankBranch?: string; - cardholderName?: string; - isFromPoorFamily?: boolean; - isMinority?: boolean; - isDisabled?: boolean; - isOrphan?: boolean; - isLeftBehind?: boolean; - isOnlyChild?: boolean; - specialTalents?: string; - awards?: string; - violations?: string; - socialActivities?: string; - infoStatus?: string; - dataSource?: string; - remark?: string; -} - -// 统计数据结构 -export interface StatisticsOverview { - totalCount?: number; - activeCount?: number; - completeCount?: number; - pendingCount?: number; - maleCount?: number; - femaleCount?: number; - graduatedCount?: number; - suspendedCount?: number; - poorFamilyCount?: number; - minorityCount?: number; - disabledCount?: number; - orphanCount?: number; -} - -// 学院统计数据 -export interface CollegeStatistics { - collegeCode?: string; - collegeName?: string; - totalCount?: number; - maleCount?: number; - femaleCount?: number; - activeCount?: number; - suspendedCount?: number; - graduatedCount?: number; - poorFamilyCount?: number; - minorityCount?: number; - disabledCount?: number; - orphanCount?: number; -} - -// 年级统计数据 -export interface GradeStatistics { - grade?: string; - count?: number; - maleCount?: number; - femaleCount?: number; - activeCount?: number; -} - -// 专业统计数据 -export interface MajorStatistics { - majorCode?: string; - majorName?: string; - count?: number; - collegeCode?: string; - collegeName?: string; -} - -// 学籍状态统计数据 -export interface StudentStatusStatistics { - studentStatus?: string; - count?: number; - statusName?: string; -} - -// 信息完整度统计数据 -export interface CompletionRateStatistics { - rateRange?: string; - count?: number; - percentage?: number; -} - -// 选项数据结构 -export interface OptionItem { - value: string | number; - label: string; - code?: string; - disabled?: boolean; - children?: OptionItem[]; - [key: string]: any; -} - -// 学院选项 -export interface CollegeOption extends OptionItem { - collegeCode?: string; - collegeName?: string; -} - -// 专业选项 -export interface MajorOption extends OptionItem { - majorCode?: string; - majorName?: string; - collegeCode?: string; - collegeName?: string; -} - -// 班级选项 -export interface ClassOption extends OptionItem { - classCode?: string; - className?: string; - majorCode?: string; - majorName?: string; - collegeCode?: string; - collegeName?: string; - grade?: string; -} - -// 教师选项 -export interface TeacherOption extends OptionItem { - teacherId?: number; - teacherName?: string; - phone?: string; - email?: string; - department?: string; -} - -// 表格列配置 -export interface TableColumn { - prop: string; - label: string; - width?: number | string; - minWidth?: number | string; - fixed?: boolean | string; - align?: 'left' | 'center' | 'right'; - sortable?: boolean | string; - showOverflowTooltip?: boolean; - formatter?: (row: any, column: any, cellValue: any, index: number) => string; - render?: (row: any, column: any, cellValue: any, index: number) => any; -} - -// 搜索表单配置 -export interface SearchFormItem { - prop: string; - label: string; - type: 'input' | 'select' | 'date' | 'daterange' | 'number' | 'switch' | 'cascader'; - placeholder?: string; - options?: OptionItem[]; - width?: number | string; - span?: number; - rules?: any[]; - clearable?: boolean; - multiple?: boolean; - filterable?: boolean; - remote?: boolean; - remoteMethod?: (query: string) => void; - props?: any; - format?: string; - valueFormat?: string; - rangeSeparator?: string; - startPlaceholder?: string; - endPlaceholder?: string; -} - -// 表单配置 -export interface FormItem { - prop: string; - label: string; - type: 'input' | 'select' | 'date' | 'number' | 'switch' | 'textarea' | 'upload' | 'cascader' | 'radio' | 'checkbox'; - placeholder?: string; - options?: OptionItem[]; - width?: number | string; - span?: number; - rules?: any[]; - required?: boolean; - clearable?: boolean; - multiple?: boolean; - filterable?: boolean; - remote?: boolean; - remoteMethod?: (query: string) => void; - props?: any; - format?: string; - valueFormat?: string; - maxlength?: number; - showWordLimit?: boolean; - rows?: number; - autosize?: boolean | { minRows: number; maxRows: number }; - accept?: string; - listType?: 'text' | 'picture' | 'picture-card'; - limit?: number; - action?: string; - headers?: any; - data?: any; - beforeUpload?: (file: File) => boolean | Promise; - onSuccess?: (response: any, file: File, fileList: any[]) => void; - onError?: (error: any, file: File, fileList: any[]) => void; - onRemove?: (file: File, fileList: any[]) => void; - disabled?: boolean; - readonly?: boolean; - size?: 'large' | 'default' | 'small'; -} - -// 批量操作配置 -export interface BatchOperation { - key: string; - label: string; - type: 'primary' | 'success' | 'warning' | 'danger' | 'info'; - icon?: string; - permission?: string; - confirm?: boolean; - confirmMessage?: string; - handler: (selectedRows: any[], selectedIds: any[]) => void; -} - -// 操作按钮配置 -export interface ActionButton { - key: string; - label: string; - type: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'; - icon?: string; - permission?: string; - show?: (row: any) => boolean; - disabled?: (row: any) => boolean; - confirm?: boolean; - confirmMessage?: string | ((row: any) => string); - handler: (row: any, index: number) => void; -} - -// 统计卡片配置 -export interface StatisticsCard { - title: string; - value: number | string; - icon: string; - color: string; - trend?: { - type: 'up' | 'down'; - value: number | string; - label: string; - }; - action?: { - label: string; - handler: () => void; - }; -} - -// 图表配置 -export interface ChartConfig { - type: 'bar' | 'line' | 'pie' | 'doughnut' | 'radar'; - title?: string; - data: any[]; - xField?: string; - yField?: string; - seriesField?: string; - colorField?: string; - colors?: string[]; - legend?: boolean; - tooltip?: boolean; - label?: boolean; - height?: number; - width?: number; - padding?: number | number[]; - meta?: any; - interactions?: any[]; - annotations?: any[]; -} - -// 导入配置 -export interface ImportConfig { - templateUrl: string; - uploadUrl: string; - maxSize: number; - allowedTypes: string[]; - requiredFields: string[]; - fieldMapping: { [key: string]: string }; - validateRules: { [key: string]: any[] }; - beforeUpload?: (file: File) => boolean | Promise; - onProgress?: (percent: number) => void; - onSuccess?: (response: any) => void; - onError?: (error: any) => void; -} - -// 导出配置 -export interface ExportConfig { - filename: string; - sheetName: string; - columns: { - prop: string; - label: string; - width?: number; - formatter?: (value: any, row: any) => string; - }[]; - beforeExport?: (data: any[]) => any[]; - onSuccess?: () => void; - onError?: (error: any) => void; -} - -// 审核配置 -export interface AuditConfig { - statusOptions: OptionItem[]; - remarkRequired: boolean; - maxRemarkLength: number; - batchAuditEnabled: boolean; - autoNotify: boolean; - notifyTemplate: string; -} - -// 权限配置 -export interface PermissionConfig { - list: string; - query: string; - add: string; - edit: string; - remove: string; - export: string; - import: string; - audit: string; - statistics: string; - batchUpdate: string; -} - -// 页面配置 -export interface PageConfig { - title: string; - breadcrumb: string[]; - permissions: PermissionConfig; - searchForm: SearchFormItem[]; - tableColumns: TableColumn[]; - formItems: FormItem[]; - batchOperations: BatchOperation[]; - actionButtons: ActionButton[]; - statisticsCards: StatisticsCard[]; - chartConfigs: ChartConfig[]; - importConfig: ImportConfig; - exportConfig: ExportConfig; - auditConfig: AuditConfig; -} diff --git a/web/src/views/xg-xx-bak/classInfo/README.md b/web/src/views/xg-xx-bak/classInfo/README.md deleted file mode 100644 index 72a34bbe..00000000 --- a/web/src/views/xg-xx-bak/classInfo/README.md +++ /dev/null @@ -1,246 +0,0 @@ -# 班级信息管理模块 - -## 📋 模块说明 - -- **模块名称**: 班级信息管理 (Class Information Management) -- **模块简称**: classInfo -- **对应后端**: backend/ruoyi-modules/ruoyi-xg-xx/ -- **对应API**: web/src/api/xg-xx/classInfo.ts - -## 🎯 功能概述 - -班级信息管理模块提供完整的班级信息管理功能,包括: - -### 📊 统计概览 - -- 总班级数统计 -- 正常班级数统计 -- 总学生数统计 -- 平均学生数统计 - -### 🔍 查询功能 - -- 班级代码、班级名称模糊查询 -- 年级、学院、专业级联查询 -- 班级类型、班级状态筛选 -- 班主任姓名查询 - -### 📝 基础管理 - -- 班级信息新增、修改、删除 -- 班级信息详情查看 -- 班级信息批量导出 - -### 👥 人员配置 - -- 班主任、辅导员配置 -- 班干部信息管理(班长、学习委员、生活委员等) -- 联系方式管理 - -### 📈 统计功能 - -- 学生数量统计更新 -- 批量统计刷新 -- 实时数据同步 - -## 🎨 页面设计 - -### 页面布局 - -- **搜索区域**: 8个搜索条件,支持组合查询 -- **统计卡片**: 4个统计指标,渐变色彩设计 -- **表格区域**: 完整的班级信息展示 -- **操作按钮**: 查看、编辑、删除、统计更新 - -### 对话框设计 - -- **新增/编辑**: 分页签设计(基本信息、人员配置、联系方式) -- **详情查看**: 描述列表展示完整信息 -- **响应式布局**: 适配不同屏幕尺寸 - -## 🔧 技术特性 - -### 前端技术 - -- **Vue 3.5.13** + **TypeScript 5.8.3** -- **Element Plus** UI组件库 -- **Composition API** 组合式API -- **响应式设计** 适配多端 - -### 样式设计 - -- **参考后勤管理模块** 保持风格一致 -- **渐变色卡片** 美观的统计展示 -- **悬停效果** 良好的交互体验 -- **操作按钮** 图标化设计 - -### 数据处理 - -- **级联选择** 学院-专业联动 -- **表单验证** 完整的输入校验 -- **状态管理** 响应式数据更新 -- **错误处理** 友好的错误提示 - -## 📋 API接口 - -### 16个标准API接口 - -#### 基础CRUD接口 - -1. `GET /list` - 查询班级信息列表 -2. `POST /export` - 导出班级信息列表 -3. `GET /{id}` - 获取班级信息详情 -4. `POST /` - 新增班级信息 -5. `PUT /` - 修改班级信息 -6. `DELETE /{ids}` - 删除班级信息 - -#### 业务查询接口 - -7. `GET /getByClassCode/{classCode}` - 根据班级代码查询 -8. `GET /getByGrade/{grade}` - 根据年级查询 -9. `GET /getByCollegeCode/{collegeCode}` - 根据学院代码查询 -10. `GET /getByMajorCode/{majorCode}` - 根据专业代码查询 -11. `GET /getByCounselorId/{counselorId}` - 根据辅导员ID查询 -12. `GET /getByClassTeacherId/{classTeacherId}` - 根据班主任ID查询 - -#### 辅助功能接口 - -13. `GET /getClassOptions` - 获取班级选项列表 -14. `POST /updateStudentCount/{id}` - 更新班级学生统计 -15. `POST /batchUpdateStudentCount` - 批量更新学生统计 -16. `POST /enable/{id}` 和 `POST /disable/{id}` - 启用/禁用班级 - -## 🎯 权限控制 - -### 权限编码 - -- `xg:classInfo:list` - 班级信息查询 -- `xg:classInfo:query` - 班级信息详情 -- `xg:classInfo:add` - 班级信息新增 -- `xg:classInfo:edit` - 班级信息修改 -- `xg:classInfo:remove` - 班级信息删除 -- `xg:classInfo:export` - 班级信息导出 - -### 按钮权限 - -- 所有操作按钮都配置了对应的权限控制 -- 使用 `v-hasPermi` 指令进行权限验证 -- 无权限时自动隐藏相关按钮 - -## 📊 数据字典 - -### 班级类型 (xg_class_type) - -- `regular` - 普通班级 -- `honor` - 荣誉班级 -- `experimental` - 实验班级 -- `special` - 特殊班级 - -### 班级状态 (xg_class_status) - -- `1` - 正常 -- `2` - 暂停 -- `3` - 毕业 -- `4` - 解散 - -### 年级选项 (xg_grade_options) - -- 支持动态配置年级选项 -- 适配不同学制需求 - -## 🔄 数据流程 - -### 查询流程 - -1. 用户输入查询条件 -2. 前端组装查询参数 -3. 调用列表查询API -4. 后端返回分页数据 -5. 前端渲染表格和统计 - -### 新增/修改流程 - -1. 用户填写表单信息 -2. 前端表单验证 -3. 调用新增/修改API -4. 后端业务处理 -5. 返回操作结果 -6. 刷新列表和统计 - -### 统计更新流程 - -1. 用户点击统计更新 -2. 调用统计更新API -3. 后端重新计算学生数 -4. 更新班级统计信息 -5. 返回最新统计数据 - -## 🎨 样式规范 - -### 色彩设计 - -- **主色调**: 蓝色系 (#409eff) -- **统计卡片**: 渐变色设计 -- **状态标签**: 语义化颜色 -- **交互效果**: 悬停和点击反馈 - -### 布局规范 - -- **页面间距**: 8px 外边距 -- **组件间距**: 10px 组件间距 -- **表格样式**: 斑马纹和悬停效果 -- **按钮样式**: 图标化小按钮 - -### 响应式设计 - -- **搜索区域**: 4列布局,支持响应式 -- **统计卡片**: 4列布局,移动端自适应 -- **表格列**: 固定宽度和自适应结合 -- **对话框**: 固定宽度,内容自适应 - -## 📝 使用说明 - -### 基本操作 - -1. **查询班级**: 使用搜索条件筛选班级信息 -2. **新增班级**: 点击"新增班级"按钮,填写班级信息 -3. **修改班级**: 点击表格行的"编辑"按钮 -4. **查看详情**: 双击表格行或点击"查看"按钮 -5. **删除班级**: 选择班级后点击"删除"按钮 - -### 高级功能 - -1. **批量操作**: 选择多个班级进行批量删除 -2. **导出数据**: 根据查询条件导出Excel文件 -3. **统计更新**: 手动更新班级学生统计数据 -4. **级联查询**: 学院-专业联动查询 - -### 注意事项 - -- 班级代码必须唯一,系统会自动校验 -- 删除班级前请确认该班级下无学生信息 -- 统计数据会定期自动更新,也可手动刷新 -- 导出功能会根据当前查询条件生成文件 - -## 🚀 扩展功能 - -### 计划功能 - -- 班级学生管理集成 -- 班级活动管理 -- 班级成绩统计 -- 班级考勤管理 - -### 技术优化 - -- 虚拟滚动优化大数据量 -- 缓存机制提升查询性能 -- 实时数据推送 -- 移动端适配优化 - ---- - -**📅 创建时间**: 2025-01-01 -**👨‍💻 开发者**: Cursor AI -**📝 版本**: v1.0.0 -**🔄 更新**: 持续迭代中 diff --git a/web/src/views/xg-xx-bak/classInfo/index.vue b/web/src/views/xg-xx-bak/classInfo/index.vue deleted file mode 100644 index bdcbaf9c..00000000 --- a/web/src/views/xg-xx-bak/classInfo/index.vue +++ /dev/null @@ -1,1288 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/README.md b/web/src/views/xg-xx-bak/collectionBatch/README.md deleted file mode 100644 index 7710244d..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/README.md +++ /dev/null @@ -1,307 +0,0 @@ -# 信息采集批次管理前端应用 - -## 📋 概述 - -信息采集批次管理模块是学工管理系统的重要组成部分,用于管理学生信息采集的批次流程,包括批次创建、状态管理、权限配置、统计分析等功能。 - -## 🏗️ 项目结构 - -``` -web/src/views/xg-xx/collectionBatch/ -├── components/ # 组件目录 -│ ├── BatchActions.vue # 批次操作组件 -│ ├── BatchStatusTag.vue # 批次状态标签组件 -│ ├── BatchTypeTag.vue # 批次类型标签组件 -│ ├── ProgressBar.vue # 进度条组件 -│ └── SearchForm.vue # 搜索表单组件 -├── index.vue # 批次列表页面 -├── form.vue # 批次编辑表单页面 -├── detail.vue # 批次详情页面 -├── statistics.vue # 批次统计页面 -├── permission.vue # 权限配置页面 -├── route.ts # 路由配置 -└── README.md # 使用文档 -``` - -## 🎯 功能特性 - -### 1. 批次列表管理 - -- ✅ 批次列表展示(支持分页) -- ✅ 多条件搜索过滤 -- ✅ 批次状态和类型标签展示 -- ✅ 完成进度可视化 -- ✅ 批次操作(新增、编辑、删除) - -### 2. 批次表单管理 - -- ✅ 批次新增和编辑 -- ✅ 分组表单设计(基本信息、时间设置、目标设置等) -- ✅ 表单验证 -- ✅ 保存和发布功能 - -### 3. 批次详情查看 - -- ✅ 批次详细信息展示 -- ✅ 卡片式布局 -- ✅ 实时状态更新 -- ✅ 批次操作按钮 - -### 4. 统计分析 - -- ✅ 批次统计数据展示 -- ✅ 图表可视化(ECharts) -- ✅ 学院完成情况统计 -- ✅ 多维度数据分析 - -### 5. 权限配置 - -- ✅ 角色权限管理 -- ✅ 批量权限配置 -- ✅ 权限有效期设置 -- ✅ 权限状态管理 - -## 🛠️ 技术栈 - -- **Vue 3.5.13** - 前端框架 -- **TypeScript 5.8.3** - 类型支持 -- **Element Plus** - UI组件库 -- **ECharts** - 图表库 -- **Vue Router** - 路由管理 -- **Axios** - HTTP请求 - -## 📦 组件说明 - -### BatchStatusTag.vue - -批次状态标签组件,用于显示批次的当前状态。 - -```vue - -``` - -**Props:** - -- `status`: 批次状态(draft, published, active, paused, ended, archived) -- `showIcon`: 是否显示图标 -- `effect`: 标签效果(dark, light, plain) - -### BatchTypeTag.vue - -批次类型标签组件,用于显示批次的类型。 - -```vue - -``` - -**Props:** - -- `type`: 批次类型(student_info, scholarship, evaluation, other) -- `showIcon`: 是否显示图标 -- `effect`: 标签效果 - -### ProgressBar.vue - -进度条组件,用于显示批次的完成进度。 - -```vue - -``` - -**Props:** - -- `current`: 当前完成数量 -- `total`: 总数量 -- `strokeWidth`: 进度条宽度 -- `showText`: 是否显示文本 -- `showDetail`: 是否显示详细信息 - -### BatchActions.vue - -批次操作组件,提供批次相关的操作按钮。 - -```vue - -``` - -**Props:** - -- `batch`: 批次数据对象 - -**Events:** - -- `start`: 开始批次 -- `pause`: 暂停批次 -- `resume`: 恢复批次 -- `end`: 结束批次 -- `copy`: 复制批次 -- `statistics`: 统计分析 -- `permission`: 权限配置 -- `export`: 导出数据 -- `delete`: 删除批次 - -### SearchForm.vue - -搜索表单组件,用于批次列表的搜索过滤。 - -```vue - -``` - -**Events:** - -- `search`: 搜索事件,返回查询参数 -- `reset`: 重置事件 - -## 🚀 使用指南 - -### 1. 批次管理流程 - -1. **创建批次** - - - 点击"新增批次"按钮 - - 填写批次基本信息、时间设置、目标设置等 - - 保存草稿或直接发布 - -2. **管理批次** - - - 在列表中查看批次状态和进度 - - 使用搜索功能快速定位批次 - - 通过操作按钮管理批次状态 - -3. **查看统计** - - - 进入统计页面查看批次数据 - - 查看图表分析和学院完成情况 - - 导出统计报告 - -4. **配置权限** - - 设置不同角色的权限范围 - - 配置权限有效期 - - 批量设置权限 - -### 2. 页面导航 - -- `/xg-xx/collectionBatch` - 批次列表页面 -- `/xg-xx/collectionBatch/add` - 新增批次页面 -- `/xg-xx/collectionBatch/edit?id={id}` - 编辑批次页面 -- `/xg-xx/collectionBatch/detail?id={id}` - 批次详情页面 -- `/xg-xx/collectionBatch/statistics` - 统计分析页面 -- `/xg-xx/collectionBatch/permission` - 权限配置页面 - -### 3. 权限控制 - -系统基于角色和权限进行访问控制: - -- `xg:collectionBatch:list` - 查看批次列表 -- `xg:collectionBatch:add` - 新增批次 -- `xg:collectionBatch:edit` - 编辑批次 -- `xg:collectionBatch:remove` - 删除批次 -- `xg:collectionBatch:query` - 查看批次详情 -- `xg:collectionBatch:export` - 导出批次数据 -- `xg:collectionBatch:statistics` - 查看统计分析 -- `xg:collectionBatch:permission` - 配置权限 - -## 🔧 开发指南 - -### 1. 本地开发 - -```bash -# 安装依赖 -npm install - -# 启动开发服务器 -npm run dev - -# 构建生产版本 -npm run build -``` - -### 2. 代码规范 - -- 使用 TypeScript 进行类型检查 -- 遵循 Vue 3 Composition API 规范 -- 使用 ESLint 进行代码检查 -- 组件命名使用 PascalCase - -### 3. 样式规范 - -- 使用 Element Plus 设计系统 -- 遵循后勤管理模块的颜色和样式规范 -- 使用 Tailwind CSS 类名进行样式定制 -- 响应式设计适配不同屏幕尺寸 - -## 📝 API 接口 - -### 批次管理接口 - -```typescript -// 查询批次列表 -listCollectionBatch(query: CollectionBatchQuery): Promise - -// 获取批次详情 -getCollectionBatch(id: string | number): Promise - -// 新增批次 -addCollectionBatch(data: CollectionBatchForm): Promise - -// 更新批次 -updateCollectionBatch(data: CollectionBatchForm): Promise - -// 删除批次 -delCollectionBatch(ids: string | number | Array): Promise - -// 批次状态操作 -startBatch(batchId: string | number): Promise -pauseBatch(batchId: string | number): Promise -resumeBatch(batchId: string | number): Promise -endBatch(batchId: string | number): Promise - -// 统计分析 -getBatchStatistics(batchId: string | number): Promise -getOverallStatistics(): Promise -``` - -## 🐛 问题排查 - -### 常见问题 - -1. **页面无法访问** - - - 检查路由配置是否正确 - - 确认用户权限是否充足 - -2. **数据加载失败** - - - 检查 API 接口是否正常 - - 确认后端服务是否启动 - -3. **图表显示异常** - - - 检查 ECharts 是否正确引入 - - 确认数据格式是否正确 - -4. **权限配置无效** - - 检查权限标识是否正确 - - 确认用户角色是否匹配 - -### 调试技巧 - -1. 使用浏览器开发者工具查看网络请求 -2. 检查 Console 中的错误信息 -3. 使用 Vue DevTools 调试组件状态 -4. 查看后端日志确认接口调用情况 - -## 📞 技术支持 - -如有问题,请联系开发团队或查看相关文档: - -- 项目文档:`docs/开发文档/API/` -- 后端接口:`backend/ruoyi-modules/ruoyi-xg-xx/` -- 前端代码:`web/src/views/xg-xx/collectionBatch/` - ---- - -**版本信息**:V1.0.0 -**更新时间**:2025-01-17 -**维护团队**:前端开发组 diff --git a/web/src/views/xg-xx-bak/collectionBatch/components/BatchActions.vue b/web/src/views/xg-xx-bak/collectionBatch/components/BatchActions.vue deleted file mode 100644 index 72bedb7f..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/components/BatchActions.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/components/BatchStatusTag.vue b/web/src/views/xg-xx-bak/collectionBatch/components/BatchStatusTag.vue deleted file mode 100644 index 8c8295c5..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/components/BatchStatusTag.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/components/BatchTypeTag.vue b/web/src/views/xg-xx-bak/collectionBatch/components/BatchTypeTag.vue deleted file mode 100644 index f8aa1b78..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/components/BatchTypeTag.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/components/ProgressBar.vue b/web/src/views/xg-xx-bak/collectionBatch/components/ProgressBar.vue deleted file mode 100644 index a12d0d29..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/components/ProgressBar.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/components/SearchForm.vue b/web/src/views/xg-xx-bak/collectionBatch/components/SearchForm.vue deleted file mode 100644 index 0d107781..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/components/SearchForm.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/detail.vue b/web/src/views/xg-xx-bak/collectionBatch/detail.vue deleted file mode 100644 index d568577d..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/detail.vue +++ /dev/null @@ -1,563 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/form.vue b/web/src/views/xg-xx-bak/collectionBatch/form.vue deleted file mode 100644 index 8781eec8..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/form.vue +++ /dev/null @@ -1,478 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/index.vue b/web/src/views/xg-xx-bak/collectionBatch/index.vue deleted file mode 100644 index 95dea99d..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/index.vue +++ /dev/null @@ -1,980 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/permission.vue b/web/src/views/xg-xx-bak/collectionBatch/permission.vue deleted file mode 100644 index ebb10ac7..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/permission.vue +++ /dev/null @@ -1,542 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/route.ts b/web/src/views/xg-xx-bak/collectionBatch/route.ts deleted file mode 100644 index 1f813b58..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/route.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { RouteRecordRaw } from 'vue-router'; - -// 信息采集批次管理路由配置 -export const collectionBatchRoutes: RouteRecordRaw[] = [ - { - path: '/xg-xx/collectionBatch', - name: 'CollectionBatch', - component: () => import('./index.vue'), - meta: { - title: '信息采集批次管理', - icon: 'list', - permissions: ['xg:collectionBatch:list'] - } - }, - { - path: '/xg-xx/collectionBatch/add', - name: 'CollectionBatchAdd', - component: () => import('./form.vue'), - meta: { - title: '新增批次', - activeMenu: '/xg-xx/collectionBatch', - permissions: ['xg:collectionBatch:add'] - }, - hidden: true - }, - { - path: '/xg-xx/collectionBatch/edit', - name: 'CollectionBatchEdit', - component: () => import('./form.vue'), - meta: { - title: '编辑批次', - activeMenu: '/xg-xx/collectionBatch', - permissions: ['xg:collectionBatch:edit'] - }, - hidden: true - }, - { - path: '/xg-xx/collectionBatch/detail', - name: 'CollectionBatchDetail', - component: () => import('./detail.vue'), - meta: { - title: '批次详情', - activeMenu: '/xg-xx/collectionBatch', - permissions: ['xg:collectionBatch:query'] - }, - hidden: true - }, - { - path: '/xg-xx/collectionBatch/statistics', - name: 'CollectionBatchStatistics', - component: () => import('./statistics.vue'), - meta: { - title: '批次统计', - activeMenu: '/xg-xx/collectionBatch', - permissions: ['xg:collectionBatch:statistics'] - }, - hidden: true - }, - { - path: '/xg-xx/collectionBatch/permission', - name: 'CollectionBatchPermission', - component: () => import('./permission.vue'), - meta: { - title: '权限配置', - activeMenu: '/xg-xx/collectionBatch', - permissions: ['xg:collectionBatch:permission'] - }, - hidden: true - } -]; - -export default collectionBatchRoutes; diff --git a/web/src/views/xg-xx-bak/collectionBatch/statistics.vue b/web/src/views/xg-xx-bak/collectionBatch/statistics.vue deleted file mode 100644 index 089c1543..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/statistics.vue +++ /dev/null @@ -1,719 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/collectionBatch/test.vue b/web/src/views/xg-xx-bak/collectionBatch/test.vue deleted file mode 100644 index 44f8a424..00000000 --- a/web/src/views/xg-xx-bak/collectionBatch/test.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/CacheManageDialog.vue b/web/src/views/xg-xx-bak/statistics/components/CacheManageDialog.vue deleted file mode 100644 index 2477648c..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/CacheManageDialog.vue +++ /dev/null @@ -1,526 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/ConfigDetailDialog.vue b/web/src/views/xg-xx-bak/statistics/components/ConfigDetailDialog.vue deleted file mode 100644 index 27ae10d2..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/ConfigDetailDialog.vue +++ /dev/null @@ -1,272 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/ConfigEditDialog.vue b/web/src/views/xg-xx-bak/statistics/components/ConfigEditDialog.vue deleted file mode 100644 index e192adaa..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/ConfigEditDialog.vue +++ /dev/null @@ -1,310 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/ConfigManageDialog.vue b/web/src/views/xg-xx-bak/statistics/components/ConfigManageDialog.vue deleted file mode 100644 index 004375b8..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/ConfigManageDialog.vue +++ /dev/null @@ -1,493 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/ExportDialog.vue b/web/src/views/xg-xx-bak/statistics/components/ExportDialog.vue deleted file mode 100644 index b8867cb9..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/ExportDialog.vue +++ /dev/null @@ -1,271 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/components/StatisticsChart.vue b/web/src/views/xg-xx-bak/statistics/components/StatisticsChart.vue deleted file mode 100644 index 553c15b6..00000000 --- a/web/src/views/xg-xx-bak/statistics/components/StatisticsChart.vue +++ /dev/null @@ -1,521 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/statistics/index.vue b/web/src/views/xg-xx-bak/statistics/index.vue deleted file mode 100644 index 1c559dc9..00000000 --- a/web/src/views/xg-xx-bak/statistics/index.vue +++ /dev/null @@ -1,676 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/AuditDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/AuditDialog.vue deleted file mode 100644 index db0b8e47..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/AuditDialog.vue +++ /dev/null @@ -1,449 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/BatchOperationDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/BatchOperationDialog.vue deleted file mode 100644 index 944d6fb5..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/BatchOperationDialog.vue +++ /dev/null @@ -1,678 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/ImportDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/ImportDialog.vue deleted file mode 100644 index 17c7f747..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/ImportDialog.vue +++ /dev/null @@ -1,529 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/StatisticsChartDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/StatisticsChartDialog.vue deleted file mode 100644 index 3db027d1..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/StatisticsChartDialog.vue +++ /dev/null @@ -1,613 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/StudentDetailDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/StudentDetailDialog.vue deleted file mode 100644 index ca8aa9ff..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/StudentDetailDialog.vue +++ /dev/null @@ -1,756 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/components/StudentEditDialog.vue b/web/src/views/xg-xx-bak/studentInfo/components/StudentEditDialog.vue deleted file mode 100644 index 6bebc9ac..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/components/StudentEditDialog.vue +++ /dev/null @@ -1,1249 +0,0 @@ - - - - - diff --git a/web/src/views/xg-xx-bak/studentInfo/index.vue b/web/src/views/xg-xx-bak/studentInfo/index.vue deleted file mode 100644 index 1128a240..00000000 --- a/web/src/views/xg-xx-bak/studentInfo/index.vue +++ /dev/null @@ -1,962 +0,0 @@ - - - - -