@cpzxrobot/sdk 1.2.31 → 1.2.32

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.
@@ -13,6 +13,27 @@ export class CompanyGateway extends Object {
13
13
  .get(`/api/v2/company/list?current=${pageNo}&size=${pageSize}`);
14
14
  }
15
15
 
16
+ async detail(id: number) {
17
+ var axios = await this.context.ready;
18
+ return axios.get(`/api/v2/company/get?id=${id}`);
19
+ }
20
+
21
+ async create(data: any) {
22
+ var axios = await this.context.ready;
23
+ return axios.post(`/api/v2/company/add`, data);
24
+ }
25
+
26
+ async update(id: number, data: any) {
27
+ var axios = await this.context.ready;
28
+ data.id = id;
29
+ return axios.post(`/api/v2/company/update`, data);
30
+ }
31
+
32
+ async delete(id: number) {
33
+ var axios = await this.context.ready;
34
+ return axios.get(`/api/v2/company/delete/id=${id}`);
35
+ }
36
+
16
37
  get rank() {
17
38
  return {
18
39
  byRevenue: async () => {
@@ -11,6 +11,23 @@ class CompanyGateway extends Object {
11
11
  return axios
12
12
  .get(`/api/v2/company/list?current=${pageNo}&size=${pageSize}`);
13
13
  }
14
+ async detail(id) {
15
+ var axios = await this.context.ready;
16
+ return axios.get(`/api/v2/company/get?id=${id}`);
17
+ }
18
+ async create(data) {
19
+ var axios = await this.context.ready;
20
+ return axios.post(`/api/v2/company/add`, data);
21
+ }
22
+ async update(id, data) {
23
+ var axios = await this.context.ready;
24
+ data.id = id;
25
+ return axios.post(`/api/v2/company/update`, data);
26
+ }
27
+ async delete(id) {
28
+ var axios = await this.context.ready;
29
+ return axios.get(`/api/v2/company/delete/id=${id}`);
30
+ }
14
31
  get rank() {
15
32
  return {
16
33
  byRevenue: async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -953,7 +953,7 @@ baseURL: "/"
953
953
  | cpzxrobot().factory.workshop.post | 添加车间信息 |
954
954
  | cpzxrobot().factory.workshop.types | 获得车间的类型列表 |
955
955
  | cpzxrobot().factory.workshop.delete | 删除车间信息,需要传入id参数 |
956
- | cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |ldiba
956
+ | cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |
957
957
  | cpzxrobot().transport.fodder.getDeviceByFodderld | 获得料单对应的设备 |
958
958
  | cpzxrobot().transport.fodder.getRecentLoad | 获取料塔最近打料记录,传入towerId参数 |
959
959
  | cpzxrobot().transport.fodder.delete | 删除饲料信息,需要传入id参数 |