提交请假销假代码

This commit is contained in:
zlwu committed 2025-08-06 01:32:11 +08:00
1 parent 4e8b6d77b6
commit 86f65df783
22 files changed
+4583 -191

No files matched your search

@@ -0,0 +1,85 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { StudentCancelLeaveVO, StudentCancelLeaveForm, StudentCancelLeaveQuery } from '@/api/workflow/studentCancelLeave/studentCancelLeave/types';
/**
* 查询学生销假列表
* @param query
* @returns {*}
*/
export const listStudentCancelLeave = (query?: StudentCancelLeaveQuery): AxiosPromise<StudentCancelLeaveVO[]> => {
return request({
url: '/studentCancelLeave/studentCancelLeave/list',
method: 'get',
params: query
});
};
/**
* 查询学生销假详细
* @param id
*/
export const getStudentCancelLeave = (id: string | number): AxiosPromise<StudentCancelLeaveVO> => {
return request({
url: '/studentCancelLeave/studentCancelLeave/' + id,
method: 'get'
});
};
/**
* 新增学生销假
* @param data
*/
export const addStudentCancelLeave = (data: StudentCancelLeaveForm): AxiosPromise<StudentCancelLeaveVO> => {
return request({
url: '/studentCancelLeave/studentCancelLeave',
method: 'post',
data: data
});
};
/**
* 修改学生销假
* @param data
*/
export const updateStudentCancelLeave = (data: StudentCancelLeaveForm) => {
return request({
url: '/studentCancelLeave/studentCancelLeave',
method: 'put',
data: data
});
};
/**
* 删除学生销假
* @param id
*/
export const delStudentCancelLeave = (id: string | number | Array<string | number>) => {
return request({
url: '/studentCancelLeave/studentCancelLeave/' + id,
method: 'delete'
});
};
/**
* 根据请假ID获取销假ID
* @param leaveId
*/
export const getCancelLeaveIdByLeaveId = (leaveId: string | number): AxiosPromise<number> => {
return request({
url: `/studentCancelLeave/studentCancelLeave/getCancelLeaveId/${leaveId}`,
method: 'get'
});
};
/**
* 根据销假ID获取请假ID
* @param cancelLeaveId
*/
export const getLeaveIdByCancelLeaveId = (cancelLeaveId: string | number): AxiosPromise<number> => {
return request({
url: `/studentCancelLeave/studentCancelLeave/getLeaveId/${cancelLeaveId}`,
method: 'get'
});
};
@@ -0,0 +1,521 @@
export interface StudentCancelLeaveVO {
/**
* 主键ID(雪花ID)
*/
id: string | number;
/**
* 删除标志(0代表存在 1代表删除)
*/
deleted: number;
/**
* 学生ID
*/
studentId: string | number;
/**
* 学生姓名
*/
studentName: string;
/**
* 学号
*/
studentNo: string;
/**
* 班级ID
*/
classId: string | number;
/**
* 班级名称
*/
className: string;
/**
* 专业ID
*/
majorId: string | number;
/**
* 专业名称
*/
majorName: string;
/**
* 学院ID
*/
collegeId: string | number;
/**
* 学院名称
*/
collegeName: string;
/**
* 请假类型编码
*/
leaveTypeCode: string;
/**
* 请假类型名称
*/
leaveTypeName: string;
/**
* 开始时间(年月日时分秒)
*/
startTime: string;
/**
* 结束时间(年月日时分秒)
*/
endTime: string;
/**
* 请假时长(天)
*/
leaveDuration: number;
/**
* 是否离校:0-否,1-是
*/
isLeaveSchool: string;
/**
* 是否需要销假:0-否,1-是
*/
needCancel: string;
/**
* 紧急联系人
*/
emergencyContact: string;
/**
* 紧急联系电话
*/
emergencyPhone: string;
/**
* 请假原因
*/
leaveReason: string;
/**
* 请假时地理位置
*/
leaveLocation: string;
/**
* 附件OSS文件ID(逗号分隔)
*/
attachmentOssIds: string | number;
/**
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
approvalStatus: string;
/**
* 审批意见
*/
approvalOpinion: string;
/**
* 审批时间
*/
approvalTime: string;
/**
* 审批人ID
*/
approvalBy: number;
/**
* 审批人姓名
*/
approvalByName: string;
/**
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
cancelStatus: string;
/**
* 销假时间
*/
cancelTime: string;
/**
* 销假地理位置
*/
cancelLocation: string;
/**
* 销假照片OSS文件ID(逗号分隔)
*/
cancelPhotoOssIds: string | number;
/**
* 销假备注
*/
cancelRemark: string;
/**
* 学生请假表id
*/
leaveId: string | number;
}
export interface StudentCancelLeaveForm extends BaseEntity {
/**
* 主键ID(雪花ID)
*/
id?: string | number;
/**
* 删除标志(0代表存在 1代表删除)
*/
deleted?: number;
/**
* 学生ID
*/
studentId?: string | number;
/**
* 学生姓名
*/
studentName?: string;
/**
* 学号
*/
studentNo?: string;
/**
* 班级ID
*/
classId?: string | number;
/**
* 班级名称
*/
className?: string;
/**
* 专业ID
*/
majorId?: string | number;
/**
* 专业名称
*/
majorName?: string;
/**
* 学院ID
*/
collegeId?: string | number;
/**
* 学院名称
*/
collegeName?: string;
/**
* 请假类型编码
*/
leaveTypeCode?: string;
/**
* 请假类型名称
*/
leaveTypeName?: string;
/**
* 开始时间(年月日时分秒)
*/
startTime?: string;
/**
* 结束时间(年月日时分秒)
*/
endTime?: string;
/**
* 请假时长(天)
*/
leaveDuration?: number;
/**
* 是否离校:0-否,1-是
*/
isLeaveSchool?: string;
/**
* 是否需要销假:0-否,1-是
*/
needCancel?: string;
/**
* 紧急联系人
*/
emergencyContact?: string;
/**
* 紧急联系电话
*/
emergencyPhone?: string;
/**
* 请假原因
*/
leaveReason?: string;
/**
* 请假时地理位置
*/
leaveLocation?: string;
/**
* 附件OSS文件ID(逗号分隔)
*/
attachmentOssIds?: string | number;
/**
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
approvalStatus?: string;
/**
* 审批意见
*/
approvalOpinion?: string;
/**
* 审批时间
*/
approvalTime?: string;
/**
* 审批人ID
*/
approvalBy?: number;
/**
* 审批人姓名
*/
approvalByName?: string;
/**
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
cancelStatus?: string;
/**
* 销假时间
*/
cancelTime?: string;
/**
* 销假地理位置
*/
cancelLocation?: string;
/**
* 销假照片OSS文件ID(逗号分隔)
*/
cancelPhotoOssIds?: string | number;
/**
* 销假备注
*/
cancelRemark?: string;
/**
* 学生请假表id
*/
leaveId?: string | number;
}
export interface StudentCancelLeaveQuery extends PageQuery {
/**
* 删除标志(0代表存在 1代表删除)
*/
deleted?: number;
/**
* 学生ID
*/
studentId?: string | number;
/**
* 学生姓名
*/
studentName?: string;
/**
* 学号
*/
studentNo?: string;
/**
* 班级ID
*/
classId?: string | number;
/**
* 班级名称
*/
className?: string;
/**
* 专业ID
*/
majorId?: string | number;
/**
* 专业名称
*/
majorName?: string;
/**
* 学院ID
*/
collegeId?: string | number;
/**
* 学院名称
*/
collegeName?: string;
/**
* 请假类型编码
*/
leaveTypeCode?: string;
/**
* 请假类型名称
*/
leaveTypeName?: string;
/**
* 开始时间(年月日时分秒)
*/
startTime?: string;
/**
* 结束时间(年月日时分秒)
*/
endTime?: string;
/**
* 请假时长(天)
*/
leaveDuration?: number;
/**
* 是否离校:0-否,1-是
*/
isLeaveSchool?: string;
/**
* 是否需要销假:0-否,1-是
*/
needCancel?: string;
/**
* 紧急联系人
*/
emergencyContact?: string;
/**
* 紧急联系电话
*/
emergencyPhone?: string;
/**
* 请假原因
*/
leaveReason?: string;
/**
* 请假时地理位置
*/
leaveLocation?: string;
/**
* 附件OSS文件ID(逗号分隔)
*/
attachmentOssIds?: string | number;
/**
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
approvalStatus?: string;
/**
* 审批意见
*/
approvalOpinion?: string;
/**
* 审批时间
*/
approvalTime?: string;
/**
* 审批人ID
*/
approvalBy?: number;
/**
* 审批人姓名
*/
approvalByName?: string;
/**
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
*/
cancelStatus?: string;
/**
* 销假时间
*/
cancelTime?: string;
/**
* 销假地理位置
*/
cancelLocation?: string;
/**
* 销假照片OSS文件ID(逗号分隔)
*/
cancelPhotoOssIds?: string | number;
/**
* 销假备注
*/
cancelRemark?: string;
/**
* 学生请假表id
*/
leaveId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}