@cpzxrobot/sdk 1.3.40 → 1.3.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.
- package/car_gateway.ts +7 -9
- package/dist/car_gateway.js +5 -6
- package/package.json +1 -1
package/car_gateway.ts
CHANGED
|
@@ -14,14 +14,6 @@ export class CarGateway extends Object {
|
|
|
14
14
|
.then((res) => res.data);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
async addWeightRecords(factory: Factory, data: any) {
|
|
18
|
-
var axios = await this.context.ready;
|
|
19
|
-
return axios
|
|
20
|
-
.post(`/api/v2/car/${factory.pid}/weightRecords`, data)
|
|
21
|
-
.then((res) => res.data);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
17
|
async detections(factory: Factory, date: Date) {
|
|
26
18
|
var axios = await this.context.ready;
|
|
27
19
|
return axios
|
|
@@ -47,7 +39,7 @@ export class CarGateway extends Object {
|
|
|
47
39
|
var axios = await this.context.ready;
|
|
48
40
|
//filter=未分配的
|
|
49
41
|
return axios
|
|
50
|
-
.get(`/api/v2/car/${factory.id}/order?date=` + date.toISOString()+"&filter=unallocated")
|
|
42
|
+
.get(`/api/v2/car/${factory.id}/order?date=` + date.toISOString() + "&filter=unallocated")
|
|
51
43
|
.then((res) => res.data);
|
|
52
44
|
}
|
|
53
45
|
|
|
@@ -81,8 +73,14 @@ export class CarGateway extends Object {
|
|
|
81
73
|
// "manualCarWeight":20000,
|
|
82
74
|
// "manualCarWeightTime":"2025-05-08 08:20:49"
|
|
83
75
|
// }
|
|
76
|
+
// 增加手动重量记录或者增加称重记录
|
|
84
77
|
async updateRecord(factory: Factory, record: any) {
|
|
85
78
|
var axios = await this.context.ready;
|
|
86
79
|
return axios.post(`/api/v2/car/${factory.pid}/weightRecord`, record);
|
|
87
80
|
}
|
|
81
|
+
|
|
82
|
+
async addRecord(factory: Factory, record: any) {
|
|
83
|
+
var axios = await this.context.ready;
|
|
84
|
+
return axios.post(`/api/v2/car/${factory.pid}/weightRecord`, record);
|
|
85
|
+
}
|
|
88
86
|
}
|
package/dist/car_gateway.js
CHANGED
|
@@ -12,12 +12,6 @@ class CarGateway extends Object {
|
|
|
12
12
|
.get(`/api/v2/car/${factory.pid}/weightRecords?date=` + date.toISOString())
|
|
13
13
|
.then((res) => res.data);
|
|
14
14
|
}
|
|
15
|
-
async addWeightRecords(factory, data) {
|
|
16
|
-
var axios = await this.context.ready;
|
|
17
|
-
return axios
|
|
18
|
-
.post(`/api/v2/car/${factory.pid}/weightRecords`, data)
|
|
19
|
-
.then((res) => res.data);
|
|
20
|
-
}
|
|
21
15
|
async detections(factory, date) {
|
|
22
16
|
var axios = await this.context.ready;
|
|
23
17
|
return axios
|
|
@@ -70,9 +64,14 @@ class CarGateway extends Object {
|
|
|
70
64
|
// "manualCarWeight":20000,
|
|
71
65
|
// "manualCarWeightTime":"2025-05-08 08:20:49"
|
|
72
66
|
// }
|
|
67
|
+
// 增加手动重量记录或者增加称重记录
|
|
73
68
|
async updateRecord(factory, record) {
|
|
74
69
|
var axios = await this.context.ready;
|
|
75
70
|
return axios.post(`/api/v2/car/${factory.pid}/weightRecord`, record);
|
|
76
71
|
}
|
|
72
|
+
async addRecord(factory, record) {
|
|
73
|
+
var axios = await this.context.ready;
|
|
74
|
+
return axios.post(`/api/v2/car/${factory.pid}/weightRecord`, record);
|
|
75
|
+
}
|
|
77
76
|
}
|
|
78
77
|
exports.CarGateway = CarGateway;
|