@cpzxrobot/sdk 1.0.88 → 1.0.90

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.
@@ -37,7 +37,11 @@ class FactoryGateway extends Object {
37
37
  },
38
38
  types: async (factoryType) => {
39
39
  var axios = await this.context.ready;
40
- return axios.get(`/api/v1/workshop/types?factoryType=${factoryType}`);
40
+ return axios.get(`/api/v1/workshop/types/${factoryType}`);
41
+ },
42
+ list: async (factory) => {
43
+ var axios = await this.context.ready;
44
+ return axios.get(`/api/v1/factory/${factory.id}/workshops`);
41
45
  },
42
46
  };
43
47
  }
@@ -42,7 +42,11 @@ export class FactoryGateway extends Object {
42
42
  },
43
43
  types: async (factoryType: string) => {
44
44
  var axios = await this.context.ready;
45
- return axios.get(`/api/v1/workshop/types?factoryType=${factoryType}`);
45
+ return axios.get(`/api/v1/workshop/types/${factoryType}`);
46
+ },
47
+ list: async (factory: Factory) => {
48
+ var axios = await this.context.ready;
49
+ return axios.get(`/api/v1/factory/${factory.id}/workshops`);
46
50
  },
47
51
  };
48
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -91,6 +91,9 @@ baseURL: "/"
91
91
  | cpzxrobot().factory.info.post | 更新或更新工厂的附加信息 |
92
92
  | cpzxrobot().factory.banner.add | 添加工厂的banner图片,提交formdata,需要传入file参数 |
93
93
  | cpzxrobot().factory.banner.delete | 删除工厂的banner图片,需要传入id参数 |
94
+ | cpzxrobot().factory.workshop.get | 获得工厂的某个车间信息 |
95
+ | cpzxrobot().factory.workshop.post | 添加料单信息 |
96
+ | cpzxrobot().factory.workshop.types | 获得料单的类型列表 |
94
97
  | cpzxrobot().transport.fodder.getDeviceByFodderld | 获得料单对应的设备 |
95
98
  | cpzxrobot().pigfarm.heatlamp.xxx | 操作保温灯 |
96
99
  | cpzxrobot().pigfarm.weightMeter.config.list | 获取称重计的配置信息 |