node-red-trexmes-commands 1.5.3 → 1.5.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.
- package/package.json +1 -1
- package/trexcommands.html +1 -1
- package/trexcommands.js +4 -1
package/package.json
CHANGED
package/trexcommands.html
CHANGED
|
@@ -464,7 +464,7 @@
|
|
|
464
464
|
data = '{ "WorkstationId": 10 }';
|
|
465
465
|
}
|
|
466
466
|
else if(operationMode.startsWith('16|')) { //Create Deffect
|
|
467
|
-
data = '{ "WorkstationId": 10, "DefectId": 11,"StockId": 12, "Quantity": 15.5 }';
|
|
467
|
+
data = '{ "WorkstationId": 10, "JobOrderId": 123456, "DefectId": 11,"StockId": 12, "Quantity": 15.5 }';
|
|
468
468
|
}
|
|
469
469
|
else if(operationMode.startsWith('100|')) { //Get Open Jobs
|
|
470
470
|
data = '{ "WorkstationId": 10 }';
|
package/trexcommands.js
CHANGED
|
@@ -107,13 +107,16 @@ module.exports = function (RED) {
|
|
|
107
107
|
if(!payload.DefectId){
|
|
108
108
|
return result;
|
|
109
109
|
}
|
|
110
|
+
if(!payload.JobOrderId){
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
110
113
|
if(!payload.StockId){
|
|
111
114
|
return result;
|
|
112
115
|
}
|
|
113
116
|
if(!payload.Quantity){
|
|
114
117
|
return result;
|
|
115
118
|
}
|
|
116
|
-
result.command = JSON.stringify({ "WorkstationId" : payload.WorkstationId, "DefectId": payload.DefectId, "StockId": payload.StockId, "Quantity": payload.Quantity, "ReferenceQuantityType": 0 });
|
|
119
|
+
result.command = JSON.stringify({ "WorkstationId" : payload.WorkstationId, "JobOrderId":payload.JobOrderId, "DefectId": payload.DefectId, "StockId": payload.StockId, "Quantity": payload.Quantity, "ReferenceQuantityType": 0 });
|
|
117
120
|
result.isOk = true;
|
|
118
121
|
}
|
|
119
122
|
else if(payload.operationMode == "100" ) { // Get Open Jobs
|