@cpzxrobot/sdk 1.2.5 → 1.2.6
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/unit_gateway.js +20 -8
- package/package.json +1 -1
- package/readme.md +2 -0
- package/unit_gateway.ts +21 -9
package/dist/unit_gateway.js
CHANGED
|
@@ -137,14 +137,26 @@ class UnitGateway extends Object {
|
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
// 获取批次操作记录
|
|
141
|
+
operation: (batchNo) => {
|
|
142
|
+
return this.context.ready.then((axios) => {
|
|
143
|
+
return axios.get(`/api/v2/batch/operation`, {
|
|
144
|
+
params: {
|
|
145
|
+
batchNo
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
// 删除批次
|
|
151
|
+
delete: (id) => {
|
|
152
|
+
return this.context.ready.then((axios) => {
|
|
153
|
+
return axios.get(`/api/v2/batch/delete`, {
|
|
154
|
+
params: {
|
|
155
|
+
id
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
148
160
|
};
|
|
149
161
|
}
|
|
150
162
|
v2() {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -152,6 +152,8 @@ baseURL: "/"
|
|
|
152
152
|
| cpzxrobot().unit.batch.getUnits | 获取批次的绑定单元信息 |
|
|
153
153
|
| cpzxrobot().unit.batch.searchInUnit | 搜索单元的生产批次信息 |
|
|
154
154
|
| cpzxrobot().unit.batch.list | 获取多个单元的生产批次信息 |
|
|
155
|
+
| cpzxrobot().unit.batch.operation | 获取批次操作记录,传入 batchNo 参数 |
|
|
156
|
+
| cpzxrobot().unit.batch.deleteBatch | 删除批次,传入批次 id 参数 |
|
|
155
157
|
| cpzxrobot().user.add | 添加用户 |
|
|
156
158
|
| cpzxrobot().user.update | 更新用户 |
|
|
157
159
|
| cpzxrobot().user.list | 列出用户(传入工厂) |
|
package/unit_gateway.ts
CHANGED
|
@@ -160,14 +160,26 @@ export class UnitGateway extends Object {
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
},
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
// 获取批次操作记录
|
|
164
|
+
operation: (batchNo: string) => {
|
|
165
|
+
return this.context.ready.then((axios) => {
|
|
166
|
+
return axios.get(`/api/v2/batch/operation`, {
|
|
167
|
+
params: {
|
|
168
|
+
batchNo
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
// 删除批次
|
|
174
|
+
delete: (id: string) => {
|
|
175
|
+
return this.context.ready.then((axios) => {
|
|
176
|
+
return axios.get(`/api/v2/batch/delete`, {
|
|
177
|
+
params: {
|
|
178
|
+
id
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
171
183
|
}
|
|
172
184
|
}
|
|
173
185
|
|
|
@@ -212,4 +224,4 @@ export class UnitGateway extends Object {
|
|
|
212
224
|
},
|
|
213
225
|
};
|
|
214
226
|
}
|
|
215
|
-
}
|
|
227
|
+
}
|