This commit is contained in:
FLL
2025-07-19 14:45:35 +08:00
parent 2684133491
commit 18aca4254d
5 changed files with 648 additions and 5 deletions

View File

@@ -0,0 +1,61 @@
import type { ShiftVO, ShiftForm, ShiftQuery } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询班次表列表
* @param params
* @returns 班次表列表
*/
export function shiftList(params?: ShiftQuery) {
return requestClient.get<PageResult<ShiftVO>>('/Property/shift/list', { params });
}
/**
* 导出班次表列表
* @param params
* @returns 班次表列表
*/
export function shiftExport(params?: ShiftQuery) {
return commonExport('/Property/shift/export', params ?? {});
}
/**
* 查询班次表详情
* @param id id
* @returns 班次表详情
*/
export function shiftInfo(id: ID) {
return requestClient.get<ShiftVO>(`/Property/shift/${id}`);
}
/**
* 新增班次表
* @param data
* @returns void
*/
export function shiftAdd(data: ShiftForm) {
return requestClient.postWithMsg<void>('/Property/shift', data);
}
/**
* 更新班次表
* @param data
* @returns void
*/
export function shiftUpdate(data: ShiftForm) {
return requestClient.putWithMsg<void>('/Property/shift', data);
}
/**
* 删除班次表
* @param id id
* @returns void
*/
export function shiftRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/Property/shift/${id}`);
}

View File

@@ -0,0 +1,129 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface ShiftVO {
/**
* 主键id
*/
id: string | number;
/**
* 班次名称
*/
name: string;
/**
* 考勤开始时间
*/
startTime: string;
/**
* 考勤结束时间
*/
endTime: string;
/**
* 状态0off1on
*/
status: number;
/**
* 是否休息0不休息1休息
*/
isRest: number;
/**
* 休息开始时间
*/
restStartTime: string;
/**
* 休息结束时间
*/
restEndTime: string;
}
export interface ShiftForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 班次名称
*/
name?: string;
/**
* 考勤开始时间
*/
startTime?: string;
/**
* 考勤结束时间
*/
endTime?: string;
/**
* 状态0off1on
*/
status?: number;
/**
* 是否休息0不休息1休息
*/
isRest?: number;
/**
* 休息开始时间
*/
restStartTime?: string;
/**
* 休息结束时间
*/
restEndTime?: string;
}
export interface ShiftQuery extends PageQuery {
/**
* 班次名称
*/
name?: string;
/**
* 考勤开始时间
*/
startTime?: string;
/**
* 考勤结束时间
*/
endTime?: string;
/**
* 状态0off1on
*/
status?: number;
/**
* 是否休息0不休息1休息
*/
isRest?: number;
/**
* 休息开始时间
*/
restStartTime?: string;
/**
* 休息结束时间
*/
restEndTime?: string;
/**
* 日期范围参数
*/
params?: any;
}