node-red-trexmes-commands 1.5.4 → 1.5.5
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.js +15 -14
package/package.json
CHANGED
package/trexcommands.js
CHANGED
|
@@ -44,63 +44,64 @@ module.exports = function (RED) {
|
|
|
44
44
|
|
|
45
45
|
if(payload.operationMode == "1" ) { // Load Job Plan
|
|
46
46
|
if(!payload.PlanId){
|
|
47
|
+
node.warn("DENEME");
|
|
47
48
|
return result;
|
|
48
49
|
}
|
|
49
|
-
result.command = JSON.stringify({ "
|
|
50
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "PlanId": payload.PlanId });
|
|
50
51
|
result.isOk = true;
|
|
51
52
|
}
|
|
52
53
|
else if(payload.operationMode == "4" ) { // Finish Production
|
|
53
|
-
result.command = JSON.stringify({ "
|
|
54
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "Quantity": 0, "ReferenceQuantityType": 0, "IsQuantityApproved": false });
|
|
54
55
|
result.isOk = true;
|
|
55
56
|
}
|
|
56
57
|
else if(payload.operationMode == "5" ) { // Start Stoppage
|
|
57
58
|
if(!payload.StoppageCauseId){
|
|
58
59
|
return result;
|
|
59
60
|
}
|
|
60
|
-
result.command = JSON.stringify({ "
|
|
61
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "StoppageCauseId": payload.StoppageCauseId });
|
|
61
62
|
result.isOk = true;
|
|
62
63
|
}
|
|
63
64
|
else if(payload.operationMode == "6" ) { // Change Stoppage
|
|
64
65
|
if(!payload.StoppageCauseId){
|
|
65
66
|
return result;
|
|
66
67
|
}
|
|
67
|
-
result.command = JSON.stringify({ "
|
|
68
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "StoppageCauseId": payload.StoppageCauseId });
|
|
68
69
|
result.isOk = true;
|
|
69
70
|
}
|
|
70
71
|
else if(payload.operationMode == "7" ) { // Finish Stoppage
|
|
71
|
-
result.command = JSON.stringify({ "
|
|
72
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId });
|
|
72
73
|
result.isOk = true;
|
|
73
74
|
}
|
|
74
75
|
else if(payload.operationMode == "9" ) { // Login Employee
|
|
75
76
|
if(!payload.EmployeeId){
|
|
76
77
|
return result;
|
|
77
78
|
}
|
|
78
|
-
result.command = JSON.stringify({ "
|
|
79
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "EmployeeId": payload.EmployeeId });
|
|
79
80
|
result.isOk = true;
|
|
80
81
|
}
|
|
81
82
|
else if(payload.operationMode == "10" ) { // Logout Employee
|
|
82
83
|
if(!payload.EmployeeId){
|
|
83
84
|
return result;
|
|
84
85
|
}
|
|
85
|
-
result.command = JSON.stringify({ "
|
|
86
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "EmployeeId": payload.EmployeeId });
|
|
86
87
|
result.isOk = true;
|
|
87
88
|
}
|
|
88
89
|
else if(payload.operationMode == "13" ) { // Shifted Shift
|
|
89
90
|
if(!payload.LineId){
|
|
90
91
|
return result;
|
|
91
92
|
}
|
|
92
|
-
result.command = JSON.stringify({ "
|
|
93
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "LineId": payload.LineId });
|
|
93
94
|
result.isOk = true;
|
|
94
95
|
}
|
|
95
96
|
else if(payload.operationMode == "14" ) { // Start Test Mode
|
|
96
97
|
if(!payload.StoppageCauseId){
|
|
97
98
|
return result;
|
|
98
99
|
}
|
|
99
|
-
result.command = JSON.stringify({ "
|
|
100
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "StoppageCauseId": payload.StoppageCauseId });
|
|
100
101
|
result.isOk = true;
|
|
101
102
|
}
|
|
102
103
|
else if(payload.operationMode == "15" ) { // Finish Test Mode
|
|
103
|
-
result.command = JSON.stringify({ "
|
|
104
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId });
|
|
104
105
|
result.isOk = true;
|
|
105
106
|
}
|
|
106
107
|
else if(payload.operationMode == "16" ) { // Create Deffect
|
|
@@ -116,16 +117,16 @@ module.exports = function (RED) {
|
|
|
116
117
|
if(!payload.Quantity){
|
|
117
118
|
return result;
|
|
118
119
|
}
|
|
119
|
-
result.command = JSON.stringify({ "
|
|
120
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId, "JobOrderId":payload.JobOrderId, "DefectId": payload.DefectId, "StockId": payload.StockId, "Quantity": payload.Quantity, "ReferenceQuantityType": 0 });
|
|
120
121
|
result.isOk = true;
|
|
121
122
|
}
|
|
122
123
|
else if(payload.operationMode == "100" ) { // Get Open Jobs
|
|
123
|
-
result.command = JSON.stringify({ "
|
|
124
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId });
|
|
124
125
|
result.isOk = true;
|
|
125
126
|
result.isGetFunc = true;
|
|
126
127
|
}
|
|
127
128
|
else if(payload.operationMode == "101" ) { // Get StopCause List
|
|
128
|
-
result.command = JSON.stringify({ "
|
|
129
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId });
|
|
129
130
|
result.isOk = true;
|
|
130
131
|
result.isGetFunc = true;
|
|
131
132
|
}
|
|
@@ -135,7 +136,7 @@ module.exports = function (RED) {
|
|
|
135
136
|
result.isGetFunc = true;
|
|
136
137
|
}
|
|
137
138
|
else if(payload.operationMode == "103" ) { // Get Station Status
|
|
138
|
-
result.command = JSON.stringify({ "
|
|
139
|
+
result.command = JSON.stringify({ "WorkStationId" : payload.WorkstationId });
|
|
139
140
|
result.isOk = true;
|
|
140
141
|
result.isGetFunc = true;
|
|
141
142
|
}
|