@cpzxrobot/sdk 1.1.39 → 1.1.41

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.
@@ -43,17 +43,44 @@ export class CompanyGateway extends Object {
43
43
  }
44
44
  }
45
45
 
46
+ get enterprise() {
47
+ return {
48
+ userCount: async (companyId: number) => {
49
+ var axios = await this.context.ready;
50
+ return axios.get(`/api/v2/coremde-sale/company/enterprise/count/user`);
51
+ },
52
+ revenue: async () => {
53
+ var axios = await this.context.ready;
54
+ return axios.get(`/api/v2/coremde-sale/company/enterprise/revenue/get`);
55
+ }
56
+ }
57
+ }
58
+
46
59
  get revenue() {
47
60
  return {
48
61
  //按类型统计
49
62
  groupSummary: {
50
- byMonth: async (companyId: number, pageNo: number, pageSize: number) => {
63
+ byMonth: async (companyId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) => {
51
64
  var axios = await this.context.ready;
52
- return axios.get(`/api/v2/coremde-sale/company/revenue/month/list?pageNo=${pageNo}&pageSize=${pageSize}&companyId=${companyId}`);
65
+ var params = {
66
+ pageNo: pageNo,
67
+ pageSize: pageSize,
68
+ companyId: companyId
69
+ }
70
+ return axios.get(`/api/v2/coremde-sale/company/revenue/month/list`, {
71
+ params: params
72
+ });
53
73
  },
54
- byYear: async (companyId: number, pageNo: number, pageSize: number) => {
74
+ byYear: async (companyId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) => {
55
75
  var axios = await this.context.ready;
56
- return axios.get(`/api/v2/coremde-sale/company/revenue/year/list?pageNo=${pageNo}&pageSize=${pageSize}&companyId=${companyId}`);
76
+ var params = {
77
+ pageNo: pageNo,
78
+ pageSize: pageSize,
79
+ companyId: companyId
80
+ }
81
+ return axios.get(`/api/v2/coremde-sale/company/revenue/year/list`, {
82
+ params: params
83
+ });
57
84
  },
58
85
  },
59
86
  //最新情况统计,最近一个月,最近十天,最近一天
@@ -71,9 +98,16 @@ export class CompanyGateway extends Object {
71
98
  return axios.get(`/api/v2/coremde-sale/company/revenue/month/get?companyId=${companyId}`);
72
99
  },
73
100
  },
74
- list: async (companyId: number, pageNo: number, pageSize: number) => {
101
+ list: async (companyId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) => {
75
102
  var axios = await this.context.ready;
76
- return axios.get(`/api/v2/coremde-sale/company/revenue/list?pageNo=${pageNo}&pageSize=${pageSize}`);
103
+ var params = {
104
+ pageNo: pageNo,
105
+ pageSize: pageSize,
106
+ companyId: companyId
107
+ }
108
+ return axios.get(`/api/v2/coremde-sale/company/revenue/list`, {
109
+ params: params
110
+ });
77
111
  },
78
112
  enterprise: async () => {
79
113
  var axios = await this.context.ready;
@@ -39,17 +39,43 @@ class CompanyGateway extends Object {
39
39
  }
40
40
  };
41
41
  }
42
+ get enterprise() {
43
+ return {
44
+ userCount: async (companyId) => {
45
+ var axios = await this.context.ready;
46
+ return axios.get(`/api/v2/coremde-sale/company/enterprise/count/user`);
47
+ },
48
+ revenue: async () => {
49
+ var axios = await this.context.ready;
50
+ return axios.get(`/api/v2/coremde-sale/company/enterprise/revenue/get`);
51
+ }
52
+ };
53
+ }
42
54
  get revenue() {
43
55
  return {
44
56
  //按类型统计
45
57
  groupSummary: {
46
- byMonth: async (companyId, pageNo, pageSize) => {
58
+ byMonth: async (companyId, pageNo = undefined, pageSize = undefined) => {
47
59
  var axios = await this.context.ready;
48
- return axios.get(`/api/v2/coremde-sale/company/revenue/month/list?pageNo=${pageNo}&pageSize=${pageSize}&companyId=${companyId}`);
60
+ var params = {
61
+ pageNo: pageNo,
62
+ pageSize: pageSize,
63
+ companyId: companyId
64
+ };
65
+ return axios.get(`/api/v2/coremde-sale/company/revenue/month/list`, {
66
+ params: params
67
+ });
49
68
  },
50
- byYear: async (companyId, pageNo, pageSize) => {
69
+ byYear: async (companyId, pageNo = undefined, pageSize = undefined) => {
51
70
  var axios = await this.context.ready;
52
- return axios.get(`/api/v2/coremde-sale/company/revenue/year/list?pageNo=${pageNo}&pageSize=${pageSize}&companyId=${companyId}`);
71
+ var params = {
72
+ pageNo: pageNo,
73
+ pageSize: pageSize,
74
+ companyId: companyId
75
+ };
76
+ return axios.get(`/api/v2/coremde-sale/company/revenue/year/list`, {
77
+ params: params
78
+ });
53
79
  },
54
80
  },
55
81
  //最新情况统计,最近一个月,最近十天,最近一天
@@ -67,9 +93,16 @@ class CompanyGateway extends Object {
67
93
  return axios.get(`/api/v2/coremde-sale/company/revenue/month/get?companyId=${companyId}`);
68
94
  },
69
95
  },
70
- list: async (companyId, pageNo, pageSize) => {
96
+ list: async (companyId, pageNo = undefined, pageSize = undefined) => {
71
97
  var axios = await this.context.ready;
72
- return axios.get(`/api/v2/coremde-sale/company/revenue/list?pageNo=${pageNo}&pageSize=${pageSize}`);
98
+ var params = {
99
+ pageNo: pageNo,
100
+ pageSize: pageSize,
101
+ companyId: companyId
102
+ };
103
+ return axios.get(`/api/v2/coremde-sale/company/revenue/list`, {
104
+ params: params
105
+ });
73
106
  },
74
107
  enterprise: async () => {
75
108
  var axios = await this.context.ready;
@@ -31,7 +31,9 @@ class ProductGateway extends Object {
31
31
  //下载报价单
32
32
  export: (args) => {
33
33
  return this.context.ready.then((axios) => {
34
- return axios.getAndSave(`/api/v2/coremde-sale/product/price/export`, args, "报价单.xlsx");
34
+ return axios.getAndSave(`/api/v2/coremde-sale/product/price/export`, {
35
+ params: args,
36
+ }, "报价单.xlsx");
35
37
  });
36
38
  },
37
39
  add: (args) => {
@@ -77,12 +77,16 @@ class ProjectGateway extends Object {
77
77
  },
78
78
  };
79
79
  }
80
- get meterial() {
80
+ get material() {
81
81
  return {
82
82
  // 获取材料列表
83
- list: (args) => {
83
+ list: (pageNo = undefined, pageSize = undefined) => {
84
84
  return this.context.ready.then((axios) => {
85
- return axios.post(`/api/v2/coremde-sale/project/meterial/list`, args);
85
+ var params = {
86
+ pageNo,
87
+ pageSize
88
+ };
89
+ return axios.post(`/api/v2/coremde-sale/project/material/list`, params);
86
90
  });
87
91
  }
88
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -50,7 +50,9 @@ export class ProductGateway extends Object {
50
50
  pageSize: number;
51
51
  }) => {
52
52
  return this.context.ready.then((axios) => {
53
- return axios.getAndSave(`/api/v2/coremde-sale/product/price/export`, args, "报价单.xlsx");
53
+ return axios.getAndSave(`/api/v2/coremde-sale/product/price/export`, {
54
+ params: args,
55
+ }, "报价单.xlsx");
54
56
  });
55
57
  },
56
58
  add: (args: {
@@ -109,16 +109,16 @@ export class ProjectGateway extends Object {
109
109
  }
110
110
 
111
111
 
112
- get meterial() {
112
+ get material() {
113
113
  return {
114
114
  // 获取材料列表
115
- list: (args: {
116
- pageNo: number;
117
- pageSize: number;
118
- projectId: number;
119
- }) => {
115
+ list: (pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) => {
120
116
  return this.context.ready.then((axios) => {
121
- return axios.post(`/api/v2/coremde-sale/project/meterial/list`, args);
117
+ var params = {
118
+ pageNo,
119
+ pageSize
120
+ }
121
+ return axios.post(`/api/v2/coremde-sale/project/material/list`,params);
122
122
  });
123
123
  }
124
124
  }
package/readme.md CHANGED
@@ -197,7 +197,8 @@ baseURL: "/"
197
197
  | cpzxrobot().company.revenue.recentSummary.byDay | 按公司当日营收统计 |
198
198
  | cpzxrobot().company.revenue.recentSummary.byDecade | 按公司按旬营收统计 |
199
199
  | cpzxrobot().company.revenue.list | 获得公司营收列表,传入必要的分页参数 |
200
- | cpzxrobot().company.revenue.enterprise | 获得集团整体营收统计 |
200
+ | cpzxrobot().company.enterprise.revenue | 获得集团整体营收统计 |
201
+ | cpzxrobot().company.enterprise.userCount | 获得集团整体用户统计 |
201
202
  | cpzxrobot().car.stat.china | 获得车辆在全国的统计信息 |
202
203
  | cpzxrobot().car.listByProvince | 获得车辆在某个省的统计信息,传入province参数 |
203
204
  | cpzxrobot().car.listByCity | 获得车辆在某个市的统计信息,传入city参数 |