ApproveController.ts
1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {ApproveView} from "lib/src/entity/track/entity/ApproveView";
import {DateCount} from "lib/src/entity/analysis/domain/DateCount";
// endregion
/**
*/
export class ApproveController{
/**
*/
static getApproveHistoriesByApproveId(axios:AxiosStatic, approveType: any, approveId: number): Promise<AxiosResponse<ApproveHistory[]>> {
return axios.get('approve/getApproveHistoriesByApproveId', {params: {approveType: approveType,approveId: approveId}});
}
/**
*/
static getApproveViewCount(axios:AxiosStatic): Promise<AxiosResponse<number>> {
return axios.get('approve/getApproveViewCount');
}
/**
*/
static getApproveViewsCountByDate(axios:AxiosStatic, date: Dayjs | string): Promise<AxiosResponse<DateCount[]>> {
if(date instanceof Object) {date = dayjs(date).format('YYYY-MM-DD') }
return axios.get('approve/getApproveViewsCountByDate', {params: {date: date}});
}
/**
*/
static getLastApproveViews(axios:AxiosStatic, date: Dayjs | string | undefined | null): Promise<AxiosResponse<ApproveView[]>> {
if(date instanceof Object) {date = dayjs(date).format('YYYY-MM-DD') }
return axios.get('approve/getLastApproveViews', {params: {date: date}});
}
// region 前端扩展代码区
// endregion
}