@etsoo/smarterp-core 1.1.65 → 1.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/OrgApi.ts +9 -9
- package/lib/cjs/CoreApp.d.ts +16 -5
- package/lib/cjs/CoreApp.js +10 -1
- package/lib/cjs/OrgApi.d.ts +0 -9
- package/lib/cjs/OrgApi.js +0 -9
- package/lib/cjs/ReportApi.d.ts +62 -0
- package/lib/cjs/ReportApi.js +68 -0
- package/lib/cjs/dto/report/OrderDailyReportData.d.ts +26 -0
- package/lib/cjs/dto/report/OrderDailyReportQueryData.d.ts +56 -0
- package/lib/cjs/dto/report/OrderMonthlyReportData.d.ts +26 -0
- package/lib/cjs/dto/report/OrderMonthlyReportData.js +2 -0
- package/lib/cjs/dto/report/OrderMonthlyReportQueryData.d.ts +56 -0
- package/lib/cjs/dto/report/OrderMonthlyReportQueryData.js +2 -0
- package/lib/cjs/dto/report/PeriodReportData.d.ts +16 -0
- package/lib/cjs/dto/report/PeriodReportData.js +2 -0
- package/lib/cjs/dto/report/TitleReportData.d.ts +16 -0
- package/lib/cjs/dto/report/TitleReportData.js +2 -0
- package/lib/cjs/index.d.ts +11 -2
- package/lib/cjs/index.js +17 -2
- package/lib/cjs/rq/report/OrderDailyReportQueryRQ.d.ts +22 -0
- package/lib/cjs/rq/report/OrderDailyReportQueryRQ.js +2 -0
- package/lib/cjs/rq/report/OrderDailyReportRQ.d.ts +22 -0
- package/lib/cjs/rq/report/OrderDailyReportRQ.js +2 -0
- package/lib/cjs/rq/report/OrderMonthlyReportQueryRQ.d.ts +22 -0
- package/lib/cjs/rq/report/OrderMonthlyReportQueryRQ.js +2 -0
- package/lib/cjs/rq/report/OrderMonthlyReportRQ.d.ts +22 -0
- package/lib/cjs/rq/report/OrderMonthlyReportRQ.js +2 -0
- package/lib/cjs/rq/report/OrgUsageReportRQ.js +2 -0
- package/lib/mjs/CoreApp.d.ts +16 -5
- package/lib/mjs/CoreApp.js +10 -1
- package/lib/mjs/OrgApi.d.ts +0 -9
- package/lib/mjs/OrgApi.js +0 -9
- package/lib/mjs/ReportApi.d.ts +62 -0
- package/lib/mjs/ReportApi.js +64 -0
- package/lib/mjs/dto/report/OrderDailyReportData.d.ts +26 -0
- package/lib/mjs/dto/report/OrderDailyReportQueryData.d.ts +56 -0
- package/lib/mjs/dto/report/OrderMonthlyReportData.d.ts +26 -0
- package/lib/mjs/dto/report/OrderMonthlyReportData.js +1 -0
- package/lib/mjs/dto/report/OrderMonthlyReportQueryData.d.ts +56 -0
- package/lib/mjs/dto/report/OrderMonthlyReportQueryData.js +1 -0
- package/lib/mjs/dto/report/PeriodReportData.d.ts +16 -0
- package/lib/mjs/dto/report/PeriodReportData.js +1 -0
- package/lib/mjs/dto/report/TitleReportData.d.ts +16 -0
- package/lib/mjs/dto/report/TitleReportData.js +1 -0
- package/lib/mjs/index.d.ts +11 -2
- package/lib/mjs/index.js +17 -2
- package/lib/mjs/rq/report/OrderDailyReportQueryRQ.d.ts +22 -0
- package/lib/mjs/rq/report/OrderDailyReportQueryRQ.js +1 -0
- package/lib/mjs/rq/report/OrderDailyReportRQ.d.ts +22 -0
- package/lib/mjs/rq/report/OrderDailyReportRQ.js +1 -0
- package/lib/mjs/rq/report/OrderMonthlyReportQueryRQ.d.ts +22 -0
- package/lib/mjs/rq/report/OrderMonthlyReportQueryRQ.js +1 -0
- package/lib/mjs/rq/report/OrderMonthlyReportRQ.d.ts +22 -0
- package/lib/mjs/rq/report/OrderMonthlyReportRQ.js +1 -0
- package/lib/mjs/rq/report/OrgUsageReportRQ.js +1 -0
- package/package.json +2 -2
- package/src/CoreApp.ts +21 -6
- package/src/OrgApi.ts +0 -12
- package/src/ReportApi.ts +92 -0
- package/src/dto/report/OrderDailyReportData.ts +29 -0
- package/src/dto/report/OrderDailyReportQueryData.ts +65 -0
- package/src/dto/report/OrderMonthlyReportData.ts +29 -0
- package/src/dto/report/OrderMonthlyReportQueryData.ts +65 -0
- package/src/dto/report/PeriodReportData.ts +17 -0
- package/src/dto/report/TitleReportData.ts +17 -0
- package/src/index.ts +19 -2
- package/src/rq/report/OrderDailyReportQueryRQ.ts +25 -0
- package/src/rq/report/OrderDailyReportRQ.ts +25 -0
- package/src/rq/report/OrderMonthlyReportQueryRQ.ts +25 -0
- package/src/rq/report/OrderMonthlyReportRQ.ts +25 -0
- package/lib/cjs/dto/org/OrgReportData.d.ts +0 -38
- package/lib/mjs/dto/org/OrgReportData.d.ts +0 -38
- package/src/dto/org/OrgReportData.ts +0 -41
- /package/lib/cjs/dto/{org/OrgReportData.js → report/OrderDailyReportData.js} +0 -0
- /package/lib/cjs/{rq/org/OrgUsageReportRQ.js → dto/report/OrderDailyReportQueryData.js} +0 -0
- /package/lib/cjs/rq/{org → report}/OrgUsageReportRQ.d.ts +0 -0
- /package/lib/mjs/dto/{org/OrgReportData.js → report/OrderDailyReportData.js} +0 -0
- /package/lib/mjs/{rq/org/OrgUsageReportRQ.js → dto/report/OrderDailyReportQueryData.js} +0 -0
- /package/lib/mjs/rq/{org → report}/OrgUsageReportRQ.d.ts +0 -0
- /package/src/rq/{org → report}/OrgUsageReportRQ.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppActionData, QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Order daily report query request
|
|
4
|
+
* 订单日报表查询请求
|
|
5
|
+
*/
|
|
6
|
+
export type OrderDailyReportQueryRQ = QueryRQ & {
|
|
7
|
+
/**
|
|
8
|
+
* Action signed data
|
|
9
|
+
* 操作签名数据
|
|
10
|
+
*/
|
|
11
|
+
action: AppActionData;
|
|
12
|
+
/**
|
|
13
|
+
* Start date
|
|
14
|
+
* 开始日期
|
|
15
|
+
*/
|
|
16
|
+
startDate?: string;
|
|
17
|
+
/**
|
|
18
|
+
* End date
|
|
19
|
+
* 结束日期
|
|
20
|
+
*/
|
|
21
|
+
endDate?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppActionData } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Order daily report request data
|
|
4
|
+
* 订单日报表请求数据
|
|
5
|
+
*/
|
|
6
|
+
export type OrderDailyReportRQ = {
|
|
7
|
+
/**
|
|
8
|
+
* Action signed data
|
|
9
|
+
* 操作签名数据
|
|
10
|
+
*/
|
|
11
|
+
action: AppActionData;
|
|
12
|
+
/**
|
|
13
|
+
* Start date
|
|
14
|
+
* 开始日期
|
|
15
|
+
*/
|
|
16
|
+
startDate?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Days to cover
|
|
19
|
+
* 覆盖的天数
|
|
20
|
+
*/
|
|
21
|
+
days?: number;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppActionData, QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Order monthly report query request data
|
|
4
|
+
* 订单月报表查询请求数据
|
|
5
|
+
*/
|
|
6
|
+
export type OrderMonthlyReportQueryRQ = QueryRQ & {
|
|
7
|
+
/**
|
|
8
|
+
* Action signed data
|
|
9
|
+
* 操作签名数据
|
|
10
|
+
*/
|
|
11
|
+
action: AppActionData;
|
|
12
|
+
/**
|
|
13
|
+
* Start date
|
|
14
|
+
* 开始日期
|
|
15
|
+
*/
|
|
16
|
+
startDate?: string;
|
|
17
|
+
/**
|
|
18
|
+
* End date
|
|
19
|
+
* 结束日期
|
|
20
|
+
*/
|
|
21
|
+
endDate?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppActionData } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Order monthly report request data
|
|
4
|
+
* 订单月报表请求数据
|
|
5
|
+
*/
|
|
6
|
+
export type OrderMonthlyReportRQ = {
|
|
7
|
+
/**
|
|
8
|
+
* Action signed data
|
|
9
|
+
* 操作签名数据
|
|
10
|
+
*/
|
|
11
|
+
action: AppActionData;
|
|
12
|
+
/**
|
|
13
|
+
* Year
|
|
14
|
+
* 年
|
|
15
|
+
*/
|
|
16
|
+
year?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to include last year data
|
|
19
|
+
* 是否包含去年数据
|
|
20
|
+
*/
|
|
21
|
+
hasLastYear?: boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.67",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@etsoo/react": "^1.8.91",
|
|
62
62
|
"@etsoo/shared": "^1.2.86",
|
|
63
63
|
"@etsoo/toolpad": "^1.0.50",
|
|
64
|
-
"@mui/material": "^9.1.
|
|
64
|
+
"@mui/material": "^9.1.2",
|
|
65
65
|
"ajv": "^8.20.0",
|
|
66
66
|
"ajv-formats": "^3.0.1",
|
|
67
67
|
"react": "^19.2.7",
|
package/src/CoreApp.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { DataTypes, ListType, ListType1, NumberUtils } from "@etsoo/shared";
|
|
|
17
17
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
18
18
|
import { DocumentApi } from "./DocumentApi";
|
|
19
19
|
import { DocumentKind } from "./dto/document/DocumentKind";
|
|
20
|
-
import {
|
|
20
|
+
import { ReportApi } from "./ReportApi";
|
|
21
|
+
import { PeriodReportData } from "./dto/report/PeriodReportData";
|
|
21
22
|
|
|
22
23
|
type AppData = { id: number; appId?: number; name: string; localName?: string };
|
|
23
24
|
|
|
@@ -61,6 +62,11 @@ export interface ICoreApp {
|
|
|
61
62
|
*/
|
|
62
63
|
readonly publicApi: PublicApi;
|
|
63
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Report API
|
|
67
|
+
*/
|
|
68
|
+
readonly reportApi: ReportApi;
|
|
69
|
+
|
|
64
70
|
/**
|
|
65
71
|
* User API
|
|
66
72
|
*/
|
|
@@ -159,7 +165,7 @@ export interface ICoreApp {
|
|
|
159
165
|
* @param year Year to calculate
|
|
160
166
|
* @returns Result
|
|
161
167
|
*/
|
|
162
|
-
getReportData(data:
|
|
168
|
+
getReportData(data: PeriodReportData[], year: number): number[];
|
|
163
169
|
|
|
164
170
|
/**
|
|
165
171
|
* Transform report data for chart
|
|
@@ -170,7 +176,7 @@ export interface ICoreApp {
|
|
|
170
176
|
* @returns Transformed report data
|
|
171
177
|
*/
|
|
172
178
|
transformReportData(
|
|
173
|
-
data:
|
|
179
|
+
data: PeriodReportData[],
|
|
174
180
|
hasLastYear?: boolean,
|
|
175
181
|
year?: number
|
|
176
182
|
): {
|
|
@@ -248,6 +254,15 @@ export class CoreApp implements ICoreApp {
|
|
|
248
254
|
return (this._publicApi ??= new PublicApi(this.app, this.api));
|
|
249
255
|
}
|
|
250
256
|
|
|
257
|
+
private _reportApi?: ReportApi;
|
|
258
|
+
/**
|
|
259
|
+
* Report API
|
|
260
|
+
* 报告接口
|
|
261
|
+
*/
|
|
262
|
+
get reportApi() {
|
|
263
|
+
return (this._reportApi ??= new ReportApi(this.app, this.api));
|
|
264
|
+
}
|
|
265
|
+
|
|
251
266
|
private _userApi?: UserApi;
|
|
252
267
|
/**
|
|
253
268
|
* User API
|
|
@@ -420,13 +435,13 @@ export class CoreApp implements ICoreApp {
|
|
|
420
435
|
* @param year Year to calculate
|
|
421
436
|
* @returns Result
|
|
422
437
|
*/
|
|
423
|
-
getReportData(data:
|
|
438
|
+
getReportData(data: PeriodReportData[], year: number) {
|
|
424
439
|
const [start, end] = NumberUtils.getMonthPeriodRange(year);
|
|
425
440
|
const items: number[] = [];
|
|
426
441
|
|
|
427
442
|
for (let i = start; i <= end; i++) {
|
|
428
443
|
const item = data.find((d) => d.period === i);
|
|
429
|
-
items.push(item
|
|
444
|
+
items.push(item?.value ?? 0);
|
|
430
445
|
}
|
|
431
446
|
|
|
432
447
|
return items;
|
|
@@ -441,7 +456,7 @@ export class CoreApp implements ICoreApp {
|
|
|
441
456
|
* @returns Transformed report data
|
|
442
457
|
*/
|
|
443
458
|
transformReportData(
|
|
444
|
-
data:
|
|
459
|
+
data: PeriodReportData[],
|
|
445
460
|
hasLastYear?: boolean,
|
|
446
461
|
year?: number
|
|
447
462
|
) {
|
package/src/OrgApi.ts
CHANGED
|
@@ -36,8 +36,6 @@ import { OrgQueryApiData } from "./dto/org/OrgQueryApiData";
|
|
|
36
36
|
import { CoreApiService } from "./dto/org/CoreApiService";
|
|
37
37
|
import { UploadFilesResult } from "./dto/org/UploadFilesResult";
|
|
38
38
|
import { OrgOwnsRQ } from "./rq/org/OrgOwnsRQ";
|
|
39
|
-
import { OrgUsageReportRQ } from "./rq/org/OrgUsageReportRQ";
|
|
40
|
-
import { OrgReportData } from "./dto/org/OrgReportData";
|
|
41
39
|
|
|
42
40
|
/**
|
|
43
41
|
* Organization API
|
|
@@ -414,14 +412,4 @@ export class OrgApi extends EntityApi {
|
|
|
414
412
|
payload
|
|
415
413
|
);
|
|
416
414
|
}
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Get usage report
|
|
420
|
-
* @param rq Request data
|
|
421
|
-
* @param payload Payload
|
|
422
|
-
* @returns Result
|
|
423
|
-
*/
|
|
424
|
-
usageReport(rq: OrgUsageReportRQ, payload?: IApiPayload<OrgReportData[]>) {
|
|
425
|
-
return this.api.post(`${this.flag}/UsageReport`, rq, payload);
|
|
426
|
-
}
|
|
427
415
|
}
|
package/src/ReportApi.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BaseApi, IApi, IApiPayload, IApp } from "@etsoo/appscript";
|
|
2
|
+
import { OrgUsageReportRQ } from "./rq/report/OrgUsageReportRQ";
|
|
3
|
+
import { PeriodReportData } from "./dto/report/PeriodReportData";
|
|
4
|
+
import { OrderDailyReportData } from "./dto/report/OrderDailyReportData";
|
|
5
|
+
import { OrderDailyReportRQ } from "./rq/report/OrderDailyReportRQ";
|
|
6
|
+
import { OrderMonthlyReportRQ } from "./rq/report/OrderMonthlyReportRQ";
|
|
7
|
+
import { OrderMonthlyReportData } from "./dto/report/OrderMonthlyReportData";
|
|
8
|
+
import { OrderDailyReportQueryRQ } from "./rq/report/OrderDailyReportQueryRQ";
|
|
9
|
+
import { OrderDailyReportQueryData } from "./dto/report/OrderDailyReportQueryData";
|
|
10
|
+
import { OrderMonthlyReportQueryData } from "./dto/report/OrderMonthlyReportQueryData";
|
|
11
|
+
import { OrderMonthlyReportQueryRQ } from "./rq/report/OrderMonthlyReportQueryRQ";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Report API
|
|
15
|
+
*/
|
|
16
|
+
export class ReportApi extends BaseApi {
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
* @param app Application
|
|
20
|
+
* @param api API
|
|
21
|
+
*/
|
|
22
|
+
constructor(app: IApp, api: IApi = app.api) {
|
|
23
|
+
super(app, api);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Order daily report
|
|
28
|
+
* 订单日报表
|
|
29
|
+
* @param rq Request data
|
|
30
|
+
* @param payload Payload
|
|
31
|
+
* @returns Result
|
|
32
|
+
*/
|
|
33
|
+
orderDailyReport(
|
|
34
|
+
rq: OrderDailyReportRQ,
|
|
35
|
+
payload?: IApiPayload<OrderDailyReportData[]>
|
|
36
|
+
) {
|
|
37
|
+
return this.api.post("Report/OrderDailyReport", rq, payload);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Order daily report query
|
|
42
|
+
* 订单日报表查询
|
|
43
|
+
* @param rq Request data
|
|
44
|
+
* @param payload Payload
|
|
45
|
+
* @returns Result
|
|
46
|
+
*/
|
|
47
|
+
orderDailyReportQuery(
|
|
48
|
+
rq: OrderDailyReportQueryRQ,
|
|
49
|
+
payload?: IApiPayload<OrderDailyReportQueryData[]>
|
|
50
|
+
) {
|
|
51
|
+
return this.api.post("Report/OrderDailyReportQuery", rq, payload);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Order monthly report
|
|
56
|
+
* 订单月报表
|
|
57
|
+
* @param rq Request data
|
|
58
|
+
* @param payload Payload
|
|
59
|
+
* @returns Result
|
|
60
|
+
*/
|
|
61
|
+
orderMonthlyReport(
|
|
62
|
+
rq: OrderMonthlyReportRQ,
|
|
63
|
+
payload?: IApiPayload<OrderMonthlyReportData[]>
|
|
64
|
+
) {
|
|
65
|
+
return this.api.post("Report/OrderMonthlyReport", rq, payload);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Order monthly report query
|
|
70
|
+
* 订单月报表查询
|
|
71
|
+
* @param rq Request data
|
|
72
|
+
* @param payload Payload
|
|
73
|
+
* @returns Result
|
|
74
|
+
*/
|
|
75
|
+
orderMonthlyReportQuery(
|
|
76
|
+
rq: OrderMonthlyReportQueryRQ,
|
|
77
|
+
payload?: IApiPayload<OrderMonthlyReportQueryData[]>
|
|
78
|
+
) {
|
|
79
|
+
return this.api.post("Report/OrderMonthlyReportQuery", rq, payload);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get usage report
|
|
84
|
+
* 获取使用报告
|
|
85
|
+
* @param rq Request data
|
|
86
|
+
* @param payload Payload
|
|
87
|
+
* @returns Result
|
|
88
|
+
*/
|
|
89
|
+
usageReport(rq: OrgUsageReportRQ, payload?: IApiPayload<PeriodReportData[]>) {
|
|
90
|
+
return this.api.post("Report/UsageReport", rq, payload);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order daily report data
|
|
3
|
+
* 订单日报表数据
|
|
4
|
+
*/
|
|
5
|
+
export type OrderDailyReportData = {
|
|
6
|
+
/**
|
|
7
|
+
* Period
|
|
8
|
+
* 区间
|
|
9
|
+
*/
|
|
10
|
+
period: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Order Items
|
|
14
|
+
* 订单数
|
|
15
|
+
*/
|
|
16
|
+
items: number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Amount
|
|
20
|
+
* 金额
|
|
21
|
+
*/
|
|
22
|
+
amount: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Customers
|
|
26
|
+
* 客户数
|
|
27
|
+
*/
|
|
28
|
+
customers: number;
|
|
29
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order daily report query data
|
|
3
|
+
* 订单日报表查询数据
|
|
4
|
+
*/
|
|
5
|
+
export type OrderDailyReportQueryData = {
|
|
6
|
+
/**
|
|
7
|
+
* Id
|
|
8
|
+
* 编号
|
|
9
|
+
*/
|
|
10
|
+
id: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Period
|
|
14
|
+
* 区间
|
|
15
|
+
*/
|
|
16
|
+
period: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Order Items
|
|
20
|
+
* 订单数
|
|
21
|
+
*/
|
|
22
|
+
items: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Amount
|
|
26
|
+
* 金额
|
|
27
|
+
*/
|
|
28
|
+
amount: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Paid amount
|
|
32
|
+
* 已付款金额
|
|
33
|
+
*/
|
|
34
|
+
paidAmount: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Discount
|
|
38
|
+
* 折扣
|
|
39
|
+
*/
|
|
40
|
+
discount: number;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Line discount
|
|
44
|
+
* 行折扣
|
|
45
|
+
*/
|
|
46
|
+
lineDiscount: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Approved discount
|
|
50
|
+
* 授权折扣
|
|
51
|
+
*/
|
|
52
|
+
approvedDiscount: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Qty
|
|
56
|
+
* 数量
|
|
57
|
+
*/
|
|
58
|
+
qty: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Customers
|
|
62
|
+
* 客户数
|
|
63
|
+
*/
|
|
64
|
+
customers: number;
|
|
65
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order monthly report data
|
|
3
|
+
* 订单月报表数据
|
|
4
|
+
*/
|
|
5
|
+
export type OrderMonthlyReportData = {
|
|
6
|
+
/**
|
|
7
|
+
* Period
|
|
8
|
+
* 区间
|
|
9
|
+
*/
|
|
10
|
+
period: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Order Items
|
|
14
|
+
* 订单数
|
|
15
|
+
*/
|
|
16
|
+
items: number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Amount
|
|
20
|
+
* 金额
|
|
21
|
+
*/
|
|
22
|
+
amount: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Customers
|
|
26
|
+
* 客户数
|
|
27
|
+
*/
|
|
28
|
+
customers: number;
|
|
29
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order monthly report query data
|
|
3
|
+
* 订单月报表查询数据
|
|
4
|
+
*/
|
|
5
|
+
export type OrderMonthlyReportQueryData = {
|
|
6
|
+
/**
|
|
7
|
+
* Id
|
|
8
|
+
* 编号
|
|
9
|
+
*/
|
|
10
|
+
id: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Period
|
|
14
|
+
* 区间
|
|
15
|
+
*/
|
|
16
|
+
period: number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Order Items
|
|
20
|
+
* 订单数
|
|
21
|
+
*/
|
|
22
|
+
items: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Amount
|
|
26
|
+
* 金额
|
|
27
|
+
*/
|
|
28
|
+
amount: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Paid amount
|
|
32
|
+
* 已付款金额
|
|
33
|
+
*/
|
|
34
|
+
paidAmount: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Discount
|
|
38
|
+
* 折扣
|
|
39
|
+
*/
|
|
40
|
+
discount: number;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Line discount
|
|
44
|
+
* 行折扣
|
|
45
|
+
*/
|
|
46
|
+
lineDiscount: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Approved discount
|
|
50
|
+
* 授权折扣
|
|
51
|
+
*/
|
|
52
|
+
approvedDiscount: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Qty
|
|
56
|
+
* 数量
|
|
57
|
+
*/
|
|
58
|
+
qty: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Customers
|
|
62
|
+
* 客户数
|
|
63
|
+
*/
|
|
64
|
+
customers: number;
|
|
65
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from "./dto/member/MemberQueryDto";
|
|
|
19
19
|
export * from "./dto/member/MemberReadDto";
|
|
20
20
|
export * from "./dto/member/MemberUpdateReadDto";
|
|
21
21
|
|
|
22
|
+
// Org
|
|
22
23
|
export * from "./dto/org/CoreApiService";
|
|
23
24
|
export * from "./dto/org/OrgDownloadKind";
|
|
24
25
|
export * from "./dto/org/OrgGetMyData";
|
|
@@ -27,12 +28,12 @@ export * from "./dto/org/OrgQueryApiData";
|
|
|
27
28
|
export * from "./dto/org/OrgQueryDto";
|
|
28
29
|
export * from "./dto/org/OrgQueryResourceData";
|
|
29
30
|
export * from "./dto/org/OrgReadDto";
|
|
30
|
-
export * from "./dto/org/OrgReportData";
|
|
31
31
|
export * from "./dto/org/OrgResourceItem";
|
|
32
32
|
export * from "./dto/org/OrgUpdateApiReadDto";
|
|
33
33
|
export * from "./dto/org/OrgUpdateReadDto";
|
|
34
34
|
export * from "./dto/org/OrgUpdateResourceReadData";
|
|
35
35
|
|
|
36
|
+
// Public
|
|
36
37
|
export * from "./dto/public/AvatarState";
|
|
37
38
|
export * from "./dto/public/ChinaPinData";
|
|
38
39
|
export * from "./dto/public/CurrencyItem";
|
|
@@ -47,6 +48,14 @@ export * from "./dto/user/DeviceListDto";
|
|
|
47
48
|
export * from "./dto/user/UserIdentifierData";
|
|
48
49
|
export * from "./dto/user/UserUpdateReadDto";
|
|
49
50
|
|
|
51
|
+
// Report
|
|
52
|
+
export * from "./dto/report/OrderDailyReportData";
|
|
53
|
+
export * from "./dto/report/OrderDailyReportQueryData";
|
|
54
|
+
export * from "./dto/report/OrderMonthlyReportData";
|
|
55
|
+
export * from "./dto/report/OrderMonthlyReportQueryData";
|
|
56
|
+
export * from "./dto/report/PeriodReportData";
|
|
57
|
+
export * from "./dto/report/TitleReportData";
|
|
58
|
+
|
|
50
59
|
// i18n
|
|
51
60
|
export * from "./i18n/CoreCulture";
|
|
52
61
|
|
|
@@ -76,6 +85,7 @@ export * from "./rq/member/MemberListRQ";
|
|
|
76
85
|
export * from "./rq/member/MemberQueryRQ";
|
|
77
86
|
export * from "./rq/member/MemberUpdateRQ";
|
|
78
87
|
|
|
88
|
+
// Org
|
|
79
89
|
export * from "./rq/org/OrgCreateApiRQ";
|
|
80
90
|
export * from "./rq/org/OrgCreateResourceRQ";
|
|
81
91
|
export * from "./rq/org/OrgCreateRQ";
|
|
@@ -86,12 +96,12 @@ export * from "./rq/org/OrgQueryApiRQ";
|
|
|
86
96
|
export * from "./rq/org/OrgQueryResourceRQ";
|
|
87
97
|
export * from "./rq/org/OrgQueryRQ";
|
|
88
98
|
export * from "./rq/org/OrgUpdateApiRQ";
|
|
89
|
-
export * from "./rq/org/OrgUsageReportRQ";
|
|
90
99
|
export * from "./rq/org/OrgUpdateRQ";
|
|
91
100
|
export * from "./rq/org/SendEmailMessage";
|
|
92
101
|
export * from "./rq/org/SendProfileEmailRQ";
|
|
93
102
|
export * from "./rq/org/SendSMSMessage";
|
|
94
103
|
|
|
104
|
+
// Public
|
|
95
105
|
export * from "./rq/public/AcceptInvitationRQ";
|
|
96
106
|
export * from "./rq/public/CreateBarcodeRQ";
|
|
97
107
|
export * from "./rq/public/ParseNameRQ";
|
|
@@ -102,6 +112,13 @@ export * from "./rq/public/TimeZoneRQ";
|
|
|
102
112
|
export * from "./rq/user/AuditHistoryRQ";
|
|
103
113
|
export * from "./rq/user/UserUpdateRQ";
|
|
104
114
|
|
|
115
|
+
// Report
|
|
116
|
+
export * from "./rq/report/OrderDailyReportQueryRQ";
|
|
117
|
+
export * from "./rq/report/OrderDailyReportRQ";
|
|
118
|
+
export * from "./rq/report/OrderMonthlyReportQueryRQ";
|
|
119
|
+
export * from "./rq/report/OrderMonthlyReportRQ";
|
|
120
|
+
export * from "./rq/report/OrgUsageReportRQ";
|
|
121
|
+
|
|
105
122
|
// APIs
|
|
106
123
|
export * from "./AppApi";
|
|
107
124
|
export * from "./AuthCodeApi";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AppActionData, QueryRQ } from "@etsoo/appscript";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Order daily report query request
|
|
5
|
+
* 订单日报表查询请求
|
|
6
|
+
*/
|
|
7
|
+
export type OrderDailyReportQueryRQ = QueryRQ & {
|
|
8
|
+
/**
|
|
9
|
+
* Action signed data
|
|
10
|
+
* 操作签名数据
|
|
11
|
+
*/
|
|
12
|
+
action: AppActionData;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Start date
|
|
16
|
+
* 开始日期
|
|
17
|
+
*/
|
|
18
|
+
startDate?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* End date
|
|
22
|
+
* 结束日期
|
|
23
|
+
*/
|
|
24
|
+
endDate?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AppActionData } from "@etsoo/appscript";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Order daily report request data
|
|
5
|
+
* 订单日报表请求数据
|
|
6
|
+
*/
|
|
7
|
+
export type OrderDailyReportRQ = {
|
|
8
|
+
/**
|
|
9
|
+
* Action signed data
|
|
10
|
+
* 操作签名数据
|
|
11
|
+
*/
|
|
12
|
+
action: AppActionData;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Start date
|
|
16
|
+
* 开始日期
|
|
17
|
+
*/
|
|
18
|
+
startDate?: string; // DateOnly maps to string (ISO format: YYYY-MM-DD)
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Days to cover
|
|
22
|
+
* 覆盖的天数
|
|
23
|
+
*/
|
|
24
|
+
days?: number;
|
|
25
|
+
};
|