@ricado/api-client 2.3.17 → 2.3.18
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 +6132 -2165
- 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
|
@@ -98,11 +98,35 @@ var CompacSizerBatchModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
98
98
|
/**
|
|
99
99
|
* The Compac Sizer Batch Data
|
|
100
100
|
*
|
|
101
|
-
* @type {
|
|
101
|
+
* @type {{id: number, name: ?string, growerCode: ?string, growerName: ?string, startTimestamp: ?Date, endTimestamp: ?Date, comments: string[], varietyId: string, varietyName: string, finished: boolean, events: Array<{id: number, batchId: number, type: string, details: string, timestamp: Date, runningSeconds: number, fruitRunningSeconds: number}>, sizingMaps: Array<{id: number, eventId: number, varietySizingMapId: number, name: ?string, fruitSizes: Array<{id: number, eventId: number, index: number, name: ?string, minimumFruitWeight: number, fruitCount: number, minimumTrayWeight: number, varietySizingMapId: number}>}>, grades: Array<{id: number, eventId: number, index: number, name: ?string}>, qualities: Array<{id: number, eventId: number, index: number, name: ?string}>, products: Array<{id: number, eventId: number, guid: string, name: ?string}>, packs: Array<{id: number, eventId: number, guid: string, name: ?string}>, summaryGroups: Array<{id: number, name: ?string, isReject: boolean, orderIndex: number}>, dropSummaries: Array<{id: number, eventId: number, summaryGroupId: number, productId: number, dropId: number, gradeIndex: number, sizeIndex: number, qualityIndex: number, fruitWeight: number, fruitCount: number, varietySizingMapId: number}>, recycleSummaries: Array<{id: number, eventId: number, productId: number, dropId: number, gradeIndex: number, sizeIndex: number, qualityIndex: number, fruitWeight: number, fruitCount: number, varietySizingMapId: number}>, packSummaries: Array<{id: number, eventId: number, summaryGroupId: number, productId: number, packId: number, packCount: number, fruitWeight: number, fruitCount: number}>, drops: Array<{id: number, name: ?string, totallingEnabled: boolean}>}}
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
_this.batch = {
|
|
105
|
+
_this.batch = function () {
|
|
106
|
+
var batchDefaultValue = {};
|
|
107
|
+
batchDefaultValue.id = 0;
|
|
108
|
+
batchDefaultValue.name = null;
|
|
109
|
+
batchDefaultValue.growerCode = null;
|
|
110
|
+
batchDefaultValue.growerName = null;
|
|
111
|
+
batchDefaultValue.startTimestamp = null;
|
|
112
|
+
batchDefaultValue.endTimestamp = null;
|
|
113
|
+
batchDefaultValue.comments = [];
|
|
114
|
+
batchDefaultValue.varietyId = "";
|
|
115
|
+
batchDefaultValue.varietyName = "";
|
|
116
|
+
batchDefaultValue.finished = false;
|
|
117
|
+
batchDefaultValue.events = [];
|
|
118
|
+
batchDefaultValue.sizingMaps = [];
|
|
119
|
+
batchDefaultValue.grades = [];
|
|
120
|
+
batchDefaultValue.qualities = [];
|
|
121
|
+
batchDefaultValue.products = [];
|
|
122
|
+
batchDefaultValue.packs = [];
|
|
123
|
+
batchDefaultValue.summaryGroups = [];
|
|
124
|
+
batchDefaultValue.dropSummaries = [];
|
|
125
|
+
batchDefaultValue.recycleSummaries = [];
|
|
126
|
+
batchDefaultValue.packSummaries = [];
|
|
127
|
+
batchDefaultValue.drops = [];
|
|
128
|
+
return batchDefaultValue;
|
|
129
|
+
}();
|
|
106
130
|
/**
|
|
107
131
|
* Whether the Compac Sizer Batch has been deleted
|
|
108
132
|
*
|
|
@@ -110,6 +134,7 @@ var CompacSizerBatchModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
110
134
|
* @public
|
|
111
135
|
*/
|
|
112
136
|
|
|
137
|
+
|
|
113
138
|
_this.deleted = false;
|
|
114
139
|
/**
|
|
115
140
|
* When the Compac Sizer Batch was last updated
|
|
@@ -214,11 +239,1257 @@ var CompacSizerBatchModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
214
239
|
|
|
215
240
|
if ('batch' in jsonObject) {
|
|
216
241
|
model.batch = function () {
|
|
217
|
-
|
|
218
|
-
|
|
242
|
+
var batchObject = {};
|
|
243
|
+
|
|
244
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'id' in jsonObject['batch']) {
|
|
245
|
+
batchObject.id = function () {
|
|
246
|
+
if (typeof jsonObject['batch'].id !== 'number') {
|
|
247
|
+
return Number.isInteger(Number(jsonObject['batch'].id)) ? Number(jsonObject['batch'].id) : Math.floor(Number(jsonObject['batch'].id));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return Number.isInteger(jsonObject['batch'].id) ? jsonObject['batch'].id : Math.floor(jsonObject['batch'].id);
|
|
251
|
+
}();
|
|
252
|
+
} else {
|
|
253
|
+
batchObject.id = 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'name' in jsonObject['batch']) {
|
|
257
|
+
batchObject.name = function () {
|
|
258
|
+
if (jsonObject['batch'].name === null) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (typeof jsonObject['batch'].name !== 'string') {
|
|
263
|
+
return String(jsonObject['batch'].name);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return jsonObject['batch'].name;
|
|
267
|
+
}();
|
|
268
|
+
} else {
|
|
269
|
+
batchObject.name = null;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'growerCode' in jsonObject['batch']) {
|
|
273
|
+
batchObject.growerCode = function () {
|
|
274
|
+
if (jsonObject['batch'].growerCode === null) {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (typeof jsonObject['batch'].growerCode !== 'string') {
|
|
279
|
+
return String(jsonObject['batch'].growerCode);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return jsonObject['batch'].growerCode;
|
|
283
|
+
}();
|
|
284
|
+
} else {
|
|
285
|
+
batchObject.growerCode = null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'growerName' in jsonObject['batch']) {
|
|
289
|
+
batchObject.growerName = function () {
|
|
290
|
+
if (jsonObject['batch'].growerName === null) {
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (typeof jsonObject['batch'].growerName !== 'string') {
|
|
295
|
+
return String(jsonObject['batch'].growerName);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return jsonObject['batch'].growerName;
|
|
299
|
+
}();
|
|
300
|
+
} else {
|
|
301
|
+
batchObject.growerName = null;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'startTimestamp' in jsonObject['batch']) {
|
|
305
|
+
batchObject.startTimestamp = function () {
|
|
306
|
+
if (jsonObject['batch'].startTimestamp === null) {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (typeof jsonObject['batch'].startTimestamp !== 'string') {
|
|
311
|
+
return new Date(String(jsonObject['batch'].startTimestamp));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return new Date(jsonObject['batch'].startTimestamp);
|
|
315
|
+
}();
|
|
316
|
+
} else {
|
|
317
|
+
batchObject.startTimestamp = null;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'endTimestamp' in jsonObject['batch']) {
|
|
321
|
+
batchObject.endTimestamp = function () {
|
|
322
|
+
if (jsonObject['batch'].endTimestamp === null) {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (typeof jsonObject['batch'].endTimestamp !== 'string') {
|
|
327
|
+
return new Date(String(jsonObject['batch'].endTimestamp));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return new Date(jsonObject['batch'].endTimestamp);
|
|
331
|
+
}();
|
|
332
|
+
} else {
|
|
333
|
+
batchObject.endTimestamp = null;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'comments' in jsonObject['batch']) {
|
|
337
|
+
batchObject.comments = function () {
|
|
338
|
+
if (Array.isArray(jsonObject['batch'].comments) !== true) {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return jsonObject['batch'].comments.map(function (commentsItem) {
|
|
343
|
+
return function () {
|
|
344
|
+
if (typeof commentsItem !== 'string') {
|
|
345
|
+
return String(commentsItem);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return commentsItem;
|
|
349
|
+
}();
|
|
350
|
+
});
|
|
351
|
+
}();
|
|
352
|
+
} else {
|
|
353
|
+
batchObject.comments = [];
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'varietyId' in jsonObject['batch']) {
|
|
357
|
+
batchObject.varietyId = function () {
|
|
358
|
+
if (typeof jsonObject['batch'].varietyId !== 'string') {
|
|
359
|
+
return String(jsonObject['batch'].varietyId);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return jsonObject['batch'].varietyId;
|
|
363
|
+
}();
|
|
364
|
+
} else {
|
|
365
|
+
batchObject.varietyId = "";
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'varietyName' in jsonObject['batch']) {
|
|
369
|
+
batchObject.varietyName = function () {
|
|
370
|
+
if (typeof jsonObject['batch'].varietyName !== 'string') {
|
|
371
|
+
return String(jsonObject['batch'].varietyName);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return jsonObject['batch'].varietyName;
|
|
375
|
+
}();
|
|
376
|
+
} else {
|
|
377
|
+
batchObject.varietyName = "";
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'finished' in jsonObject['batch']) {
|
|
381
|
+
batchObject.finished = function () {
|
|
382
|
+
if (typeof jsonObject['batch'].finished !== 'boolean') {
|
|
383
|
+
return Boolean(jsonObject['batch'].finished);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
return jsonObject['batch'].finished;
|
|
387
|
+
}();
|
|
388
|
+
} else {
|
|
389
|
+
batchObject.finished = false;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'events' in jsonObject['batch']) {
|
|
393
|
+
batchObject.events = function () {
|
|
394
|
+
if (Array.isArray(jsonObject['batch'].events) !== true) {
|
|
395
|
+
return [];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return jsonObject['batch'].events.map(function (eventsItem) {
|
|
399
|
+
return function () {
|
|
400
|
+
var eventsItemObject = {};
|
|
401
|
+
|
|
402
|
+
if (_typeof(eventsItem) === 'object' && 'id' in eventsItem) {
|
|
403
|
+
eventsItemObject.id = function () {
|
|
404
|
+
if (typeof eventsItem.id !== 'number') {
|
|
405
|
+
return Number.isInteger(Number(eventsItem.id)) ? Number(eventsItem.id) : Math.floor(Number(eventsItem.id));
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
return Number.isInteger(eventsItem.id) ? eventsItem.id : Math.floor(eventsItem.id);
|
|
409
|
+
}();
|
|
410
|
+
} else {
|
|
411
|
+
eventsItemObject.id = 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (_typeof(eventsItem) === 'object' && 'batchId' in eventsItem) {
|
|
415
|
+
eventsItemObject.batchId = function () {
|
|
416
|
+
if (typeof eventsItem.batchId !== 'number') {
|
|
417
|
+
return Number.isInteger(Number(eventsItem.batchId)) ? Number(eventsItem.batchId) : Math.floor(Number(eventsItem.batchId));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
return Number.isInteger(eventsItem.batchId) ? eventsItem.batchId : Math.floor(eventsItem.batchId);
|
|
421
|
+
}();
|
|
422
|
+
} else {
|
|
423
|
+
eventsItemObject.batchId = 0;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (_typeof(eventsItem) === 'object' && 'type' in eventsItem) {
|
|
427
|
+
eventsItemObject.type = function () {
|
|
428
|
+
if (typeof eventsItem.type !== 'string') {
|
|
429
|
+
return String(eventsItem.type);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return eventsItem.type;
|
|
433
|
+
}();
|
|
434
|
+
} else {
|
|
435
|
+
eventsItemObject.type = "";
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (_typeof(eventsItem) === 'object' && 'details' in eventsItem) {
|
|
439
|
+
eventsItemObject.details = function () {
|
|
440
|
+
if (typeof eventsItem.details !== 'string') {
|
|
441
|
+
return String(eventsItem.details);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
return eventsItem.details;
|
|
445
|
+
}();
|
|
446
|
+
} else {
|
|
447
|
+
eventsItemObject.details = "";
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (_typeof(eventsItem) === 'object' && 'timestamp' in eventsItem) {
|
|
451
|
+
eventsItemObject.timestamp = function () {
|
|
452
|
+
if (typeof eventsItem.timestamp !== 'string') {
|
|
453
|
+
return new Date(String(eventsItem.timestamp));
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return new Date(eventsItem.timestamp);
|
|
457
|
+
}();
|
|
458
|
+
} else {
|
|
459
|
+
eventsItemObject.timestamp = new Date();
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (_typeof(eventsItem) === 'object' && 'runningSeconds' in eventsItem) {
|
|
463
|
+
eventsItemObject.runningSeconds = function () {
|
|
464
|
+
if (typeof eventsItem.runningSeconds !== 'number') {
|
|
465
|
+
return Number.isInteger(Number(eventsItem.runningSeconds)) ? Number(eventsItem.runningSeconds) : Math.floor(Number(eventsItem.runningSeconds));
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
return Number.isInteger(eventsItem.runningSeconds) ? eventsItem.runningSeconds : Math.floor(eventsItem.runningSeconds);
|
|
469
|
+
}();
|
|
470
|
+
} else {
|
|
471
|
+
eventsItemObject.runningSeconds = 0;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (_typeof(eventsItem) === 'object' && 'fruitRunningSeconds' in eventsItem) {
|
|
475
|
+
eventsItemObject.fruitRunningSeconds = function () {
|
|
476
|
+
if (typeof eventsItem.fruitRunningSeconds !== 'number') {
|
|
477
|
+
return Number.isInteger(Number(eventsItem.fruitRunningSeconds)) ? Number(eventsItem.fruitRunningSeconds) : Math.floor(Number(eventsItem.fruitRunningSeconds));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
return Number.isInteger(eventsItem.fruitRunningSeconds) ? eventsItem.fruitRunningSeconds : Math.floor(eventsItem.fruitRunningSeconds);
|
|
481
|
+
}();
|
|
482
|
+
} else {
|
|
483
|
+
eventsItemObject.fruitRunningSeconds = 0;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
return eventsItemObject;
|
|
487
|
+
}();
|
|
488
|
+
});
|
|
489
|
+
}();
|
|
490
|
+
} else {
|
|
491
|
+
batchObject.events = [];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'sizingMaps' in jsonObject['batch']) {
|
|
495
|
+
batchObject.sizingMaps = function () {
|
|
496
|
+
if (Array.isArray(jsonObject['batch'].sizingMaps) !== true) {
|
|
497
|
+
return [];
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
return jsonObject['batch'].sizingMaps.map(function (sizingMapsItem) {
|
|
501
|
+
return function () {
|
|
502
|
+
var sizingMapsItemObject = {};
|
|
503
|
+
|
|
504
|
+
if (_typeof(sizingMapsItem) === 'object' && 'id' in sizingMapsItem) {
|
|
505
|
+
sizingMapsItemObject.id = function () {
|
|
506
|
+
if (typeof sizingMapsItem.id !== 'number') {
|
|
507
|
+
return Number.isInteger(Number(sizingMapsItem.id)) ? Number(sizingMapsItem.id) : Math.floor(Number(sizingMapsItem.id));
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return Number.isInteger(sizingMapsItem.id) ? sizingMapsItem.id : Math.floor(sizingMapsItem.id);
|
|
511
|
+
}();
|
|
512
|
+
} else {
|
|
513
|
+
sizingMapsItemObject.id = 0;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
if (_typeof(sizingMapsItem) === 'object' && 'eventId' in sizingMapsItem) {
|
|
517
|
+
sizingMapsItemObject.eventId = function () {
|
|
518
|
+
if (typeof sizingMapsItem.eventId !== 'number') {
|
|
519
|
+
return Number.isInteger(Number(sizingMapsItem.eventId)) ? Number(sizingMapsItem.eventId) : Math.floor(Number(sizingMapsItem.eventId));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
return Number.isInteger(sizingMapsItem.eventId) ? sizingMapsItem.eventId : Math.floor(sizingMapsItem.eventId);
|
|
523
|
+
}();
|
|
524
|
+
} else {
|
|
525
|
+
sizingMapsItemObject.eventId = 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
if (_typeof(sizingMapsItem) === 'object' && 'varietySizingMapId' in sizingMapsItem) {
|
|
529
|
+
sizingMapsItemObject.varietySizingMapId = function () {
|
|
530
|
+
if (typeof sizingMapsItem.varietySizingMapId !== 'number') {
|
|
531
|
+
return Number.isInteger(Number(sizingMapsItem.varietySizingMapId)) ? Number(sizingMapsItem.varietySizingMapId) : Math.floor(Number(sizingMapsItem.varietySizingMapId));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return Number.isInteger(sizingMapsItem.varietySizingMapId) ? sizingMapsItem.varietySizingMapId : Math.floor(sizingMapsItem.varietySizingMapId);
|
|
535
|
+
}();
|
|
536
|
+
} else {
|
|
537
|
+
sizingMapsItemObject.varietySizingMapId = 0;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (_typeof(sizingMapsItem) === 'object' && 'name' in sizingMapsItem) {
|
|
541
|
+
sizingMapsItemObject.name = function () {
|
|
542
|
+
if (sizingMapsItem.name === null) {
|
|
543
|
+
return null;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
if (typeof sizingMapsItem.name !== 'string') {
|
|
547
|
+
return String(sizingMapsItem.name);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
return sizingMapsItem.name;
|
|
551
|
+
}();
|
|
552
|
+
} else {
|
|
553
|
+
sizingMapsItemObject.name = null;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (_typeof(sizingMapsItem) === 'object' && 'fruitSizes' in sizingMapsItem) {
|
|
557
|
+
sizingMapsItemObject.fruitSizes = function () {
|
|
558
|
+
if (Array.isArray(sizingMapsItem.fruitSizes) !== true) {
|
|
559
|
+
return [];
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
return sizingMapsItem.fruitSizes.map(function (fruitSizesItem) {
|
|
563
|
+
return function () {
|
|
564
|
+
var fruitSizesItemObject = {};
|
|
565
|
+
|
|
566
|
+
if (_typeof(fruitSizesItem) === 'object' && 'id' in fruitSizesItem) {
|
|
567
|
+
fruitSizesItemObject.id = function () {
|
|
568
|
+
if (typeof fruitSizesItem.id !== 'number') {
|
|
569
|
+
return Number.isInteger(Number(fruitSizesItem.id)) ? Number(fruitSizesItem.id) : Math.floor(Number(fruitSizesItem.id));
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
return Number.isInteger(fruitSizesItem.id) ? fruitSizesItem.id : Math.floor(fruitSizesItem.id);
|
|
573
|
+
}();
|
|
574
|
+
} else {
|
|
575
|
+
fruitSizesItemObject.id = 0;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (_typeof(fruitSizesItem) === 'object' && 'eventId' in fruitSizesItem) {
|
|
579
|
+
fruitSizesItemObject.eventId = function () {
|
|
580
|
+
if (typeof fruitSizesItem.eventId !== 'number') {
|
|
581
|
+
return Number.isInteger(Number(fruitSizesItem.eventId)) ? Number(fruitSizesItem.eventId) : Math.floor(Number(fruitSizesItem.eventId));
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
return Number.isInteger(fruitSizesItem.eventId) ? fruitSizesItem.eventId : Math.floor(fruitSizesItem.eventId);
|
|
585
|
+
}();
|
|
586
|
+
} else {
|
|
587
|
+
fruitSizesItemObject.eventId = 0;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
if (_typeof(fruitSizesItem) === 'object' && 'index' in fruitSizesItem) {
|
|
591
|
+
fruitSizesItemObject.index = function () {
|
|
592
|
+
if (typeof fruitSizesItem.index !== 'number') {
|
|
593
|
+
return Number.isInteger(Number(fruitSizesItem.index)) ? Number(fruitSizesItem.index) : Math.floor(Number(fruitSizesItem.index));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return Number.isInteger(fruitSizesItem.index) ? fruitSizesItem.index : Math.floor(fruitSizesItem.index);
|
|
597
|
+
}();
|
|
598
|
+
} else {
|
|
599
|
+
fruitSizesItemObject.index = 0;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
if (_typeof(fruitSizesItem) === 'object' && 'name' in fruitSizesItem) {
|
|
603
|
+
fruitSizesItemObject.name = function () {
|
|
604
|
+
if (fruitSizesItem.name === null) {
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
if (typeof fruitSizesItem.name !== 'string') {
|
|
609
|
+
return String(fruitSizesItem.name);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
return fruitSizesItem.name;
|
|
613
|
+
}();
|
|
614
|
+
} else {
|
|
615
|
+
fruitSizesItemObject.name = null;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
if (_typeof(fruitSizesItem) === 'object' && 'minimumFruitWeight' in fruitSizesItem) {
|
|
619
|
+
fruitSizesItemObject.minimumFruitWeight = function () {
|
|
620
|
+
if (typeof fruitSizesItem.minimumFruitWeight !== 'number') {
|
|
621
|
+
return Number(fruitSizesItem.minimumFruitWeight);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
return fruitSizesItem.minimumFruitWeight;
|
|
625
|
+
}();
|
|
626
|
+
} else {
|
|
627
|
+
fruitSizesItemObject.minimumFruitWeight = 0;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
if (_typeof(fruitSizesItem) === 'object' && 'fruitCount' in fruitSizesItem) {
|
|
631
|
+
fruitSizesItemObject.fruitCount = function () {
|
|
632
|
+
if (typeof fruitSizesItem.fruitCount !== 'number') {
|
|
633
|
+
return Number.isInteger(Number(fruitSizesItem.fruitCount)) ? Number(fruitSizesItem.fruitCount) : Math.floor(Number(fruitSizesItem.fruitCount));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
return Number.isInteger(fruitSizesItem.fruitCount) ? fruitSizesItem.fruitCount : Math.floor(fruitSizesItem.fruitCount);
|
|
637
|
+
}();
|
|
638
|
+
} else {
|
|
639
|
+
fruitSizesItemObject.fruitCount = 0;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (_typeof(fruitSizesItem) === 'object' && 'minimumTrayWeight' in fruitSizesItem) {
|
|
643
|
+
fruitSizesItemObject.minimumTrayWeight = function () {
|
|
644
|
+
if (typeof fruitSizesItem.minimumTrayWeight !== 'number') {
|
|
645
|
+
return Number(fruitSizesItem.minimumTrayWeight);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return fruitSizesItem.minimumTrayWeight;
|
|
649
|
+
}();
|
|
650
|
+
} else {
|
|
651
|
+
fruitSizesItemObject.minimumTrayWeight = 0;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
if (_typeof(fruitSizesItem) === 'object' && 'varietySizingMapId' in fruitSizesItem) {
|
|
655
|
+
fruitSizesItemObject.varietySizingMapId = function () {
|
|
656
|
+
if (typeof fruitSizesItem.varietySizingMapId !== 'number') {
|
|
657
|
+
return Number.isInteger(Number(fruitSizesItem.varietySizingMapId)) ? Number(fruitSizesItem.varietySizingMapId) : Math.floor(Number(fruitSizesItem.varietySizingMapId));
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
return Number.isInteger(fruitSizesItem.varietySizingMapId) ? fruitSizesItem.varietySizingMapId : Math.floor(fruitSizesItem.varietySizingMapId);
|
|
661
|
+
}();
|
|
662
|
+
} else {
|
|
663
|
+
fruitSizesItemObject.varietySizingMapId = 0;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
return fruitSizesItemObject;
|
|
667
|
+
}();
|
|
668
|
+
});
|
|
669
|
+
}();
|
|
670
|
+
} else {
|
|
671
|
+
sizingMapsItemObject.fruitSizes = [];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
return sizingMapsItemObject;
|
|
675
|
+
}();
|
|
676
|
+
});
|
|
677
|
+
}();
|
|
678
|
+
} else {
|
|
679
|
+
batchObject.sizingMaps = [];
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'grades' in jsonObject['batch']) {
|
|
683
|
+
batchObject.grades = function () {
|
|
684
|
+
if (Array.isArray(jsonObject['batch'].grades) !== true) {
|
|
685
|
+
return [];
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
return jsonObject['batch'].grades.map(function (gradesItem) {
|
|
689
|
+
return function () {
|
|
690
|
+
var gradesItemObject = {};
|
|
691
|
+
|
|
692
|
+
if (_typeof(gradesItem) === 'object' && 'id' in gradesItem) {
|
|
693
|
+
gradesItemObject.id = function () {
|
|
694
|
+
if (typeof gradesItem.id !== 'number') {
|
|
695
|
+
return Number.isInteger(Number(gradesItem.id)) ? Number(gradesItem.id) : Math.floor(Number(gradesItem.id));
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
return Number.isInteger(gradesItem.id) ? gradesItem.id : Math.floor(gradesItem.id);
|
|
699
|
+
}();
|
|
700
|
+
} else {
|
|
701
|
+
gradesItemObject.id = 0;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
if (_typeof(gradesItem) === 'object' && 'eventId' in gradesItem) {
|
|
705
|
+
gradesItemObject.eventId = function () {
|
|
706
|
+
if (typeof gradesItem.eventId !== 'number') {
|
|
707
|
+
return Number.isInteger(Number(gradesItem.eventId)) ? Number(gradesItem.eventId) : Math.floor(Number(gradesItem.eventId));
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
return Number.isInteger(gradesItem.eventId) ? gradesItem.eventId : Math.floor(gradesItem.eventId);
|
|
711
|
+
}();
|
|
712
|
+
} else {
|
|
713
|
+
gradesItemObject.eventId = 0;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (_typeof(gradesItem) === 'object' && 'index' in gradesItem) {
|
|
717
|
+
gradesItemObject.index = function () {
|
|
718
|
+
if (typeof gradesItem.index !== 'number') {
|
|
719
|
+
return Number.isInteger(Number(gradesItem.index)) ? Number(gradesItem.index) : Math.floor(Number(gradesItem.index));
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return Number.isInteger(gradesItem.index) ? gradesItem.index : Math.floor(gradesItem.index);
|
|
723
|
+
}();
|
|
724
|
+
} else {
|
|
725
|
+
gradesItemObject.index = 0;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (_typeof(gradesItem) === 'object' && 'name' in gradesItem) {
|
|
729
|
+
gradesItemObject.name = function () {
|
|
730
|
+
if (gradesItem.name === null) {
|
|
731
|
+
return null;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
if (typeof gradesItem.name !== 'string') {
|
|
735
|
+
return String(gradesItem.name);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
return gradesItem.name;
|
|
739
|
+
}();
|
|
740
|
+
} else {
|
|
741
|
+
gradesItemObject.name = null;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
return gradesItemObject;
|
|
745
|
+
}();
|
|
746
|
+
});
|
|
747
|
+
}();
|
|
748
|
+
} else {
|
|
749
|
+
batchObject.grades = [];
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'qualities' in jsonObject['batch']) {
|
|
753
|
+
batchObject.qualities = function () {
|
|
754
|
+
if (Array.isArray(jsonObject['batch'].qualities) !== true) {
|
|
755
|
+
return [];
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
return jsonObject['batch'].qualities.map(function (qualitiesItem) {
|
|
759
|
+
return function () {
|
|
760
|
+
var qualitiesItemObject = {};
|
|
761
|
+
|
|
762
|
+
if (_typeof(qualitiesItem) === 'object' && 'id' in qualitiesItem) {
|
|
763
|
+
qualitiesItemObject.id = function () {
|
|
764
|
+
if (typeof qualitiesItem.id !== 'number') {
|
|
765
|
+
return Number.isInteger(Number(qualitiesItem.id)) ? Number(qualitiesItem.id) : Math.floor(Number(qualitiesItem.id));
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
return Number.isInteger(qualitiesItem.id) ? qualitiesItem.id : Math.floor(qualitiesItem.id);
|
|
769
|
+
}();
|
|
770
|
+
} else {
|
|
771
|
+
qualitiesItemObject.id = 0;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (_typeof(qualitiesItem) === 'object' && 'eventId' in qualitiesItem) {
|
|
775
|
+
qualitiesItemObject.eventId = function () {
|
|
776
|
+
if (typeof qualitiesItem.eventId !== 'number') {
|
|
777
|
+
return Number.isInteger(Number(qualitiesItem.eventId)) ? Number(qualitiesItem.eventId) : Math.floor(Number(qualitiesItem.eventId));
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
return Number.isInteger(qualitiesItem.eventId) ? qualitiesItem.eventId : Math.floor(qualitiesItem.eventId);
|
|
781
|
+
}();
|
|
782
|
+
} else {
|
|
783
|
+
qualitiesItemObject.eventId = 0;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (_typeof(qualitiesItem) === 'object' && 'index' in qualitiesItem) {
|
|
787
|
+
qualitiesItemObject.index = function () {
|
|
788
|
+
if (typeof qualitiesItem.index !== 'number') {
|
|
789
|
+
return Number.isInteger(Number(qualitiesItem.index)) ? Number(qualitiesItem.index) : Math.floor(Number(qualitiesItem.index));
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
return Number.isInteger(qualitiesItem.index) ? qualitiesItem.index : Math.floor(qualitiesItem.index);
|
|
793
|
+
}();
|
|
794
|
+
} else {
|
|
795
|
+
qualitiesItemObject.index = 0;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
if (_typeof(qualitiesItem) === 'object' && 'name' in qualitiesItem) {
|
|
799
|
+
qualitiesItemObject.name = function () {
|
|
800
|
+
if (qualitiesItem.name === null) {
|
|
801
|
+
return null;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
if (typeof qualitiesItem.name !== 'string') {
|
|
805
|
+
return String(qualitiesItem.name);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
return qualitiesItem.name;
|
|
809
|
+
}();
|
|
810
|
+
} else {
|
|
811
|
+
qualitiesItemObject.name = null;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
return qualitiesItemObject;
|
|
815
|
+
}();
|
|
816
|
+
});
|
|
817
|
+
}();
|
|
818
|
+
} else {
|
|
819
|
+
batchObject.qualities = [];
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'products' in jsonObject['batch']) {
|
|
823
|
+
batchObject.products = function () {
|
|
824
|
+
if (Array.isArray(jsonObject['batch'].products) !== true) {
|
|
825
|
+
return [];
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return jsonObject['batch'].products.map(function (productsItem) {
|
|
829
|
+
return function () {
|
|
830
|
+
var productsItemObject = {};
|
|
831
|
+
|
|
832
|
+
if (_typeof(productsItem) === 'object' && 'id' in productsItem) {
|
|
833
|
+
productsItemObject.id = function () {
|
|
834
|
+
if (typeof productsItem.id !== 'number') {
|
|
835
|
+
return Number.isInteger(Number(productsItem.id)) ? Number(productsItem.id) : Math.floor(Number(productsItem.id));
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
return Number.isInteger(productsItem.id) ? productsItem.id : Math.floor(productsItem.id);
|
|
839
|
+
}();
|
|
840
|
+
} else {
|
|
841
|
+
productsItemObject.id = 0;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
if (_typeof(productsItem) === 'object' && 'eventId' in productsItem) {
|
|
845
|
+
productsItemObject.eventId = function () {
|
|
846
|
+
if (typeof productsItem.eventId !== 'number') {
|
|
847
|
+
return Number.isInteger(Number(productsItem.eventId)) ? Number(productsItem.eventId) : Math.floor(Number(productsItem.eventId));
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
return Number.isInteger(productsItem.eventId) ? productsItem.eventId : Math.floor(productsItem.eventId);
|
|
851
|
+
}();
|
|
852
|
+
} else {
|
|
853
|
+
productsItemObject.eventId = 0;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
if (_typeof(productsItem) === 'object' && 'guid' in productsItem) {
|
|
857
|
+
productsItemObject.guid = function () {
|
|
858
|
+
if (typeof productsItem.guid !== 'string') {
|
|
859
|
+
return String(productsItem.guid);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
return productsItem.guid;
|
|
863
|
+
}();
|
|
864
|
+
} else {
|
|
865
|
+
productsItemObject.guid = "";
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
if (_typeof(productsItem) === 'object' && 'name' in productsItem) {
|
|
869
|
+
productsItemObject.name = function () {
|
|
870
|
+
if (productsItem.name === null) {
|
|
871
|
+
return null;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
if (typeof productsItem.name !== 'string') {
|
|
875
|
+
return String(productsItem.name);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
return productsItem.name;
|
|
879
|
+
}();
|
|
880
|
+
} else {
|
|
881
|
+
productsItemObject.name = null;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
return productsItemObject;
|
|
885
|
+
}();
|
|
886
|
+
});
|
|
887
|
+
}();
|
|
888
|
+
} else {
|
|
889
|
+
batchObject.products = [];
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'packs' in jsonObject['batch']) {
|
|
893
|
+
batchObject.packs = function () {
|
|
894
|
+
if (Array.isArray(jsonObject['batch'].packs) !== true) {
|
|
895
|
+
return [];
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
return jsonObject['batch'].packs.map(function (packsItem) {
|
|
899
|
+
return function () {
|
|
900
|
+
var packsItemObject = {};
|
|
901
|
+
|
|
902
|
+
if (_typeof(packsItem) === 'object' && 'id' in packsItem) {
|
|
903
|
+
packsItemObject.id = function () {
|
|
904
|
+
if (typeof packsItem.id !== 'number') {
|
|
905
|
+
return Number.isInteger(Number(packsItem.id)) ? Number(packsItem.id) : Math.floor(Number(packsItem.id));
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
return Number.isInteger(packsItem.id) ? packsItem.id : Math.floor(packsItem.id);
|
|
909
|
+
}();
|
|
910
|
+
} else {
|
|
911
|
+
packsItemObject.id = 0;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
if (_typeof(packsItem) === 'object' && 'eventId' in packsItem) {
|
|
915
|
+
packsItemObject.eventId = function () {
|
|
916
|
+
if (typeof packsItem.eventId !== 'number') {
|
|
917
|
+
return Number.isInteger(Number(packsItem.eventId)) ? Number(packsItem.eventId) : Math.floor(Number(packsItem.eventId));
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
return Number.isInteger(packsItem.eventId) ? packsItem.eventId : Math.floor(packsItem.eventId);
|
|
921
|
+
}();
|
|
922
|
+
} else {
|
|
923
|
+
packsItemObject.eventId = 0;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
if (_typeof(packsItem) === 'object' && 'guid' in packsItem) {
|
|
927
|
+
packsItemObject.guid = function () {
|
|
928
|
+
if (typeof packsItem.guid !== 'string') {
|
|
929
|
+
return String(packsItem.guid);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return packsItem.guid;
|
|
933
|
+
}();
|
|
934
|
+
} else {
|
|
935
|
+
packsItemObject.guid = "";
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
if (_typeof(packsItem) === 'object' && 'name' in packsItem) {
|
|
939
|
+
packsItemObject.name = function () {
|
|
940
|
+
if (packsItem.name === null) {
|
|
941
|
+
return null;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
if (typeof packsItem.name !== 'string') {
|
|
945
|
+
return String(packsItem.name);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
return packsItem.name;
|
|
949
|
+
}();
|
|
950
|
+
} else {
|
|
951
|
+
packsItemObject.name = null;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
return packsItemObject;
|
|
955
|
+
}();
|
|
956
|
+
});
|
|
957
|
+
}();
|
|
958
|
+
} else {
|
|
959
|
+
batchObject.packs = [];
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'summaryGroups' in jsonObject['batch']) {
|
|
963
|
+
batchObject.summaryGroups = function () {
|
|
964
|
+
if (Array.isArray(jsonObject['batch'].summaryGroups) !== true) {
|
|
965
|
+
return [];
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
return jsonObject['batch'].summaryGroups.map(function (summaryGroupsItem) {
|
|
969
|
+
return function () {
|
|
970
|
+
var summaryGroupsItemObject = {};
|
|
971
|
+
|
|
972
|
+
if (_typeof(summaryGroupsItem) === 'object' && 'id' in summaryGroupsItem) {
|
|
973
|
+
summaryGroupsItemObject.id = function () {
|
|
974
|
+
if (typeof summaryGroupsItem.id !== 'number') {
|
|
975
|
+
return Number.isInteger(Number(summaryGroupsItem.id)) ? Number(summaryGroupsItem.id) : Math.floor(Number(summaryGroupsItem.id));
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
return Number.isInteger(summaryGroupsItem.id) ? summaryGroupsItem.id : Math.floor(summaryGroupsItem.id);
|
|
979
|
+
}();
|
|
980
|
+
} else {
|
|
981
|
+
summaryGroupsItemObject.id = 0;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
if (_typeof(summaryGroupsItem) === 'object' && 'name' in summaryGroupsItem) {
|
|
985
|
+
summaryGroupsItemObject.name = function () {
|
|
986
|
+
if (summaryGroupsItem.name === null) {
|
|
987
|
+
return null;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
if (typeof summaryGroupsItem.name !== 'string') {
|
|
991
|
+
return String(summaryGroupsItem.name);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
return summaryGroupsItem.name;
|
|
995
|
+
}();
|
|
996
|
+
} else {
|
|
997
|
+
summaryGroupsItemObject.name = null;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
if (_typeof(summaryGroupsItem) === 'object' && 'isReject' in summaryGroupsItem) {
|
|
1001
|
+
summaryGroupsItemObject.isReject = function () {
|
|
1002
|
+
if (typeof summaryGroupsItem.isReject !== 'boolean') {
|
|
1003
|
+
return Boolean(summaryGroupsItem.isReject);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
return summaryGroupsItem.isReject;
|
|
1007
|
+
}();
|
|
1008
|
+
} else {
|
|
1009
|
+
summaryGroupsItemObject.isReject = false;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
if (_typeof(summaryGroupsItem) === 'object' && 'orderIndex' in summaryGroupsItem) {
|
|
1013
|
+
summaryGroupsItemObject.orderIndex = function () {
|
|
1014
|
+
if (typeof summaryGroupsItem.orderIndex !== 'number') {
|
|
1015
|
+
return Number.isInteger(Number(summaryGroupsItem.orderIndex)) ? Number(summaryGroupsItem.orderIndex) : Math.floor(Number(summaryGroupsItem.orderIndex));
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
return Number.isInteger(summaryGroupsItem.orderIndex) ? summaryGroupsItem.orderIndex : Math.floor(summaryGroupsItem.orderIndex);
|
|
1019
|
+
}();
|
|
1020
|
+
} else {
|
|
1021
|
+
summaryGroupsItemObject.orderIndex = 0;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
return summaryGroupsItemObject;
|
|
1025
|
+
}();
|
|
1026
|
+
});
|
|
1027
|
+
}();
|
|
1028
|
+
} else {
|
|
1029
|
+
batchObject.summaryGroups = [];
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'dropSummaries' in jsonObject['batch']) {
|
|
1033
|
+
batchObject.dropSummaries = function () {
|
|
1034
|
+
if (Array.isArray(jsonObject['batch'].dropSummaries) !== true) {
|
|
1035
|
+
return [];
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
return jsonObject['batch'].dropSummaries.map(function (dropSummariesItem) {
|
|
1039
|
+
return function () {
|
|
1040
|
+
var dropSummariesItemObject = {};
|
|
1041
|
+
|
|
1042
|
+
if (_typeof(dropSummariesItem) === 'object' && 'id' in dropSummariesItem) {
|
|
1043
|
+
dropSummariesItemObject.id = function () {
|
|
1044
|
+
if (typeof dropSummariesItem.id !== 'number') {
|
|
1045
|
+
return Number.isInteger(Number(dropSummariesItem.id)) ? Number(dropSummariesItem.id) : Math.floor(Number(dropSummariesItem.id));
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
return Number.isInteger(dropSummariesItem.id) ? dropSummariesItem.id : Math.floor(dropSummariesItem.id);
|
|
1049
|
+
}();
|
|
1050
|
+
} else {
|
|
1051
|
+
dropSummariesItemObject.id = 0;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (_typeof(dropSummariesItem) === 'object' && 'eventId' in dropSummariesItem) {
|
|
1055
|
+
dropSummariesItemObject.eventId = function () {
|
|
1056
|
+
if (typeof dropSummariesItem.eventId !== 'number') {
|
|
1057
|
+
return Number.isInteger(Number(dropSummariesItem.eventId)) ? Number(dropSummariesItem.eventId) : Math.floor(Number(dropSummariesItem.eventId));
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
return Number.isInteger(dropSummariesItem.eventId) ? dropSummariesItem.eventId : Math.floor(dropSummariesItem.eventId);
|
|
1061
|
+
}();
|
|
1062
|
+
} else {
|
|
1063
|
+
dropSummariesItemObject.eventId = 0;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
if (_typeof(dropSummariesItem) === 'object' && 'summaryGroupId' in dropSummariesItem) {
|
|
1067
|
+
dropSummariesItemObject.summaryGroupId = function () {
|
|
1068
|
+
if (typeof dropSummariesItem.summaryGroupId !== 'number') {
|
|
1069
|
+
return Number.isInteger(Number(dropSummariesItem.summaryGroupId)) ? Number(dropSummariesItem.summaryGroupId) : Math.floor(Number(dropSummariesItem.summaryGroupId));
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
return Number.isInteger(dropSummariesItem.summaryGroupId) ? dropSummariesItem.summaryGroupId : Math.floor(dropSummariesItem.summaryGroupId);
|
|
1073
|
+
}();
|
|
1074
|
+
} else {
|
|
1075
|
+
dropSummariesItemObject.summaryGroupId = 0;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
if (_typeof(dropSummariesItem) === 'object' && 'productId' in dropSummariesItem) {
|
|
1079
|
+
dropSummariesItemObject.productId = function () {
|
|
1080
|
+
if (typeof dropSummariesItem.productId !== 'number') {
|
|
1081
|
+
return Number.isInteger(Number(dropSummariesItem.productId)) ? Number(dropSummariesItem.productId) : Math.floor(Number(dropSummariesItem.productId));
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return Number.isInteger(dropSummariesItem.productId) ? dropSummariesItem.productId : Math.floor(dropSummariesItem.productId);
|
|
1085
|
+
}();
|
|
1086
|
+
} else {
|
|
1087
|
+
dropSummariesItemObject.productId = 0;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
if (_typeof(dropSummariesItem) === 'object' && 'dropId' in dropSummariesItem) {
|
|
1091
|
+
dropSummariesItemObject.dropId = function () {
|
|
1092
|
+
if (typeof dropSummariesItem.dropId !== 'number') {
|
|
1093
|
+
return Number.isInteger(Number(dropSummariesItem.dropId)) ? Number(dropSummariesItem.dropId) : Math.floor(Number(dropSummariesItem.dropId));
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
return Number.isInteger(dropSummariesItem.dropId) ? dropSummariesItem.dropId : Math.floor(dropSummariesItem.dropId);
|
|
1097
|
+
}();
|
|
1098
|
+
} else {
|
|
1099
|
+
dropSummariesItemObject.dropId = 0;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
if (_typeof(dropSummariesItem) === 'object' && 'gradeIndex' in dropSummariesItem) {
|
|
1103
|
+
dropSummariesItemObject.gradeIndex = function () {
|
|
1104
|
+
if (typeof dropSummariesItem.gradeIndex !== 'number') {
|
|
1105
|
+
return Number.isInteger(Number(dropSummariesItem.gradeIndex)) ? Number(dropSummariesItem.gradeIndex) : Math.floor(Number(dropSummariesItem.gradeIndex));
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
return Number.isInteger(dropSummariesItem.gradeIndex) ? dropSummariesItem.gradeIndex : Math.floor(dropSummariesItem.gradeIndex);
|
|
1109
|
+
}();
|
|
1110
|
+
} else {
|
|
1111
|
+
dropSummariesItemObject.gradeIndex = 0;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
if (_typeof(dropSummariesItem) === 'object' && 'sizeIndex' in dropSummariesItem) {
|
|
1115
|
+
dropSummariesItemObject.sizeIndex = function () {
|
|
1116
|
+
if (typeof dropSummariesItem.sizeIndex !== 'number') {
|
|
1117
|
+
return Number.isInteger(Number(dropSummariesItem.sizeIndex)) ? Number(dropSummariesItem.sizeIndex) : Math.floor(Number(dropSummariesItem.sizeIndex));
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
return Number.isInteger(dropSummariesItem.sizeIndex) ? dropSummariesItem.sizeIndex : Math.floor(dropSummariesItem.sizeIndex);
|
|
1121
|
+
}();
|
|
1122
|
+
} else {
|
|
1123
|
+
dropSummariesItemObject.sizeIndex = 0;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
if (_typeof(dropSummariesItem) === 'object' && 'qualityIndex' in dropSummariesItem) {
|
|
1127
|
+
dropSummariesItemObject.qualityIndex = function () {
|
|
1128
|
+
if (typeof dropSummariesItem.qualityIndex !== 'number') {
|
|
1129
|
+
return Number.isInteger(Number(dropSummariesItem.qualityIndex)) ? Number(dropSummariesItem.qualityIndex) : Math.floor(Number(dropSummariesItem.qualityIndex));
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
return Number.isInteger(dropSummariesItem.qualityIndex) ? dropSummariesItem.qualityIndex : Math.floor(dropSummariesItem.qualityIndex);
|
|
1133
|
+
}();
|
|
1134
|
+
} else {
|
|
1135
|
+
dropSummariesItemObject.qualityIndex = 0;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
if (_typeof(dropSummariesItem) === 'object' && 'fruitWeight' in dropSummariesItem) {
|
|
1139
|
+
dropSummariesItemObject.fruitWeight = function () {
|
|
1140
|
+
if (typeof dropSummariesItem.fruitWeight !== 'number') {
|
|
1141
|
+
return Number(dropSummariesItem.fruitWeight);
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
return dropSummariesItem.fruitWeight;
|
|
1145
|
+
}();
|
|
1146
|
+
} else {
|
|
1147
|
+
dropSummariesItemObject.fruitWeight = 0;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
if (_typeof(dropSummariesItem) === 'object' && 'fruitCount' in dropSummariesItem) {
|
|
1151
|
+
dropSummariesItemObject.fruitCount = function () {
|
|
1152
|
+
if (typeof dropSummariesItem.fruitCount !== 'number') {
|
|
1153
|
+
return Number.isInteger(Number(dropSummariesItem.fruitCount)) ? Number(dropSummariesItem.fruitCount) : Math.floor(Number(dropSummariesItem.fruitCount));
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
return Number.isInteger(dropSummariesItem.fruitCount) ? dropSummariesItem.fruitCount : Math.floor(dropSummariesItem.fruitCount);
|
|
1157
|
+
}();
|
|
1158
|
+
} else {
|
|
1159
|
+
dropSummariesItemObject.fruitCount = 0;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
if (_typeof(dropSummariesItem) === 'object' && 'varietySizingMapId' in dropSummariesItem) {
|
|
1163
|
+
dropSummariesItemObject.varietySizingMapId = function () {
|
|
1164
|
+
if (typeof dropSummariesItem.varietySizingMapId !== 'number') {
|
|
1165
|
+
return Number.isInteger(Number(dropSummariesItem.varietySizingMapId)) ? Number(dropSummariesItem.varietySizingMapId) : Math.floor(Number(dropSummariesItem.varietySizingMapId));
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
return Number.isInteger(dropSummariesItem.varietySizingMapId) ? dropSummariesItem.varietySizingMapId : Math.floor(dropSummariesItem.varietySizingMapId);
|
|
1169
|
+
}();
|
|
1170
|
+
} else {
|
|
1171
|
+
dropSummariesItemObject.varietySizingMapId = 0;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
return dropSummariesItemObject;
|
|
1175
|
+
}();
|
|
1176
|
+
});
|
|
1177
|
+
}();
|
|
1178
|
+
} else {
|
|
1179
|
+
batchObject.dropSummaries = [];
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'recycleSummaries' in jsonObject['batch']) {
|
|
1183
|
+
batchObject.recycleSummaries = function () {
|
|
1184
|
+
if (Array.isArray(jsonObject['batch'].recycleSummaries) !== true) {
|
|
1185
|
+
return [];
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
return jsonObject['batch'].recycleSummaries.map(function (recycleSummariesItem) {
|
|
1189
|
+
return function () {
|
|
1190
|
+
var recycleSummariesItemObject = {};
|
|
1191
|
+
|
|
1192
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'id' in recycleSummariesItem) {
|
|
1193
|
+
recycleSummariesItemObject.id = function () {
|
|
1194
|
+
if (typeof recycleSummariesItem.id !== 'number') {
|
|
1195
|
+
return Number.isInteger(Number(recycleSummariesItem.id)) ? Number(recycleSummariesItem.id) : Math.floor(Number(recycleSummariesItem.id));
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
return Number.isInteger(recycleSummariesItem.id) ? recycleSummariesItem.id : Math.floor(recycleSummariesItem.id);
|
|
1199
|
+
}();
|
|
1200
|
+
} else {
|
|
1201
|
+
recycleSummariesItemObject.id = 0;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'eventId' in recycleSummariesItem) {
|
|
1205
|
+
recycleSummariesItemObject.eventId = function () {
|
|
1206
|
+
if (typeof recycleSummariesItem.eventId !== 'number') {
|
|
1207
|
+
return Number.isInteger(Number(recycleSummariesItem.eventId)) ? Number(recycleSummariesItem.eventId) : Math.floor(Number(recycleSummariesItem.eventId));
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
return Number.isInteger(recycleSummariesItem.eventId) ? recycleSummariesItem.eventId : Math.floor(recycleSummariesItem.eventId);
|
|
1211
|
+
}();
|
|
1212
|
+
} else {
|
|
1213
|
+
recycleSummariesItemObject.eventId = 0;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'productId' in recycleSummariesItem) {
|
|
1217
|
+
recycleSummariesItemObject.productId = function () {
|
|
1218
|
+
if (typeof recycleSummariesItem.productId !== 'number') {
|
|
1219
|
+
return Number.isInteger(Number(recycleSummariesItem.productId)) ? Number(recycleSummariesItem.productId) : Math.floor(Number(recycleSummariesItem.productId));
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
return Number.isInteger(recycleSummariesItem.productId) ? recycleSummariesItem.productId : Math.floor(recycleSummariesItem.productId);
|
|
1223
|
+
}();
|
|
1224
|
+
} else {
|
|
1225
|
+
recycleSummariesItemObject.productId = 0;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'dropId' in recycleSummariesItem) {
|
|
1229
|
+
recycleSummariesItemObject.dropId = function () {
|
|
1230
|
+
if (typeof recycleSummariesItem.dropId !== 'number') {
|
|
1231
|
+
return Number.isInteger(Number(recycleSummariesItem.dropId)) ? Number(recycleSummariesItem.dropId) : Math.floor(Number(recycleSummariesItem.dropId));
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
return Number.isInteger(recycleSummariesItem.dropId) ? recycleSummariesItem.dropId : Math.floor(recycleSummariesItem.dropId);
|
|
1235
|
+
}();
|
|
1236
|
+
} else {
|
|
1237
|
+
recycleSummariesItemObject.dropId = 0;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'gradeIndex' in recycleSummariesItem) {
|
|
1241
|
+
recycleSummariesItemObject.gradeIndex = function () {
|
|
1242
|
+
if (typeof recycleSummariesItem.gradeIndex !== 'number') {
|
|
1243
|
+
return Number.isInteger(Number(recycleSummariesItem.gradeIndex)) ? Number(recycleSummariesItem.gradeIndex) : Math.floor(Number(recycleSummariesItem.gradeIndex));
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
return Number.isInteger(recycleSummariesItem.gradeIndex) ? recycleSummariesItem.gradeIndex : Math.floor(recycleSummariesItem.gradeIndex);
|
|
1247
|
+
}();
|
|
1248
|
+
} else {
|
|
1249
|
+
recycleSummariesItemObject.gradeIndex = 0;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'sizeIndex' in recycleSummariesItem) {
|
|
1253
|
+
recycleSummariesItemObject.sizeIndex = function () {
|
|
1254
|
+
if (typeof recycleSummariesItem.sizeIndex !== 'number') {
|
|
1255
|
+
return Number.isInteger(Number(recycleSummariesItem.sizeIndex)) ? Number(recycleSummariesItem.sizeIndex) : Math.floor(Number(recycleSummariesItem.sizeIndex));
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
return Number.isInteger(recycleSummariesItem.sizeIndex) ? recycleSummariesItem.sizeIndex : Math.floor(recycleSummariesItem.sizeIndex);
|
|
1259
|
+
}();
|
|
1260
|
+
} else {
|
|
1261
|
+
recycleSummariesItemObject.sizeIndex = 0;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'qualityIndex' in recycleSummariesItem) {
|
|
1265
|
+
recycleSummariesItemObject.qualityIndex = function () {
|
|
1266
|
+
if (typeof recycleSummariesItem.qualityIndex !== 'number') {
|
|
1267
|
+
return Number.isInteger(Number(recycleSummariesItem.qualityIndex)) ? Number(recycleSummariesItem.qualityIndex) : Math.floor(Number(recycleSummariesItem.qualityIndex));
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
return Number.isInteger(recycleSummariesItem.qualityIndex) ? recycleSummariesItem.qualityIndex : Math.floor(recycleSummariesItem.qualityIndex);
|
|
1271
|
+
}();
|
|
1272
|
+
} else {
|
|
1273
|
+
recycleSummariesItemObject.qualityIndex = 0;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'fruitWeight' in recycleSummariesItem) {
|
|
1277
|
+
recycleSummariesItemObject.fruitWeight = function () {
|
|
1278
|
+
if (typeof recycleSummariesItem.fruitWeight !== 'number') {
|
|
1279
|
+
return Number(recycleSummariesItem.fruitWeight);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
return recycleSummariesItem.fruitWeight;
|
|
1283
|
+
}();
|
|
1284
|
+
} else {
|
|
1285
|
+
recycleSummariesItemObject.fruitWeight = 0;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'fruitCount' in recycleSummariesItem) {
|
|
1289
|
+
recycleSummariesItemObject.fruitCount = function () {
|
|
1290
|
+
if (typeof recycleSummariesItem.fruitCount !== 'number') {
|
|
1291
|
+
return Number.isInteger(Number(recycleSummariesItem.fruitCount)) ? Number(recycleSummariesItem.fruitCount) : Math.floor(Number(recycleSummariesItem.fruitCount));
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return Number.isInteger(recycleSummariesItem.fruitCount) ? recycleSummariesItem.fruitCount : Math.floor(recycleSummariesItem.fruitCount);
|
|
1295
|
+
}();
|
|
1296
|
+
} else {
|
|
1297
|
+
recycleSummariesItemObject.fruitCount = 0;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
if (_typeof(recycleSummariesItem) === 'object' && 'varietySizingMapId' in recycleSummariesItem) {
|
|
1301
|
+
recycleSummariesItemObject.varietySizingMapId = function () {
|
|
1302
|
+
if (typeof recycleSummariesItem.varietySizingMapId !== 'number') {
|
|
1303
|
+
return Number.isInteger(Number(recycleSummariesItem.varietySizingMapId)) ? Number(recycleSummariesItem.varietySizingMapId) : Math.floor(Number(recycleSummariesItem.varietySizingMapId));
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
return Number.isInteger(recycleSummariesItem.varietySizingMapId) ? recycleSummariesItem.varietySizingMapId : Math.floor(recycleSummariesItem.varietySizingMapId);
|
|
1307
|
+
}();
|
|
1308
|
+
} else {
|
|
1309
|
+
recycleSummariesItemObject.varietySizingMapId = 0;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
return recycleSummariesItemObject;
|
|
1313
|
+
}();
|
|
1314
|
+
});
|
|
1315
|
+
}();
|
|
1316
|
+
} else {
|
|
1317
|
+
batchObject.recycleSummaries = [];
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'packSummaries' in jsonObject['batch']) {
|
|
1321
|
+
batchObject.packSummaries = function () {
|
|
1322
|
+
if (Array.isArray(jsonObject['batch'].packSummaries) !== true) {
|
|
1323
|
+
return [];
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
return jsonObject['batch'].packSummaries.map(function (packSummariesItem) {
|
|
1327
|
+
return function () {
|
|
1328
|
+
var packSummariesItemObject = {};
|
|
1329
|
+
|
|
1330
|
+
if (_typeof(packSummariesItem) === 'object' && 'id' in packSummariesItem) {
|
|
1331
|
+
packSummariesItemObject.id = function () {
|
|
1332
|
+
if (typeof packSummariesItem.id !== 'number') {
|
|
1333
|
+
return Number.isInteger(Number(packSummariesItem.id)) ? Number(packSummariesItem.id) : Math.floor(Number(packSummariesItem.id));
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
return Number.isInteger(packSummariesItem.id) ? packSummariesItem.id : Math.floor(packSummariesItem.id);
|
|
1337
|
+
}();
|
|
1338
|
+
} else {
|
|
1339
|
+
packSummariesItemObject.id = 0;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
if (_typeof(packSummariesItem) === 'object' && 'eventId' in packSummariesItem) {
|
|
1343
|
+
packSummariesItemObject.eventId = function () {
|
|
1344
|
+
if (typeof packSummariesItem.eventId !== 'number') {
|
|
1345
|
+
return Number.isInteger(Number(packSummariesItem.eventId)) ? Number(packSummariesItem.eventId) : Math.floor(Number(packSummariesItem.eventId));
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
return Number.isInteger(packSummariesItem.eventId) ? packSummariesItem.eventId : Math.floor(packSummariesItem.eventId);
|
|
1349
|
+
}();
|
|
1350
|
+
} else {
|
|
1351
|
+
packSummariesItemObject.eventId = 0;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
if (_typeof(packSummariesItem) === 'object' && 'summaryGroupId' in packSummariesItem) {
|
|
1355
|
+
packSummariesItemObject.summaryGroupId = function () {
|
|
1356
|
+
if (typeof packSummariesItem.summaryGroupId !== 'number') {
|
|
1357
|
+
return Number.isInteger(Number(packSummariesItem.summaryGroupId)) ? Number(packSummariesItem.summaryGroupId) : Math.floor(Number(packSummariesItem.summaryGroupId));
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
return Number.isInteger(packSummariesItem.summaryGroupId) ? packSummariesItem.summaryGroupId : Math.floor(packSummariesItem.summaryGroupId);
|
|
1361
|
+
}();
|
|
1362
|
+
} else {
|
|
1363
|
+
packSummariesItemObject.summaryGroupId = 0;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
if (_typeof(packSummariesItem) === 'object' && 'productId' in packSummariesItem) {
|
|
1367
|
+
packSummariesItemObject.productId = function () {
|
|
1368
|
+
if (typeof packSummariesItem.productId !== 'number') {
|
|
1369
|
+
return Number.isInteger(Number(packSummariesItem.productId)) ? Number(packSummariesItem.productId) : Math.floor(Number(packSummariesItem.productId));
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
return Number.isInteger(packSummariesItem.productId) ? packSummariesItem.productId : Math.floor(packSummariesItem.productId);
|
|
1373
|
+
}();
|
|
1374
|
+
} else {
|
|
1375
|
+
packSummariesItemObject.productId = 0;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
if (_typeof(packSummariesItem) === 'object' && 'packId' in packSummariesItem) {
|
|
1379
|
+
packSummariesItemObject.packId = function () {
|
|
1380
|
+
if (typeof packSummariesItem.packId !== 'number') {
|
|
1381
|
+
return Number.isInteger(Number(packSummariesItem.packId)) ? Number(packSummariesItem.packId) : Math.floor(Number(packSummariesItem.packId));
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
return Number.isInteger(packSummariesItem.packId) ? packSummariesItem.packId : Math.floor(packSummariesItem.packId);
|
|
1385
|
+
}();
|
|
1386
|
+
} else {
|
|
1387
|
+
packSummariesItemObject.packId = 0;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
if (_typeof(packSummariesItem) === 'object' && 'packCount' in packSummariesItem) {
|
|
1391
|
+
packSummariesItemObject.packCount = function () {
|
|
1392
|
+
if (typeof packSummariesItem.packCount !== 'number') {
|
|
1393
|
+
return Number.isInteger(Number(packSummariesItem.packCount)) ? Number(packSummariesItem.packCount) : Math.floor(Number(packSummariesItem.packCount));
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
return Number.isInteger(packSummariesItem.packCount) ? packSummariesItem.packCount : Math.floor(packSummariesItem.packCount);
|
|
1397
|
+
}();
|
|
1398
|
+
} else {
|
|
1399
|
+
packSummariesItemObject.packCount = 0;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
if (_typeof(packSummariesItem) === 'object' && 'fruitWeight' in packSummariesItem) {
|
|
1403
|
+
packSummariesItemObject.fruitWeight = function () {
|
|
1404
|
+
if (typeof packSummariesItem.fruitWeight !== 'number') {
|
|
1405
|
+
return Number(packSummariesItem.fruitWeight);
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
return packSummariesItem.fruitWeight;
|
|
1409
|
+
}();
|
|
1410
|
+
} else {
|
|
1411
|
+
packSummariesItemObject.fruitWeight = 0;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
if (_typeof(packSummariesItem) === 'object' && 'fruitCount' in packSummariesItem) {
|
|
1415
|
+
packSummariesItemObject.fruitCount = function () {
|
|
1416
|
+
if (typeof packSummariesItem.fruitCount !== 'number') {
|
|
1417
|
+
return Number.isInteger(Number(packSummariesItem.fruitCount)) ? Number(packSummariesItem.fruitCount) : Math.floor(Number(packSummariesItem.fruitCount));
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
return Number.isInteger(packSummariesItem.fruitCount) ? packSummariesItem.fruitCount : Math.floor(packSummariesItem.fruitCount);
|
|
1421
|
+
}();
|
|
1422
|
+
} else {
|
|
1423
|
+
packSummariesItemObject.fruitCount = 0;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
return packSummariesItemObject;
|
|
1427
|
+
}();
|
|
1428
|
+
});
|
|
1429
|
+
}();
|
|
1430
|
+
} else {
|
|
1431
|
+
batchObject.packSummaries = [];
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
if (_typeof(jsonObject['batch']) === 'object' && 'drops' in jsonObject['batch']) {
|
|
1435
|
+
batchObject.drops = function () {
|
|
1436
|
+
if (Array.isArray(jsonObject['batch'].drops) !== true) {
|
|
1437
|
+
return [];
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
return jsonObject['batch'].drops.map(function (dropsItem) {
|
|
1441
|
+
return function () {
|
|
1442
|
+
var dropsItemObject = {};
|
|
1443
|
+
|
|
1444
|
+
if (_typeof(dropsItem) === 'object' && 'id' in dropsItem) {
|
|
1445
|
+
dropsItemObject.id = function () {
|
|
1446
|
+
if (typeof dropsItem.id !== 'number') {
|
|
1447
|
+
return Number.isInteger(Number(dropsItem.id)) ? Number(dropsItem.id) : Math.floor(Number(dropsItem.id));
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
return Number.isInteger(dropsItem.id) ? dropsItem.id : Math.floor(dropsItem.id);
|
|
1451
|
+
}();
|
|
1452
|
+
} else {
|
|
1453
|
+
dropsItemObject.id = 0;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
if (_typeof(dropsItem) === 'object' && 'name' in dropsItem) {
|
|
1457
|
+
dropsItemObject.name = function () {
|
|
1458
|
+
if (dropsItem.name === null) {
|
|
1459
|
+
return null;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
if (typeof dropsItem.name !== 'string') {
|
|
1463
|
+
return String(dropsItem.name);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
return dropsItem.name;
|
|
1467
|
+
}();
|
|
1468
|
+
} else {
|
|
1469
|
+
dropsItemObject.name = null;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
if (_typeof(dropsItem) === 'object' && 'totallingEnabled' in dropsItem) {
|
|
1473
|
+
dropsItemObject.totallingEnabled = function () {
|
|
1474
|
+
if (typeof dropsItem.totallingEnabled !== 'boolean') {
|
|
1475
|
+
return Boolean(dropsItem.totallingEnabled);
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
return dropsItem.totallingEnabled;
|
|
1479
|
+
}();
|
|
1480
|
+
} else {
|
|
1481
|
+
dropsItemObject.totallingEnabled = false;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
return dropsItemObject;
|
|
1485
|
+
}();
|
|
1486
|
+
});
|
|
1487
|
+
}();
|
|
1488
|
+
} else {
|
|
1489
|
+
batchObject.drops = [];
|
|
219
1490
|
}
|
|
220
1491
|
|
|
221
|
-
return
|
|
1492
|
+
return batchObject;
|
|
222
1493
|
}();
|
|
223
1494
|
}
|
|
224
1495
|
|