考勤
This commit is contained in:
@@ -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}`);
|
||||
}
|
129
apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts
vendored
Normal file
129
apps/web-antd/src/api/property/attendanceManagement/shiftSetting/model.d.ts
vendored
Normal 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;
|
||||
|
||||
/**
|
||||
* 状态(0:off,1:on)
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 状态(0:off,1:on)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 是否休息(0:不休息,1:休息)
|
||||
*/
|
||||
isRest?: number;
|
||||
|
||||
/**
|
||||
* 休息开始时间
|
||||
*/
|
||||
restStartTime?: string;
|
||||
|
||||
/**
|
||||
* 休息结束时间
|
||||
*/
|
||||
restEndTime?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ShiftQuery extends PageQuery {
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 考勤开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 考勤结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 状态(0:off,1:on)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 是否休息(0:不休息,1:休息)
|
||||
*/
|
||||
isRest?: number;
|
||||
|
||||
/**
|
||||
* 休息开始时间
|
||||
*/
|
||||
restStartTime?: string;
|
||||
|
||||
/**
|
||||
* 休息结束时间
|
||||
*/
|
||||
restEndTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user