@ricado/api-client 2.3.17 → 2.3.19
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/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +198 -0
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +959 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/lib/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/lib/Controllers/Packhouse/Site/index.js +6 -0
- package/lib/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +263 -0
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +75 -5
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +1276 -5
- package/lib/Models/Packhouse/Site/CompacSizerBinWeightModel.js +627 -0
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +966 -72
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +260 -8
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +660 -85
- package/lib/Models/Packhouse/Site/PackingLineModel.js +3860 -551
- package/lib/Models/Packhouse/Site/PackrunModel.js +26 -4
- package/lib/Models/Packhouse/Site/RejectBinModel.js +214 -4
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +576 -14
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +113 -9
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +98 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +50 -5
- package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +75 -5
- package/lib/Models/Packhouse/Site/index.js +6 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +6004 -2037
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +175 -0
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +1090 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/src/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/src/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/src/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/src/Controllers/Packhouse/Site/index.js +4 -0
- package/src/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +252 -0
- package/src/Models/Packhouse/Site/BinTipBinModel.js +97 -5
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +1682 -5
- package/src/Models/Packhouse/Site/CompacSizerBinWeightModel.js +715 -0
- package/src/Models/Packhouse/Site/CompacSizerModel.js +1319 -109
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +339 -8
- package/src/Models/Packhouse/Site/MAFSizerModel.js +869 -92
- package/src/Models/Packhouse/Site/PackingLineModel.js +5086 -671
- package/src/Models/Packhouse/Site/PackrunModel.js +33 -4
- package/src/Models/Packhouse/Site/RejectBinModel.js +280 -4
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +775 -15
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +147 -10
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +120 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +65 -5
- package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +97 -5
- package/src/Models/Packhouse/Site/index.js +4 -0
- package/src/PackageVersion.js +1 -1
|
@@ -50,65 +50,147 @@ class CompacSizerModel extends BaseModel
|
|
|
50
50
|
this.name = "";
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* The
|
|
53
|
+
* The Packing Line ID that manages this Compac Sizer
|
|
54
54
|
*
|
|
55
|
-
* @type {
|
|
55
|
+
* @type {string}
|
|
56
56
|
* @public
|
|
57
57
|
*/
|
|
58
|
-
this.
|
|
58
|
+
this.packingLineId = "";
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* The
|
|
61
|
+
* The Sizer Type
|
|
62
62
|
*
|
|
63
|
-
* @type {
|
|
63
|
+
* @type {string}
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.sizerType = "";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* The
|
|
69
|
+
* The Auto Create Batch Delay in Seconds for this Compac Sizer
|
|
70
70
|
*
|
|
71
|
-
* @type {
|
|
71
|
+
* @type {number}
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.autoCreateBatchDelay = 0;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* The Sizer
|
|
77
|
+
* The Points used by this Compac Sizer
|
|
78
78
|
*
|
|
79
|
-
* @type {
|
|
79
|
+
* @type {{currentBatchId: number, currentBatchName: number, currentBatchGrowerCode: number, currentBatchVarietyId: number, currentBatchVarietyName: number, currentBatchComments: number, currentBatchStartTimestamp: number, currentBatchLayoutId: number, currentBatchLayoutName: number, currentBatchSizingProfileName: ?number, currentBatchFruitSizeProfile: ?number, machineAverageFruitWeight: number, machineAverageFruitSize: number, machineCupFill: number, machineRecycledFruitPerMinute: number, machineTotalFruitPerMinute: number, machineDroppedFruitPerMinute: number, machinePackedFruitPerMinute: number, machineMissedFruitPerMinute: number, machineRejectFruitPerMinute: number, machineTraysPerHour: number, machineTraysPerHourTarget: ?number, machineTonnesPerHour: number, machineRodsPerMinute: number, machineIncomingFruitPerMinuteBySize: ?number, machineRecycleFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteByGrade: ?number, createNewBatchRequest: number, createBatchOnPackrunChange: number, createBatchOnTimeBatchChange: number, restartServiceRequest: number, outletGroupSummaries: number, varieties: number, packTypeOutletUtilizationTargets: number}}
|
|
80
80
|
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.points = (function(){
|
|
83
|
+
let pointsDefaultValue = {};
|
|
84
|
+
|
|
85
|
+
pointsDefaultValue.currentBatchId = 0;
|
|
86
|
+
|
|
87
|
+
pointsDefaultValue.currentBatchName = 0;
|
|
88
|
+
|
|
89
|
+
pointsDefaultValue.currentBatchGrowerCode = 0;
|
|
90
|
+
|
|
91
|
+
pointsDefaultValue.currentBatchVarietyId = 0;
|
|
92
|
+
|
|
93
|
+
pointsDefaultValue.currentBatchVarietyName = 0;
|
|
94
|
+
|
|
95
|
+
pointsDefaultValue.currentBatchComments = 0;
|
|
96
|
+
|
|
97
|
+
pointsDefaultValue.currentBatchStartTimestamp = 0;
|
|
98
|
+
|
|
99
|
+
pointsDefaultValue.currentBatchLayoutId = 0;
|
|
100
|
+
|
|
101
|
+
pointsDefaultValue.currentBatchLayoutName = 0;
|
|
102
|
+
|
|
103
|
+
pointsDefaultValue.currentBatchSizingProfileName = null;
|
|
104
|
+
|
|
105
|
+
pointsDefaultValue.currentBatchFruitSizeProfile = null;
|
|
106
|
+
|
|
107
|
+
pointsDefaultValue.machineAverageFruitWeight = 0;
|
|
108
|
+
|
|
109
|
+
pointsDefaultValue.machineAverageFruitSize = 0;
|
|
110
|
+
|
|
111
|
+
pointsDefaultValue.machineCupFill = 0;
|
|
112
|
+
|
|
113
|
+
pointsDefaultValue.machineRecycledFruitPerMinute = 0;
|
|
114
|
+
|
|
115
|
+
pointsDefaultValue.machineTotalFruitPerMinute = 0;
|
|
116
|
+
|
|
117
|
+
pointsDefaultValue.machineDroppedFruitPerMinute = 0;
|
|
118
|
+
|
|
119
|
+
pointsDefaultValue.machinePackedFruitPerMinute = 0;
|
|
120
|
+
|
|
121
|
+
pointsDefaultValue.machineMissedFruitPerMinute = 0;
|
|
122
|
+
|
|
123
|
+
pointsDefaultValue.machineRejectFruitPerMinute = 0;
|
|
124
|
+
|
|
125
|
+
pointsDefaultValue.machineTraysPerHour = 0;
|
|
126
|
+
|
|
127
|
+
pointsDefaultValue.machineTraysPerHourTarget = null;
|
|
128
|
+
|
|
129
|
+
pointsDefaultValue.machineTonnesPerHour = 0;
|
|
130
|
+
|
|
131
|
+
pointsDefaultValue.machineRodsPerMinute = 0;
|
|
132
|
+
|
|
133
|
+
pointsDefaultValue.machineIncomingFruitPerMinuteBySize = null;
|
|
134
|
+
|
|
135
|
+
pointsDefaultValue.machineRecycleFruitPerMinuteBySize = null;
|
|
136
|
+
|
|
137
|
+
pointsDefaultValue.machineLanesFruitPerMinuteBySize = null;
|
|
138
|
+
|
|
139
|
+
pointsDefaultValue.machineLanesFruitPerMinuteByGrade = null;
|
|
140
|
+
|
|
141
|
+
pointsDefaultValue.createNewBatchRequest = 0;
|
|
142
|
+
|
|
143
|
+
pointsDefaultValue.createBatchOnPackrunChange = 0;
|
|
144
|
+
|
|
145
|
+
pointsDefaultValue.createBatchOnTimeBatchChange = 0;
|
|
146
|
+
|
|
147
|
+
pointsDefaultValue.restartServiceRequest = 0;
|
|
148
|
+
|
|
149
|
+
pointsDefaultValue.outletGroupSummaries = 0;
|
|
150
|
+
|
|
151
|
+
pointsDefaultValue.varieties = 0;
|
|
152
|
+
|
|
153
|
+
pointsDefaultValue.packTypeOutletUtilizationTargets = 0;
|
|
154
|
+
|
|
155
|
+
return pointsDefaultValue;
|
|
156
|
+
}());
|
|
83
157
|
|
|
84
158
|
/**
|
|
85
|
-
* The
|
|
159
|
+
* The Lanes defined for this Compac Sizer
|
|
86
160
|
*
|
|
87
|
-
* @type {number}
|
|
161
|
+
* @type {Array<{id: string, number: number, points: {cupFill: number}}>}
|
|
88
162
|
* @public
|
|
89
163
|
*/
|
|
90
|
-
this.
|
|
164
|
+
this.lanes = [];
|
|
91
165
|
|
|
92
166
|
/**
|
|
93
|
-
*
|
|
167
|
+
* An Optional Array of Frames defined for this Compac Sizer
|
|
94
168
|
*
|
|
95
|
-
* @type {
|
|
169
|
+
* @type {Array<{number: number, startLane: number, endLane: number, points: {machineRodsPerMinute: number}}>}
|
|
96
170
|
* @public
|
|
97
171
|
*/
|
|
98
|
-
this.
|
|
172
|
+
this.frames = [];
|
|
99
173
|
|
|
100
174
|
/**
|
|
101
|
-
* The
|
|
175
|
+
* The Outlets defined for this Compac Sizer
|
|
102
176
|
*
|
|
103
|
-
* @type {string}
|
|
177
|
+
* @type {Array<{id: string, number: number, type: string, points: {name: number, fruitPerMinute: number, productId: number, productName: number, utilization: number, status: number, pendingProductId: number, pendingProductName: number}}>}
|
|
104
178
|
* @public
|
|
105
179
|
*/
|
|
106
|
-
this.
|
|
180
|
+
this.outlets = [];
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The Fruit Sizes defined and handled by this Compac Sizer
|
|
184
|
+
*
|
|
185
|
+
* @type {Array<{fruitSize: string, points: {incomingFruitPerMinute: number, recycledFruitPerMinute: number, allocatedFruitPerMinute: number}}>}
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
this.fruitSizes = [];
|
|
107
189
|
|
|
108
190
|
/**
|
|
109
191
|
* The FreshPack Integration Configuration for this Compac Sizer
|
|
110
192
|
*
|
|
111
|
-
* @type {?Object}
|
|
193
|
+
* @type {?{points: Object, enabled: boolean, materialGroupId: number, binTypeId: number, bulkWeightClassTypes: string[]}}
|
|
112
194
|
* @public
|
|
113
195
|
*/
|
|
114
196
|
this.freshPackIntegration = null;
|
|
@@ -116,7 +198,7 @@ class CompacSizerModel extends BaseModel
|
|
|
116
198
|
/**
|
|
117
199
|
* An Array of Sources that deliver Fruit to this Compac Sizer
|
|
118
200
|
*
|
|
119
|
-
* @type {
|
|
201
|
+
* @type {Array<{type: string, riserId: string}|{type: string, sizerId: string, outletNumbers: number[]}>}
|
|
120
202
|
* @public
|
|
121
203
|
*/
|
|
122
204
|
this.sources = [];
|
|
@@ -216,57 +298,15 @@ class CompacSizerModel extends BaseModel
|
|
|
216
298
|
}());
|
|
217
299
|
}
|
|
218
300
|
|
|
219
|
-
if('
|
|
220
|
-
{
|
|
221
|
-
model.lanes = (function(){
|
|
222
|
-
if(Array.isArray(jsonObject['lanes']) !== true)
|
|
223
|
-
{
|
|
224
|
-
return [];
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return jsonObject['lanes'].map((lanesItem) => {
|
|
228
|
-
return (function(){
|
|
229
|
-
if(typeof lanesItem !== 'object')
|
|
230
|
-
{
|
|
231
|
-
return Object(lanesItem);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return lanesItem;
|
|
235
|
-
}());
|
|
236
|
-
});
|
|
237
|
-
}());
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if('points' in jsonObject)
|
|
241
|
-
{
|
|
242
|
-
model.points = (function(){
|
|
243
|
-
if(typeof jsonObject['points'] !== 'object')
|
|
244
|
-
{
|
|
245
|
-
return Object(jsonObject['points']);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return jsonObject['points'];
|
|
249
|
-
}());
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
if('outlets' in jsonObject)
|
|
301
|
+
if('packingLineId' in jsonObject)
|
|
253
302
|
{
|
|
254
|
-
model.
|
|
255
|
-
if(
|
|
303
|
+
model.packingLineId = (function(){
|
|
304
|
+
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
256
305
|
{
|
|
257
|
-
return [];
|
|
306
|
+
return String(jsonObject['packingLineId']);
|
|
258
307
|
}
|
|
259
308
|
|
|
260
|
-
return jsonObject['
|
|
261
|
-
return (function(){
|
|
262
|
-
if(typeof outletsItem !== 'object')
|
|
263
|
-
{
|
|
264
|
-
return Object(outletsItem);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return outletsItem;
|
|
268
|
-
}());
|
|
269
|
-
});
|
|
309
|
+
return jsonObject['packingLineId'];
|
|
270
310
|
}());
|
|
271
311
|
}
|
|
272
312
|
|
|
@@ -294,71 +334,1241 @@ class CompacSizerModel extends BaseModel
|
|
|
294
334
|
}());
|
|
295
335
|
}
|
|
296
336
|
|
|
297
|
-
if('
|
|
337
|
+
if('points' in jsonObject)
|
|
298
338
|
{
|
|
299
|
-
model.
|
|
300
|
-
|
|
339
|
+
model.points = (function(){
|
|
340
|
+
let pointsObject = {};
|
|
341
|
+
|
|
342
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchId' in jsonObject['points'])
|
|
301
343
|
{
|
|
302
|
-
|
|
344
|
+
pointsObject.currentBatchId = (function(){
|
|
345
|
+
if(typeof jsonObject['points'].currentBatchId !== 'number')
|
|
346
|
+
{
|
|
347
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchId)) ? Number(jsonObject['points'].currentBatchId) : Math.floor(Number(jsonObject['points'].currentBatchId));
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return Number.isInteger(jsonObject['points'].currentBatchId) ? jsonObject['points'].currentBatchId : Math.floor(jsonObject['points'].currentBatchId);
|
|
351
|
+
}());
|
|
352
|
+
}
|
|
353
|
+
else
|
|
354
|
+
{
|
|
355
|
+
pointsObject.currentBatchId = 0;
|
|
303
356
|
}
|
|
357
|
+
|
|
358
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchName' in jsonObject['points'])
|
|
359
|
+
{
|
|
360
|
+
pointsObject.currentBatchName = (function(){
|
|
361
|
+
if(typeof jsonObject['points'].currentBatchName !== 'number')
|
|
362
|
+
{
|
|
363
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchName)) ? Number(jsonObject['points'].currentBatchName) : Math.floor(Number(jsonObject['points'].currentBatchName));
|
|
364
|
+
}
|
|
304
365
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
366
|
+
return Number.isInteger(jsonObject['points'].currentBatchName) ? jsonObject['points'].currentBatchName : Math.floor(jsonObject['points'].currentBatchName);
|
|
367
|
+
}());
|
|
368
|
+
}
|
|
369
|
+
else
|
|
370
|
+
{
|
|
371
|
+
pointsObject.currentBatchName = 0;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchGrowerCode' in jsonObject['points'])
|
|
375
|
+
{
|
|
376
|
+
pointsObject.currentBatchGrowerCode = (function(){
|
|
377
|
+
if(typeof jsonObject['points'].currentBatchGrowerCode !== 'number')
|
|
308
378
|
{
|
|
309
|
-
return
|
|
379
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchGrowerCode)) ? Number(jsonObject['points'].currentBatchGrowerCode) : Math.floor(Number(jsonObject['points'].currentBatchGrowerCode));
|
|
310
380
|
}
|
|
311
381
|
|
|
312
|
-
return
|
|
382
|
+
return Number.isInteger(jsonObject['points'].currentBatchGrowerCode) ? jsonObject['points'].currentBatchGrowerCode : Math.floor(jsonObject['points'].currentBatchGrowerCode);
|
|
313
383
|
}());
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
384
|
+
}
|
|
385
|
+
else
|
|
386
|
+
{
|
|
387
|
+
pointsObject.currentBatchGrowerCode = 0;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchVarietyId' in jsonObject['points'])
|
|
391
|
+
{
|
|
392
|
+
pointsObject.currentBatchVarietyId = (function(){
|
|
393
|
+
if(typeof jsonObject['points'].currentBatchVarietyId !== 'number')
|
|
394
|
+
{
|
|
395
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchVarietyId)) ? Number(jsonObject['points'].currentBatchVarietyId) : Math.floor(Number(jsonObject['points'].currentBatchVarietyId));
|
|
396
|
+
}
|
|
317
397
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
398
|
+
return Number.isInteger(jsonObject['points'].currentBatchVarietyId) ? jsonObject['points'].currentBatchVarietyId : Math.floor(jsonObject['points'].currentBatchVarietyId);
|
|
399
|
+
}());
|
|
400
|
+
}
|
|
401
|
+
else
|
|
322
402
|
{
|
|
323
|
-
|
|
403
|
+
pointsObject.currentBatchVarietyId = 0;
|
|
324
404
|
}
|
|
405
|
+
|
|
406
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchVarietyName' in jsonObject['points'])
|
|
407
|
+
{
|
|
408
|
+
pointsObject.currentBatchVarietyName = (function(){
|
|
409
|
+
if(typeof jsonObject['points'].currentBatchVarietyName !== 'number')
|
|
410
|
+
{
|
|
411
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchVarietyName)) ? Number(jsonObject['points'].currentBatchVarietyName) : Math.floor(Number(jsonObject['points'].currentBatchVarietyName));
|
|
412
|
+
}
|
|
325
413
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
414
|
+
return Number.isInteger(jsonObject['points'].currentBatchVarietyName) ? jsonObject['points'].currentBatchVarietyName : Math.floor(jsonObject['points'].currentBatchVarietyName);
|
|
415
|
+
}());
|
|
416
|
+
}
|
|
417
|
+
else
|
|
418
|
+
{
|
|
419
|
+
pointsObject.currentBatchVarietyName = 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchComments' in jsonObject['points'])
|
|
423
|
+
{
|
|
424
|
+
pointsObject.currentBatchComments = (function(){
|
|
425
|
+
if(typeof jsonObject['points'].currentBatchComments !== 'number')
|
|
426
|
+
{
|
|
427
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchComments)) ? Number(jsonObject['points'].currentBatchComments) : Math.floor(Number(jsonObject['points'].currentBatchComments));
|
|
428
|
+
}
|
|
329
429
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
430
|
+
return Number.isInteger(jsonObject['points'].currentBatchComments) ? jsonObject['points'].currentBatchComments : Math.floor(jsonObject['points'].currentBatchComments);
|
|
431
|
+
}());
|
|
432
|
+
}
|
|
433
|
+
else
|
|
334
434
|
{
|
|
335
|
-
|
|
435
|
+
pointsObject.currentBatchComments = 0;
|
|
336
436
|
}
|
|
437
|
+
|
|
438
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchStartTimestamp' in jsonObject['points'])
|
|
439
|
+
{
|
|
440
|
+
pointsObject.currentBatchStartTimestamp = (function(){
|
|
441
|
+
if(typeof jsonObject['points'].currentBatchStartTimestamp !== 'number')
|
|
442
|
+
{
|
|
443
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchStartTimestamp)) ? Number(jsonObject['points'].currentBatchStartTimestamp) : Math.floor(Number(jsonObject['points'].currentBatchStartTimestamp));
|
|
444
|
+
}
|
|
337
445
|
|
|
338
|
-
|
|
446
|
+
return Number.isInteger(jsonObject['points'].currentBatchStartTimestamp) ? jsonObject['points'].currentBatchStartTimestamp : Math.floor(jsonObject['points'].currentBatchStartTimestamp);
|
|
447
|
+
}());
|
|
448
|
+
}
|
|
449
|
+
else
|
|
339
450
|
{
|
|
340
|
-
|
|
451
|
+
pointsObject.currentBatchStartTimestamp = 0;
|
|
341
452
|
}
|
|
453
|
+
|
|
454
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchLayoutId' in jsonObject['points'])
|
|
455
|
+
{
|
|
456
|
+
pointsObject.currentBatchLayoutId = (function(){
|
|
457
|
+
if(typeof jsonObject['points'].currentBatchLayoutId !== 'number')
|
|
458
|
+
{
|
|
459
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchLayoutId)) ? Number(jsonObject['points'].currentBatchLayoutId) : Math.floor(Number(jsonObject['points'].currentBatchLayoutId));
|
|
460
|
+
}
|
|
342
461
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
462
|
+
return Number.isInteger(jsonObject['points'].currentBatchLayoutId) ? jsonObject['points'].currentBatchLayoutId : Math.floor(jsonObject['points'].currentBatchLayoutId);
|
|
463
|
+
}());
|
|
464
|
+
}
|
|
465
|
+
else
|
|
466
|
+
{
|
|
467
|
+
pointsObject.currentBatchLayoutId = 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchLayoutName' in jsonObject['points'])
|
|
471
|
+
{
|
|
472
|
+
pointsObject.currentBatchLayoutName = (function(){
|
|
473
|
+
if(typeof jsonObject['points'].currentBatchLayoutName !== 'number')
|
|
474
|
+
{
|
|
475
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchLayoutName)) ? Number(jsonObject['points'].currentBatchLayoutName) : Math.floor(Number(jsonObject['points'].currentBatchLayoutName));
|
|
476
|
+
}
|
|
346
477
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
478
|
+
return Number.isInteger(jsonObject['points'].currentBatchLayoutName) ? jsonObject['points'].currentBatchLayoutName : Math.floor(jsonObject['points'].currentBatchLayoutName);
|
|
479
|
+
}());
|
|
480
|
+
}
|
|
481
|
+
else
|
|
351
482
|
{
|
|
352
|
-
|
|
483
|
+
pointsObject.currentBatchLayoutName = 0;
|
|
353
484
|
}
|
|
485
|
+
|
|
486
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchSizingProfileName' in jsonObject['points'])
|
|
487
|
+
{
|
|
488
|
+
pointsObject.currentBatchSizingProfileName = (function(){
|
|
489
|
+
if(jsonObject['points'].currentBatchSizingProfileName === null)
|
|
490
|
+
{
|
|
491
|
+
return null;
|
|
492
|
+
}
|
|
354
493
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
494
|
+
if(typeof jsonObject['points'].currentBatchSizingProfileName !== 'number')
|
|
495
|
+
{
|
|
496
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchSizingProfileName)) ? Number(jsonObject['points'].currentBatchSizingProfileName) : Math.floor(Number(jsonObject['points'].currentBatchSizingProfileName));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return Number.isInteger(jsonObject['points'].currentBatchSizingProfileName) ? jsonObject['points'].currentBatchSizingProfileName : Math.floor(jsonObject['points'].currentBatchSizingProfileName);
|
|
500
|
+
}());
|
|
501
|
+
}
|
|
502
|
+
else
|
|
503
|
+
{
|
|
504
|
+
pointsObject.currentBatchSizingProfileName = null;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if(typeof jsonObject['points'] === 'object' && 'currentBatchFruitSizeProfile' in jsonObject['points'])
|
|
508
|
+
{
|
|
509
|
+
pointsObject.currentBatchFruitSizeProfile = (function(){
|
|
510
|
+
if(jsonObject['points'].currentBatchFruitSizeProfile === null)
|
|
511
|
+
{
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if(typeof jsonObject['points'].currentBatchFruitSizeProfile !== 'number')
|
|
516
|
+
{
|
|
517
|
+
return Number.isInteger(Number(jsonObject['points'].currentBatchFruitSizeProfile)) ? Number(jsonObject['points'].currentBatchFruitSizeProfile) : Math.floor(Number(jsonObject['points'].currentBatchFruitSizeProfile));
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return Number.isInteger(jsonObject['points'].currentBatchFruitSizeProfile) ? jsonObject['points'].currentBatchFruitSizeProfile : Math.floor(jsonObject['points'].currentBatchFruitSizeProfile);
|
|
521
|
+
}());
|
|
522
|
+
}
|
|
523
|
+
else
|
|
524
|
+
{
|
|
525
|
+
pointsObject.currentBatchFruitSizeProfile = null;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
if(typeof jsonObject['points'] === 'object' && 'machineAverageFruitWeight' in jsonObject['points'])
|
|
529
|
+
{
|
|
530
|
+
pointsObject.machineAverageFruitWeight = (function(){
|
|
531
|
+
if(typeof jsonObject['points'].machineAverageFruitWeight !== 'number')
|
|
532
|
+
{
|
|
533
|
+
return Number.isInteger(Number(jsonObject['points'].machineAverageFruitWeight)) ? Number(jsonObject['points'].machineAverageFruitWeight) : Math.floor(Number(jsonObject['points'].machineAverageFruitWeight));
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return Number.isInteger(jsonObject['points'].machineAverageFruitWeight) ? jsonObject['points'].machineAverageFruitWeight : Math.floor(jsonObject['points'].machineAverageFruitWeight);
|
|
537
|
+
}());
|
|
538
|
+
}
|
|
539
|
+
else
|
|
540
|
+
{
|
|
541
|
+
pointsObject.machineAverageFruitWeight = 0;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if(typeof jsonObject['points'] === 'object' && 'machineAverageFruitSize' in jsonObject['points'])
|
|
545
|
+
{
|
|
546
|
+
pointsObject.machineAverageFruitSize = (function(){
|
|
547
|
+
if(typeof jsonObject['points'].machineAverageFruitSize !== 'number')
|
|
548
|
+
{
|
|
549
|
+
return Number.isInteger(Number(jsonObject['points'].machineAverageFruitSize)) ? Number(jsonObject['points'].machineAverageFruitSize) : Math.floor(Number(jsonObject['points'].machineAverageFruitSize));
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return Number.isInteger(jsonObject['points'].machineAverageFruitSize) ? jsonObject['points'].machineAverageFruitSize : Math.floor(jsonObject['points'].machineAverageFruitSize);
|
|
553
|
+
}());
|
|
554
|
+
}
|
|
555
|
+
else
|
|
556
|
+
{
|
|
557
|
+
pointsObject.machineAverageFruitSize = 0;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if(typeof jsonObject['points'] === 'object' && 'machineCupFill' in jsonObject['points'])
|
|
561
|
+
{
|
|
562
|
+
pointsObject.machineCupFill = (function(){
|
|
563
|
+
if(typeof jsonObject['points'].machineCupFill !== 'number')
|
|
564
|
+
{
|
|
565
|
+
return Number.isInteger(Number(jsonObject['points'].machineCupFill)) ? Number(jsonObject['points'].machineCupFill) : Math.floor(Number(jsonObject['points'].machineCupFill));
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
return Number.isInteger(jsonObject['points'].machineCupFill) ? jsonObject['points'].machineCupFill : Math.floor(jsonObject['points'].machineCupFill);
|
|
569
|
+
}());
|
|
570
|
+
}
|
|
571
|
+
else
|
|
572
|
+
{
|
|
573
|
+
pointsObject.machineCupFill = 0;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
if(typeof jsonObject['points'] === 'object' && 'machineRecycledFruitPerMinute' in jsonObject['points'])
|
|
577
|
+
{
|
|
578
|
+
pointsObject.machineRecycledFruitPerMinute = (function(){
|
|
579
|
+
if(typeof jsonObject['points'].machineRecycledFruitPerMinute !== 'number')
|
|
580
|
+
{
|
|
581
|
+
return Number.isInteger(Number(jsonObject['points'].machineRecycledFruitPerMinute)) ? Number(jsonObject['points'].machineRecycledFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineRecycledFruitPerMinute));
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
return Number.isInteger(jsonObject['points'].machineRecycledFruitPerMinute) ? jsonObject['points'].machineRecycledFruitPerMinute : Math.floor(jsonObject['points'].machineRecycledFruitPerMinute);
|
|
585
|
+
}());
|
|
586
|
+
}
|
|
587
|
+
else
|
|
588
|
+
{
|
|
589
|
+
pointsObject.machineRecycledFruitPerMinute = 0;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
if(typeof jsonObject['points'] === 'object' && 'machineTotalFruitPerMinute' in jsonObject['points'])
|
|
593
|
+
{
|
|
594
|
+
pointsObject.machineTotalFruitPerMinute = (function(){
|
|
595
|
+
if(typeof jsonObject['points'].machineTotalFruitPerMinute !== 'number')
|
|
596
|
+
{
|
|
597
|
+
return Number.isInteger(Number(jsonObject['points'].machineTotalFruitPerMinute)) ? Number(jsonObject['points'].machineTotalFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineTotalFruitPerMinute));
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
return Number.isInteger(jsonObject['points'].machineTotalFruitPerMinute) ? jsonObject['points'].machineTotalFruitPerMinute : Math.floor(jsonObject['points'].machineTotalFruitPerMinute);
|
|
601
|
+
}());
|
|
602
|
+
}
|
|
603
|
+
else
|
|
604
|
+
{
|
|
605
|
+
pointsObject.machineTotalFruitPerMinute = 0;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
if(typeof jsonObject['points'] === 'object' && 'machineDroppedFruitPerMinute' in jsonObject['points'])
|
|
609
|
+
{
|
|
610
|
+
pointsObject.machineDroppedFruitPerMinute = (function(){
|
|
611
|
+
if(typeof jsonObject['points'].machineDroppedFruitPerMinute !== 'number')
|
|
612
|
+
{
|
|
613
|
+
return Number.isInteger(Number(jsonObject['points'].machineDroppedFruitPerMinute)) ? Number(jsonObject['points'].machineDroppedFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineDroppedFruitPerMinute));
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
return Number.isInteger(jsonObject['points'].machineDroppedFruitPerMinute) ? jsonObject['points'].machineDroppedFruitPerMinute : Math.floor(jsonObject['points'].machineDroppedFruitPerMinute);
|
|
617
|
+
}());
|
|
618
|
+
}
|
|
619
|
+
else
|
|
620
|
+
{
|
|
621
|
+
pointsObject.machineDroppedFruitPerMinute = 0;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if(typeof jsonObject['points'] === 'object' && 'machinePackedFruitPerMinute' in jsonObject['points'])
|
|
625
|
+
{
|
|
626
|
+
pointsObject.machinePackedFruitPerMinute = (function(){
|
|
627
|
+
if(typeof jsonObject['points'].machinePackedFruitPerMinute !== 'number')
|
|
628
|
+
{
|
|
629
|
+
return Number.isInteger(Number(jsonObject['points'].machinePackedFruitPerMinute)) ? Number(jsonObject['points'].machinePackedFruitPerMinute) : Math.floor(Number(jsonObject['points'].machinePackedFruitPerMinute));
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
return Number.isInteger(jsonObject['points'].machinePackedFruitPerMinute) ? jsonObject['points'].machinePackedFruitPerMinute : Math.floor(jsonObject['points'].machinePackedFruitPerMinute);
|
|
633
|
+
}());
|
|
634
|
+
}
|
|
635
|
+
else
|
|
636
|
+
{
|
|
637
|
+
pointsObject.machinePackedFruitPerMinute = 0;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
if(typeof jsonObject['points'] === 'object' && 'machineMissedFruitPerMinute' in jsonObject['points'])
|
|
641
|
+
{
|
|
642
|
+
pointsObject.machineMissedFruitPerMinute = (function(){
|
|
643
|
+
if(typeof jsonObject['points'].machineMissedFruitPerMinute !== 'number')
|
|
644
|
+
{
|
|
645
|
+
return Number.isInteger(Number(jsonObject['points'].machineMissedFruitPerMinute)) ? Number(jsonObject['points'].machineMissedFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineMissedFruitPerMinute));
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return Number.isInteger(jsonObject['points'].machineMissedFruitPerMinute) ? jsonObject['points'].machineMissedFruitPerMinute : Math.floor(jsonObject['points'].machineMissedFruitPerMinute);
|
|
649
|
+
}());
|
|
650
|
+
}
|
|
651
|
+
else
|
|
652
|
+
{
|
|
653
|
+
pointsObject.machineMissedFruitPerMinute = 0;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
if(typeof jsonObject['points'] === 'object' && 'machineRejectFruitPerMinute' in jsonObject['points'])
|
|
657
|
+
{
|
|
658
|
+
pointsObject.machineRejectFruitPerMinute = (function(){
|
|
659
|
+
if(typeof jsonObject['points'].machineRejectFruitPerMinute !== 'number')
|
|
358
660
|
{
|
|
359
|
-
return
|
|
661
|
+
return Number.isInteger(Number(jsonObject['points'].machineRejectFruitPerMinute)) ? Number(jsonObject['points'].machineRejectFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineRejectFruitPerMinute));
|
|
360
662
|
}
|
|
361
663
|
|
|
664
|
+
return Number.isInteger(jsonObject['points'].machineRejectFruitPerMinute) ? jsonObject['points'].machineRejectFruitPerMinute : Math.floor(jsonObject['points'].machineRejectFruitPerMinute);
|
|
665
|
+
}());
|
|
666
|
+
}
|
|
667
|
+
else
|
|
668
|
+
{
|
|
669
|
+
pointsObject.machineRejectFruitPerMinute = 0;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if(typeof jsonObject['points'] === 'object' && 'machineTraysPerHour' in jsonObject['points'])
|
|
673
|
+
{
|
|
674
|
+
pointsObject.machineTraysPerHour = (function(){
|
|
675
|
+
if(typeof jsonObject['points'].machineTraysPerHour !== 'number')
|
|
676
|
+
{
|
|
677
|
+
return Number.isInteger(Number(jsonObject['points'].machineTraysPerHour)) ? Number(jsonObject['points'].machineTraysPerHour) : Math.floor(Number(jsonObject['points'].machineTraysPerHour));
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
return Number.isInteger(jsonObject['points'].machineTraysPerHour) ? jsonObject['points'].machineTraysPerHour : Math.floor(jsonObject['points'].machineTraysPerHour);
|
|
681
|
+
}());
|
|
682
|
+
}
|
|
683
|
+
else
|
|
684
|
+
{
|
|
685
|
+
pointsObject.machineTraysPerHour = 0;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
if(typeof jsonObject['points'] === 'object' && 'machineTraysPerHourTarget' in jsonObject['points'])
|
|
689
|
+
{
|
|
690
|
+
pointsObject.machineTraysPerHourTarget = (function(){
|
|
691
|
+
if(jsonObject['points'].machineTraysPerHourTarget === null)
|
|
692
|
+
{
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
if(typeof jsonObject['points'].machineTraysPerHourTarget !== 'number')
|
|
697
|
+
{
|
|
698
|
+
return Number.isInteger(Number(jsonObject['points'].machineTraysPerHourTarget)) ? Number(jsonObject['points'].machineTraysPerHourTarget) : Math.floor(Number(jsonObject['points'].machineTraysPerHourTarget));
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
return Number.isInteger(jsonObject['points'].machineTraysPerHourTarget) ? jsonObject['points'].machineTraysPerHourTarget : Math.floor(jsonObject['points'].machineTraysPerHourTarget);
|
|
702
|
+
}());
|
|
703
|
+
}
|
|
704
|
+
else
|
|
705
|
+
{
|
|
706
|
+
pointsObject.machineTraysPerHourTarget = null;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
if(typeof jsonObject['points'] === 'object' && 'machineTonnesPerHour' in jsonObject['points'])
|
|
710
|
+
{
|
|
711
|
+
pointsObject.machineTonnesPerHour = (function(){
|
|
712
|
+
if(typeof jsonObject['points'].machineTonnesPerHour !== 'number')
|
|
713
|
+
{
|
|
714
|
+
return Number.isInteger(Number(jsonObject['points'].machineTonnesPerHour)) ? Number(jsonObject['points'].machineTonnesPerHour) : Math.floor(Number(jsonObject['points'].machineTonnesPerHour));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
return Number.isInteger(jsonObject['points'].machineTonnesPerHour) ? jsonObject['points'].machineTonnesPerHour : Math.floor(jsonObject['points'].machineTonnesPerHour);
|
|
718
|
+
}());
|
|
719
|
+
}
|
|
720
|
+
else
|
|
721
|
+
{
|
|
722
|
+
pointsObject.machineTonnesPerHour = 0;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
if(typeof jsonObject['points'] === 'object' && 'machineRodsPerMinute' in jsonObject['points'])
|
|
726
|
+
{
|
|
727
|
+
pointsObject.machineRodsPerMinute = (function(){
|
|
728
|
+
if(typeof jsonObject['points'].machineRodsPerMinute !== 'number')
|
|
729
|
+
{
|
|
730
|
+
return Number.isInteger(Number(jsonObject['points'].machineRodsPerMinute)) ? Number(jsonObject['points'].machineRodsPerMinute) : Math.floor(Number(jsonObject['points'].machineRodsPerMinute));
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
return Number.isInteger(jsonObject['points'].machineRodsPerMinute) ? jsonObject['points'].machineRodsPerMinute : Math.floor(jsonObject['points'].machineRodsPerMinute);
|
|
734
|
+
}());
|
|
735
|
+
}
|
|
736
|
+
else
|
|
737
|
+
{
|
|
738
|
+
pointsObject.machineRodsPerMinute = 0;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
if(typeof jsonObject['points'] === 'object' && 'machineIncomingFruitPerMinuteBySize' in jsonObject['points'])
|
|
742
|
+
{
|
|
743
|
+
pointsObject.machineIncomingFruitPerMinuteBySize = (function(){
|
|
744
|
+
if(jsonObject['points'].machineIncomingFruitPerMinuteBySize === null)
|
|
745
|
+
{
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if(typeof jsonObject['points'].machineIncomingFruitPerMinuteBySize !== 'number')
|
|
750
|
+
{
|
|
751
|
+
return Number.isInteger(Number(jsonObject['points'].machineIncomingFruitPerMinuteBySize)) ? Number(jsonObject['points'].machineIncomingFruitPerMinuteBySize) : Math.floor(Number(jsonObject['points'].machineIncomingFruitPerMinuteBySize));
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
return Number.isInteger(jsonObject['points'].machineIncomingFruitPerMinuteBySize) ? jsonObject['points'].machineIncomingFruitPerMinuteBySize : Math.floor(jsonObject['points'].machineIncomingFruitPerMinuteBySize);
|
|
755
|
+
}());
|
|
756
|
+
}
|
|
757
|
+
else
|
|
758
|
+
{
|
|
759
|
+
pointsObject.machineIncomingFruitPerMinuteBySize = null;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
if(typeof jsonObject['points'] === 'object' && 'machineRecycleFruitPerMinuteBySize' in jsonObject['points'])
|
|
763
|
+
{
|
|
764
|
+
pointsObject.machineRecycleFruitPerMinuteBySize = (function(){
|
|
765
|
+
if(jsonObject['points'].machineRecycleFruitPerMinuteBySize === null)
|
|
766
|
+
{
|
|
767
|
+
return null;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if(typeof jsonObject['points'].machineRecycleFruitPerMinuteBySize !== 'number')
|
|
771
|
+
{
|
|
772
|
+
return Number.isInteger(Number(jsonObject['points'].machineRecycleFruitPerMinuteBySize)) ? Number(jsonObject['points'].machineRecycleFruitPerMinuteBySize) : Math.floor(Number(jsonObject['points'].machineRecycleFruitPerMinuteBySize));
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
return Number.isInteger(jsonObject['points'].machineRecycleFruitPerMinuteBySize) ? jsonObject['points'].machineRecycleFruitPerMinuteBySize : Math.floor(jsonObject['points'].machineRecycleFruitPerMinuteBySize);
|
|
776
|
+
}());
|
|
777
|
+
}
|
|
778
|
+
else
|
|
779
|
+
{
|
|
780
|
+
pointsObject.machineRecycleFruitPerMinuteBySize = null;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
if(typeof jsonObject['points'] === 'object' && 'machineLanesFruitPerMinuteBySize' in jsonObject['points'])
|
|
784
|
+
{
|
|
785
|
+
pointsObject.machineLanesFruitPerMinuteBySize = (function(){
|
|
786
|
+
if(jsonObject['points'].machineLanesFruitPerMinuteBySize === null)
|
|
787
|
+
{
|
|
788
|
+
return null;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
if(typeof jsonObject['points'].machineLanesFruitPerMinuteBySize !== 'number')
|
|
792
|
+
{
|
|
793
|
+
return Number.isInteger(Number(jsonObject['points'].machineLanesFruitPerMinuteBySize)) ? Number(jsonObject['points'].machineLanesFruitPerMinuteBySize) : Math.floor(Number(jsonObject['points'].machineLanesFruitPerMinuteBySize));
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
return Number.isInteger(jsonObject['points'].machineLanesFruitPerMinuteBySize) ? jsonObject['points'].machineLanesFruitPerMinuteBySize : Math.floor(jsonObject['points'].machineLanesFruitPerMinuteBySize);
|
|
797
|
+
}());
|
|
798
|
+
}
|
|
799
|
+
else
|
|
800
|
+
{
|
|
801
|
+
pointsObject.machineLanesFruitPerMinuteBySize = null;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
if(typeof jsonObject['points'] === 'object' && 'machineLanesFruitPerMinuteByGrade' in jsonObject['points'])
|
|
805
|
+
{
|
|
806
|
+
pointsObject.machineLanesFruitPerMinuteByGrade = (function(){
|
|
807
|
+
if(jsonObject['points'].machineLanesFruitPerMinuteByGrade === null)
|
|
808
|
+
{
|
|
809
|
+
return null;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
if(typeof jsonObject['points'].machineLanesFruitPerMinuteByGrade !== 'number')
|
|
813
|
+
{
|
|
814
|
+
return Number.isInteger(Number(jsonObject['points'].machineLanesFruitPerMinuteByGrade)) ? Number(jsonObject['points'].machineLanesFruitPerMinuteByGrade) : Math.floor(Number(jsonObject['points'].machineLanesFruitPerMinuteByGrade));
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
return Number.isInteger(jsonObject['points'].machineLanesFruitPerMinuteByGrade) ? jsonObject['points'].machineLanesFruitPerMinuteByGrade : Math.floor(jsonObject['points'].machineLanesFruitPerMinuteByGrade);
|
|
818
|
+
}());
|
|
819
|
+
}
|
|
820
|
+
else
|
|
821
|
+
{
|
|
822
|
+
pointsObject.machineLanesFruitPerMinuteByGrade = null;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
if(typeof jsonObject['points'] === 'object' && 'createNewBatchRequest' in jsonObject['points'])
|
|
826
|
+
{
|
|
827
|
+
pointsObject.createNewBatchRequest = (function(){
|
|
828
|
+
if(typeof jsonObject['points'].createNewBatchRequest !== 'number')
|
|
829
|
+
{
|
|
830
|
+
return Number.isInteger(Number(jsonObject['points'].createNewBatchRequest)) ? Number(jsonObject['points'].createNewBatchRequest) : Math.floor(Number(jsonObject['points'].createNewBatchRequest));
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
return Number.isInteger(jsonObject['points'].createNewBatchRequest) ? jsonObject['points'].createNewBatchRequest : Math.floor(jsonObject['points'].createNewBatchRequest);
|
|
834
|
+
}());
|
|
835
|
+
}
|
|
836
|
+
else
|
|
837
|
+
{
|
|
838
|
+
pointsObject.createNewBatchRequest = 0;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
if(typeof jsonObject['points'] === 'object' && 'createBatchOnPackrunChange' in jsonObject['points'])
|
|
842
|
+
{
|
|
843
|
+
pointsObject.createBatchOnPackrunChange = (function(){
|
|
844
|
+
if(typeof jsonObject['points'].createBatchOnPackrunChange !== 'number')
|
|
845
|
+
{
|
|
846
|
+
return Number.isInteger(Number(jsonObject['points'].createBatchOnPackrunChange)) ? Number(jsonObject['points'].createBatchOnPackrunChange) : Math.floor(Number(jsonObject['points'].createBatchOnPackrunChange));
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
return Number.isInteger(jsonObject['points'].createBatchOnPackrunChange) ? jsonObject['points'].createBatchOnPackrunChange : Math.floor(jsonObject['points'].createBatchOnPackrunChange);
|
|
850
|
+
}());
|
|
851
|
+
}
|
|
852
|
+
else
|
|
853
|
+
{
|
|
854
|
+
pointsObject.createBatchOnPackrunChange = 0;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
if(typeof jsonObject['points'] === 'object' && 'createBatchOnTimeBatchChange' in jsonObject['points'])
|
|
858
|
+
{
|
|
859
|
+
pointsObject.createBatchOnTimeBatchChange = (function(){
|
|
860
|
+
if(typeof jsonObject['points'].createBatchOnTimeBatchChange !== 'number')
|
|
861
|
+
{
|
|
862
|
+
return Number.isInteger(Number(jsonObject['points'].createBatchOnTimeBatchChange)) ? Number(jsonObject['points'].createBatchOnTimeBatchChange) : Math.floor(Number(jsonObject['points'].createBatchOnTimeBatchChange));
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
return Number.isInteger(jsonObject['points'].createBatchOnTimeBatchChange) ? jsonObject['points'].createBatchOnTimeBatchChange : Math.floor(jsonObject['points'].createBatchOnTimeBatchChange);
|
|
866
|
+
}());
|
|
867
|
+
}
|
|
868
|
+
else
|
|
869
|
+
{
|
|
870
|
+
pointsObject.createBatchOnTimeBatchChange = 0;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
if(typeof jsonObject['points'] === 'object' && 'restartServiceRequest' in jsonObject['points'])
|
|
874
|
+
{
|
|
875
|
+
pointsObject.restartServiceRequest = (function(){
|
|
876
|
+
if(typeof jsonObject['points'].restartServiceRequest !== 'number')
|
|
877
|
+
{
|
|
878
|
+
return Number.isInteger(Number(jsonObject['points'].restartServiceRequest)) ? Number(jsonObject['points'].restartServiceRequest) : Math.floor(Number(jsonObject['points'].restartServiceRequest));
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
return Number.isInteger(jsonObject['points'].restartServiceRequest) ? jsonObject['points'].restartServiceRequest : Math.floor(jsonObject['points'].restartServiceRequest);
|
|
882
|
+
}());
|
|
883
|
+
}
|
|
884
|
+
else
|
|
885
|
+
{
|
|
886
|
+
pointsObject.restartServiceRequest = 0;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
if(typeof jsonObject['points'] === 'object' && 'outletGroupSummaries' in jsonObject['points'])
|
|
890
|
+
{
|
|
891
|
+
pointsObject.outletGroupSummaries = (function(){
|
|
892
|
+
if(typeof jsonObject['points'].outletGroupSummaries !== 'number')
|
|
893
|
+
{
|
|
894
|
+
return Number.isInteger(Number(jsonObject['points'].outletGroupSummaries)) ? Number(jsonObject['points'].outletGroupSummaries) : Math.floor(Number(jsonObject['points'].outletGroupSummaries));
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
return Number.isInteger(jsonObject['points'].outletGroupSummaries) ? jsonObject['points'].outletGroupSummaries : Math.floor(jsonObject['points'].outletGroupSummaries);
|
|
898
|
+
}());
|
|
899
|
+
}
|
|
900
|
+
else
|
|
901
|
+
{
|
|
902
|
+
pointsObject.outletGroupSummaries = 0;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
if(typeof jsonObject['points'] === 'object' && 'varieties' in jsonObject['points'])
|
|
906
|
+
{
|
|
907
|
+
pointsObject.varieties = (function(){
|
|
908
|
+
if(typeof jsonObject['points'].varieties !== 'number')
|
|
909
|
+
{
|
|
910
|
+
return Number.isInteger(Number(jsonObject['points'].varieties)) ? Number(jsonObject['points'].varieties) : Math.floor(Number(jsonObject['points'].varieties));
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
return Number.isInteger(jsonObject['points'].varieties) ? jsonObject['points'].varieties : Math.floor(jsonObject['points'].varieties);
|
|
914
|
+
}());
|
|
915
|
+
}
|
|
916
|
+
else
|
|
917
|
+
{
|
|
918
|
+
pointsObject.varieties = 0;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
if(typeof jsonObject['points'] === 'object' && 'packTypeOutletUtilizationTargets' in jsonObject['points'])
|
|
922
|
+
{
|
|
923
|
+
pointsObject.packTypeOutletUtilizationTargets = (function(){
|
|
924
|
+
if(typeof jsonObject['points'].packTypeOutletUtilizationTargets !== 'number')
|
|
925
|
+
{
|
|
926
|
+
return Number.isInteger(Number(jsonObject['points'].packTypeOutletUtilizationTargets)) ? Number(jsonObject['points'].packTypeOutletUtilizationTargets) : Math.floor(Number(jsonObject['points'].packTypeOutletUtilizationTargets));
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
return Number.isInteger(jsonObject['points'].packTypeOutletUtilizationTargets) ? jsonObject['points'].packTypeOutletUtilizationTargets : Math.floor(jsonObject['points'].packTypeOutletUtilizationTargets);
|
|
930
|
+
}());
|
|
931
|
+
}
|
|
932
|
+
else
|
|
933
|
+
{
|
|
934
|
+
pointsObject.packTypeOutletUtilizationTargets = 0;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
return pointsObject;
|
|
938
|
+
}());
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
if('lanes' in jsonObject)
|
|
942
|
+
{
|
|
943
|
+
model.lanes = (function(){
|
|
944
|
+
if(Array.isArray(jsonObject['lanes']) !== true)
|
|
945
|
+
{
|
|
946
|
+
return [];
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return jsonObject['lanes'].map((lanesItem) => {
|
|
950
|
+
return (function(){
|
|
951
|
+
let lanesItemObject = {};
|
|
952
|
+
|
|
953
|
+
if(typeof lanesItem === 'object' && 'id' in lanesItem)
|
|
954
|
+
{
|
|
955
|
+
lanesItemObject.id = (function(){
|
|
956
|
+
if(typeof lanesItem.id !== 'string')
|
|
957
|
+
{
|
|
958
|
+
return String(lanesItem.id);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
return lanesItem.id;
|
|
962
|
+
}());
|
|
963
|
+
}
|
|
964
|
+
else
|
|
965
|
+
{
|
|
966
|
+
lanesItemObject.id = "";
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
if(typeof lanesItem === 'object' && 'number' in lanesItem)
|
|
970
|
+
{
|
|
971
|
+
lanesItemObject.number = (function(){
|
|
972
|
+
if(typeof lanesItem.number !== 'number')
|
|
973
|
+
{
|
|
974
|
+
return Number.isInteger(Number(lanesItem.number)) ? Number(lanesItem.number) : Math.floor(Number(lanesItem.number));
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
return Number.isInteger(lanesItem.number) ? lanesItem.number : Math.floor(lanesItem.number);
|
|
978
|
+
}());
|
|
979
|
+
}
|
|
980
|
+
else
|
|
981
|
+
{
|
|
982
|
+
lanesItemObject.number = 0;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
if(typeof lanesItem === 'object' && 'points' in lanesItem)
|
|
986
|
+
{
|
|
987
|
+
lanesItemObject.points = (function(){
|
|
988
|
+
let pointsObject = {};
|
|
989
|
+
|
|
990
|
+
if(typeof lanesItem.points === 'object' && 'cupFill' in lanesItem.points)
|
|
991
|
+
{
|
|
992
|
+
pointsObject.cupFill = (function(){
|
|
993
|
+
if(typeof lanesItem.points.cupFill !== 'number')
|
|
994
|
+
{
|
|
995
|
+
return Number.isInteger(Number(lanesItem.points.cupFill)) ? Number(lanesItem.points.cupFill) : Math.floor(Number(lanesItem.points.cupFill));
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
return Number.isInteger(lanesItem.points.cupFill) ? lanesItem.points.cupFill : Math.floor(lanesItem.points.cupFill);
|
|
999
|
+
}());
|
|
1000
|
+
}
|
|
1001
|
+
else
|
|
1002
|
+
{
|
|
1003
|
+
pointsObject.cupFill = 0;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
return pointsObject;
|
|
1007
|
+
}());
|
|
1008
|
+
}
|
|
1009
|
+
else
|
|
1010
|
+
{
|
|
1011
|
+
lanesItemObject.points = (function(){
|
|
1012
|
+
let pointsDefaultValue = {};
|
|
1013
|
+
|
|
1014
|
+
pointsDefaultValue.cupFill = 0;
|
|
1015
|
+
|
|
1016
|
+
return pointsDefaultValue;
|
|
1017
|
+
}());
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
return lanesItemObject;
|
|
1021
|
+
}());
|
|
1022
|
+
});
|
|
1023
|
+
}());
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
if('frames' in jsonObject)
|
|
1027
|
+
{
|
|
1028
|
+
model.frames = (function(){
|
|
1029
|
+
if(Array.isArray(jsonObject['frames']) !== true)
|
|
1030
|
+
{
|
|
1031
|
+
return [];
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
return jsonObject['frames'].map((framesItem) => {
|
|
1035
|
+
return (function(){
|
|
1036
|
+
let framesItemObject = {};
|
|
1037
|
+
|
|
1038
|
+
if(typeof framesItem === 'object' && 'number' in framesItem)
|
|
1039
|
+
{
|
|
1040
|
+
framesItemObject.number = (function(){
|
|
1041
|
+
if(typeof framesItem.number !== 'number')
|
|
1042
|
+
{
|
|
1043
|
+
return Number.isInteger(Number(framesItem.number)) ? Number(framesItem.number) : Math.floor(Number(framesItem.number));
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
return Number.isInteger(framesItem.number) ? framesItem.number : Math.floor(framesItem.number);
|
|
1047
|
+
}());
|
|
1048
|
+
}
|
|
1049
|
+
else
|
|
1050
|
+
{
|
|
1051
|
+
framesItemObject.number = 0;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if(typeof framesItem === 'object' && 'startLane' in framesItem)
|
|
1055
|
+
{
|
|
1056
|
+
framesItemObject.startLane = (function(){
|
|
1057
|
+
if(typeof framesItem.startLane !== 'number')
|
|
1058
|
+
{
|
|
1059
|
+
return Number.isInteger(Number(framesItem.startLane)) ? Number(framesItem.startLane) : Math.floor(Number(framesItem.startLane));
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
return Number.isInteger(framesItem.startLane) ? framesItem.startLane : Math.floor(framesItem.startLane);
|
|
1063
|
+
}());
|
|
1064
|
+
}
|
|
1065
|
+
else
|
|
1066
|
+
{
|
|
1067
|
+
framesItemObject.startLane = 0;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
if(typeof framesItem === 'object' && 'endLane' in framesItem)
|
|
1071
|
+
{
|
|
1072
|
+
framesItemObject.endLane = (function(){
|
|
1073
|
+
if(typeof framesItem.endLane !== 'number')
|
|
1074
|
+
{
|
|
1075
|
+
return Number.isInteger(Number(framesItem.endLane)) ? Number(framesItem.endLane) : Math.floor(Number(framesItem.endLane));
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
return Number.isInteger(framesItem.endLane) ? framesItem.endLane : Math.floor(framesItem.endLane);
|
|
1079
|
+
}());
|
|
1080
|
+
}
|
|
1081
|
+
else
|
|
1082
|
+
{
|
|
1083
|
+
framesItemObject.endLane = 0;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if(typeof framesItem === 'object' && 'points' in framesItem)
|
|
1087
|
+
{
|
|
1088
|
+
framesItemObject.points = (function(){
|
|
1089
|
+
let pointsObject = {};
|
|
1090
|
+
|
|
1091
|
+
if(typeof framesItem.points === 'object' && 'machineRodsPerMinute' in framesItem.points)
|
|
1092
|
+
{
|
|
1093
|
+
pointsObject.machineRodsPerMinute = (function(){
|
|
1094
|
+
if(typeof framesItem.points.machineRodsPerMinute !== 'number')
|
|
1095
|
+
{
|
|
1096
|
+
return Number.isInteger(Number(framesItem.points.machineRodsPerMinute)) ? Number(framesItem.points.machineRodsPerMinute) : Math.floor(Number(framesItem.points.machineRodsPerMinute));
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
return Number.isInteger(framesItem.points.machineRodsPerMinute) ? framesItem.points.machineRodsPerMinute : Math.floor(framesItem.points.machineRodsPerMinute);
|
|
1100
|
+
}());
|
|
1101
|
+
}
|
|
1102
|
+
else
|
|
1103
|
+
{
|
|
1104
|
+
pointsObject.machineRodsPerMinute = 0;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
return pointsObject;
|
|
1108
|
+
}());
|
|
1109
|
+
}
|
|
1110
|
+
else
|
|
1111
|
+
{
|
|
1112
|
+
framesItemObject.points = (function(){
|
|
1113
|
+
let pointsDefaultValue = {};
|
|
1114
|
+
|
|
1115
|
+
pointsDefaultValue.machineRodsPerMinute = 0;
|
|
1116
|
+
|
|
1117
|
+
return pointsDefaultValue;
|
|
1118
|
+
}());
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
return framesItemObject;
|
|
1122
|
+
}());
|
|
1123
|
+
});
|
|
1124
|
+
}());
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
if('outlets' in jsonObject)
|
|
1128
|
+
{
|
|
1129
|
+
model.outlets = (function(){
|
|
1130
|
+
if(Array.isArray(jsonObject['outlets']) !== true)
|
|
1131
|
+
{
|
|
1132
|
+
return [];
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
return jsonObject['outlets'].map((outletsItem) => {
|
|
1136
|
+
return (function(){
|
|
1137
|
+
let outletsItemObject = {};
|
|
1138
|
+
|
|
1139
|
+
if(typeof outletsItem === 'object' && 'id' in outletsItem)
|
|
1140
|
+
{
|
|
1141
|
+
outletsItemObject.id = (function(){
|
|
1142
|
+
if(typeof outletsItem.id !== 'string')
|
|
1143
|
+
{
|
|
1144
|
+
return String(outletsItem.id);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
return outletsItem.id;
|
|
1148
|
+
}());
|
|
1149
|
+
}
|
|
1150
|
+
else
|
|
1151
|
+
{
|
|
1152
|
+
outletsItemObject.id = "";
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
if(typeof outletsItem === 'object' && 'number' in outletsItem)
|
|
1156
|
+
{
|
|
1157
|
+
outletsItemObject.number = (function(){
|
|
1158
|
+
if(typeof outletsItem.number !== 'number')
|
|
1159
|
+
{
|
|
1160
|
+
return Number.isInteger(Number(outletsItem.number)) ? Number(outletsItem.number) : Math.floor(Number(outletsItem.number));
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
return Number.isInteger(outletsItem.number) ? outletsItem.number : Math.floor(outletsItem.number);
|
|
1164
|
+
}());
|
|
1165
|
+
}
|
|
1166
|
+
else
|
|
1167
|
+
{
|
|
1168
|
+
outletsItemObject.number = 0;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
if(typeof outletsItem === 'object' && 'type' in outletsItem)
|
|
1172
|
+
{
|
|
1173
|
+
outletsItemObject.type = (function(){
|
|
1174
|
+
if(typeof outletsItem.type !== 'string')
|
|
1175
|
+
{
|
|
1176
|
+
return String(outletsItem.type);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
return outletsItem.type;
|
|
1180
|
+
}());
|
|
1181
|
+
}
|
|
1182
|
+
else
|
|
1183
|
+
{
|
|
1184
|
+
outletsItemObject.type = "";
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
if(typeof outletsItem === 'object' && 'points' in outletsItem)
|
|
1188
|
+
{
|
|
1189
|
+
outletsItemObject.points = (function(){
|
|
1190
|
+
let pointsObject = {};
|
|
1191
|
+
|
|
1192
|
+
if(typeof outletsItem.points === 'object' && 'name' in outletsItem.points)
|
|
1193
|
+
{
|
|
1194
|
+
pointsObject.name = (function(){
|
|
1195
|
+
if(typeof outletsItem.points.name !== 'number')
|
|
1196
|
+
{
|
|
1197
|
+
return Number.isInteger(Number(outletsItem.points.name)) ? Number(outletsItem.points.name) : Math.floor(Number(outletsItem.points.name));
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
return Number.isInteger(outletsItem.points.name) ? outletsItem.points.name : Math.floor(outletsItem.points.name);
|
|
1201
|
+
}());
|
|
1202
|
+
}
|
|
1203
|
+
else
|
|
1204
|
+
{
|
|
1205
|
+
pointsObject.name = 0;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
if(typeof outletsItem.points === 'object' && 'fruitPerMinute' in outletsItem.points)
|
|
1209
|
+
{
|
|
1210
|
+
pointsObject.fruitPerMinute = (function(){
|
|
1211
|
+
if(typeof outletsItem.points.fruitPerMinute !== 'number')
|
|
1212
|
+
{
|
|
1213
|
+
return Number.isInteger(Number(outletsItem.points.fruitPerMinute)) ? Number(outletsItem.points.fruitPerMinute) : Math.floor(Number(outletsItem.points.fruitPerMinute));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
return Number.isInteger(outletsItem.points.fruitPerMinute) ? outletsItem.points.fruitPerMinute : Math.floor(outletsItem.points.fruitPerMinute);
|
|
1217
|
+
}());
|
|
1218
|
+
}
|
|
1219
|
+
else
|
|
1220
|
+
{
|
|
1221
|
+
pointsObject.fruitPerMinute = 0;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
if(typeof outletsItem.points === 'object' && 'productId' in outletsItem.points)
|
|
1225
|
+
{
|
|
1226
|
+
pointsObject.productId = (function(){
|
|
1227
|
+
if(typeof outletsItem.points.productId !== 'number')
|
|
1228
|
+
{
|
|
1229
|
+
return Number.isInteger(Number(outletsItem.points.productId)) ? Number(outletsItem.points.productId) : Math.floor(Number(outletsItem.points.productId));
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
return Number.isInteger(outletsItem.points.productId) ? outletsItem.points.productId : Math.floor(outletsItem.points.productId);
|
|
1233
|
+
}());
|
|
1234
|
+
}
|
|
1235
|
+
else
|
|
1236
|
+
{
|
|
1237
|
+
pointsObject.productId = 0;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
if(typeof outletsItem.points === 'object' && 'productName' in outletsItem.points)
|
|
1241
|
+
{
|
|
1242
|
+
pointsObject.productName = (function(){
|
|
1243
|
+
if(typeof outletsItem.points.productName !== 'number')
|
|
1244
|
+
{
|
|
1245
|
+
return Number.isInteger(Number(outletsItem.points.productName)) ? Number(outletsItem.points.productName) : Math.floor(Number(outletsItem.points.productName));
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
return Number.isInteger(outletsItem.points.productName) ? outletsItem.points.productName : Math.floor(outletsItem.points.productName);
|
|
1249
|
+
}());
|
|
1250
|
+
}
|
|
1251
|
+
else
|
|
1252
|
+
{
|
|
1253
|
+
pointsObject.productName = 0;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
if(typeof outletsItem.points === 'object' && 'utilization' in outletsItem.points)
|
|
1257
|
+
{
|
|
1258
|
+
pointsObject.utilization = (function(){
|
|
1259
|
+
if(typeof outletsItem.points.utilization !== 'number')
|
|
1260
|
+
{
|
|
1261
|
+
return Number.isInteger(Number(outletsItem.points.utilization)) ? Number(outletsItem.points.utilization) : Math.floor(Number(outletsItem.points.utilization));
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
return Number.isInteger(outletsItem.points.utilization) ? outletsItem.points.utilization : Math.floor(outletsItem.points.utilization);
|
|
1265
|
+
}());
|
|
1266
|
+
}
|
|
1267
|
+
else
|
|
1268
|
+
{
|
|
1269
|
+
pointsObject.utilization = 0;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
if(typeof outletsItem.points === 'object' && 'status' in outletsItem.points)
|
|
1273
|
+
{
|
|
1274
|
+
pointsObject.status = (function(){
|
|
1275
|
+
if(typeof outletsItem.points.status !== 'number')
|
|
1276
|
+
{
|
|
1277
|
+
return Number.isInteger(Number(outletsItem.points.status)) ? Number(outletsItem.points.status) : Math.floor(Number(outletsItem.points.status));
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
return Number.isInteger(outletsItem.points.status) ? outletsItem.points.status : Math.floor(outletsItem.points.status);
|
|
1281
|
+
}());
|
|
1282
|
+
}
|
|
1283
|
+
else
|
|
1284
|
+
{
|
|
1285
|
+
pointsObject.status = 0;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
if(typeof outletsItem.points === 'object' && 'pendingProductId' in outletsItem.points)
|
|
1289
|
+
{
|
|
1290
|
+
pointsObject.pendingProductId = (function(){
|
|
1291
|
+
if(typeof outletsItem.points.pendingProductId !== 'number')
|
|
1292
|
+
{
|
|
1293
|
+
return Number.isInteger(Number(outletsItem.points.pendingProductId)) ? Number(outletsItem.points.pendingProductId) : Math.floor(Number(outletsItem.points.pendingProductId));
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
return Number.isInteger(outletsItem.points.pendingProductId) ? outletsItem.points.pendingProductId : Math.floor(outletsItem.points.pendingProductId);
|
|
1297
|
+
}());
|
|
1298
|
+
}
|
|
1299
|
+
else
|
|
1300
|
+
{
|
|
1301
|
+
pointsObject.pendingProductId = 0;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
if(typeof outletsItem.points === 'object' && 'pendingProductName' in outletsItem.points)
|
|
1305
|
+
{
|
|
1306
|
+
pointsObject.pendingProductName = (function(){
|
|
1307
|
+
if(typeof outletsItem.points.pendingProductName !== 'number')
|
|
1308
|
+
{
|
|
1309
|
+
return Number.isInteger(Number(outletsItem.points.pendingProductName)) ? Number(outletsItem.points.pendingProductName) : Math.floor(Number(outletsItem.points.pendingProductName));
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
return Number.isInteger(outletsItem.points.pendingProductName) ? outletsItem.points.pendingProductName : Math.floor(outletsItem.points.pendingProductName);
|
|
1313
|
+
}());
|
|
1314
|
+
}
|
|
1315
|
+
else
|
|
1316
|
+
{
|
|
1317
|
+
pointsObject.pendingProductName = 0;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
return pointsObject;
|
|
1321
|
+
}());
|
|
1322
|
+
}
|
|
1323
|
+
else
|
|
1324
|
+
{
|
|
1325
|
+
outletsItemObject.points = (function(){
|
|
1326
|
+
let pointsDefaultValue = {};
|
|
1327
|
+
|
|
1328
|
+
pointsDefaultValue.name = 0;
|
|
1329
|
+
|
|
1330
|
+
pointsDefaultValue.fruitPerMinute = 0;
|
|
1331
|
+
|
|
1332
|
+
pointsDefaultValue.productId = 0;
|
|
1333
|
+
|
|
1334
|
+
pointsDefaultValue.productName = 0;
|
|
1335
|
+
|
|
1336
|
+
pointsDefaultValue.utilization = 0;
|
|
1337
|
+
|
|
1338
|
+
pointsDefaultValue.status = 0;
|
|
1339
|
+
|
|
1340
|
+
pointsDefaultValue.pendingProductId = 0;
|
|
1341
|
+
|
|
1342
|
+
pointsDefaultValue.pendingProductName = 0;
|
|
1343
|
+
|
|
1344
|
+
return pointsDefaultValue;
|
|
1345
|
+
}());
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
return outletsItemObject;
|
|
1349
|
+
}());
|
|
1350
|
+
});
|
|
1351
|
+
}());
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
if('fruitSizes' in jsonObject)
|
|
1355
|
+
{
|
|
1356
|
+
model.fruitSizes = (function(){
|
|
1357
|
+
if(Array.isArray(jsonObject['fruitSizes']) !== true)
|
|
1358
|
+
{
|
|
1359
|
+
return [];
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
return jsonObject['fruitSizes'].map((fruitSizesItem) => {
|
|
1363
|
+
return (function(){
|
|
1364
|
+
let fruitSizesItemObject = {};
|
|
1365
|
+
|
|
1366
|
+
if(typeof fruitSizesItem === 'object' && 'fruitSize' in fruitSizesItem)
|
|
1367
|
+
{
|
|
1368
|
+
fruitSizesItemObject.fruitSize = (function(){
|
|
1369
|
+
if(typeof fruitSizesItem.fruitSize !== 'string')
|
|
1370
|
+
{
|
|
1371
|
+
return String(fruitSizesItem.fruitSize);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
return fruitSizesItem.fruitSize;
|
|
1375
|
+
}());
|
|
1376
|
+
}
|
|
1377
|
+
else
|
|
1378
|
+
{
|
|
1379
|
+
fruitSizesItemObject.fruitSize = "";
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
if(typeof fruitSizesItem === 'object' && 'points' in fruitSizesItem)
|
|
1383
|
+
{
|
|
1384
|
+
fruitSizesItemObject.points = (function(){
|
|
1385
|
+
let pointsObject = {};
|
|
1386
|
+
|
|
1387
|
+
if(typeof fruitSizesItem.points === 'object' && 'incomingFruitPerMinute' in fruitSizesItem.points)
|
|
1388
|
+
{
|
|
1389
|
+
pointsObject.incomingFruitPerMinute = (function(){
|
|
1390
|
+
if(typeof fruitSizesItem.points.incomingFruitPerMinute !== 'number')
|
|
1391
|
+
{
|
|
1392
|
+
return Number.isInteger(Number(fruitSizesItem.points.incomingFruitPerMinute)) ? Number(fruitSizesItem.points.incomingFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.incomingFruitPerMinute));
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
return Number.isInteger(fruitSizesItem.points.incomingFruitPerMinute) ? fruitSizesItem.points.incomingFruitPerMinute : Math.floor(fruitSizesItem.points.incomingFruitPerMinute);
|
|
1396
|
+
}());
|
|
1397
|
+
}
|
|
1398
|
+
else
|
|
1399
|
+
{
|
|
1400
|
+
pointsObject.incomingFruitPerMinute = 0;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
if(typeof fruitSizesItem.points === 'object' && 'recycledFruitPerMinute' in fruitSizesItem.points)
|
|
1404
|
+
{
|
|
1405
|
+
pointsObject.recycledFruitPerMinute = (function(){
|
|
1406
|
+
if(typeof fruitSizesItem.points.recycledFruitPerMinute !== 'number')
|
|
1407
|
+
{
|
|
1408
|
+
return Number.isInteger(Number(fruitSizesItem.points.recycledFruitPerMinute)) ? Number(fruitSizesItem.points.recycledFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.recycledFruitPerMinute));
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
return Number.isInteger(fruitSizesItem.points.recycledFruitPerMinute) ? fruitSizesItem.points.recycledFruitPerMinute : Math.floor(fruitSizesItem.points.recycledFruitPerMinute);
|
|
1412
|
+
}());
|
|
1413
|
+
}
|
|
1414
|
+
else
|
|
1415
|
+
{
|
|
1416
|
+
pointsObject.recycledFruitPerMinute = 0;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
if(typeof fruitSizesItem.points === 'object' && 'allocatedFruitPerMinute' in fruitSizesItem.points)
|
|
1420
|
+
{
|
|
1421
|
+
pointsObject.allocatedFruitPerMinute = (function(){
|
|
1422
|
+
if(typeof fruitSizesItem.points.allocatedFruitPerMinute !== 'number')
|
|
1423
|
+
{
|
|
1424
|
+
return Number.isInteger(Number(fruitSizesItem.points.allocatedFruitPerMinute)) ? Number(fruitSizesItem.points.allocatedFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.allocatedFruitPerMinute));
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
return Number.isInteger(fruitSizesItem.points.allocatedFruitPerMinute) ? fruitSizesItem.points.allocatedFruitPerMinute : Math.floor(fruitSizesItem.points.allocatedFruitPerMinute);
|
|
1428
|
+
}());
|
|
1429
|
+
}
|
|
1430
|
+
else
|
|
1431
|
+
{
|
|
1432
|
+
pointsObject.allocatedFruitPerMinute = 0;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
return pointsObject;
|
|
1436
|
+
}());
|
|
1437
|
+
}
|
|
1438
|
+
else
|
|
1439
|
+
{
|
|
1440
|
+
fruitSizesItemObject.points = (function(){
|
|
1441
|
+
let pointsDefaultValue = {};
|
|
1442
|
+
|
|
1443
|
+
pointsDefaultValue.incomingFruitPerMinute = 0;
|
|
1444
|
+
|
|
1445
|
+
pointsDefaultValue.recycledFruitPerMinute = 0;
|
|
1446
|
+
|
|
1447
|
+
pointsDefaultValue.allocatedFruitPerMinute = 0;
|
|
1448
|
+
|
|
1449
|
+
return pointsDefaultValue;
|
|
1450
|
+
}());
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
return fruitSizesItemObject;
|
|
1454
|
+
}());
|
|
1455
|
+
});
|
|
1456
|
+
}());
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
if('freshPackIntegration' in jsonObject)
|
|
1460
|
+
{
|
|
1461
|
+
model.freshPackIntegration = (function(){
|
|
1462
|
+
if(jsonObject['freshPackIntegration'] === null)
|
|
1463
|
+
{
|
|
1464
|
+
return null;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
let freshPackIntegrationObject = {};
|
|
1468
|
+
|
|
1469
|
+
if(typeof jsonObject['freshPackIntegration'] === 'object' && 'points' in jsonObject['freshPackIntegration'])
|
|
1470
|
+
{
|
|
1471
|
+
freshPackIntegrationObject.points = (function(){
|
|
1472
|
+
if(typeof jsonObject['freshPackIntegration'].points !== 'object')
|
|
1473
|
+
{
|
|
1474
|
+
return Object(jsonObject['freshPackIntegration'].points);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
return jsonObject['freshPackIntegration'].points;
|
|
1478
|
+
}());
|
|
1479
|
+
}
|
|
1480
|
+
else
|
|
1481
|
+
{
|
|
1482
|
+
freshPackIntegrationObject.points = {}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
if(typeof jsonObject['freshPackIntegration'] === 'object' && 'enabled' in jsonObject['freshPackIntegration'])
|
|
1486
|
+
{
|
|
1487
|
+
freshPackIntegrationObject.enabled = (function(){
|
|
1488
|
+
if(typeof jsonObject['freshPackIntegration'].enabled !== 'boolean')
|
|
1489
|
+
{
|
|
1490
|
+
return Boolean(jsonObject['freshPackIntegration'].enabled);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
return jsonObject['freshPackIntegration'].enabled;
|
|
1494
|
+
}());
|
|
1495
|
+
}
|
|
1496
|
+
else
|
|
1497
|
+
{
|
|
1498
|
+
freshPackIntegrationObject.enabled = false;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
if(typeof jsonObject['freshPackIntegration'] === 'object' && 'materialGroupId' in jsonObject['freshPackIntegration'])
|
|
1502
|
+
{
|
|
1503
|
+
freshPackIntegrationObject.materialGroupId = (function(){
|
|
1504
|
+
if(typeof jsonObject['freshPackIntegration'].materialGroupId !== 'number')
|
|
1505
|
+
{
|
|
1506
|
+
return Number.isInteger(Number(jsonObject['freshPackIntegration'].materialGroupId)) ? Number(jsonObject['freshPackIntegration'].materialGroupId) : Math.floor(Number(jsonObject['freshPackIntegration'].materialGroupId));
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
return Number.isInteger(jsonObject['freshPackIntegration'].materialGroupId) ? jsonObject['freshPackIntegration'].materialGroupId : Math.floor(jsonObject['freshPackIntegration'].materialGroupId);
|
|
1510
|
+
}());
|
|
1511
|
+
}
|
|
1512
|
+
else
|
|
1513
|
+
{
|
|
1514
|
+
freshPackIntegrationObject.materialGroupId = 0;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
if(typeof jsonObject['freshPackIntegration'] === 'object' && 'binTypeId' in jsonObject['freshPackIntegration'])
|
|
1518
|
+
{
|
|
1519
|
+
freshPackIntegrationObject.binTypeId = (function(){
|
|
1520
|
+
if(typeof jsonObject['freshPackIntegration'].binTypeId !== 'number')
|
|
1521
|
+
{
|
|
1522
|
+
return Number.isInteger(Number(jsonObject['freshPackIntegration'].binTypeId)) ? Number(jsonObject['freshPackIntegration'].binTypeId) : Math.floor(Number(jsonObject['freshPackIntegration'].binTypeId));
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
return Number.isInteger(jsonObject['freshPackIntegration'].binTypeId) ? jsonObject['freshPackIntegration'].binTypeId : Math.floor(jsonObject['freshPackIntegration'].binTypeId);
|
|
1526
|
+
}());
|
|
1527
|
+
}
|
|
1528
|
+
else
|
|
1529
|
+
{
|
|
1530
|
+
freshPackIntegrationObject.binTypeId = 0;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
if(typeof jsonObject['freshPackIntegration'] === 'object' && 'bulkWeightClassTypes' in jsonObject['freshPackIntegration'])
|
|
1534
|
+
{
|
|
1535
|
+
freshPackIntegrationObject.bulkWeightClassTypes = (function(){
|
|
1536
|
+
if(Array.isArray(jsonObject['freshPackIntegration'].bulkWeightClassTypes) !== true)
|
|
1537
|
+
{
|
|
1538
|
+
return [];
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
return jsonObject['freshPackIntegration'].bulkWeightClassTypes.map((bulkWeightClassTypesItem) => {
|
|
1542
|
+
return (function(){
|
|
1543
|
+
if(typeof bulkWeightClassTypesItem !== 'string')
|
|
1544
|
+
{
|
|
1545
|
+
return String(bulkWeightClassTypesItem);
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
return bulkWeightClassTypesItem;
|
|
1549
|
+
}());
|
|
1550
|
+
});
|
|
1551
|
+
}());
|
|
1552
|
+
}
|
|
1553
|
+
else
|
|
1554
|
+
{
|
|
1555
|
+
freshPackIntegrationObject.bulkWeightClassTypes = [];
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
return freshPackIntegrationObject;
|
|
1559
|
+
}());
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
if('sources' in jsonObject)
|
|
1563
|
+
{
|
|
1564
|
+
model.sources = (function(){
|
|
1565
|
+
if(Array.isArray(jsonObject['sources']) !== true)
|
|
1566
|
+
{
|
|
1567
|
+
return [];
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
return jsonObject['sources'].map((sourcesItem) => {
|
|
1571
|
+
return (function(){
|
|
362
1572
|
return sourcesItem;
|
|
363
1573
|
}());
|
|
364
1574
|
});
|