封装AXIOS,添加接口

- 今日体检统计信息
- 营收数据统计
This commit is contained in:
xianyi
2025-12-10 14:56:07 +08:00
parent 5f81667c60
commit 9c8b679689
8 changed files with 640 additions and 108 deletions

48
src/api/his.ts Normal file
View File

@@ -0,0 +1,48 @@
import request from './request';
import type {
InputTodayExamStatisticsInfo,
TodayExamStatisticsResponse,
InputRevenueStatisticsInfo,
RevenueStatisticsResponse,
} from './types';
/**
* 自助机HIS接口
* 基础路径: /api/his-web/self-service-machine/
*/
const HIS_BASE_PATH = '/api/his-web/self-service-machine';
/**
* 体检中心HIS接口
* 基础路径: /api/his-web/medical-exam-center-app/
*/
const MEDICAL_EXAM_BASE_PATH = '/api/his-web/medical-exam-center-app';
/**
* 今日体检统计信息
* @param data 请求参数(空对象)
* @returns 今日体检统计信息
*/
export const getTodayExamStatistics = (
data: InputTodayExamStatisticsInfo = {}
): Promise<TodayExamStatisticsResponse> => {
return request.post<TodayExamStatisticsResponse>(
`${MEDICAL_EXAM_BASE_PATH}/today-exam-statistics`,
data
).then(res => res.data);
};
/**
* 营收数据统计
* @param data 请求参数(空对象)
* @returns 营收数据统计信息
*/
export const getRevenueStatistics = (
data: InputRevenueStatisticsInfo = {}
): Promise<RevenueStatisticsResponse> => {
return request.post<RevenueStatisticsResponse>(
`${MEDICAL_EXAM_BASE_PATH}/revenue-statistics`,
data
).then(res => res.data);
};