@cpzxrobot/sdk 1.2.1 → 1.2.2
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 +12 -0
- package/package.json +1 -1
- package/readme.md +2 -0
- package/unit_gateway.ts +12 -0
package/dist/unit_gateway.js
CHANGED
|
@@ -85,6 +85,7 @@ class UnitGateway extends Object {
|
|
|
85
85
|
//批次管理
|
|
86
86
|
get batch() {
|
|
87
87
|
return {
|
|
88
|
+
// @deprecated
|
|
88
89
|
bind: (unitDayage, batchNo, type) => {
|
|
89
90
|
return this.context.ready.then((axios) => {
|
|
90
91
|
return axios.post(`/api/v2/batch/unit/bind`, {
|
|
@@ -94,6 +95,17 @@ class UnitGateway extends Object {
|
|
|
94
95
|
});
|
|
95
96
|
});
|
|
96
97
|
},
|
|
98
|
+
//创建批次,和bind可以复用
|
|
99
|
+
create: (args) => {
|
|
100
|
+
return this.context.ready.then((axios) => {
|
|
101
|
+
return axios.post(`/api/v2/batch/unit/bind`, args);
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
update: (args) => {
|
|
105
|
+
return this.context.ready.then((axios) => {
|
|
106
|
+
return axios.post(`/api/v2/batch/unit/update`, args);
|
|
107
|
+
});
|
|
108
|
+
},
|
|
97
109
|
clear: (args) => {
|
|
98
110
|
return this.context.ready.then((axios) => {
|
|
99
111
|
return axios.post(`/api/v2/batch/unit/empty`, args);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -145,6 +145,8 @@ baseURL: "/"
|
|
|
145
145
|
| cpzxrobot().unit.thresholdConfig.bind | 设置单元的阈值配置信息 |
|
|
146
146
|
| cpzxrobot().unit.thresholdConfig.delete | 删除单元的阈值配置信息,传入get获取的条目的具体id或对象本身 |
|
|
147
147
|
| cpzxrobot().unit.batch.bind | 绑定单元和生产批次关系 |
|
|
148
|
+
| cpzxrobot().unit.batch.create | 创建生产批次 |
|
|
149
|
+
| cpzxrobot().unit.batch.update | 更新生产批次信息,传入id参数和更新的内容 |
|
|
148
150
|
| cpzxrobot().unit.batch.clear | 清除单元绑定的生产批次 |
|
|
149
151
|
| cpzxrobot().unit.batch.getUnits | 获取批次的绑定单元信息 |
|
|
150
152
|
| cpzxrobot().unit.batch.searchInUnit | 搜索单元的生产批次信息 |
|
package/unit_gateway.ts
CHANGED
|
@@ -102,6 +102,7 @@ export class UnitGateway extends Object {
|
|
|
102
102
|
//批次管理
|
|
103
103
|
get batch() {
|
|
104
104
|
return {
|
|
105
|
+
// @deprecated
|
|
105
106
|
bind: (unitDayage: {
|
|
106
107
|
unitId: Number;
|
|
107
108
|
dayage: Number;
|
|
@@ -115,6 +116,17 @@ export class UnitGateway extends Object {
|
|
|
115
116
|
});
|
|
116
117
|
});
|
|
117
118
|
},
|
|
119
|
+
//创建批次,和bind可以复用
|
|
120
|
+
create: (args:any) => {
|
|
121
|
+
return this.context.ready.then((axios) => {
|
|
122
|
+
return axios.post(`/api/v2/batch/unit/bind`, args);
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
update: (args:any) => {
|
|
126
|
+
return this.context.ready.then((axios) => {
|
|
127
|
+
return axios.post(`/api/v2/batch/unit/update`, args);
|
|
128
|
+
});
|
|
129
|
+
},
|
|
118
130
|
clear: (args:any) => {
|
|
119
131
|
return this.context.ready.then((axios) => {
|
|
120
132
|
return axios.post(
|