@cpzxrobot/sdk 1.1.36 → 1.1.38
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/company_gateway.ts +6 -6
- package/device_filter.ts +6 -0
- package/dist/company_gateway.js +6 -6
- package/dist/device_filter.js +5 -0
- package/package.json +1 -1
- package/readme.md +6 -3
package/company_gateway.ts
CHANGED
|
@@ -15,17 +15,17 @@ export class CompanyGateway extends Object {
|
|
|
15
15
|
|
|
16
16
|
get rank() {
|
|
17
17
|
return {
|
|
18
|
-
byRevenue: async (
|
|
18
|
+
byRevenue: async () => {
|
|
19
19
|
var axios = await this.context.ready;
|
|
20
|
-
return axios.get(`/api/v2/coremde-sale/company/revenue/rank/list
|
|
20
|
+
return axios.get(`/api/v2/coremde-sale/company/revenue/rank/list`);
|
|
21
21
|
},
|
|
22
|
-
byProfit: async (
|
|
22
|
+
byProfit: async () => {
|
|
23
23
|
var axios = await this.context.ready;
|
|
24
|
-
return axios.get(`/api/v2/coremde-sale/company/profit/rank/list
|
|
24
|
+
return axios.get(`/api/v2/coremde-sale/company/profit/rank/list`);
|
|
25
25
|
},
|
|
26
|
-
byOrder: async (
|
|
26
|
+
byOrder: async () => {
|
|
27
27
|
var axios = await this.context.ready;
|
|
28
|
-
return axios.get(`/api/v2/coremde-sale/company/order/rank/list
|
|
28
|
+
return axios.get(`/api/v2/coremde-sale/company/order/rank/list`);
|
|
29
29
|
},
|
|
30
30
|
}
|
|
31
31
|
}
|
package/device_filter.ts
CHANGED
|
@@ -31,6 +31,12 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
31
31
|
return Promise.resolve(list);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
add(device: any) {
|
|
35
|
+
this.context.ready.then(axios=>{
|
|
36
|
+
return axios.post("/api/v2/device/add", device)
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
getInfo(id: number): Promise<T> {
|
|
35
41
|
if (this.devices) {
|
|
36
42
|
const one = this.devices.find((device) => device.id == id);
|
package/dist/company_gateway.js
CHANGED
|
@@ -13,17 +13,17 @@ class CompanyGateway extends Object {
|
|
|
13
13
|
}
|
|
14
14
|
get rank() {
|
|
15
15
|
return {
|
|
16
|
-
byRevenue: async (
|
|
16
|
+
byRevenue: async () => {
|
|
17
17
|
var axios = await this.context.ready;
|
|
18
|
-
return axios.get(`/api/v2/coremde-sale/company/revenue/rank/list
|
|
18
|
+
return axios.get(`/api/v2/coremde-sale/company/revenue/rank/list`);
|
|
19
19
|
},
|
|
20
|
-
byProfit: async (
|
|
20
|
+
byProfit: async () => {
|
|
21
21
|
var axios = await this.context.ready;
|
|
22
|
-
return axios.get(`/api/v2/coremde-sale/company/profit/rank/list
|
|
22
|
+
return axios.get(`/api/v2/coremde-sale/company/profit/rank/list`);
|
|
23
23
|
},
|
|
24
|
-
byOrder: async (
|
|
24
|
+
byOrder: async () => {
|
|
25
25
|
var axios = await this.context.ready;
|
|
26
|
-
return axios.get(`/api/v2/coremde-sale/company/order/rank/list
|
|
26
|
+
return axios.get(`/api/v2/coremde-sale/company/order/rank/list`);
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
}
|
package/dist/device_filter.js
CHANGED
|
@@ -22,6 +22,11 @@ class DeviceFilter {
|
|
|
22
22
|
wrapList(list) {
|
|
23
23
|
return Promise.resolve(list);
|
|
24
24
|
}
|
|
25
|
+
add(device) {
|
|
26
|
+
this.context.ready.then(axios => {
|
|
27
|
+
return axios.post("/api/v2/device/add", device);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
25
30
|
getInfo(id) {
|
|
26
31
|
if (this.devices) {
|
|
27
32
|
const one = this.devices.find((device) => device.id == id);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -152,6 +152,9 @@ baseURL: "/"
|
|
|
152
152
|
| cpzxrobot().user.stat.china | 获得员工在全国的统计信息 |
|
|
153
153
|
| cpzxrobot().user.listByProvince | 获得员工在某个省的统计信息,传入province参数 |
|
|
154
154
|
| cpzxrobot().user.listByCity | 获得员工在某个市的统计信息,传入city参数 |
|
|
155
|
+
| cpzxrobot().user.workReport.list | 列出用户的日报记录 |
|
|
156
|
+
| cpzxrobot().user.workReport.get | 获取用户的日报记录 |
|
|
157
|
+
| cpzxrobot().user.workReport.add | 添加用户的日报记录 |
|
|
155
158
|
| cpzxrobot().product.list | 获得产品列表,传入factory_id和必要的分页参数 |
|
|
156
159
|
| cpzxrobot().product.get | 获得产品信息,传入id参数 |
|
|
157
160
|
| cpzxrobot().product.price.list | 获得产品报价列表 |
|
|
@@ -190,9 +193,9 @@ baseURL: "/"
|
|
|
190
193
|
| cpzxrobot().company.cost.byYear | 按公司按年成本 |
|
|
191
194
|
| cpzxrobot().company.revenue.groupSummary.byMonth | 按公司按类别按月营收统计 |
|
|
192
195
|
| cpzxrobot().company.revenue.groupSummary.byYear | 按公司按类别按年营收统计 |
|
|
193
|
-
| cpzxrobot().company.revenue.
|
|
194
|
-
| cpzxrobot().company.revenue.
|
|
195
|
-
| cpzxrobot().company.revenue.
|
|
196
|
+
| cpzxrobot().company.revenue.recentSummary.byMonth | 按公司当月营收统计 |
|
|
197
|
+
| cpzxrobot().company.revenue.recentSummary.byDay | 按公司当日营收统计 |
|
|
198
|
+
| cpzxrobot().company.revenue.recentSummary.byDecade | 按公司按旬营收统计 |
|
|
196
199
|
| cpzxrobot().company.revenue.list | 获得公司营收列表,传入必要的分页参数 |
|
|
197
200
|
| cpzxrobot().company.revenue.enterprise | 获得集团整体营收统计 |
|
|
198
201
|
| cpzxrobot().car.stat.china | 获得车辆在全国的统计信息 |
|