@cpzxrobot/sdk 1.0.35 → 1.0.36
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/dist/transport_gateway.js +17 -0
- package/package.json +1 -1
- package/readme.md +1 -0
- package/transport_gateway.ts +17 -0
|
@@ -33,6 +33,23 @@ class TransportGateway extends Object {
|
|
|
33
33
|
get inputs() {
|
|
34
34
|
return this.getDetail;
|
|
35
35
|
},
|
|
36
|
+
//按料单获得对应的料塔
|
|
37
|
+
getDeviceByFodderld: (id) => {
|
|
38
|
+
return this.context.ready.then(() => {
|
|
39
|
+
return this.context.axios
|
|
40
|
+
.get("/api/v1/pigfarm/device/fodderTower/getDeviceByFodderld", {
|
|
41
|
+
params: {
|
|
42
|
+
fodderld: id,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
.then((res) => {
|
|
46
|
+
if (res.data.code != 200) {
|
|
47
|
+
throw res.data.message;
|
|
48
|
+
}
|
|
49
|
+
return res.data.data;
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
},
|
|
36
53
|
//获取设备打料数据 deperecated
|
|
37
54
|
getDetail: (ids, date) => {
|
|
38
55
|
return this.context.ready.then(() => {
|
package/package.json
CHANGED
package/readme.md
CHANGED
package/transport_gateway.ts
CHANGED
|
@@ -43,6 +43,23 @@ export class TransportGateway extends Object {
|
|
|
43
43
|
get inputs() {
|
|
44
44
|
return this.getDetail;
|
|
45
45
|
},
|
|
46
|
+
//按料单获得对应的料塔
|
|
47
|
+
getDeviceByFodderld: (id: number): Promise<any> => {
|
|
48
|
+
return this.context.ready.then(() => {
|
|
49
|
+
return this.context.axios
|
|
50
|
+
.get("/api/v1/pigfarm/device/fodderTower/getDeviceByFodderld", {
|
|
51
|
+
params: {
|
|
52
|
+
fodderld: id,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
.then((res) => {
|
|
56
|
+
if (res.data.code != 200) {
|
|
57
|
+
throw res.data.message;
|
|
58
|
+
}
|
|
59
|
+
return res.data.data;
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
},
|
|
46
63
|
//获取设备打料数据 deperecated
|
|
47
64
|
getDetail: (ids: Array<number>, date: string): Promise<any> => {
|
|
48
65
|
return this.context.ready.then(() => {
|