封装AXIOS,添加接口
- 今日体检统计信息 - 营收数据统计
This commit is contained in:
87
src/api/types.ts
Normal file
87
src/api/types.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* 通用接口返回状态码类型
|
||||
*/
|
||||
export type CommonActionResultStatusCode = 200 | 400 | 401 | 403 | 500 | 4011 | -1;
|
||||
|
||||
/**
|
||||
* 状态码常量(用于运行时访问)
|
||||
*/
|
||||
export const StatusCode = {
|
||||
Success: 200,
|
||||
BadRequest: 400,
|
||||
Unauthorized: 401,
|
||||
Forbidden: 403,
|
||||
InternalException: 500,
|
||||
Unidentified: 4011,
|
||||
Fail: -1,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* 通用接口返回数据实体
|
||||
*/
|
||||
export interface CommonActionResult<T = any> {
|
||||
Status: CommonActionResultStatusCode;
|
||||
Message?: string | null;
|
||||
Data?: T;
|
||||
TraceId?: string | null;
|
||||
CopyRight?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 今日体检统计信息入参
|
||||
*/
|
||||
export interface InputTodayExamStatisticsInfo {
|
||||
// 空对象,无需参数
|
||||
}
|
||||
|
||||
/**
|
||||
* 今日体检统计信息出参
|
||||
*/
|
||||
export interface OutputTodayExamStatisticsInfo {
|
||||
/** 今日预约人数 */
|
||||
today_appointment_count?: number | null;
|
||||
/** 今日签到人数 */
|
||||
today_signin_count?: number | null;
|
||||
/** 今日签在检人数 */
|
||||
today_in_exam_count?: number | null;
|
||||
/** 今日签打印导检单 */
|
||||
today_print_guide_count?: number | null;
|
||||
/** 今日签已完成人数 */
|
||||
today_completed_count?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 今日体检统计信息接口返回
|
||||
*/
|
||||
export type TodayExamStatisticsResponse = CommonActionResult<OutputTodayExamStatisticsInfo>;
|
||||
|
||||
/**
|
||||
* 营收数据统计入参
|
||||
*/
|
||||
export interface InputRevenueStatisticsInfo {
|
||||
// 空对象,无需参数
|
||||
}
|
||||
|
||||
/**
|
||||
* 营收数据统计出参
|
||||
*/
|
||||
export interface OutputRevenueStatisticsInfo {
|
||||
/** 体检收入 */
|
||||
physical_exam_income?: number | null;
|
||||
/** 加项收入 */
|
||||
add_item_income?: number | null;
|
||||
/** 整体收入 */
|
||||
total_income?: number | null;
|
||||
/** 目标收入 */
|
||||
target_income?: number | null;
|
||||
/** 完成百分比 */
|
||||
completion_percentage?: string | null;
|
||||
/** 缺口金额 */
|
||||
gap_amount?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 营收数据统计接口返回
|
||||
*/
|
||||
export type RevenueStatisticsResponse = CommonActionResult<OutputRevenueStatisticsInfo>;
|
||||
|
||||
Reference in New Issue
Block a user