@cpzxrobot/sdk 1.1.3 → 1.1.4

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.
@@ -42,7 +42,7 @@ export class FeedTowerGateway extends DeviceFilter<FeedTower> {
42
42
  throw res[0].data.Error;
43
43
  } else {
44
44
  if (!args.ingoreInput) {
45
- if (res[1].data.data.list == undefined){
45
+ if (res[1].data.data.list == undefined) {
46
46
  throw "未查询到饲料下料数据,请联系管理员";
47
47
  }
48
48
  res[1].data.data.list.forEach((item: any) => {
@@ -166,22 +166,22 @@ export class FeedTowerGateway extends DeviceFilter<FeedTower> {
166
166
  options:
167
167
  | undefined
168
168
  | {
169
- id?: Number | null | undefined; //工厂id
170
- data?:
171
- | "diffPerDay"
172
- | "sumPerDay"
173
- | "latest"
174
- | "weekoverweek"
175
- | "last"
176
- | "rangeOfDay"
177
- | "rangeToday"
178
- | null; //如果data为null,则不获取数据,只获取设备列表,否则获取设备列表和数据
179
- status?: string;
180
- unit?: Number;
181
- detail?: boolean;
182
- type?: string;
183
- supplier?: string; //供应商,可用于过滤设备
184
- } = undefined
169
+ id?: Number | null | undefined; //工厂id
170
+ data?:
171
+ | "diffPerDay"
172
+ | "sumPerDay"
173
+ | "latest"
174
+ | "weekoverweek"
175
+ | "last"
176
+ | "rangeOfDay"
177
+ | "rangeToday"
178
+ | null; //如果data为null,则不获取数据,只获取设备列表,否则获取设备列表和数据
179
+ status?: string;
180
+ unit?: Number;
181
+ detail?: boolean;
182
+ type?: string;
183
+ supplier?: string; //供应商,可用于过滤设备
184
+ } = undefined
185
185
  ) => {
186
186
  return this.context.axios.get(
187
187
  `/api/v2/device/feedTower/list/${options?.id}`
@@ -193,12 +193,18 @@ export class FeedTowerGateway extends DeviceFilter<FeedTower> {
193
193
  update: (ft: FeedTowerV2) => {
194
194
  return this.context.axios.post("/api/v2/device/feedTower/update", ft);
195
195
  },
196
- adzero: (ft: FeedTowerV2,force = false) => {
197
- return this.context.axios.post(`/api/v2/device/feedTower/adzero`,{
196
+ adzero: (ft: FeedTowerV2, force = false) => {
197
+ return this.context.axios.post(`/api/v2/device/feedTower/adzero`, {
198
198
  id: ft.id,
199
199
  force: force
200
200
  });
201
- }
201
+ },
202
+ correctWeight: (ft: FeedTowerV2, amount: Number) => {
203
+ return this.context.axios.post(`/api/v2/device/feedTower/correctWeight`, {
204
+ id: ft.id,
205
+ suttle: amount,
206
+ });
207
+ }
202
208
  };
203
209
  }
204
210
  }
@@ -136,6 +136,12 @@ class FeedTowerGateway extends device_filter_1.DeviceFilter {
136
136
  id: ft.id,
137
137
  force: force
138
138
  });
139
+ },
140
+ correctWeight: (ft, amount) => {
141
+ return this.context.axios.post(`/api/v2/device/feedTower/correctWeight`, {
142
+ id: ft.id,
143
+ suttle: amount,
144
+ });
139
145
  }
140
146
  };
141
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {