wuzhen提交删除xg-xx前端

This commit is contained in:
zlwu authored and wuzhen committed 2025-07-14 14:32:31 +08:00
1 parent cbae932faa
commit a886333f13
32 files changed
+249 -14105

No files matched your search

-396
View File
@@ -1,396 +0,0 @@
import { BaseEntity, PageQuery } from './types';
/**
* 学年管理 VO
*/
export interface AcademicYearVO {
/**
* 主键ID
*/
id: string | number;
/**
* 租户编号
*/
tenantId: string;
/**
* 学年编码
*/
yearCode: string;
/**
* 学年名称
*/
yearName: string;
/**
* 开始日期
*/
startDate: string;
/**
* 结束日期
*/
endDate: string;
/**
* 是否当前学年:0-否,1-是
*/
isCurrent: boolean;
/**
* 学年状态:1-启用,0-停用
*/
yearStatus: string;
/**
* 学年描述
*/
description?: string;
/**
* 排序序号
*/
sortOrder: number;
/**
* 备注信息
*/
remark?: string;
/**
* 创建者
*/
createBy: string | number;
/**
* 创建时间
*/
createTime: string;
/**
* 更新者
*/
updateBy?: string | number;
/**
* 更新时间
*/
updateTime?: string;
}
/**
* 学年管理 Form
*/
export interface AcademicYearForm extends BaseEntity {
/**
* 主键ID
*/
id?: string | number;
/**
* 学年编码
*/
yearCode?: string;
/**
* 学年名称
*/
yearName?: string;
/**
* 开始日期
*/
startDate?: string;
/**
* 结束日期
*/
endDate?: string;
/**
* 是否当前学年
*/
isCurrent?: boolean;
/**
* 学年状态
*/
yearStatus?: string;
/**
* 学年描述
*/
description?: string;
/**
* 排序序号
*/
sortOrder?: number;
/**
* 备注信息
*/
remark?: string;
}
/**
* 学年管理 Query
*/
export interface AcademicYearQuery extends PageQuery {
/**
* 学年编码
*/
yearCode?: string;
/**
* 学年名称
*/
yearName?: string;
/**
* 是否当前学年
*/
isCurrent?: boolean;
/**
* 学年状态
*/
yearStatus?: string;
/**
* 开始日期范围
*/
startDateRange?: string[];
/**
* 结束日期范围
*/
endDateRange?: string[];
/**
* 创建时间范围
*/
createTimeRange?: string[];
/**
* 日期范围参数
*/
params?: any;
}
/**
* 学期管理 VO
*/
export interface SemesterVO {
/**
* 主键ID
*/
id: string | number;
/**
* 租户编号
*/
tenantId: string;
/**
* 学年ID
*/
academicYearId: string | number;
/**
* 学年名称
*/
academicYearName?: string;
/**
* 学期编码
*/
semesterCode: string;
/**
* 学期名称
*/
semesterName: string;
/**
* 学期类型:1-春季学期,2-秋季学期,3-夏季学期,4-短学期
*/
semesterType: string;
/**
* 开始日期
*/
startDate: string;
/**
* 结束日期
*/
endDate: string;
/**
* 是否当前学期:0-否,1-是
*/
isCurrent: boolean;
/**
* 学期状态:1-启用,0-停用
*/
semesterStatus: string;
/**
* 学期描述
*/
description?: string;
/**
* 排序序号
*/
sortOrder: number;
/**
* 备注信息
*/
remark?: string;
/**
* 创建者
*/
createBy: string | number;
/**
* 创建时间
*/
createTime: string;
/**
* 更新者
*/
updateBy?: string | number;
/**
* 更新时间
*/
updateTime?: string;
}
/**
* 学期管理 Form
*/
export interface SemesterForm extends BaseEntity {
/**
* 主键ID
*/
id?: string | number;
/**
* 学年ID
*/
academicYearId?: string | number;
/**
* 学期编码
*/
semesterCode?: string;
/**
* 学期名称
*/
semesterName?: string;
/**
* 学期类型
*/
semesterType?: string;
/**
* 开始日期
*/
startDate?: string;
/**
* 结束日期
*/
endDate?: string;
/**
* 是否当前学期
*/
isCurrent?: boolean;
/**
* 学期状态
*/
semesterStatus?: string;
/**
* 学期描述
*/
description?: string;
/**
* 排序序号
*/
sortOrder?: number;
/**
* 备注信息
*/
remark?: string;
}
/**
* 学期管理 Query
*/
export interface SemesterQuery extends PageQuery {
/**
* 学年ID
*/
academicYearId?: string | number;
/**
* 学期编码
*/
semesterCode?: string;
/**
* 学期名称
*/
semesterName?: string;
/**
* 学期类型
*/
semesterType?: string;
/**
* 是否当前学期
*/
isCurrent?: boolean;
/**
* 学期状态
*/
semesterStatus?: string;
/**
* 开始日期范围
*/
startDateRange?: string[];
/**
* 结束日期范围
*/
endDateRange?: string[];
/**
* 创建时间范围
*/
createTimeRange?: string[];
/**
* 日期范围参数
*/
params?: any;
}
-152
View File
@@ -1,152 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { AcademicYearVO, AcademicYearForm, AcademicYearQuery } from './academicTypes';
/**
* 查询学年管理列表
* @param query 查询参数
*/
export const listAcademicYear = (query?: AcademicYearQuery): AxiosPromise<AcademicYearVO[]> => {
return request({
url: '/xg-xx/academicYear/list',
method: 'get',
params: query
});
};
/**
* 查询学年管理详细信息
* @param id 学年ID
*/
export const getAcademicYear = (id: string | number): AxiosPromise<AcademicYearVO> => {
return request({
url: `/xg-xx/academicYear/${id}`,
method: 'get'
});
};
/**
* 新增学年管理
* @param data 学年管理数据
*/
export const addAcademicYear = (data: AcademicYearForm) => {
return request({
url: '/xg-xx/academicYear',
method: 'post',
data: data
});
};
/**
* 修改学年管理
* @param data 学年管理数据
*/
export const updateAcademicYear = (data: AcademicYearForm) => {
return request({
url: '/xg-xx/academicYear',
method: 'put',
data: data
});
};
/**
* 删除学年管理
* @param id 学年ID
*/
export const delAcademicYear = (id: string | number | Array<string | number>) => {
return request({
url: `/xg-xx/academicYear/${id}`,
method: 'delete'
});
};
/**
* 导出学年管理列表
* @param query 查询参数
*/
export const exportAcademicYear = (query?: AcademicYearQuery) => {
return request({
url: '/xg-xx/academicYear/export',
method: 'post',
data: query
});
};
/**
* 查询当前学年
*/
export const getCurrentAcademicYear = (): AxiosPromise<AcademicYearVO> => {
return request({
url: '/xg-xx/academicYear/current',
method: 'get'
});
};
/**
* 设置当前学年
* @param id 学年ID
*/
export const setCurrentAcademicYear = (id: string | number) => {
return request({
url: `/xg-xx/academicYear/setCurrent/${id}`,
method: 'put'
});
};
/**
* 查询可用的学年选项
*/
export const getAvailableAcademicYearOptions = (): AxiosPromise<AcademicYearVO[]> => {
return request({
url: '/xg-xx/academicYear/availableOptions',
method: 'get'
});
};
/**
* 校验学年名称是否唯一
* @param yearName 学年名称
* @param id 学年ID
*/
export const checkAcademicYearName = (yearName: string, id?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg-xx/academicYear/checkYearName',
method: 'get',
params: { yearName, id }
});
};
/**
* 校验学年编码是否唯一
* @param yearCode 学年编码
* @param id 学年ID
*/
export const checkAcademicYearCode = (yearCode: string, id?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg-xx/academicYear/checkYearCode',
method: 'get',
params: { yearCode, id }
});
};
/**
* 激活学年
* @param id 学年ID
*/
export const activateAcademicYear = (id: string | number) => {
return request({
url: `/xg-xx/academicYear/activate/${id}`,
method: 'put'
});
};
/**
* 停用学年
* @param id 学年ID
*/
export const deactivateAcademicYear = (id: string | number) => {
return request({
url: `/xg-xx/academicYear/deactivate/${id}`,
method: 'put'
});
};
-194
View File
@@ -1,194 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
* 业务期间查询参数
*/
export interface XgBusinessPeriodQuery {
id?: number;
batchId?: number;
periodName?: string;
periodType?: string;
targetRole?: string;
startTime?: string;
endTime?: string;
status?: string;
enabled?: boolean;
keyword?: string;
batchName?: string;
pageNum?: number;
pageSize?: number;
}
/**
* 业务期间表单
*/
export interface XgBusinessPeriodForm {
id?: number;
batchId?: number;
periodName?: string;
periodType?: string;
targetRole?: string;
startTime?: string;
endTime?: string;
status?: string;
description?: string;
sortOrder?: number;
enabled?: boolean;
}
/**
* 业务期间视图对象
*/
export interface XgBusinessPeriodVO {
id?: number;
batchId?: number;
batchName?: string;
periodName?: string;
periodType?: string;
targetRole?: string;
startTime?: string;
endTime?: string;
status?: string;
description?: string;
sortOrder?: number;
enabled?: boolean;
createTime?: string;
updateTime?: string;
}
/**
* 查询业务期间列表
*/
export const listBusinessPeriod = (query: XgBusinessPeriodQuery): AxiosPromise<XgBusinessPeriodVO[]> => {
return request({
url: '/xg/businessPeriod/list',
method: 'get',
params: query
});
};
/**
* 查询所有业务期间列表(不分页)
*/
export const listAllBusinessPeriod = (query: XgBusinessPeriodQuery): AxiosPromise<XgBusinessPeriodVO[]> => {
return request({
url: '/xg/businessPeriod/listAll',
method: 'get',
params: query
});
};
/**
* 获取业务期间详细信息
*/
export const getBusinessPeriod = (id: string | number): AxiosPromise<XgBusinessPeriodVO> => {
return request({
url: '/xg/businessPeriod/' + id,
method: 'get'
});
};
/**
* 新增业务期间
*/
export const addBusinessPeriod = (data: XgBusinessPeriodForm) => {
return request({
url: '/xg/businessPeriod',
method: 'post',
data: data
});
};
/**
* 修改业务期间
*/
export const updateBusinessPeriod = (data: XgBusinessPeriodForm) => {
return request({
url: '/xg/businessPeriod',
method: 'put',
data: data
});
};
/**
* 删除业务期间
*/
export const delBusinessPeriod = (id: string | number | Array<string | number>) => {
return request({
url: '/xg/businessPeriod/' + id,
method: 'delete'
});
};
/**
* 导出业务期间
*/
export const exportBusinessPeriod = (query: XgBusinessPeriodQuery) => {
return request({
url: '/xg/businessPeriod/export',
method: 'post',
data: query
});
};
/**
* 根据批次ID查询业务期间列表
*/
export const queryByBatchId = (batchId: number): AxiosPromise<XgBusinessPeriodVO[]> => {
return request({
url: '/xg/businessPeriod/byBatch/' + batchId,
method: 'get'
});
};
/**
* 查询当前活跃的业务期间
*/
export const queryActivePeriods = (): AxiosPromise<XgBusinessPeriodVO[]> => {
return request({
url: '/xg/businessPeriod/active',
method: 'get'
});
};
/**
* 检查业务期间是否开放
*/
export const checkPeriodOpen = (batchId: number): AxiosPromise<boolean> => {
return request({
url: '/xg/businessPeriod/checkOpen/' + batchId,
method: 'get'
});
};
/**
* 开启业务期间
*/
export const openPeriod = (id: string | number) => {
return request({
url: '/xg/businessPeriod/open/' + id,
method: 'post'
});
};
/**
* 关闭业务期间
*/
export const closePeriod = (id: string | number) => {
return request({
url: '/xg/businessPeriod/close/' + id,
method: 'post'
});
};
/**
* 校验业务期间时间是否冲突
*/
export const checkPeriodTimeConflict = (data: XgBusinessPeriodForm): AxiosPromise<boolean> => {
return request({
url: '/xg/businessPeriod/checkTimeConflict',
method: 'post',
data: data
});
};
-265
View File
@@ -1,265 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { XgClassCadreVO, XgClassCadreForm, XgClassCadreQuery } from '@/api/xg-xx/types';
// 查询班级干部信息列表
export const listClassCadre = (query: XgClassCadreQuery): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/list',
method: 'get',
params: query
});
};
// 查询班级干部信息详细
export const getClassCadre = (id: string | number): AxiosPromise<XgClassCadreVO> => {
return request({
url: '/xg/classCadre/' + id,
method: 'get'
});
};
// 新增班级干部信息
export const addClassCadre = (data: XgClassCadreForm) => {
return request({
url: '/xg/classCadre',
method: 'post',
data: data
});
};
// 修改班级干部信息
export const updateClassCadre = (data: XgClassCadreForm) => {
return request({
url: '/xg/classCadre',
method: 'put',
data: data
});
};
// 删除班级干部信息
export const delClassCadre = (ids: string | number | Array<string | number>) => {
return request({
url: '/xg/classCadre/' + ids,
method: 'delete'
});
};
// 导出班级干部信息
export const exportClassCadre = (query: XgClassCadreQuery) => {
return request({
url: '/xg/classCadre/export',
method: 'post',
data: query
});
};
// ==================== 业务功能接口 ====================
// 根据班级ID查询班干部列表
export const getCadresByClass = (classId: string | number): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/class/' + classId,
method: 'get'
});
};
// 根据学生ID查询班干部信息
export const getCadresByStudent = (studentId: string | number): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/student/' + studentId,
method: 'get'
});
};
// 查询当前在任班干部列表
export const getCurrentCadres = (classId?: string | number): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/current',
method: 'get',
params: { classId }
});
};
// 根据职务查询班干部
export const getCadreByPosition = (classId: string | number, positionCode: string): AxiosPromise<XgClassCadreVO> => {
return request({
url: '/xg/classCadre/position',
method: 'get',
params: { classId, positionCode }
});
};
// 任命班干部
export const appointCadre = (data: XgClassCadreForm) => {
return request({
url: '/xg/classCadre/appoint',
method: 'post',
data: data
});
};
// 免职班干部
export const dismissCadre = (cadreId: string | number, dismissalReason: string, dismissalDate: string) => {
return request({
url: '/xg/classCadre/dismiss/' + cadreId,
method: 'put',
params: { dismissalReason, dismissalDate }
});
};
// 调任班干部
export const transferCadre = (
cadreId: string | number,
newPositionCode: string,
newPositionName: string,
transferReason: string,
effectiveDate: string
) => {
return request({
url: '/xg/classCadre/transfer/' + cadreId,
method: 'put',
params: { newPositionCode, newPositionName, transferReason, effectiveDate }
});
};
// 续任班干部
export const renewCadre = (cadreId: string | number, newTermDuration: number, renewalReason: string) => {
return request({
url: '/xg/classCadre/renew/' + cadreId,
method: 'put',
params: { newTermDuration, renewalReason }
});
};
// 班干部辞职
export const resignCadre = (cadreId: string | number, resignationReason: string, resignationDate: string) => {
return request({
url: '/xg/classCadre/resign/' + cadreId,
method: 'put',
params: { resignationReason, resignationDate }
});
};
// ==================== 统计查询接口 ====================
// 查询即将到期的班干部列表
export const getExpiringCadres = (days: number = 30): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/expiring',
method: 'get',
params: { days }
});
};
// 查询已到期的班干部列表
export const getExpiredCadres = (): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/expired',
method: 'get'
});
};
// 根据学院查询班干部统计
export const getCadresByCollege = (collegeName: string): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/college/' + collegeName,
method: 'get'
});
};
// 根据年级查询班干部统计
export const getCadresByGrade = (grade: string): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/grade/' + grade,
method: 'get'
});
};
// 查询班干部任期统计
export const getCadreTermStatistics = (startDate: string, endDate: string): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/term-statistics',
method: 'get',
params: { startDate, endDate }
});
};
// 根据职务级别查询班干部
export const getCadresByLevel = (positionLevel: number): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/level/' + positionLevel,
method: 'get'
});
};
// 查询班干部工作表现统计
export const getCadresByPerformance = (performance: string): AxiosPromise<XgClassCadreVO[]> => {
return request({
url: '/xg/classCadre/performance/' + performance,
method: 'get'
});
};
// ==================== 辅助功能接口 ====================
// 检查职务是否已被占用
export const checkPositionOccupied = (classId: string | number, positionCode: string, excludeId?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg/classCadre/check-position',
method: 'get',
params: { classId, positionCode, excludeId }
});
};
// 检查学生是否已有其他职务
export const checkStudentHasOtherPosition = (studentId: string | number, excludeId?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg/classCadre/check-student',
method: 'get',
params: { studentId, excludeId }
});
};
// 批量更新班干部状态
export const batchUpdateCadreStatus = (cadreIds: Array<string | number>, status: string) => {
return request({
url: '/xg/classCadre/batch-status',
method: 'put',
params: { cadreIds: cadreIds.join(','), status }
});
};
// 自动处理到期班干部
export const autoProcessExpiredCadres = () => {
return request({
url: '/xg/classCadre/auto-process-expired',
method: 'post'
});
};
// 发送到期提醒通知
export const sendExpirationReminder = (days: number = 30) => {
return request({
url: '/xg/classCadre/send-reminder',
method: 'post',
params: { days }
});
};
// 导入班干部信息
export const importClassCadre = (data: FormData) => {
return request({
url: '/xg/classCadre/import',
method: 'post',
data: data
});
};
// 获取导入模板
export const importTemplate = () => {
return request({
url: '/xg/classCadre/import-template',
method: 'post'
});
};
-205
View File
@@ -1,205 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ClassInfoVO, ClassInfoForm, ClassInfoQuery, ClassOption, TeacherOption } from './types';
/**
* 查询班级信息列表
* @param query 查询参数
*/
export const listClassInfo = (query?: ClassInfoQuery): AxiosPromise<ClassInfoVO[]> => {
return request({
url: '/xg/classInfo/list',
method: 'get',
params: query
});
};
/**
* 查询班级信息详细信息
* @param id 班级ID
*/
export const getClassInfo = (id: string | number): AxiosPromise<ClassInfoVO> => {
return request({
url: `/xg/classInfo/${id}`,
method: 'get'
});
};
/**
* 新增班级信息
* @param data 班级信息数据
*/
export const addClassInfo = (data: ClassInfoForm) => {
return request({
url: '/xg/classInfo',
method: 'post',
data: data
});
};
/**
* 修改班级信息
* @param data 班级信息数据
*/
export const updateClassInfo = (data: ClassInfoForm) => {
return request({
url: '/xg/classInfo',
method: 'put',
data: data
});
};
/**
* 删除班级信息
* @param id 班级ID
*/
export const delClassInfo = (id: string | number | Array<string | number>) => {
return request({
url: `/xg/classInfo/${id}`,
method: 'delete'
});
};
/**
* 根据班级代码查询班级信息
* @param classCode 班级代码
*/
export const getClassInfoByCode = (classCode: string): AxiosPromise<ClassInfoVO> => {
return request({
url: `/xg/classInfo/byCode/${classCode}`,
method: 'get'
});
};
/**
* 查询学院班级列表
* @param collegeCode 学院代码
*/
export const getClassInfoByCollege = (collegeCode: string): AxiosPromise<ClassInfoVO[]> => {
return request({
url: `/xg/classInfo/byCollege/${collegeCode}`,
method: 'get'
});
};
/**
* 获取班级选项列表
*/
export const getClassInfoOptions = (): AxiosPromise<ClassOption[]> => {
return request({
url: '/xg/classInfo/options',
method: 'get'
});
};
/**
* 检查班级代码是否存在
* @param classCode 班级代码
*/
export const checkClassCode = (classCode: string): AxiosPromise<boolean> => {
return request({
url: '/xg/classInfo/checkClassCode',
method: 'get',
params: { classCode }
});
};
/**
* 更新班级人数统计
* @param classId 班级ID
*/
export const updateClassStudentCount = (classId: string | number) => {
return request({
url: `/xg/classInfo/${classId}/updateCount`,
method: 'put'
});
};
/**
* 获取辅导员选项列表
* @param collegeCode 学院代码(可选)
*/
export const getCounselorOptions = (collegeCode?: string): AxiosPromise<TeacherOption[]> => {
return request({
url: '/xg/classInfo/counselorOptions',
method: 'get',
params: { collegeCode }
});
};
/**
* 获取班主任选项列表
* @param collegeCode 学院代码(可选)
*/
export const getClassTeacherOptions = (collegeCode?: string): AxiosPromise<TeacherOption[]> => {
return request({
url: '/xg/classInfo/classTeacherOptions',
method: 'get',
params: { collegeCode }
});
};
/**
* 导出班级信息
* @param query 查询参数
*/
export const exportClassInfo = (query?: ClassInfoQuery) => {
return request({
url: '/xg/classInfo/export',
method: 'post',
data: query
});
};
/**
* 批量生成班级代码
* @param params 生成参数
*/
export const generateClassCode = (params: {
collegeCode: string;
majorCode: string;
enrollmentYear: number;
classCount: number;
}): AxiosPromise<string[]> => {
return request({
url: '/xg/classInfo/generateClassCode',
method: 'post',
data: params
});
};
/**
* 查询班级学生统计
* @param classId 班级ID
*/
export const getClassStudentStatistics = (
classId: string | number
): AxiosPromise<{
totalCount: number;
maleCount: number;
femaleCount: number;
activeCount: number;
suspendedCount: number;
graduatedCount: number;
}> => {
return request({
url: `/xg/classInfo/${classId}/statistics`,
method: 'get'
});
};
/**
* 获取班级信息总体统计
*/
export const getClassInfoStatistics = (): AxiosPromise<{
totalCount: number;
activeCount: number;
suspendedCount: number;
graduatedCount: number;
averageStudentCount: number;
}> => {
return request({
url: '/xg/classInfo/statistics',
method: 'get'
});
};
-162
View File
@@ -1,162 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { XgCollectionBatchVO, XgCollectionBatchForm, XgCollectionBatchQuery } from './types';
/**
* 查询信息采集批次列表
*/
export const listCollectionBatch = (query: XgCollectionBatchQuery): AxiosPromise<XgCollectionBatchVO[]> => {
return request({
url: '/xg/collectionBatch/list',
method: 'get',
params: query
});
};
/**
* 查询所有信息采集批次列表(不分页)
*/
export const listAllCollectionBatch = (query: XgCollectionBatchQuery): AxiosPromise<XgCollectionBatchVO[]> => {
return request({
url: '/xg/collectionBatch/listAll',
method: 'get',
params: query
});
};
/**
* 查询信息采集批次详细
*/
export const getCollectionBatch = (id: string | number): AxiosPromise<XgCollectionBatchVO> => {
return request({
url: '/xg/collectionBatch/' + id,
method: 'get'
});
};
/**
* 新增信息采集批次
*/
export const addCollectionBatch = (data: XgCollectionBatchForm) => {
return request({
url: '/xg/collectionBatch',
method: 'post',
data: data
});
};
/**
* 修改信息采集批次
*/
export const updateCollectionBatch = (data: XgCollectionBatchForm) => {
return request({
url: '/xg/collectionBatch',
method: 'put',
data: data
});
};
/**
* 删除信息采集批次
*/
export const delCollectionBatch = (id: string | number | Array<string | number>) => {
return request({
url: '/xg/collectionBatch/' + id,
method: 'delete'
});
};
/**
* 导出信息采集批次
*/
export const exportCollectionBatch = (query: XgCollectionBatchQuery) => {
return request({
url: '/xg/collectionBatch/export',
method: 'post',
data: query
});
};
/**
* 获取当前活跃的批次列表
*/
export const getActiveBatches = (): AxiosPromise<XgCollectionBatchVO[]> => {
return request({
url: '/xg/collectionBatch/active',
method: 'get'
});
};
/**
* 发布批次
*/
export const publishBatch = (id: string | number) => {
return request({
url: '/xg/collectionBatch/publish/' + id,
method: 'post'
});
};
/**
* 取消发布批次
*/
export const unpublishBatch = (id: string | number) => {
return request({
url: '/xg/collectionBatch/unpublish/' + id,
method: 'post'
});
};
/**
* 结束批次
*/
export const completeBatch = (id: string | number) => {
return request({
url: '/xg/collectionBatch/complete/' + id,
method: 'post'
});
};
/**
* 复制批次
*/
export const copyBatch = (id: string | number, newBatchName: string, newBatchCode: string) => {
return request({
url: '/xg/collectionBatch/copy/' + id,
method: 'post',
params: {
newBatchName,
newBatchCode
}
});
};
/**
* 获取批次统计信息
*/
export const getBatchStatistics = (id: string | number) => {
return request({
url: '/xg/collectionBatch/statistics/' + id,
method: 'get'
});
};
/**
* 更新批次统计信息
*/
export const updateBatchStatistics = (id: string | number) => {
return request({
url: '/xg/collectionBatch/updateStatistics/' + id,
method: 'post'
});
};
/**
* 获取批次选项列表(用于下拉框)
*/
export const getBatchOptions = () => {
return request({
url: '/xg/collectionBatch/options',
method: 'get'
});
};
-18
View File
@@ -1,18 +0,0 @@
/**
* 学工管理模块 API 入口
*/
// 学生信息管理
export * from './studentInfo';
// 班级信息管理
export * from './classInfo';
// 班级干部管理
export * from './classCadre';
// 学年管理
export * from './academicYear';
// 学期管理
export * from './semester';
// 类型定义
export * from './types';
export * from './academicTypes';
export * from './collectionBatch';
-128
View File
@@ -1,128 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SemesterVO, SemesterForm, SemesterQuery } from './academicTypes';
/**
* 查询学期管理列表
* @param query 查询参数
*/
export const listSemester = (query?: SemesterQuery): AxiosPromise<SemesterVO[]> => {
return request({
url: '/xg-xx/semester/list',
method: 'get',
params: query
});
};
/**
* 查询学期管理详细信息
* @param id 学期ID
*/
export const getSemester = (id: string | number): AxiosPromise<SemesterVO> => {
return request({
url: `/xg-xx/semester/${id}`,
method: 'get'
});
};
/**
* 新增学期管理
* @param data 学期管理数据
*/
export const addSemester = (data: SemesterForm) => {
return request({
url: '/xg-xx/semester',
method: 'post',
data: data
});
};
/**
* 修改学期管理
* @param data 学期管理数据
*/
export const updateSemester = (data: SemesterForm) => {
return request({
url: '/xg-xx/semester',
method: 'put',
data: data
});
};
/**
* 删除学期管理
* @param id 学期ID
*/
export const delSemester = (id: string | number | Array<string | number>) => {
return request({
url: `/xg-xx/semester/${id}`,
method: 'delete'
});
};
/**
* 导出学期管理列表
* @param query 查询参数
*/
export const exportSemester = (query?: SemesterQuery) => {
return request({
url: '/xg-xx/semester/export',
method: 'post',
data: query
});
};
/**
* 根据学年ID查询学期列表
* @param academicYearId 学年ID
*/
export const getSemestersByAcademicYear = (academicYearId: string | number): AxiosPromise<SemesterVO[]> => {
return request({
url: `/xg-xx/semester/getByAcademicYear/${academicYearId}`,
method: 'get'
});
};
/**
* 查询当前学期
*/
export const getCurrentSemester = (): AxiosPromise<SemesterVO> => {
return request({
url: '/xg-xx/semester/current',
method: 'get'
});
};
/**
* 设置当前学期
* @param id 学期ID
*/
export const setCurrentSemester = (id: string | number) => {
return request({
url: `/xg-xx/semester/setCurrent/${id}`,
method: 'put'
});
};
/**
* 查询可用的学期选项
*/
export const getAvailableSemesterOptions = (): AxiosPromise<SemesterVO[]> => {
return request({
url: '/xg-xx/semester/availableOptions',
method: 'get'
});
};
/**
* 校验学期名称是否唯一
* @param semesterName 学期名称
* @param id 学期ID
*/
export const checkSemesterName = (semesterName: string, id?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg-xx/semester/checkSemesterName',
method: 'get',
params: { semesterName, id }
});
};
-478
View File
@@ -1,478 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {
StudentInfoVO,
StudentInfoForm,
StudentInfoQuery,
StudentStatisticsVO,
BatchUpdateStatusForm,
StudentAuditForm,
SubmitAuditForm,
ClassOption,
CollegeOption,
MajorOption,
ImportResult
} from './types';
/**
* 查询学生信息列表
* @param query 查询参数
*/
export const listStudentInfo = (query?: StudentInfoQuery): AxiosPromise<StudentInfoVO[]> => {
return request({
url: '/xg/studentInfo/list',
method: 'get',
params: query
});
};
/**
* 查询学生信息详细信息
* @param id 学生ID
*/
export const getStudentInfo = (id: string | number): AxiosPromise<StudentInfoVO> => {
return request({
url: `/xg/studentInfo/${id}`,
method: 'get'
});
};
/**
* 根据学号查询学生信息
* @param studentNo 学号
*/
export const getStudentInfoByStudentNo = (studentNo: string): AxiosPromise<StudentInfoVO> => {
return request({
url: `/xg/studentInfo/byStudentNo/${studentNo}`,
method: 'get'
});
};
/**
* 根据身份证号查询学生信息
* @param idCard 身份证号
*/
export const getStudentInfoByIdCard = (idCard: string): AxiosPromise<StudentInfoVO> => {
return request({
url: `/xg/studentInfo/byIdCard/${idCard}`,
method: 'get'
});
};
/**
* 查询班级学生列表
* @param classCode 班级代码
*/
export const getStudentInfoByClass = (classCode: string): AxiosPromise<StudentInfoVO[]> => {
return request({
url: `/xg/studentInfo/byClass/${classCode}`,
method: 'get'
});
};
/**
* 查询学院学生列表
* @param collegeCode 学院代码
*/
export const getStudentInfoByCollege = (collegeCode: string): AxiosPromise<StudentInfoVO[]> => {
return request({
url: `/xg/studentInfo/byCollege/${collegeCode}`,
method: 'get'
});
};
/**
* 新增学生信息
* @param data 学生信息数据
*/
export const addStudentInfo = (data: StudentInfoForm) => {
return request({
url: '/xg/studentInfo',
method: 'post',
data: data
});
};
/**
* 修改学生信息
* @param data 学生信息数据
*/
export const updateStudentInfo = (data: StudentInfoForm) => {
return request({
url: '/xg/studentInfo',
method: 'put',
data: data
});
};
/**
* 删除学生信息
* @param id 学生ID
*/
export const delStudentInfo = (id: string | number | Array<string | number>) => {
return request({
url: `/xg/studentInfo/${id}`,
method: 'delete'
});
};
/**
* 导出学生信息
* @param query 查询参数
*/
export const exportStudentInfo = (query?: StudentInfoQuery) => {
return request({
url: '/xg/studentInfo/export',
method: 'post',
data: query
});
};
/**
* 批量导入学生信息
* @param file 文件
* @param updateSupport 是否更新支持
*/
export const importStudentInfo = (file: File, updateSupport: boolean = false): AxiosPromise<ImportResult> => {
const formData = new FormData();
formData.append('file', file);
formData.append('updateSupport', updateSupport.toString());
return request({
url: '/xg/studentInfo/importData',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
};
/**
* 获取导入模板
*/
export const importTemplate = () => {
return request({
url: '/xg/studentInfo/importTemplate',
method: 'post'
});
};
/**
* 批量更新学生信息状态
* @param data 批量更新数据
*/
export const batchUpdateStudentInfoStatus = (data: BatchUpdateStatusForm) => {
return request({
url: '/xg/studentInfo/batchUpdateStatus',
method: 'put',
data: data
});
};
/**
* 提交学生信息审核
* @param data 提交审核数据
*/
export const submitStudentInfoAudit = (data: SubmitAuditForm) => {
return request({
url: '/xg/studentInfo/submitAudit',
method: 'post',
data: data
});
};
/**
* 审核学生信息
* @param data 审核数据
*/
export const auditStudentInfo = (data: StudentAuditForm) => {
return request({
url: '/xg/studentInfo/audit',
method: 'post',
data: data
});
};
/**
* 查询学生统计信息
* @param query 查询参数
*/
export const getStudentStatistics = (query?: {
collegeCode?: string;
classCode?: string;
enrollmentYear?: number;
studentStatus?: string;
}): AxiosPromise<StudentStatisticsVO[]> => {
return request({
url: '/xg/studentInfo/statistics',
method: 'get',
params: query
});
};
/**
* 检查学号是否存在
* @param studentNo 学号
* @param id 学生ID(编辑时传入)
*/
export const checkStudentNo = (studentNo: string, id?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg/studentInfo/checkStudentNo',
method: 'get',
params: { studentNo, id }
});
};
/**
* 检查身份证号是否存在
* @param idCard 身份证号
* @param id 学生ID(编辑时传入)
*/
export const checkIdCard = (idCard: string, id?: string | number): AxiosPromise<boolean> => {
return request({
url: '/xg/studentInfo/checkIdCard',
method: 'get',
params: { idCard, id }
});
};
/**
* 获取班级选项列表
* @param collegeCode 学院代码(可选)
*/
export const getClassOptions = (collegeCode?: string): AxiosPromise<ClassOption[]> => {
return request({
url: '/xg/studentInfo/classOptions',
method: 'get',
params: { collegeCode }
});
};
/**
* 获取学院选项列表
*/
export const getCollegeOptions = (): AxiosPromise<CollegeOption[]> => {
return request({
url: '/xg/studentInfo/collegeOptions',
method: 'get'
});
};
/**
* 获取专业选项列表
* @param collegeCode 学院代码(可选)
*/
export const getMajorOptions = (collegeCode?: string): AxiosPromise<MajorOption[]> => {
return request({
url: '/xg/studentInfo/majorOptions',
method: 'get',
params: { collegeCode }
});
};
/**
* 获取学生选项列表(用于下拉选择)
* @param query 查询参数
*/
export const getStudentOptions = (query?: {
name?: string;
classCode?: string;
collegeCode?: string;
}): AxiosPromise<Array<{ value: string | number; label: string; studentNo?: string; className?: string }>> => {
return request({
url: '/xg/studentInfo/studentOptions',
method: 'get',
params: query
});
};
/**
* 同步学生信息
* @param source 同步来源:1-教务系统,2-招生系统
*/
export const syncStudentInfo = (source: string) => {
return request({
url: '/xg/studentInfo/sync',
method: 'post',
data: { source }
});
};
/**
* 生成学生学号
* @param collegeCode 学院代码
* @param enrollmentYear 入学年份
*/
export const generateStudentNo = (collegeCode: string, enrollmentYear: number): AxiosPromise<string> => {
return request({
url: '/xg/studentInfo/generateStudentNo',
method: 'get',
params: { collegeCode, enrollmentYear }
});
};
// ==================== 批次相关接口 ====================
/**
* 根据批次ID查询学生信息
* @param batchId 批次ID
* @param query 查询参数
*/
export const getStudentsByBatch = (batchId: string | number, query?: StudentInfoQuery): AxiosPromise<StudentInfoVO[]> => {
return request({
url: `/xg/studentInfo/batch/${batchId}`,
method: 'get',
params: query
});
};
/**
* 关联学生到批次
* @param studentId 学生ID
* @param batchId 批次ID
*/
export const associateStudentToBatch = (studentId: string | number, batchId: string | number) => {
return request({
url: '/xg/studentInfo/associateToBatch',
method: 'post',
data: { studentId, batchId }
});
};
/**
* 批量关联学生到批次
* @param studentIds 学生ID数组
* @param batchId 批次ID
*/
export const batchAssociateStudentsToBatch = (studentIds: (string | number)[], batchId: string | number) => {
return request({
url: '/xg/studentInfo/batchAssociateToBatch',
method: 'post',
data: { studentIds, batchId }
});
};
/**
* 提交学生信息到批次
* @param studentId 学生ID
* @param batchId 批次ID
*/
export const submitStudentInfo = (studentId: string | number, batchId: string | number) => {
return request({
url: '/xg/studentInfo/submit',
method: 'post',
data: { studentId, batchId }
});
};
/**
* 撤回学生信息提交
* @param studentId 学生ID
* @param batchId 批次ID
*/
export const withdrawStudentInfo = (studentId: string | number, batchId: string | number) => {
return request({
url: '/xg/studentInfo/withdraw',
method: 'post',
data: { studentId, batchId }
});
};
/**
* 获取学生批次进度
* @param studentId 学生ID
* @param batchId 批次ID
*/
export const getStudentBatchProgress = (studentId: string | number, batchId: string | number) => {
return request({
url: `/xg/studentInfo/batchProgress/${studentId}/${batchId}`,
method: 'get'
});
};
/**
* 批量审核学生信息
* @param studentIds 学生ID数组
* @param batchId 批次ID
* @param approvalStatus 审核状态
* @param approvalComments 审核意见
*/
export const batchAuditStudentInfo = (data: {
studentIds: (string | number)[];
batchId: string | number;
approvalStatus: string;
approvalComments?: string;
}) => {
return request({
url: '/xg/studentInfo/batchAudit',
method: 'post',
data
});
};
/**
* 检查学生编辑权限
* @param studentId 学生ID
* @param batchId 批次ID
*/
export const checkEditPermission = (studentId: string | number, batchId: string | number) => {
return request({
url: `/xg/studentInfo/checkEditPermission/${studentId}/${batchId}`,
method: 'get'
});
};
/**
* 获取学生批次统计信息
* @param batchId 批次ID
*/
export const getStudentBatchStatistics = (batchId: string | number) => {
return request({
url: `/xg/studentInfo/batchStatistics/${batchId}`,
method: 'get'
});
};
/**
* 批量提交学生信息
* @param studentIds 学生ID数组
* @param batchId 批次ID
*/
export const batchSubmitStudentInfo = (studentIds: (string | number)[], batchId: string | number) => {
return request({
url: '/xg/studentInfo/batchSubmit',
method: 'post',
data: { studentIds, batchId }
});
};
/**
* 批量撤回学生信息
* @param studentIds 学生ID数组
* @param batchId 批次ID
*/
export const batchWithdrawStudentInfo = (studentIds: (string | number)[], batchId: string | number) => {
return request({
url: '/xg/studentInfo/batchWithdraw',
method: 'post',
data: { studentIds, batchId }
});
};
/**
* 获取所有学生选项(用于批次关联)
* @param query 查询参数
*/
export const getAllStudentOptions = (query?: {
name?: string;
studentNo?: string;
classCode?: string;
collegeCode?: string;
}): AxiosPromise<Array<{ id: string | number; name: string; studentNo: string; className?: string; collegeName?: string }>> => {
return request({
url: '/xg/studentInfo/allOptions',
method: 'get',
params: query
});
};
-182
View File
@@ -1,182 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
* 学生信息审核查询参数
*/
export interface XgStudentInfoApprovalQuery {
batchId?: number;
studentId?: number;
studentName?: string;
studentNo?: string;
classCode?: string;
className?: string;
collegeCode?: string;
collegeName?: string;
submissionStatus?: string;
approvalStatus?: string;
submissionTimeStart?: string;
submissionTimeEnd?: string;
approvalTimeStart?: string;
approvalTimeEnd?: string;
approvalBy?: number;
approvalByName?: string;
keyword?: string;
pageNum?: number;
pageSize?: number;
}
/**
* 学生信息审核视图对象
*/
export interface XgStudentInfoApprovalVO {
id?: number;
batchId?: number;
batchName?: string;
studentId?: number;
studentName?: string;
studentNo?: string;
classCode?: string;
className?: string;
collegeCode?: string;
collegeName?: string;
majorCode?: string;
majorName?: string;
submissionStatus?: string;
approvalStatus?: string;
submissionTime?: string;
approvalTime?: string;
approvalBy?: number;
approvalByName?: string;
approvalComments?: string;
phone?: string;
idCard?: string;
createTime?: string;
updateTime?: string;
totalCount?: number;
pendingCount?: number;
approvedCount?: number;
rejectedCount?: number;
submittedCount?: number;
draftCount?: number;
}
/**
* 查询待审核的学生信息列表
*/
export const queryPendingApprovalList = (query: XgStudentInfoApprovalQuery): AxiosPromise<XgStudentInfoApprovalVO[]> => {
return request({
url: '/xg/studentInfoApproval/pending',
method: 'get',
params: query
});
};
/**
* 查询已审核的学生信息列表
*/
export const queryApprovedList = (query: XgStudentInfoApprovalQuery): AxiosPromise<XgStudentInfoApprovalVO[]> => {
return request({
url: '/xg/studentInfoApproval/approved',
method: 'get',
params: query
});
};
/**
* 审核学生信息
*/
export const approveStudentInfo = (studentId: number, batchId: number, approved: boolean, comments?: string) => {
return request({
url: '/xg/studentInfoApproval/approve',
method: 'post',
params: {
studentId,
batchId,
approved,
comments
}
});
};
/**
* 批量审核学生信息
*/
export const batchApproveStudentInfo = (studentIds: number[], batchId: number, approved: boolean, comments?: string) => {
return request({
url: '/xg/studentInfoApproval/batchApprove',
method: 'post',
data: studentIds,
params: {
batchId,
approved,
comments
}
});
};
/**
* 撤销审核
*/
export const revokeApproval = (studentId: number, batchId: number, reason?: string) => {
return request({
url: '/xg/studentInfoApproval/revoke',
method: 'post',
params: {
studentId,
batchId,
reason
}
});
};
/**
* 查询学生信息审核历史
*/
export const queryApprovalHistory = (studentId: number, batchId: number): AxiosPromise<XgStudentInfoApprovalVO[]> => {
return request({
url: '/xg/studentInfoApproval/history',
method: 'get',
params: {
studentId,
batchId
}
});
};
/**
* 获取审核统计信息
*/
export const getApprovalStatistics = (batchId: number): AxiosPromise<XgStudentInfoApprovalVO> => {
return request({
url: '/xg/studentInfoApproval/statistics',
method: 'get',
params: {
batchId
}
});
};
/**
* 检查审核权限
*/
export const checkApprovalPermission = (batchId: number): AxiosPromise<boolean> => {
return request({
url: '/xg/studentInfoApproval/checkPermission',
method: 'get',
params: {
batchId
}
});
};
/**
* 导出审核结果
*/
export const exportApprovalResults = (query: XgStudentInfoApprovalQuery) => {
return request({
url: '/xg/studentInfoApproval/export',
method: 'post',
data: query
});
};
File diff suppressed because it is too large. Load diff