/**
* File Auto-Generated by the RICADO Gen 4 PHP API Project
*
* Do Not Edit this File Manually!
*/
import RequestHelper from '../../RequestHelper';
/**
* The Production Data Export Controller Class
*
* @class
*/
class ProductionDataExportController
{
/**
* Retrieve Production Data [GET /packhouse/production-data-export]
*
* Request a Production Data Export in the default JSON Format
*
* @static
* @public
* @param {Date} dateBegin The Beginning Date of the Production Data Export
* @param {Date} dateEnd The End Date of the Production Data Export
* @param {ProductionDataExportController.JsonExportQueryParameters} [queryParameters] The Optional Query Parameters
* @return {Promise<ProductionDataExportController.ProductionData>}
*/
static jsonExport(dateBegin, dateEnd, queryParameters = {})
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/packhouse/production-data-export`, Object.assign(queryParameters, {dateBegin, dateEnd}))
.then((result) => {
let resolveValue = (function(){
let resultObject = {};
if(typeof result === 'object' && 'packruns' in result)
{
resultObject.packruns = (function(){
if(Array.isArray(result.packruns) !== true)
{
return [];
}
return result.packruns.map((packrunsItem) => {
return (function(){
let packrunsItemObject = {};
if(typeof packrunsItem === 'object' && 'siteId' in packrunsItem)
{
packrunsItemObject.siteId = (function(){
if(typeof packrunsItem.siteId !== 'number')
{
return Number.isInteger(Number(packrunsItem.siteId)) ? Number(packrunsItem.siteId) : Math.floor(Number(packrunsItem.siteId));
}
return Number.isInteger(packrunsItem.siteId) ? packrunsItem.siteId : Math.floor(packrunsItem.siteId);
}());
}
else
{
packrunsItemObject.siteId = 0;
}
if(typeof packrunsItem === 'object' && 'siteName' in packrunsItem)
{
packrunsItemObject.siteName = (function(){
if(typeof packrunsItem.siteName !== 'string')
{
return String(packrunsItem.siteName);
}
return packrunsItem.siteName;
}());
}
else
{
packrunsItemObject.siteName = "";
}
if(typeof packrunsItem === 'object' && 'packingLineId' in packrunsItem)
{
packrunsItemObject.packingLineId = (function(){
if(typeof packrunsItem.packingLineId !== 'string')
{
return String(packrunsItem.packingLineId);
}
return packrunsItem.packingLineId;
}());
}
else
{
packrunsItemObject.packingLineId = "";
}
if(typeof packrunsItem === 'object' && 'packingLineName' in packrunsItem)
{
packrunsItemObject.packingLineName = (function(){
if(typeof packrunsItem.packingLineName !== 'string')
{
return String(packrunsItem.packingLineName);
}
return packrunsItem.packingLineName;
}());
}
else
{
packrunsItemObject.packingLineName = "";
}
if(typeof packrunsItem === 'object' && 'isoWeek' in packrunsItem)
{
packrunsItemObject.isoWeek = (function(){
if(typeof packrunsItem.isoWeek !== 'number')
{
return Number.isInteger(Number(packrunsItem.isoWeek)) ? Number(packrunsItem.isoWeek) : Math.floor(Number(packrunsItem.isoWeek));
}
return Number.isInteger(packrunsItem.isoWeek) ? packrunsItem.isoWeek : Math.floor(packrunsItem.isoWeek);
}());
}
else
{
packrunsItemObject.isoWeek = 0;
}
if(typeof packrunsItem === 'object' && 'startTimestamp' in packrunsItem)
{
packrunsItemObject.startTimestamp = (function(){
if(typeof packrunsItem.startTimestamp !== 'string')
{
return new Date(String(packrunsItem.startTimestamp));
}
return new Date(packrunsItem.startTimestamp);
}());
}
else
{
packrunsItemObject.startTimestamp = new Date();
}
if(typeof packrunsItem === 'object' && 'finishTimestamp' in packrunsItem)
{
packrunsItemObject.finishTimestamp = (function(){
if(packrunsItem.finishTimestamp === null)
{
return null;
}
if(typeof packrunsItem.finishTimestamp !== 'string')
{
return new Date(String(packrunsItem.finishTimestamp));
}
return new Date(packrunsItem.finishTimestamp);
}());
}
else
{
packrunsItemObject.finishTimestamp = null;
}
if(typeof packrunsItem === 'object' && 'packrunId' in packrunsItem)
{
packrunsItemObject.packrunId = (function(){
if(typeof packrunsItem.packrunId !== 'string')
{
return String(packrunsItem.packrunId);
}
return packrunsItem.packrunId;
}());
}
else
{
packrunsItemObject.packrunId = "";
}
if(typeof packrunsItem === 'object' && 'packrunName' in packrunsItem)
{
packrunsItemObject.packrunName = (function(){
if(typeof packrunsItem.packrunName !== 'string')
{
return String(packrunsItem.packrunName);
}
return packrunsItem.packrunName;
}());
}
else
{
packrunsItemObject.packrunName = "";
}
if(typeof packrunsItem === 'object' && 'varietyId' in packrunsItem)
{
packrunsItemObject.varietyId = (function(){
if(typeof packrunsItem.varietyId !== 'string')
{
return String(packrunsItem.varietyId);
}
return packrunsItem.varietyId;
}());
}
else
{
packrunsItemObject.varietyId = "";
}
if(typeof packrunsItem === 'object' && 'varietyCode' in packrunsItem)
{
packrunsItemObject.varietyCode = (function(){
if(typeof packrunsItem.varietyCode !== 'string')
{
return String(packrunsItem.varietyCode);
}
return packrunsItem.varietyCode;
}());
}
else
{
packrunsItemObject.varietyCode = "";
}
if(typeof packrunsItem === 'object' && 'growingMethodId' in packrunsItem)
{
packrunsItemObject.growingMethodId = (function(){
if(typeof packrunsItem.growingMethodId !== 'string')
{
return String(packrunsItem.growingMethodId);
}
return packrunsItem.growingMethodId;
}());
}
else
{
packrunsItemObject.growingMethodId = "";
}
if(typeof packrunsItem === 'object' && 'growingMethodCode' in packrunsItem)
{
packrunsItemObject.growingMethodCode = (function(){
if(typeof packrunsItem.growingMethodCode !== 'string')
{
return String(packrunsItem.growingMethodCode);
}
return packrunsItem.growingMethodCode;
}());
}
else
{
packrunsItemObject.growingMethodCode = "";
}
if(typeof packrunsItem === 'object' && 'growerCode' in packrunsItem)
{
packrunsItemObject.growerCode = (function(){
if(typeof packrunsItem.growerCode !== 'string')
{
return String(packrunsItem.growerCode);
}
return packrunsItem.growerCode;
}());
}
else
{
packrunsItemObject.growerCode = "";
}
if(typeof packrunsItem === 'object' && 'growerName' in packrunsItem)
{
packrunsItemObject.growerName = (function(){
if(typeof packrunsItem.growerName !== 'string')
{
return String(packrunsItem.growerName);
}
return packrunsItem.growerName;
}());
}
else
{
packrunsItemObject.growerName = "";
}
if(typeof packrunsItem === 'object' && 'maturityArea' in packrunsItem)
{
packrunsItemObject.maturityArea = (function(){
if(typeof packrunsItem.maturityArea !== 'string')
{
return String(packrunsItem.maturityArea);
}
return packrunsItem.maturityArea;
}());
}
else
{
packrunsItemObject.maturityArea = "";
}
if(typeof packrunsItem === 'object' && 'allocatedBins' in packrunsItem)
{
packrunsItemObject.allocatedBins = (function(){
if(typeof packrunsItem.allocatedBins !== 'number')
{
return Number.isInteger(Number(packrunsItem.allocatedBins)) ? Number(packrunsItem.allocatedBins) : Math.floor(Number(packrunsItem.allocatedBins));
}
return Number.isInteger(packrunsItem.allocatedBins) ? packrunsItem.allocatedBins : Math.floor(packrunsItem.allocatedBins);
}());
}
else
{
packrunsItemObject.allocatedBins = 0;
}
if(typeof packrunsItem === 'object' && 'totalBinsTipped' in packrunsItem)
{
packrunsItemObject.totalBinsTipped = (function(){
if(typeof packrunsItem.totalBinsTipped !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalBinsTipped)) ? Number(packrunsItem.totalBinsTipped) : Math.floor(Number(packrunsItem.totalBinsTipped));
}
return Number.isInteger(packrunsItem.totalBinsTipped) ? packrunsItem.totalBinsTipped : Math.floor(packrunsItem.totalBinsTipped);
}());
}
else
{
packrunsItemObject.totalBinsTipped = 0;
}
if(typeof packrunsItem === 'object' && 'totalNetWeightTipped' in packrunsItem)
{
packrunsItemObject.totalNetWeightTipped = (function(){
if(typeof packrunsItem.totalNetWeightTipped !== 'number')
{
return Number(packrunsItem.totalNetWeightTipped);
}
return packrunsItem.totalNetWeightTipped;
}());
}
else
{
packrunsItemObject.totalNetWeightTipped = 0;
}
if(typeof packrunsItem === 'object' && 'averageNetWeightPerBin' in packrunsItem)
{
packrunsItemObject.averageNetWeightPerBin = (function(){
if(typeof packrunsItem.averageNetWeightPerBin !== 'number')
{
return Number(packrunsItem.averageNetWeightPerBin);
}
return packrunsItem.averageNetWeightPerBin;
}());
}
else
{
packrunsItemObject.averageNetWeightPerBin = 0;
}
if(typeof packrunsItem === 'object' && 'averageBinsTippedPerHour' in packrunsItem)
{
packrunsItemObject.averageBinsTippedPerHour = (function(){
if(typeof packrunsItem.averageBinsTippedPerHour !== 'number')
{
return Number(packrunsItem.averageBinsTippedPerHour);
}
return packrunsItem.averageBinsTippedPerHour;
}());
}
else
{
packrunsItemObject.averageBinsTippedPerHour = 0;
}
if(typeof packrunsItem === 'object' && 'averageBinsTippedPerHourExcludingDowntime' in packrunsItem)
{
packrunsItemObject.averageBinsTippedPerHourExcludingDowntime = (function(){
if(typeof packrunsItem.averageBinsTippedPerHourExcludingDowntime !== 'number')
{
return Number(packrunsItem.averageBinsTippedPerHourExcludingDowntime);
}
return packrunsItem.averageBinsTippedPerHourExcludingDowntime;
}());
}
else
{
packrunsItemObject.averageBinsTippedPerHourExcludingDowntime = 0;
}
if(typeof packrunsItem === 'object' && 'averageTimePerTippedBin' in packrunsItem)
{
packrunsItemObject.averageTimePerTippedBin = (function(){
if(typeof packrunsItem.averageTimePerTippedBin !== 'number')
{
return Number.isInteger(Number(packrunsItem.averageTimePerTippedBin)) ? Number(packrunsItem.averageTimePerTippedBin) : Math.floor(Number(packrunsItem.averageTimePerTippedBin));
}
return Number.isInteger(packrunsItem.averageTimePerTippedBin) ? packrunsItem.averageTimePerTippedBin : Math.floor(packrunsItem.averageTimePerTippedBin);
}());
}
else
{
packrunsItemObject.averageTimePerTippedBin = 0;
}
if(typeof packrunsItem === 'object' && 'averageBinTipWeightThroughput' in packrunsItem)
{
packrunsItemObject.averageBinTipWeightThroughput = (function(){
if(typeof packrunsItem.averageBinTipWeightThroughput !== 'number')
{
return Number(packrunsItem.averageBinTipWeightThroughput);
}
return packrunsItem.averageBinTipWeightThroughput;
}());
}
else
{
packrunsItemObject.averageBinTipWeightThroughput = 0;
}
if(typeof packrunsItem === 'object' && 'softSortEventsPerBin' in packrunsItem)
{
packrunsItemObject.softSortEventsPerBin = (function(){
if(typeof packrunsItem.softSortEventsPerBin !== 'number')
{
return Number(packrunsItem.softSortEventsPerBin);
}
return packrunsItem.softSortEventsPerBin;
}());
}
else
{
packrunsItemObject.softSortEventsPerBin = 0;
}
if(typeof packrunsItem === 'object' && 'totalSoftSortEventsCount' in packrunsItem)
{
packrunsItemObject.totalSoftSortEventsCount = (function(){
if(typeof packrunsItem.totalSoftSortEventsCount !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalSoftSortEventsCount)) ? Number(packrunsItem.totalSoftSortEventsCount) : Math.floor(Number(packrunsItem.totalSoftSortEventsCount));
}
return Number.isInteger(packrunsItem.totalSoftSortEventsCount) ? packrunsItem.totalSoftSortEventsCount : Math.floor(packrunsItem.totalSoftSortEventsCount);
}());
}
else
{
packrunsItemObject.totalSoftSortEventsCount = 0;
}
if(typeof packrunsItem === 'object' && 'averageSoftSortEventsDuration' in packrunsItem)
{
packrunsItemObject.averageSoftSortEventsDuration = (function(){
if(typeof packrunsItem.averageSoftSortEventsDuration !== 'number')
{
return Number(packrunsItem.averageSoftSortEventsDuration);
}
return packrunsItem.averageSoftSortEventsDuration;
}());
}
else
{
packrunsItemObject.averageSoftSortEventsDuration = 0;
}
if(typeof packrunsItem === 'object' && 'totalSoftSortEventsDuration' in packrunsItem)
{
packrunsItemObject.totalSoftSortEventsDuration = (function(){
if(typeof packrunsItem.totalSoftSortEventsDuration !== 'number')
{
return Number(packrunsItem.totalSoftSortEventsDuration);
}
return packrunsItem.totalSoftSortEventsDuration;
}());
}
else
{
packrunsItemObject.totalSoftSortEventsDuration = 0;
}
if(typeof packrunsItem === 'object' && 'softSortEventsAccurate' in packrunsItem)
{
packrunsItemObject.softSortEventsAccurate = (function(){
if(packrunsItem.softSortEventsAccurate === null)
{
return null;
}
if(typeof packrunsItem.softSortEventsAccurate !== 'boolean')
{
return Boolean(packrunsItem.softSortEventsAccurate);
}
return packrunsItem.softSortEventsAccurate;
}());
}
else
{
packrunsItemObject.softSortEventsAccurate = null;
}
if(typeof packrunsItem === 'object' && 'softSortEventsNotAccurateReason' in packrunsItem)
{
packrunsItemObject.softSortEventsNotAccurateReason = (function(){
if(packrunsItem.softSortEventsNotAccurateReason === null)
{
return null;
}
if(typeof packrunsItem.softSortEventsNotAccurateReason !== 'string')
{
return String(packrunsItem.softSortEventsNotAccurateReason);
}
return packrunsItem.softSortEventsNotAccurateReason;
}());
}
else
{
packrunsItemObject.softSortEventsNotAccurateReason = null;
}
if(typeof packrunsItem === 'object' && 'class1Percentage' in packrunsItem)
{
packrunsItemObject.class1Percentage = (function(){
if(typeof packrunsItem.class1Percentage !== 'number')
{
return Number(packrunsItem.class1Percentage);
}
return packrunsItem.class1Percentage;
}());
}
else
{
packrunsItemObject.class1Percentage = 0;
}
if(typeof packrunsItem === 'object' && 'class2Percentage' in packrunsItem)
{
packrunsItemObject.class2Percentage = (function(){
if(typeof packrunsItem.class2Percentage !== 'number')
{
return Number(packrunsItem.class2Percentage);
}
return packrunsItem.class2Percentage;
}());
}
else
{
packrunsItemObject.class2Percentage = 0;
}
if(typeof packrunsItem === 'object' && 'class3Percentage' in packrunsItem)
{
packrunsItemObject.class3Percentage = (function(){
if(typeof packrunsItem.class3Percentage !== 'number')
{
return Number(packrunsItem.class3Percentage);
}
return packrunsItem.class3Percentage;
}());
}
else
{
packrunsItemObject.class3Percentage = 0;
}
if(typeof packrunsItem === 'object' && 'nssPercentage' in packrunsItem)
{
packrunsItemObject.nssPercentage = (function(){
if(typeof packrunsItem.nssPercentage !== 'number')
{
return Number(packrunsItem.nssPercentage);
}
return packrunsItem.nssPercentage;
}());
}
else
{
packrunsItemObject.nssPercentage = 0;
}
if(typeof packrunsItem === 'object' && 'undersizePercentage' in packrunsItem)
{
packrunsItemObject.undersizePercentage = (function(){
if(typeof packrunsItem.undersizePercentage !== 'number')
{
return Number(packrunsItem.undersizePercentage);
}
return packrunsItem.undersizePercentage;
}());
}
else
{
packrunsItemObject.undersizePercentage = 0;
}
if(typeof packrunsItem === 'object' && 'cdmPercentage' in packrunsItem)
{
packrunsItemObject.cdmPercentage = (function(){
if(typeof packrunsItem.cdmPercentage !== 'number')
{
return Number(packrunsItem.cdmPercentage);
}
return packrunsItem.cdmPercentage;
}());
}
else
{
packrunsItemObject.cdmPercentage = 0;
}
if(typeof packrunsItem === 'object' && 'wastePercentage' in packrunsItem)
{
packrunsItemObject.wastePercentage = (function(){
if(typeof packrunsItem.wastePercentage !== 'number')
{
return Number(packrunsItem.wastePercentage);
}
return packrunsItem.wastePercentage;
}());
}
else
{
packrunsItemObject.wastePercentage = 0;
}
if(typeof packrunsItem === 'object' && 'softSortPercentage' in packrunsItem)
{
packrunsItemObject.softSortPercentage = (function(){
if(typeof packrunsItem.softSortPercentage !== 'number')
{
return Number(packrunsItem.softSortPercentage);
}
return packrunsItem.softSortPercentage;
}());
}
else
{
packrunsItemObject.softSortPercentage = 0;
}
if(typeof packrunsItem === 'object' && 'totalNonClass1Percentage' in packrunsItem)
{
packrunsItemObject.totalNonClass1Percentage = (function(){
if(typeof packrunsItem.totalNonClass1Percentage !== 'number')
{
return Number(packrunsItem.totalNonClass1Percentage);
}
return packrunsItem.totalNonClass1Percentage;
}());
}
else
{
packrunsItemObject.totalNonClass1Percentage = 0;
}
if(typeof packrunsItem === 'object' && 'class1Weight' in packrunsItem)
{
packrunsItemObject.class1Weight = (function(){
if(typeof packrunsItem.class1Weight !== 'number')
{
return Number(packrunsItem.class1Weight);
}
return packrunsItem.class1Weight;
}());
}
else
{
packrunsItemObject.class1Weight = 0;
}
if(typeof packrunsItem === 'object' && 'class2Weight' in packrunsItem)
{
packrunsItemObject.class2Weight = (function(){
if(typeof packrunsItem.class2Weight !== 'number')
{
return Number(packrunsItem.class2Weight);
}
return packrunsItem.class2Weight;
}());
}
else
{
packrunsItemObject.class2Weight = 0;
}
if(typeof packrunsItem === 'object' && 'class3Weight' in packrunsItem)
{
packrunsItemObject.class3Weight = (function(){
if(typeof packrunsItem.class3Weight !== 'number')
{
return Number(packrunsItem.class3Weight);
}
return packrunsItem.class3Weight;
}());
}
else
{
packrunsItemObject.class3Weight = 0;
}
if(typeof packrunsItem === 'object' && 'nssWeight' in packrunsItem)
{
packrunsItemObject.nssWeight = (function(){
if(typeof packrunsItem.nssWeight !== 'number')
{
return Number(packrunsItem.nssWeight);
}
return packrunsItem.nssWeight;
}());
}
else
{
packrunsItemObject.nssWeight = 0;
}
if(typeof packrunsItem === 'object' && 'undersizeWeight' in packrunsItem)
{
packrunsItemObject.undersizeWeight = (function(){
if(typeof packrunsItem.undersizeWeight !== 'number')
{
return Number(packrunsItem.undersizeWeight);
}
return packrunsItem.undersizeWeight;
}());
}
else
{
packrunsItemObject.undersizeWeight = 0;
}
if(typeof packrunsItem === 'object' && 'cdmWeight' in packrunsItem)
{
packrunsItemObject.cdmWeight = (function(){
if(typeof packrunsItem.cdmWeight !== 'number')
{
return Number(packrunsItem.cdmWeight);
}
return packrunsItem.cdmWeight;
}());
}
else
{
packrunsItemObject.cdmWeight = 0;
}
if(typeof packrunsItem === 'object' && 'wasteWeight' in packrunsItem)
{
packrunsItemObject.wasteWeight = (function(){
if(typeof packrunsItem.wasteWeight !== 'number')
{
return Number(packrunsItem.wasteWeight);
}
return packrunsItem.wasteWeight;
}());
}
else
{
packrunsItemObject.wasteWeight = 0;
}
if(typeof packrunsItem === 'object' && 'softSortWeight' in packrunsItem)
{
packrunsItemObject.softSortWeight = (function(){
if(typeof packrunsItem.softSortWeight !== 'number')
{
return Number(packrunsItem.softSortWeight);
}
return packrunsItem.softSortWeight;
}());
}
else
{
packrunsItemObject.softSortWeight = 0;
}
if(typeof packrunsItem === 'object' && 'totalNonClass1Weight' in packrunsItem)
{
packrunsItemObject.totalNonClass1Weight = (function(){
if(typeof packrunsItem.totalNonClass1Weight !== 'number')
{
return Number(packrunsItem.totalNonClass1Weight);
}
return packrunsItem.totalNonClass1Weight;
}());
}
else
{
packrunsItemObject.totalNonClass1Weight = 0;
}
if(typeof packrunsItem === 'object' && 'totalClass1Trays' in packrunsItem)
{
packrunsItemObject.totalClass1Trays = (function(){
if(typeof packrunsItem.totalClass1Trays !== 'number')
{
return Number(packrunsItem.totalClass1Trays);
}
return packrunsItem.totalClass1Trays;
}());
}
else
{
packrunsItemObject.totalClass1Trays = 0;
}
if(typeof packrunsItem === 'object' && 'totalClass2Trays' in packrunsItem)
{
packrunsItemObject.totalClass2Trays = (function(){
if(typeof packrunsItem.totalClass2Trays !== 'number')
{
return Number(packrunsItem.totalClass2Trays);
}
return packrunsItem.totalClass2Trays;
}());
}
else
{
packrunsItemObject.totalClass2Trays = 0;
}
if(typeof packrunsItem === 'object' && 'totalClass1FruitCount' in packrunsItem)
{
packrunsItemObject.totalClass1FruitCount = (function(){
if(typeof packrunsItem.totalClass1FruitCount !== 'number')
{
return Number(packrunsItem.totalClass1FruitCount);
}
return packrunsItem.totalClass1FruitCount;
}());
}
else
{
packrunsItemObject.totalClass1FruitCount = 0;
}
if(typeof packrunsItem === 'object' && 'totalClass2FruitCount' in packrunsItem)
{
packrunsItemObject.totalClass2FruitCount = (function(){
if(typeof packrunsItem.totalClass2FruitCount !== 'number')
{
return Number(packrunsItem.totalClass2FruitCount);
}
return packrunsItem.totalClass2FruitCount;
}());
}
else
{
packrunsItemObject.totalClass2FruitCount = 0;
}
if(typeof packrunsItem === 'object' && 'averageClass1TrayWeight' in packrunsItem)
{
packrunsItemObject.averageClass1TrayWeight = (function(){
if(typeof packrunsItem.averageClass1TrayWeight !== 'number')
{
return Number(packrunsItem.averageClass1TrayWeight);
}
return packrunsItem.averageClass1TrayWeight;
}());
}
else
{
packrunsItemObject.averageClass1TrayWeight = 0;
}
if(typeof packrunsItem === 'object' && 'averageClass2TrayWeight' in packrunsItem)
{
packrunsItemObject.averageClass2TrayWeight = (function(){
if(typeof packrunsItem.averageClass2TrayWeight !== 'number')
{
return Number(packrunsItem.averageClass2TrayWeight);
}
return packrunsItem.averageClass2TrayWeight;
}());
}
else
{
packrunsItemObject.averageClass2TrayWeight = 0;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerBin' in packrunsItem)
{
packrunsItemObject.class1TraysPerBin = (function(){
if(typeof packrunsItem.class1TraysPerBin !== 'number')
{
return Number(packrunsItem.class1TraysPerBin);
}
return packrunsItem.class1TraysPerBin;
}());
}
else
{
packrunsItemObject.class1TraysPerBin = 0;
}
if(typeof packrunsItem === 'object' && 'averageFruitSize' in packrunsItem)
{
packrunsItemObject.averageFruitSize = (function(){
if(typeof packrunsItem.averageFruitSize !== 'number')
{
return Number(packrunsItem.averageFruitSize);
}
return packrunsItem.averageFruitSize;
}());
}
else
{
packrunsItemObject.averageFruitSize = 0;
}
if(typeof packrunsItem === 'object' && 'averageFruitWeight' in packrunsItem)
{
packrunsItemObject.averageFruitWeight = (function(){
if(typeof packrunsItem.averageFruitWeight !== 'number')
{
return Number(packrunsItem.averageFruitWeight);
}
return packrunsItem.averageFruitWeight;
}());
}
else
{
packrunsItemObject.averageFruitWeight = 0;
}
if(typeof packrunsItem === 'object' && 'totalRejectBinsCount' in packrunsItem)
{
packrunsItemObject.totalRejectBinsCount = (function(){
if(typeof packrunsItem.totalRejectBinsCount !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalRejectBinsCount)) ? Number(packrunsItem.totalRejectBinsCount) : Math.floor(Number(packrunsItem.totalRejectBinsCount));
}
return Number.isInteger(packrunsItem.totalRejectBinsCount) ? packrunsItem.totalRejectBinsCount : Math.floor(packrunsItem.totalRejectBinsCount);
}());
}
else
{
packrunsItemObject.totalRejectBinsCount = 0;
}
if(typeof packrunsItem === 'object' && 'totalRejectBinsNetWeight' in packrunsItem)
{
packrunsItemObject.totalRejectBinsNetWeight = (function(){
if(typeof packrunsItem.totalRejectBinsNetWeight !== 'number')
{
return Number(packrunsItem.totalRejectBinsNetWeight);
}
return packrunsItem.totalRejectBinsNetWeight;
}());
}
else
{
packrunsItemObject.totalRejectBinsNetWeight = 0;
}
if(typeof packrunsItem === 'object' && 'qualityR600TotalFruitSampled' in packrunsItem)
{
packrunsItemObject.qualityR600TotalFruitSampled = (function(){
if(packrunsItem.qualityR600TotalFruitSampled === null)
{
return null;
}
if(typeof packrunsItem.qualityR600TotalFruitSampled !== 'number')
{
return Number.isInteger(Number(packrunsItem.qualityR600TotalFruitSampled)) ? Number(packrunsItem.qualityR600TotalFruitSampled) : Math.floor(Number(packrunsItem.qualityR600TotalFruitSampled));
}
return Number.isInteger(packrunsItem.qualityR600TotalFruitSampled) ? packrunsItem.qualityR600TotalFruitSampled : Math.floor(packrunsItem.qualityR600TotalFruitSampled);
}());
}
else
{
packrunsItemObject.qualityR600TotalFruitSampled = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600FruitSampledPercentage' in packrunsItem)
{
packrunsItemObject.qualityR600FruitSampledPercentage = (function(){
if(packrunsItem.qualityR600FruitSampledPercentage === null)
{
return null;
}
if(typeof packrunsItem.qualityR600FruitSampledPercentage !== 'number')
{
return Number(packrunsItem.qualityR600FruitSampledPercentage);
}
return packrunsItem.qualityR600FruitSampledPercentage;
}());
}
else
{
packrunsItemObject.qualityR600FruitSampledPercentage = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600AverageSampledFruitSize' in packrunsItem)
{
packrunsItemObject.qualityR600AverageSampledFruitSize = (function(){
if(packrunsItem.qualityR600AverageSampledFruitSize === null)
{
return null;
}
if(typeof packrunsItem.qualityR600AverageSampledFruitSize !== 'number')
{
return Number(packrunsItem.qualityR600AverageSampledFruitSize);
}
return packrunsItem.qualityR600AverageSampledFruitSize;
}());
}
else
{
packrunsItemObject.qualityR600AverageSampledFruitSize = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600TotalSamplesCount' in packrunsItem)
{
packrunsItemObject.qualityR600TotalSamplesCount = (function(){
if(packrunsItem.qualityR600TotalSamplesCount === null)
{
return null;
}
if(typeof packrunsItem.qualityR600TotalSamplesCount !== 'number')
{
return Number.isInteger(Number(packrunsItem.qualityR600TotalSamplesCount)) ? Number(packrunsItem.qualityR600TotalSamplesCount) : Math.floor(Number(packrunsItem.qualityR600TotalSamplesCount));
}
return Number.isInteger(packrunsItem.qualityR600TotalSamplesCount) ? packrunsItem.qualityR600TotalSamplesCount : Math.floor(packrunsItem.qualityR600TotalSamplesCount);
}());
}
else
{
packrunsItemObject.qualityR600TotalSamplesCount = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600IdealSamplesTarget' in packrunsItem)
{
packrunsItemObject.qualityR600IdealSamplesTarget = (function(){
if(packrunsItem.qualityR600IdealSamplesTarget === null)
{
return null;
}
if(typeof packrunsItem.qualityR600IdealSamplesTarget !== 'number')
{
return Number(packrunsItem.qualityR600IdealSamplesTarget);
}
return packrunsItem.qualityR600IdealSamplesTarget;
}());
}
else
{
packrunsItemObject.qualityR600IdealSamplesTarget = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600IdealSamplesActual' in packrunsItem)
{
packrunsItemObject.qualityR600IdealSamplesActual = (function(){
if(packrunsItem.qualityR600IdealSamplesActual === null)
{
return null;
}
if(typeof packrunsItem.qualityR600IdealSamplesActual !== 'number')
{
return Number(packrunsItem.qualityR600IdealSamplesActual);
}
return packrunsItem.qualityR600IdealSamplesActual;
}());
}
else
{
packrunsItemObject.qualityR600IdealSamplesActual = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600MinorPackingDefects' in packrunsItem)
{
packrunsItemObject.qualityR600MinorPackingDefects = (function(){
if(packrunsItem.qualityR600MinorPackingDefects === null)
{
return null;
}
if(typeof packrunsItem.qualityR600MinorPackingDefects !== 'number')
{
return Number(packrunsItem.qualityR600MinorPackingDefects);
}
return packrunsItem.qualityR600MinorPackingDefects;
}());
}
else
{
packrunsItemObject.qualityR600MinorPackingDefects = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600MajorPackingDefects' in packrunsItem)
{
packrunsItemObject.qualityR600MajorPackingDefects = (function(){
if(packrunsItem.qualityR600MajorPackingDefects === null)
{
return null;
}
if(typeof packrunsItem.qualityR600MajorPackingDefects !== 'number')
{
return Number(packrunsItem.qualityR600MajorPackingDefects);
}
return packrunsItem.qualityR600MajorPackingDefects;
}());
}
else
{
packrunsItemObject.qualityR600MajorPackingDefects = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600Softs' in packrunsItem)
{
packrunsItemObject.qualityR600Softs = (function(){
if(packrunsItem.qualityR600Softs === null)
{
return null;
}
if(typeof packrunsItem.qualityR600Softs !== 'number')
{
return Number(packrunsItem.qualityR600Softs);
}
return packrunsItem.qualityR600Softs;
}());
}
else
{
packrunsItemObject.qualityR600Softs = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600Cuts' in packrunsItem)
{
packrunsItemObject.qualityR600Cuts = (function(){
if(packrunsItem.qualityR600Cuts === null)
{
return null;
}
if(typeof packrunsItem.qualityR600Cuts !== 'number')
{
return Number(packrunsItem.qualityR600Cuts);
}
return packrunsItem.qualityR600Cuts;
}());
}
else
{
packrunsItemObject.qualityR600Cuts = null;
}
if(typeof packrunsItem === 'object' && 'qualityR600Rots' in packrunsItem)
{
packrunsItemObject.qualityR600Rots = (function(){
if(packrunsItem.qualityR600Rots === null)
{
return null;
}
if(typeof packrunsItem.qualityR600Rots !== 'number')
{
return Number(packrunsItem.qualityR600Rots);
}
return packrunsItem.qualityR600Rots;
}());
}
else
{
packrunsItemObject.qualityR600Rots = null;
}
if(typeof packrunsItem === 'object' && 'qualityExportFruitInClass2' in packrunsItem)
{
packrunsItemObject.qualityExportFruitInClass2 = (function(){
if(packrunsItem.qualityExportFruitInClass2 === null)
{
return null;
}
if(typeof packrunsItem.qualityExportFruitInClass2 !== 'number')
{
return Number(packrunsItem.qualityExportFruitInClass2);
}
return packrunsItem.qualityExportFruitInClass2;
}());
}
else
{
packrunsItemObject.qualityExportFruitInClass2 = null;
}
if(typeof packrunsItem === 'object' && 'qualityExportFruitInClass3' in packrunsItem)
{
packrunsItemObject.qualityExportFruitInClass3 = (function(){
if(packrunsItem.qualityExportFruitInClass3 === null)
{
return null;
}
if(typeof packrunsItem.qualityExportFruitInClass3 !== 'number')
{
return Number(packrunsItem.qualityExportFruitInClass3);
}
return packrunsItem.qualityExportFruitInClass3;
}());
}
else
{
packrunsItemObject.qualityExportFruitInClass3 = null;
}
if(typeof packrunsItem === 'object' && 'qualityExportFruitInWaste' in packrunsItem)
{
packrunsItemObject.qualityExportFruitInWaste = (function(){
if(packrunsItem.qualityExportFruitInWaste === null)
{
return null;
}
if(typeof packrunsItem.qualityExportFruitInWaste !== 'number')
{
return Number(packrunsItem.qualityExportFruitInWaste);
}
return packrunsItem.qualityExportFruitInWaste;
}());
}
else
{
packrunsItemObject.qualityExportFruitInWaste = null;
}
if(typeof packrunsItem === 'object' && 'shiftIds' in packrunsItem)
{
packrunsItemObject.shiftIds = (function(){
if(Array.isArray(packrunsItem.shiftIds) !== true)
{
return [];
}
return packrunsItem.shiftIds.map((shiftIdsItem) => {
return (function(){
if(typeof shiftIdsItem !== 'string')
{
return String(shiftIdsItem);
}
return shiftIdsItem;
}());
});
}());
}
else
{
packrunsItemObject.shiftIds = [];
}
if(typeof packrunsItem === 'object' && 'shiftTypes' in packrunsItem)
{
packrunsItemObject.shiftTypes = (function(){
if(Array.isArray(packrunsItem.shiftTypes) !== true)
{
return [];
}
return packrunsItem.shiftTypes.map((shiftTypesItem) => {
return (function(){
if(typeof shiftTypesItem !== 'string')
{
return String(shiftTypesItem);
}
return shiftTypesItem;
}());
});
}());
}
else
{
packrunsItemObject.shiftTypes = [];
}
if(typeof packrunsItem === 'object' && 'lineManagerNames' in packrunsItem)
{
packrunsItemObject.lineManagerNames = (function(){
if(Array.isArray(packrunsItem.lineManagerNames) !== true)
{
return [];
}
return packrunsItem.lineManagerNames.map((lineManagerNamesItem) => {
return (function(){
if(typeof lineManagerNamesItem !== 'string')
{
return String(lineManagerNamesItem);
}
return lineManagerNamesItem;
}());
});
}());
}
else
{
packrunsItemObject.lineManagerNames = [];
}
if(typeof packrunsItem === 'object' && 'qualityManagerNames' in packrunsItem)
{
packrunsItemObject.qualityManagerNames = (function(){
if(Array.isArray(packrunsItem.qualityManagerNames) !== true)
{
return [];
}
return packrunsItem.qualityManagerNames.map((qualityManagerNamesItem) => {
return (function(){
if(typeof qualityManagerNamesItem !== 'string')
{
return String(qualityManagerNamesItem);
}
return qualityManagerNamesItem;
}());
});
}());
}
else
{
packrunsItemObject.qualityManagerNames = [];
}
if(typeof packrunsItem === 'object' && 'totalProductionTime' in packrunsItem)
{
packrunsItemObject.totalProductionTime = (function(){
if(typeof packrunsItem.totalProductionTime !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalProductionTime)) ? Number(packrunsItem.totalProductionTime) : Math.floor(Number(packrunsItem.totalProductionTime));
}
return Number.isInteger(packrunsItem.totalProductionTime) ? packrunsItem.totalProductionTime : Math.floor(packrunsItem.totalProductionTime);
}());
}
else
{
packrunsItemObject.totalProductionTime = 0;
}
if(typeof packrunsItem === 'object' && 'totalScheduledBreakTime' in packrunsItem)
{
packrunsItemObject.totalScheduledBreakTime = (function(){
if(typeof packrunsItem.totalScheduledBreakTime !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalScheduledBreakTime)) ? Number(packrunsItem.totalScheduledBreakTime) : Math.floor(Number(packrunsItem.totalScheduledBreakTime));
}
return Number.isInteger(packrunsItem.totalScheduledBreakTime) ? packrunsItem.totalScheduledBreakTime : Math.floor(packrunsItem.totalScheduledBreakTime);
}());
}
else
{
packrunsItemObject.totalScheduledBreakTime = 0;
}
if(typeof packrunsItem === 'object' && 'totalDowntime' in packrunsItem)
{
packrunsItemObject.totalDowntime = (function(){
if(typeof packrunsItem.totalDowntime !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalDowntime)) ? Number(packrunsItem.totalDowntime) : Math.floor(Number(packrunsItem.totalDowntime));
}
return Number.isInteger(packrunsItem.totalDowntime) ? packrunsItem.totalDowntime : Math.floor(packrunsItem.totalDowntime);
}());
}
else
{
packrunsItemObject.totalDowntime = 0;
}
if(typeof packrunsItem === 'object' && 'downtimeEventsCount' in packrunsItem)
{
packrunsItemObject.downtimeEventsCount = (function(){
if(typeof packrunsItem.downtimeEventsCount !== 'number')
{
return Number.isInteger(Number(packrunsItem.downtimeEventsCount)) ? Number(packrunsItem.downtimeEventsCount) : Math.floor(Number(packrunsItem.downtimeEventsCount));
}
return Number.isInteger(packrunsItem.downtimeEventsCount) ? packrunsItem.downtimeEventsCount : Math.floor(packrunsItem.downtimeEventsCount);
}());
}
else
{
packrunsItemObject.downtimeEventsCount = 0;
}
if(typeof packrunsItem === 'object' && 'downtimeEventsAverageDuration' in packrunsItem)
{
packrunsItemObject.downtimeEventsAverageDuration = (function(){
if(typeof packrunsItem.downtimeEventsAverageDuration !== 'number')
{
return Number.isInteger(Number(packrunsItem.downtimeEventsAverageDuration)) ? Number(packrunsItem.downtimeEventsAverageDuration) : Math.floor(Number(packrunsItem.downtimeEventsAverageDuration));
}
return Number.isInteger(packrunsItem.downtimeEventsAverageDuration) ? packrunsItem.downtimeEventsAverageDuration : Math.floor(packrunsItem.downtimeEventsAverageDuration);
}());
}
else
{
packrunsItemObject.downtimeEventsAverageDuration = 0;
}
if(typeof packrunsItem === 'object' && 'class1ManningTarget' in packrunsItem)
{
packrunsItemObject.class1ManningTarget = (function(){
if(packrunsItem.class1ManningTarget === null)
{
return null;
}
if(typeof packrunsItem.class1ManningTarget !== 'number')
{
return Number.isInteger(Number(packrunsItem.class1ManningTarget)) ? Number(packrunsItem.class1ManningTarget) : Math.floor(Number(packrunsItem.class1ManningTarget));
}
return Number.isInteger(packrunsItem.class1ManningTarget) ? packrunsItem.class1ManningTarget : Math.floor(packrunsItem.class1ManningTarget);
}());
}
else
{
packrunsItemObject.class1ManningTarget = null;
}
if(typeof packrunsItem === 'object' && 'averageClass1Manning' in packrunsItem)
{
packrunsItemObject.averageClass1Manning = (function(){
if(packrunsItem.averageClass1Manning === null)
{
return null;
}
if(typeof packrunsItem.averageClass1Manning !== 'number')
{
return Number.isInteger(Number(packrunsItem.averageClass1Manning)) ? Number(packrunsItem.averageClass1Manning) : Math.floor(Number(packrunsItem.averageClass1Manning));
}
return Number.isInteger(packrunsItem.averageClass1Manning) ? packrunsItem.averageClass1Manning : Math.floor(packrunsItem.averageClass1Manning);
}());
}
else
{
packrunsItemObject.averageClass1Manning = null;
}
if(typeof packrunsItem === 'object' && 'class1ManningPercentage' in packrunsItem)
{
packrunsItemObject.class1ManningPercentage = (function(){
if(packrunsItem.class1ManningPercentage === null)
{
return null;
}
if(typeof packrunsItem.class1ManningPercentage !== 'number')
{
return Number(packrunsItem.class1ManningPercentage);
}
return packrunsItem.class1ManningPercentage;
}());
}
else
{
packrunsItemObject.class1ManningPercentage = null;
}
if(typeof packrunsItem === 'object' && 'class2ManningTarget' in packrunsItem)
{
packrunsItemObject.class2ManningTarget = (function(){
if(packrunsItem.class2ManningTarget === null)
{
return null;
}
if(typeof packrunsItem.class2ManningTarget !== 'number')
{
return Number.isInteger(Number(packrunsItem.class2ManningTarget)) ? Number(packrunsItem.class2ManningTarget) : Math.floor(Number(packrunsItem.class2ManningTarget));
}
return Number.isInteger(packrunsItem.class2ManningTarget) ? packrunsItem.class2ManningTarget : Math.floor(packrunsItem.class2ManningTarget);
}());
}
else
{
packrunsItemObject.class2ManningTarget = null;
}
if(typeof packrunsItem === 'object' && 'averageClass2Manning' in packrunsItem)
{
packrunsItemObject.averageClass2Manning = (function(){
if(packrunsItem.averageClass2Manning === null)
{
return null;
}
if(typeof packrunsItem.averageClass2Manning !== 'number')
{
return Number.isInteger(Number(packrunsItem.averageClass2Manning)) ? Number(packrunsItem.averageClass2Manning) : Math.floor(Number(packrunsItem.averageClass2Manning));
}
return Number.isInteger(packrunsItem.averageClass2Manning) ? packrunsItem.averageClass2Manning : Math.floor(packrunsItem.averageClass2Manning);
}());
}
else
{
packrunsItemObject.averageClass2Manning = null;
}
if(typeof packrunsItem === 'object' && 'class2ManningPercentage' in packrunsItem)
{
packrunsItemObject.class2ManningPercentage = (function(){
if(packrunsItem.class2ManningPercentage === null)
{
return null;
}
if(typeof packrunsItem.class2ManningPercentage !== 'number')
{
return Number(packrunsItem.class2ManningPercentage);
}
return packrunsItem.class2ManningPercentage;
}());
}
else
{
packrunsItemObject.class2ManningPercentage = null;
}
if(typeof packrunsItem === 'object' && 'totalManningTarget' in packrunsItem)
{
packrunsItemObject.totalManningTarget = (function(){
if(packrunsItem.totalManningTarget === null)
{
return null;
}
if(typeof packrunsItem.totalManningTarget !== 'number')
{
return Number.isInteger(Number(packrunsItem.totalManningTarget)) ? Number(packrunsItem.totalManningTarget) : Math.floor(Number(packrunsItem.totalManningTarget));
}
return Number.isInteger(packrunsItem.totalManningTarget) ? packrunsItem.totalManningTarget : Math.floor(packrunsItem.totalManningTarget);
}());
}
else
{
packrunsItemObject.totalManningTarget = null;
}
if(typeof packrunsItem === 'object' && 'averageTotalManning' in packrunsItem)
{
packrunsItemObject.averageTotalManning = (function(){
if(packrunsItem.averageTotalManning === null)
{
return null;
}
if(typeof packrunsItem.averageTotalManning !== 'number')
{
return Number.isInteger(Number(packrunsItem.averageTotalManning)) ? Number(packrunsItem.averageTotalManning) : Math.floor(Number(packrunsItem.averageTotalManning));
}
return Number.isInteger(packrunsItem.averageTotalManning) ? packrunsItem.averageTotalManning : Math.floor(packrunsItem.averageTotalManning);
}());
}
else
{
packrunsItemObject.averageTotalManning = null;
}
if(typeof packrunsItem === 'object' && 'totalManningPercentage' in packrunsItem)
{
packrunsItemObject.totalManningPercentage = (function(){
if(packrunsItem.totalManningPercentage === null)
{
return null;
}
if(typeof packrunsItem.totalManningPercentage !== 'number')
{
return Number(packrunsItem.totalManningPercentage);
}
return packrunsItem.totalManningPercentage;
}());
}
else
{
packrunsItemObject.totalManningPercentage = null;
}
if(typeof packrunsItem === 'object' && 'costPerManningUnitHour' in packrunsItem)
{
packrunsItemObject.costPerManningUnitHour = (function(){
if(packrunsItem.costPerManningUnitHour === null)
{
return null;
}
if(typeof packrunsItem.costPerManningUnitHour !== 'number')
{
return Number(packrunsItem.costPerManningUnitHour);
}
return packrunsItem.costPerManningUnitHour;
}());
}
else
{
packrunsItemObject.costPerManningUnitHour = null;
}
if(typeof packrunsItem === 'object' && 'totalHoursWorked' in packrunsItem)
{
packrunsItemObject.totalHoursWorked = (function(){
if(typeof packrunsItem.totalHoursWorked !== 'number')
{
return Number(packrunsItem.totalHoursWorked);
}
return packrunsItem.totalHoursWorked;
}());
}
else
{
packrunsItemObject.totalHoursWorked = 0;
}
if(typeof packrunsItem === 'object' && 'totalHoursWorkedExcludingDowntime' in packrunsItem)
{
packrunsItemObject.totalHoursWorkedExcludingDowntime = (function(){
if(typeof packrunsItem.totalHoursWorkedExcludingDowntime !== 'number')
{
return Number(packrunsItem.totalHoursWorkedExcludingDowntime);
}
return packrunsItem.totalHoursWorkedExcludingDowntime;
}());
}
else
{
packrunsItemObject.totalHoursWorkedExcludingDowntime = 0;
}
if(typeof packrunsItem === 'object' && 'totalHoursPaid' in packrunsItem)
{
packrunsItemObject.totalHoursPaid = (function(){
if(typeof packrunsItem.totalHoursPaid !== 'number')
{
return Number(packrunsItem.totalHoursPaid);
}
return packrunsItem.totalHoursPaid;
}());
}
else
{
packrunsItemObject.totalHoursPaid = 0;
}
if(typeof packrunsItem === 'object' && 'class1TotalManningCost' in packrunsItem)
{
packrunsItemObject.class1TotalManningCost = (function(){
if(packrunsItem.class1TotalManningCost === null)
{
return null;
}
if(typeof packrunsItem.class1TotalManningCost !== 'number')
{
return Number(packrunsItem.class1TotalManningCost);
}
return packrunsItem.class1TotalManningCost;
}());
}
else
{
packrunsItemObject.class1TotalManningCost = null;
}
if(typeof packrunsItem === 'object' && 'class2TotalManningCost' in packrunsItem)
{
packrunsItemObject.class2TotalManningCost = (function(){
if(packrunsItem.class2TotalManningCost === null)
{
return null;
}
if(typeof packrunsItem.class2TotalManningCost !== 'number')
{
return Number(packrunsItem.class2TotalManningCost);
}
return packrunsItem.class2TotalManningCost;
}());
}
else
{
packrunsItemObject.class2TotalManningCost = null;
}
if(typeof packrunsItem === 'object' && 'class1DowntimeManningCost' in packrunsItem)
{
packrunsItemObject.class1DowntimeManningCost = (function(){
if(packrunsItem.class1DowntimeManningCost === null)
{
return null;
}
if(typeof packrunsItem.class1DowntimeManningCost !== 'number')
{
return Number(packrunsItem.class1DowntimeManningCost);
}
return packrunsItem.class1DowntimeManningCost;
}());
}
else
{
packrunsItemObject.class1DowntimeManningCost = null;
}
if(typeof packrunsItem === 'object' && 'class2DowntimeManningCost' in packrunsItem)
{
packrunsItemObject.class2DowntimeManningCost = (function(){
if(packrunsItem.class2DowntimeManningCost === null)
{
return null;
}
if(typeof packrunsItem.class2DowntimeManningCost !== 'number')
{
return Number(packrunsItem.class2DowntimeManningCost);
}
return packrunsItem.class2DowntimeManningCost;
}());
}
else
{
packrunsItemObject.class2DowntimeManningCost = null;
}
if(typeof packrunsItem === 'object' && 'class1CostPerTrayTarget' in packrunsItem)
{
packrunsItemObject.class1CostPerTrayTarget = (function(){
if(packrunsItem.class1CostPerTrayTarget === null)
{
return null;
}
if(typeof packrunsItem.class1CostPerTrayTarget !== 'number')
{
return Number(packrunsItem.class1CostPerTrayTarget);
}
return packrunsItem.class1CostPerTrayTarget;
}());
}
else
{
packrunsItemObject.class1CostPerTrayTarget = null;
}
if(typeof packrunsItem === 'object' && 'class1CostPerTrayActual' in packrunsItem)
{
packrunsItemObject.class1CostPerTrayActual = (function(){
if(packrunsItem.class1CostPerTrayActual === null)
{
return null;
}
if(typeof packrunsItem.class1CostPerTrayActual !== 'number')
{
return Number(packrunsItem.class1CostPerTrayActual);
}
return packrunsItem.class1CostPerTrayActual;
}());
}
else
{
packrunsItemObject.class1CostPerTrayActual = null;
}
if(typeof packrunsItem === 'object' && 'class2CostPerTrayActual' in packrunsItem)
{
packrunsItemObject.class2CostPerTrayActual = (function(){
if(packrunsItem.class2CostPerTrayActual === null)
{
return null;
}
if(typeof packrunsItem.class2CostPerTrayActual !== 'number')
{
return Number(packrunsItem.class2CostPerTrayActual);
}
return packrunsItem.class2CostPerTrayActual;
}());
}
else
{
packrunsItemObject.class2CostPerTrayActual = null;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerHour' in packrunsItem)
{
packrunsItemObject.class1TraysPerHour = (function(){
if(typeof packrunsItem.class1TraysPerHour !== 'number')
{
return Number.isInteger(Number(packrunsItem.class1TraysPerHour)) ? Number(packrunsItem.class1TraysPerHour) : Math.floor(Number(packrunsItem.class1TraysPerHour));
}
return Number.isInteger(packrunsItem.class1TraysPerHour) ? packrunsItem.class1TraysPerHour : Math.floor(packrunsItem.class1TraysPerHour);
}());
}
else
{
packrunsItemObject.class1TraysPerHour = 0;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerHourExcludingDowntime' in packrunsItem)
{
packrunsItemObject.class1TraysPerHourExcludingDowntime = (function(){
if(typeof packrunsItem.class1TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(packrunsItem.class1TraysPerHourExcludingDowntime)) ? Number(packrunsItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(packrunsItem.class1TraysPerHourExcludingDowntime));
}
return Number.isInteger(packrunsItem.class1TraysPerHourExcludingDowntime) ? packrunsItem.class1TraysPerHourExcludingDowntime : Math.floor(packrunsItem.class1TraysPerHourExcludingDowntime);
}());
}
else
{
packrunsItemObject.class1TraysPerHourExcludingDowntime = 0;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in packrunsItem)
{
packrunsItemObject.class1TraysPerHourExcludingDowntimeTarget = (function(){
if(typeof packrunsItem.class1TraysPerHourExcludingDowntimeTarget !== 'number')
{
return Number.isInteger(Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget));
}
return Number.isInteger(packrunsItem.class1TraysPerHourExcludingDowntimeTarget) ? packrunsItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(packrunsItem.class1TraysPerHourExcludingDowntimeTarget);
}());
}
else
{
packrunsItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerManHour' in packrunsItem)
{
packrunsItemObject.class1TraysPerManHour = (function(){
if(packrunsItem.class1TraysPerManHour === null)
{
return null;
}
if(typeof packrunsItem.class1TraysPerManHour !== 'number')
{
return Number(packrunsItem.class1TraysPerManHour);
}
return packrunsItem.class1TraysPerManHour;
}());
}
else
{
packrunsItemObject.class1TraysPerManHour = null;
}
if(typeof packrunsItem === 'object' && 'class1TraysPerManHourExcludingDowntime' in packrunsItem)
{
packrunsItemObject.class1TraysPerManHourExcludingDowntime = (function(){
if(packrunsItem.class1TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof packrunsItem.class1TraysPerManHourExcludingDowntime !== 'number')
{
return Number(packrunsItem.class1TraysPerManHourExcludingDowntime);
}
return packrunsItem.class1TraysPerManHourExcludingDowntime;
}());
}
else
{
packrunsItemObject.class1TraysPerManHourExcludingDowntime = null;
}
if(typeof packrunsItem === 'object' && 'class2TraysPerHour' in packrunsItem)
{
packrunsItemObject.class2TraysPerHour = (function(){
if(typeof packrunsItem.class2TraysPerHour !== 'number')
{
return Number.isInteger(Number(packrunsItem.class2TraysPerHour)) ? Number(packrunsItem.class2TraysPerHour) : Math.floor(Number(packrunsItem.class2TraysPerHour));
}
return Number.isInteger(packrunsItem.class2TraysPerHour) ? packrunsItem.class2TraysPerHour : Math.floor(packrunsItem.class2TraysPerHour);
}());
}
else
{
packrunsItemObject.class2TraysPerHour = 0;
}
if(typeof packrunsItem === 'object' && 'class2TraysPerHourExcludingDowntime' in packrunsItem)
{
packrunsItemObject.class2TraysPerHourExcludingDowntime = (function(){
if(typeof packrunsItem.class2TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(packrunsItem.class2TraysPerHourExcludingDowntime)) ? Number(packrunsItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(packrunsItem.class2TraysPerHourExcludingDowntime));
}
return Number.isInteger(packrunsItem.class2TraysPerHourExcludingDowntime) ? packrunsItem.class2TraysPerHourExcludingDowntime : Math.floor(packrunsItem.class2TraysPerHourExcludingDowntime);
}());
}
else
{
packrunsItemObject.class2TraysPerHourExcludingDowntime = 0;
}
if(typeof packrunsItem === 'object' && 'class2TraysPerManHour' in packrunsItem)
{
packrunsItemObject.class2TraysPerManHour = (function(){
if(packrunsItem.class2TraysPerManHour === null)
{
return null;
}
if(typeof packrunsItem.class2TraysPerManHour !== 'number')
{
return Number(packrunsItem.class2TraysPerManHour);
}
return packrunsItem.class2TraysPerManHour;
}());
}
else
{
packrunsItemObject.class2TraysPerManHour = null;
}
if(typeof packrunsItem === 'object' && 'class2TraysPerManHourExcludingDowntime' in packrunsItem)
{
packrunsItemObject.class2TraysPerManHourExcludingDowntime = (function(){
if(packrunsItem.class2TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof packrunsItem.class2TraysPerManHourExcludingDowntime !== 'number')
{
return Number(packrunsItem.class2TraysPerManHourExcludingDowntime);
}
return packrunsItem.class2TraysPerManHourExcludingDowntime;
}());
}
else
{
packrunsItemObject.class2TraysPerManHourExcludingDowntime = null;
}
if(typeof packrunsItem === 'object' && 'class1LayeredPercentageTarget' in packrunsItem)
{
packrunsItemObject.class1LayeredPercentageTarget = (function(){
if(packrunsItem.class1LayeredPercentageTarget === null)
{
return null;
}
if(typeof packrunsItem.class1LayeredPercentageTarget !== 'number')
{
return Number(packrunsItem.class1LayeredPercentageTarget);
}
return packrunsItem.class1LayeredPercentageTarget;
}());
}
else
{
packrunsItemObject.class1LayeredPercentageTarget = null;
}
if(typeof packrunsItem === 'object' && 'class1LayeredPercentage' in packrunsItem)
{
packrunsItemObject.class1LayeredPercentage = (function(){
if(packrunsItem.class1LayeredPercentage === null)
{
return null;
}
if(typeof packrunsItem.class1LayeredPercentage !== 'number')
{
return Number(packrunsItem.class1LayeredPercentage);
}
return packrunsItem.class1LayeredPercentage;
}());
}
else
{
packrunsItemObject.class1LayeredPercentage = null;
}
if(typeof packrunsItem === 'object' && 'class1BulkPercentage' in packrunsItem)
{
packrunsItemObject.class1BulkPercentage = (function(){
if(packrunsItem.class1BulkPercentage === null)
{
return null;
}
if(typeof packrunsItem.class1BulkPercentage !== 'number')
{
return Number(packrunsItem.class1BulkPercentage);
}
return packrunsItem.class1BulkPercentage;
}());
}
else
{
packrunsItemObject.class1BulkPercentage = null;
}
return packrunsItemObject;
}());
});
}());
}
else
{
resultObject.packruns = [];
}
if(typeof result === 'object' && 'shifts' in result)
{
resultObject.shifts = (function(){
if(Array.isArray(result.shifts) !== true)
{
return [];
}
return result.shifts.map((shiftsItem) => {
return (function(){
let shiftsItemObject = {};
if(typeof shiftsItem === 'object' && 'siteId' in shiftsItem)
{
shiftsItemObject.siteId = (function(){
if(typeof shiftsItem.siteId !== 'number')
{
return Number.isInteger(Number(shiftsItem.siteId)) ? Number(shiftsItem.siteId) : Math.floor(Number(shiftsItem.siteId));
}
return Number.isInteger(shiftsItem.siteId) ? shiftsItem.siteId : Math.floor(shiftsItem.siteId);
}());
}
else
{
shiftsItemObject.siteId = 0;
}
if(typeof shiftsItem === 'object' && 'siteName' in shiftsItem)
{
shiftsItemObject.siteName = (function(){
if(typeof shiftsItem.siteName !== 'string')
{
return String(shiftsItem.siteName);
}
return shiftsItem.siteName;
}());
}
else
{
shiftsItemObject.siteName = "";
}
if(typeof shiftsItem === 'object' && 'packingLineId' in shiftsItem)
{
shiftsItemObject.packingLineId = (function(){
if(typeof shiftsItem.packingLineId !== 'string')
{
return String(shiftsItem.packingLineId);
}
return shiftsItem.packingLineId;
}());
}
else
{
shiftsItemObject.packingLineId = "";
}
if(typeof shiftsItem === 'object' && 'packingLineName' in shiftsItem)
{
shiftsItemObject.packingLineName = (function(){
if(typeof shiftsItem.packingLineName !== 'string')
{
return String(shiftsItem.packingLineName);
}
return shiftsItem.packingLineName;
}());
}
else
{
shiftsItemObject.packingLineName = "";
}
if(typeof shiftsItem === 'object' && 'shiftId' in shiftsItem)
{
shiftsItemObject.shiftId = (function(){
if(typeof shiftsItem.shiftId !== 'string')
{
return String(shiftsItem.shiftId);
}
return shiftsItem.shiftId;
}());
}
else
{
shiftsItemObject.shiftId = "";
}
if(typeof shiftsItem === 'object' && 'shiftType' in shiftsItem)
{
shiftsItemObject.shiftType = (function(){
if(typeof shiftsItem.shiftType !== 'string')
{
return String(shiftsItem.shiftType);
}
return shiftsItem.shiftType;
}());
}
else
{
shiftsItemObject.shiftType = "";
}
if(typeof shiftsItem === 'object' && 'isoWeek' in shiftsItem)
{
shiftsItemObject.isoWeek = (function(){
if(typeof shiftsItem.isoWeek !== 'number')
{
return Number.isInteger(Number(shiftsItem.isoWeek)) ? Number(shiftsItem.isoWeek) : Math.floor(Number(shiftsItem.isoWeek));
}
return Number.isInteger(shiftsItem.isoWeek) ? shiftsItem.isoWeek : Math.floor(shiftsItem.isoWeek);
}());
}
else
{
shiftsItemObject.isoWeek = 0;
}
if(typeof shiftsItem === 'object' && 'startTimestamp' in shiftsItem)
{
shiftsItemObject.startTimestamp = (function(){
if(typeof shiftsItem.startTimestamp !== 'string')
{
return new Date(String(shiftsItem.startTimestamp));
}
return new Date(shiftsItem.startTimestamp);
}());
}
else
{
shiftsItemObject.startTimestamp = new Date();
}
if(typeof shiftsItem === 'object' && 'finishTimestamp' in shiftsItem)
{
shiftsItemObject.finishTimestamp = (function(){
if(shiftsItem.finishTimestamp === null)
{
return null;
}
if(typeof shiftsItem.finishTimestamp !== 'string')
{
return new Date(String(shiftsItem.finishTimestamp));
}
return new Date(shiftsItem.finishTimestamp);
}());
}
else
{
shiftsItemObject.finishTimestamp = null;
}
if(typeof shiftsItem === 'object' && 'lineManagerName' in shiftsItem)
{
shiftsItemObject.lineManagerName = (function(){
if(shiftsItem.lineManagerName === null)
{
return null;
}
if(typeof shiftsItem.lineManagerName !== 'string')
{
return String(shiftsItem.lineManagerName);
}
return shiftsItem.lineManagerName;
}());
}
else
{
shiftsItemObject.lineManagerName = null;
}
if(typeof shiftsItem === 'object' && 'qualityManagerName' in shiftsItem)
{
shiftsItemObject.qualityManagerName = (function(){
if(shiftsItem.qualityManagerName === null)
{
return null;
}
if(typeof shiftsItem.qualityManagerName !== 'string')
{
return String(shiftsItem.qualityManagerName);
}
return shiftsItem.qualityManagerName;
}());
}
else
{
shiftsItemObject.qualityManagerName = null;
}
if(typeof shiftsItem === 'object' && 'varietyIds' in shiftsItem)
{
shiftsItemObject.varietyIds = (function(){
if(Array.isArray(shiftsItem.varietyIds) !== true)
{
return [];
}
return shiftsItem.varietyIds.map((varietyIdsItem) => {
return (function(){
if(typeof varietyIdsItem !== 'string')
{
return String(varietyIdsItem);
}
return varietyIdsItem;
}());
});
}());
}
else
{
shiftsItemObject.varietyIds = [];
}
if(typeof shiftsItem === 'object' && 'varietyCodes' in shiftsItem)
{
shiftsItemObject.varietyCodes = (function(){
if(Array.isArray(shiftsItem.varietyCodes) !== true)
{
return [];
}
return shiftsItem.varietyCodes.map((varietyCodesItem) => {
return (function(){
if(typeof varietyCodesItem !== 'string')
{
return String(varietyCodesItem);
}
return varietyCodesItem;
}());
});
}());
}
else
{
shiftsItemObject.varietyCodes = [];
}
if(typeof shiftsItem === 'object' && 'growingMethodIds' in shiftsItem)
{
shiftsItemObject.growingMethodIds = (function(){
if(Array.isArray(shiftsItem.growingMethodIds) !== true)
{
return [];
}
return shiftsItem.growingMethodIds.map((growingMethodIdsItem) => {
return (function(){
if(typeof growingMethodIdsItem !== 'string')
{
return String(growingMethodIdsItem);
}
return growingMethodIdsItem;
}());
});
}());
}
else
{
shiftsItemObject.growingMethodIds = [];
}
if(typeof shiftsItem === 'object' && 'growingMethodCodes' in shiftsItem)
{
shiftsItemObject.growingMethodCodes = (function(){
if(Array.isArray(shiftsItem.growingMethodCodes) !== true)
{
return [];
}
return shiftsItem.growingMethodCodes.map((growingMethodCodesItem) => {
return (function(){
if(typeof growingMethodCodesItem !== 'string')
{
return String(growingMethodCodesItem);
}
return growingMethodCodesItem;
}());
});
}());
}
else
{
shiftsItemObject.growingMethodCodes = [];
}
if(typeof shiftsItem === 'object' && 'binsTippedTarget' in shiftsItem)
{
shiftsItemObject.binsTippedTarget = (function(){
if(typeof shiftsItem.binsTippedTarget !== 'number')
{
return Number.isInteger(Number(shiftsItem.binsTippedTarget)) ? Number(shiftsItem.binsTippedTarget) : Math.floor(Number(shiftsItem.binsTippedTarget));
}
return Number.isInteger(shiftsItem.binsTippedTarget) ? shiftsItem.binsTippedTarget : Math.floor(shiftsItem.binsTippedTarget);
}());
}
else
{
shiftsItemObject.binsTippedTarget = 0;
}
if(typeof shiftsItem === 'object' && 'totalBinsTipped' in shiftsItem)
{
shiftsItemObject.totalBinsTipped = (function(){
if(typeof shiftsItem.totalBinsTipped !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalBinsTipped)) ? Number(shiftsItem.totalBinsTipped) : Math.floor(Number(shiftsItem.totalBinsTipped));
}
return Number.isInteger(shiftsItem.totalBinsTipped) ? shiftsItem.totalBinsTipped : Math.floor(shiftsItem.totalBinsTipped);
}());
}
else
{
shiftsItemObject.totalBinsTipped = 0;
}
if(typeof shiftsItem === 'object' && 'binsTippedPerHour' in shiftsItem)
{
shiftsItemObject.binsTippedPerHour = (function(){
if(typeof shiftsItem.binsTippedPerHour !== 'number')
{
return Number.isInteger(Number(shiftsItem.binsTippedPerHour)) ? Number(shiftsItem.binsTippedPerHour) : Math.floor(Number(shiftsItem.binsTippedPerHour));
}
return Number.isInteger(shiftsItem.binsTippedPerHour) ? shiftsItem.binsTippedPerHour : Math.floor(shiftsItem.binsTippedPerHour);
}());
}
else
{
shiftsItemObject.binsTippedPerHour = 0;
}
if(typeof shiftsItem === 'object' && 'binsTippedPerHourExcludingDowntime' in shiftsItem)
{
shiftsItemObject.binsTippedPerHourExcludingDowntime = (function(){
if(typeof shiftsItem.binsTippedPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(shiftsItem.binsTippedPerHourExcludingDowntime)) ? Number(shiftsItem.binsTippedPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.binsTippedPerHourExcludingDowntime));
}
return Number.isInteger(shiftsItem.binsTippedPerHourExcludingDowntime) ? shiftsItem.binsTippedPerHourExcludingDowntime : Math.floor(shiftsItem.binsTippedPerHourExcludingDowntime);
}());
}
else
{
shiftsItemObject.binsTippedPerHourExcludingDowntime = 0;
}
if(typeof shiftsItem === 'object' && 'totalProductionTime' in shiftsItem)
{
shiftsItemObject.totalProductionTime = (function(){
if(typeof shiftsItem.totalProductionTime !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalProductionTime)) ? Number(shiftsItem.totalProductionTime) : Math.floor(Number(shiftsItem.totalProductionTime));
}
return Number.isInteger(shiftsItem.totalProductionTime) ? shiftsItem.totalProductionTime : Math.floor(shiftsItem.totalProductionTime);
}());
}
else
{
shiftsItemObject.totalProductionTime = 0;
}
if(typeof shiftsItem === 'object' && 'totalScheduledBreakTime' in shiftsItem)
{
shiftsItemObject.totalScheduledBreakTime = (function(){
if(typeof shiftsItem.totalScheduledBreakTime !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalScheduledBreakTime)) ? Number(shiftsItem.totalScheduledBreakTime) : Math.floor(Number(shiftsItem.totalScheduledBreakTime));
}
return Number.isInteger(shiftsItem.totalScheduledBreakTime) ? shiftsItem.totalScheduledBreakTime : Math.floor(shiftsItem.totalScheduledBreakTime);
}());
}
else
{
shiftsItemObject.totalScheduledBreakTime = 0;
}
if(typeof shiftsItem === 'object' && 'totalDowntime' in shiftsItem)
{
shiftsItemObject.totalDowntime = (function(){
if(typeof shiftsItem.totalDowntime !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalDowntime)) ? Number(shiftsItem.totalDowntime) : Math.floor(Number(shiftsItem.totalDowntime));
}
return Number.isInteger(shiftsItem.totalDowntime) ? shiftsItem.totalDowntime : Math.floor(shiftsItem.totalDowntime);
}());
}
else
{
shiftsItemObject.totalDowntime = 0;
}
if(typeof shiftsItem === 'object' && 'downtimeEventsCount' in shiftsItem)
{
shiftsItemObject.downtimeEventsCount = (function(){
if(typeof shiftsItem.downtimeEventsCount !== 'number')
{
return Number.isInteger(Number(shiftsItem.downtimeEventsCount)) ? Number(shiftsItem.downtimeEventsCount) : Math.floor(Number(shiftsItem.downtimeEventsCount));
}
return Number.isInteger(shiftsItem.downtimeEventsCount) ? shiftsItem.downtimeEventsCount : Math.floor(shiftsItem.downtimeEventsCount);
}());
}
else
{
shiftsItemObject.downtimeEventsCount = 0;
}
if(typeof shiftsItem === 'object' && 'downtimeEventsAverageDuration' in shiftsItem)
{
shiftsItemObject.downtimeEventsAverageDuration = (function(){
if(typeof shiftsItem.downtimeEventsAverageDuration !== 'number')
{
return Number.isInteger(Number(shiftsItem.downtimeEventsAverageDuration)) ? Number(shiftsItem.downtimeEventsAverageDuration) : Math.floor(Number(shiftsItem.downtimeEventsAverageDuration));
}
return Number.isInteger(shiftsItem.downtimeEventsAverageDuration) ? shiftsItem.downtimeEventsAverageDuration : Math.floor(shiftsItem.downtimeEventsAverageDuration);
}());
}
else
{
shiftsItemObject.downtimeEventsAverageDuration = 0;
}
if(typeof shiftsItem === 'object' && 'class1ManningTarget' in shiftsItem)
{
shiftsItemObject.class1ManningTarget = (function(){
if(shiftsItem.class1ManningTarget === null)
{
return null;
}
if(typeof shiftsItem.class1ManningTarget !== 'number')
{
return Number.isInteger(Number(shiftsItem.class1ManningTarget)) ? Number(shiftsItem.class1ManningTarget) : Math.floor(Number(shiftsItem.class1ManningTarget));
}
return Number.isInteger(shiftsItem.class1ManningTarget) ? shiftsItem.class1ManningTarget : Math.floor(shiftsItem.class1ManningTarget);
}());
}
else
{
shiftsItemObject.class1ManningTarget = null;
}
if(typeof shiftsItem === 'object' && 'averageClass1Manning' in shiftsItem)
{
shiftsItemObject.averageClass1Manning = (function(){
if(shiftsItem.averageClass1Manning === null)
{
return null;
}
if(typeof shiftsItem.averageClass1Manning !== 'number')
{
return Number.isInteger(Number(shiftsItem.averageClass1Manning)) ? Number(shiftsItem.averageClass1Manning) : Math.floor(Number(shiftsItem.averageClass1Manning));
}
return Number.isInteger(shiftsItem.averageClass1Manning) ? shiftsItem.averageClass1Manning : Math.floor(shiftsItem.averageClass1Manning);
}());
}
else
{
shiftsItemObject.averageClass1Manning = null;
}
if(typeof shiftsItem === 'object' && 'class1ManningPercentage' in shiftsItem)
{
shiftsItemObject.class1ManningPercentage = (function(){
if(shiftsItem.class1ManningPercentage === null)
{
return null;
}
if(typeof shiftsItem.class1ManningPercentage !== 'number')
{
return Number(shiftsItem.class1ManningPercentage);
}
return shiftsItem.class1ManningPercentage;
}());
}
else
{
shiftsItemObject.class1ManningPercentage = null;
}
if(typeof shiftsItem === 'object' && 'class2ManningTarget' in shiftsItem)
{
shiftsItemObject.class2ManningTarget = (function(){
if(shiftsItem.class2ManningTarget === null)
{
return null;
}
if(typeof shiftsItem.class2ManningTarget !== 'number')
{
return Number.isInteger(Number(shiftsItem.class2ManningTarget)) ? Number(shiftsItem.class2ManningTarget) : Math.floor(Number(shiftsItem.class2ManningTarget));
}
return Number.isInteger(shiftsItem.class2ManningTarget) ? shiftsItem.class2ManningTarget : Math.floor(shiftsItem.class2ManningTarget);
}());
}
else
{
shiftsItemObject.class2ManningTarget = null;
}
if(typeof shiftsItem === 'object' && 'averageClass2Manning' in shiftsItem)
{
shiftsItemObject.averageClass2Manning = (function(){
if(shiftsItem.averageClass2Manning === null)
{
return null;
}
if(typeof shiftsItem.averageClass2Manning !== 'number')
{
return Number.isInteger(Number(shiftsItem.averageClass2Manning)) ? Number(shiftsItem.averageClass2Manning) : Math.floor(Number(shiftsItem.averageClass2Manning));
}
return Number.isInteger(shiftsItem.averageClass2Manning) ? shiftsItem.averageClass2Manning : Math.floor(shiftsItem.averageClass2Manning);
}());
}
else
{
shiftsItemObject.averageClass2Manning = null;
}
if(typeof shiftsItem === 'object' && 'class2ManningPercentage' in shiftsItem)
{
shiftsItemObject.class2ManningPercentage = (function(){
if(shiftsItem.class2ManningPercentage === null)
{
return null;
}
if(typeof shiftsItem.class2ManningPercentage !== 'number')
{
return Number(shiftsItem.class2ManningPercentage);
}
return shiftsItem.class2ManningPercentage;
}());
}
else
{
shiftsItemObject.class2ManningPercentage = null;
}
if(typeof shiftsItem === 'object' && 'totalManningTarget' in shiftsItem)
{
shiftsItemObject.totalManningTarget = (function(){
if(shiftsItem.totalManningTarget === null)
{
return null;
}
if(typeof shiftsItem.totalManningTarget !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalManningTarget)) ? Number(shiftsItem.totalManningTarget) : Math.floor(Number(shiftsItem.totalManningTarget));
}
return Number.isInteger(shiftsItem.totalManningTarget) ? shiftsItem.totalManningTarget : Math.floor(shiftsItem.totalManningTarget);
}());
}
else
{
shiftsItemObject.totalManningTarget = null;
}
if(typeof shiftsItem === 'object' && 'averageTotalManning' in shiftsItem)
{
shiftsItemObject.averageTotalManning = (function(){
if(shiftsItem.averageTotalManning === null)
{
return null;
}
if(typeof shiftsItem.averageTotalManning !== 'number')
{
return Number.isInteger(Number(shiftsItem.averageTotalManning)) ? Number(shiftsItem.averageTotalManning) : Math.floor(Number(shiftsItem.averageTotalManning));
}
return Number.isInteger(shiftsItem.averageTotalManning) ? shiftsItem.averageTotalManning : Math.floor(shiftsItem.averageTotalManning);
}());
}
else
{
shiftsItemObject.averageTotalManning = null;
}
if(typeof shiftsItem === 'object' && 'totalManningPercentage' in shiftsItem)
{
shiftsItemObject.totalManningPercentage = (function(){
if(shiftsItem.totalManningPercentage === null)
{
return null;
}
if(typeof shiftsItem.totalManningPercentage !== 'number')
{
return Number(shiftsItem.totalManningPercentage);
}
return shiftsItem.totalManningPercentage;
}());
}
else
{
shiftsItemObject.totalManningPercentage = null;
}
if(typeof shiftsItem === 'object' && 'costPerManningUnitHour' in shiftsItem)
{
shiftsItemObject.costPerManningUnitHour = (function(){
if(shiftsItem.costPerManningUnitHour === null)
{
return null;
}
if(typeof shiftsItem.costPerManningUnitHour !== 'number')
{
return Number(shiftsItem.costPerManningUnitHour);
}
return shiftsItem.costPerManningUnitHour;
}());
}
else
{
shiftsItemObject.costPerManningUnitHour = null;
}
if(typeof shiftsItem === 'object' && 'totalHoursWorked' in shiftsItem)
{
shiftsItemObject.totalHoursWorked = (function(){
if(typeof shiftsItem.totalHoursWorked !== 'number')
{
return Number(shiftsItem.totalHoursWorked);
}
return shiftsItem.totalHoursWorked;
}());
}
else
{
shiftsItemObject.totalHoursWorked = 0;
}
if(typeof shiftsItem === 'object' && 'totalHoursWorkedExcludingDowntime' in shiftsItem)
{
shiftsItemObject.totalHoursWorkedExcludingDowntime = (function(){
if(typeof shiftsItem.totalHoursWorkedExcludingDowntime !== 'number')
{
return Number(shiftsItem.totalHoursWorkedExcludingDowntime);
}
return shiftsItem.totalHoursWorkedExcludingDowntime;
}());
}
else
{
shiftsItemObject.totalHoursWorkedExcludingDowntime = 0;
}
if(typeof shiftsItem === 'object' && 'totalHoursPaid' in shiftsItem)
{
shiftsItemObject.totalHoursPaid = (function(){
if(typeof shiftsItem.totalHoursPaid !== 'number')
{
return Number(shiftsItem.totalHoursPaid);
}
return shiftsItem.totalHoursPaid;
}());
}
else
{
shiftsItemObject.totalHoursPaid = 0;
}
if(typeof shiftsItem === 'object' && 'class1TotalManningCost' in shiftsItem)
{
shiftsItemObject.class1TotalManningCost = (function(){
if(shiftsItem.class1TotalManningCost === null)
{
return null;
}
if(typeof shiftsItem.class1TotalManningCost !== 'number')
{
return Number(shiftsItem.class1TotalManningCost);
}
return shiftsItem.class1TotalManningCost;
}());
}
else
{
shiftsItemObject.class1TotalManningCost = null;
}
if(typeof shiftsItem === 'object' && 'class2TotalManningCost' in shiftsItem)
{
shiftsItemObject.class2TotalManningCost = (function(){
if(shiftsItem.class2TotalManningCost === null)
{
return null;
}
if(typeof shiftsItem.class2TotalManningCost !== 'number')
{
return Number(shiftsItem.class2TotalManningCost);
}
return shiftsItem.class2TotalManningCost;
}());
}
else
{
shiftsItemObject.class2TotalManningCost = null;
}
if(typeof shiftsItem === 'object' && 'class1DowntimeManningCost' in shiftsItem)
{
shiftsItemObject.class1DowntimeManningCost = (function(){
if(shiftsItem.class1DowntimeManningCost === null)
{
return null;
}
if(typeof shiftsItem.class1DowntimeManningCost !== 'number')
{
return Number(shiftsItem.class1DowntimeManningCost);
}
return shiftsItem.class1DowntimeManningCost;
}());
}
else
{
shiftsItemObject.class1DowntimeManningCost = null;
}
if(typeof shiftsItem === 'object' && 'class2DowntimeManningCost' in shiftsItem)
{
shiftsItemObject.class2DowntimeManningCost = (function(){
if(shiftsItem.class2DowntimeManningCost === null)
{
return null;
}
if(typeof shiftsItem.class2DowntimeManningCost !== 'number')
{
return Number(shiftsItem.class2DowntimeManningCost);
}
return shiftsItem.class2DowntimeManningCost;
}());
}
else
{
shiftsItemObject.class2DowntimeManningCost = null;
}
if(typeof shiftsItem === 'object' && 'class1CostPerTrayTarget' in shiftsItem)
{
shiftsItemObject.class1CostPerTrayTarget = (function(){
if(shiftsItem.class1CostPerTrayTarget === null)
{
return null;
}
if(typeof shiftsItem.class1CostPerTrayTarget !== 'number')
{
return Number(shiftsItem.class1CostPerTrayTarget);
}
return shiftsItem.class1CostPerTrayTarget;
}());
}
else
{
shiftsItemObject.class1CostPerTrayTarget = null;
}
if(typeof shiftsItem === 'object' && 'class1CostPerTrayActual' in shiftsItem)
{
shiftsItemObject.class1CostPerTrayActual = (function(){
if(shiftsItem.class1CostPerTrayActual === null)
{
return null;
}
if(typeof shiftsItem.class1CostPerTrayActual !== 'number')
{
return Number(shiftsItem.class1CostPerTrayActual);
}
return shiftsItem.class1CostPerTrayActual;
}());
}
else
{
shiftsItemObject.class1CostPerTrayActual = null;
}
if(typeof shiftsItem === 'object' && 'class2CostPerTrayActual' in shiftsItem)
{
shiftsItemObject.class2CostPerTrayActual = (function(){
if(shiftsItem.class2CostPerTrayActual === null)
{
return null;
}
if(typeof shiftsItem.class2CostPerTrayActual !== 'number')
{
return Number(shiftsItem.class2CostPerTrayActual);
}
return shiftsItem.class2CostPerTrayActual;
}());
}
else
{
shiftsItemObject.class2CostPerTrayActual = null;
}
if(typeof shiftsItem === 'object' && 'totalClass1Trays' in shiftsItem)
{
shiftsItemObject.totalClass1Trays = (function(){
if(typeof shiftsItem.totalClass1Trays !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalClass1Trays)) ? Number(shiftsItem.totalClass1Trays) : Math.floor(Number(shiftsItem.totalClass1Trays));
}
return Number.isInteger(shiftsItem.totalClass1Trays) ? shiftsItem.totalClass1Trays : Math.floor(shiftsItem.totalClass1Trays);
}());
}
else
{
shiftsItemObject.totalClass1Trays = 0;
}
if(typeof shiftsItem === 'object' && 'totalClass2Trays' in shiftsItem)
{
shiftsItemObject.totalClass2Trays = (function(){
if(typeof shiftsItem.totalClass2Trays !== 'number')
{
return Number.isInteger(Number(shiftsItem.totalClass2Trays)) ? Number(shiftsItem.totalClass2Trays) : Math.floor(Number(shiftsItem.totalClass2Trays));
}
return Number.isInteger(shiftsItem.totalClass2Trays) ? shiftsItem.totalClass2Trays : Math.floor(shiftsItem.totalClass2Trays);
}());
}
else
{
shiftsItemObject.totalClass2Trays = 0;
}
if(typeof shiftsItem === 'object' && 'class1TraysPerHour' in shiftsItem)
{
shiftsItemObject.class1TraysPerHour = (function(){
if(typeof shiftsItem.class1TraysPerHour !== 'number')
{
return Number.isInteger(Number(shiftsItem.class1TraysPerHour)) ? Number(shiftsItem.class1TraysPerHour) : Math.floor(Number(shiftsItem.class1TraysPerHour));
}
return Number.isInteger(shiftsItem.class1TraysPerHour) ? shiftsItem.class1TraysPerHour : Math.floor(shiftsItem.class1TraysPerHour);
}());
}
else
{
shiftsItemObject.class1TraysPerHour = 0;
}
if(typeof shiftsItem === 'object' && 'class1TraysPerHourExcludingDowntime' in shiftsItem)
{
shiftsItemObject.class1TraysPerHourExcludingDowntime = (function(){
if(typeof shiftsItem.class1TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(shiftsItem.class1TraysPerHourExcludingDowntime)) ? Number(shiftsItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.class1TraysPerHourExcludingDowntime));
}
return Number.isInteger(shiftsItem.class1TraysPerHourExcludingDowntime) ? shiftsItem.class1TraysPerHourExcludingDowntime : Math.floor(shiftsItem.class1TraysPerHourExcludingDowntime);
}());
}
else
{
shiftsItemObject.class1TraysPerHourExcludingDowntime = 0;
}
if(typeof shiftsItem === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in shiftsItem)
{
shiftsItemObject.class1TraysPerHourExcludingDowntimeTarget = (function(){
if(typeof shiftsItem.class1TraysPerHourExcludingDowntimeTarget !== 'number')
{
return Number.isInteger(Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget));
}
return Number.isInteger(shiftsItem.class1TraysPerHourExcludingDowntimeTarget) ? shiftsItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(shiftsItem.class1TraysPerHourExcludingDowntimeTarget);
}());
}
else
{
shiftsItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
}
if(typeof shiftsItem === 'object' && 'class1TraysPerManHour' in shiftsItem)
{
shiftsItemObject.class1TraysPerManHour = (function(){
if(shiftsItem.class1TraysPerManHour === null)
{
return null;
}
if(typeof shiftsItem.class1TraysPerManHour !== 'number')
{
return Number(shiftsItem.class1TraysPerManHour);
}
return shiftsItem.class1TraysPerManHour;
}());
}
else
{
shiftsItemObject.class1TraysPerManHour = null;
}
if(typeof shiftsItem === 'object' && 'class1TraysPerManHourExcludingDowntime' in shiftsItem)
{
shiftsItemObject.class1TraysPerManHourExcludingDowntime = (function(){
if(shiftsItem.class1TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof shiftsItem.class1TraysPerManHourExcludingDowntime !== 'number')
{
return Number(shiftsItem.class1TraysPerManHourExcludingDowntime);
}
return shiftsItem.class1TraysPerManHourExcludingDowntime;
}());
}
else
{
shiftsItemObject.class1TraysPerManHourExcludingDowntime = null;
}
if(typeof shiftsItem === 'object' && 'class2TraysPerHour' in shiftsItem)
{
shiftsItemObject.class2TraysPerHour = (function(){
if(typeof shiftsItem.class2TraysPerHour !== 'number')
{
return Number.isInteger(Number(shiftsItem.class2TraysPerHour)) ? Number(shiftsItem.class2TraysPerHour) : Math.floor(Number(shiftsItem.class2TraysPerHour));
}
return Number.isInteger(shiftsItem.class2TraysPerHour) ? shiftsItem.class2TraysPerHour : Math.floor(shiftsItem.class2TraysPerHour);
}());
}
else
{
shiftsItemObject.class2TraysPerHour = 0;
}
if(typeof shiftsItem === 'object' && 'class2TraysPerHourExcludingDowntime' in shiftsItem)
{
shiftsItemObject.class2TraysPerHourExcludingDowntime = (function(){
if(typeof shiftsItem.class2TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(shiftsItem.class2TraysPerHourExcludingDowntime)) ? Number(shiftsItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.class2TraysPerHourExcludingDowntime));
}
return Number.isInteger(shiftsItem.class2TraysPerHourExcludingDowntime) ? shiftsItem.class2TraysPerHourExcludingDowntime : Math.floor(shiftsItem.class2TraysPerHourExcludingDowntime);
}());
}
else
{
shiftsItemObject.class2TraysPerHourExcludingDowntime = 0;
}
if(typeof shiftsItem === 'object' && 'class2TraysPerManHour' in shiftsItem)
{
shiftsItemObject.class2TraysPerManHour = (function(){
if(shiftsItem.class2TraysPerManHour === null)
{
return null;
}
if(typeof shiftsItem.class2TraysPerManHour !== 'number')
{
return Number(shiftsItem.class2TraysPerManHour);
}
return shiftsItem.class2TraysPerManHour;
}());
}
else
{
shiftsItemObject.class2TraysPerManHour = null;
}
if(typeof shiftsItem === 'object' && 'class2TraysPerManHourExcludingDowntime' in shiftsItem)
{
shiftsItemObject.class2TraysPerManHourExcludingDowntime = (function(){
if(shiftsItem.class2TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof shiftsItem.class2TraysPerManHourExcludingDowntime !== 'number')
{
return Number(shiftsItem.class2TraysPerManHourExcludingDowntime);
}
return shiftsItem.class2TraysPerManHourExcludingDowntime;
}());
}
else
{
shiftsItemObject.class2TraysPerManHourExcludingDowntime = null;
}
if(typeof shiftsItem === 'object' && 'class1LayeredPercentageTarget' in shiftsItem)
{
shiftsItemObject.class1LayeredPercentageTarget = (function(){
if(shiftsItem.class1LayeredPercentageTarget === null)
{
return null;
}
if(typeof shiftsItem.class1LayeredPercentageTarget !== 'number')
{
return Number(shiftsItem.class1LayeredPercentageTarget);
}
return shiftsItem.class1LayeredPercentageTarget;
}());
}
else
{
shiftsItemObject.class1LayeredPercentageTarget = null;
}
if(typeof shiftsItem === 'object' && 'class1LayeredPercentage' in shiftsItem)
{
shiftsItemObject.class1LayeredPercentage = (function(){
if(shiftsItem.class1LayeredPercentage === null)
{
return null;
}
if(typeof shiftsItem.class1LayeredPercentage !== 'number')
{
return Number(shiftsItem.class1LayeredPercentage);
}
return shiftsItem.class1LayeredPercentage;
}());
}
else
{
shiftsItemObject.class1LayeredPercentage = null;
}
if(typeof shiftsItem === 'object' && 'class1BulkPercentage' in shiftsItem)
{
shiftsItemObject.class1BulkPercentage = (function(){
if(shiftsItem.class1BulkPercentage === null)
{
return null;
}
if(typeof shiftsItem.class1BulkPercentage !== 'number')
{
return Number(shiftsItem.class1BulkPercentage);
}
return shiftsItem.class1BulkPercentage;
}());
}
else
{
shiftsItemObject.class1BulkPercentage = null;
}
if(typeof shiftsItem === 'object' && 'averageClass1Percentage' in shiftsItem)
{
shiftsItemObject.averageClass1Percentage = (function(){
if(shiftsItem.averageClass1Percentage === null)
{
return null;
}
if(typeof shiftsItem.averageClass1Percentage !== 'number')
{
return Number(shiftsItem.averageClass1Percentage);
}
return shiftsItem.averageClass1Percentage;
}());
}
else
{
shiftsItemObject.averageClass1Percentage = null;
}
if(typeof shiftsItem === 'object' && 'qualityR600IdealSamplesTarget' in shiftsItem)
{
shiftsItemObject.qualityR600IdealSamplesTarget = (function(){
if(shiftsItem.qualityR600IdealSamplesTarget === null)
{
return null;
}
if(typeof shiftsItem.qualityR600IdealSamplesTarget !== 'number')
{
return Number(shiftsItem.qualityR600IdealSamplesTarget);
}
return shiftsItem.qualityR600IdealSamplesTarget;
}());
}
else
{
shiftsItemObject.qualityR600IdealSamplesTarget = null;
}
if(typeof shiftsItem === 'object' && 'qualityR600IdealSamplesActual' in shiftsItem)
{
shiftsItemObject.qualityR600IdealSamplesActual = (function(){
if(shiftsItem.qualityR600IdealSamplesActual === null)
{
return null;
}
if(typeof shiftsItem.qualityR600IdealSamplesActual !== 'number')
{
return Number(shiftsItem.qualityR600IdealSamplesActual);
}
return shiftsItem.qualityR600IdealSamplesActual;
}());
}
else
{
shiftsItemObject.qualityR600IdealSamplesActual = null;
}
if(typeof shiftsItem === 'object' && 'satisfactionRating' in shiftsItem)
{
shiftsItemObject.satisfactionRating = (function(){
if(shiftsItem.satisfactionRating === null)
{
return null;
}
if(typeof shiftsItem.satisfactionRating !== 'number')
{
return Number.isInteger(Number(shiftsItem.satisfactionRating)) ? Number(shiftsItem.satisfactionRating) : Math.floor(Number(shiftsItem.satisfactionRating));
}
return Number.isInteger(shiftsItem.satisfactionRating) ? shiftsItem.satisfactionRating : Math.floor(shiftsItem.satisfactionRating);
}());
}
else
{
shiftsItemObject.satisfactionRating = null;
}
if(typeof shiftsItem === 'object' && 'keyCelebration' in shiftsItem)
{
shiftsItemObject.keyCelebration = (function(){
if(shiftsItem.keyCelebration === null)
{
return null;
}
if(typeof shiftsItem.keyCelebration !== 'string')
{
return String(shiftsItem.keyCelebration);
}
return shiftsItem.keyCelebration;
}());
}
else
{
shiftsItemObject.keyCelebration = null;
}
if(typeof shiftsItem === 'object' && 'keyChallenge' in shiftsItem)
{
shiftsItemObject.keyChallenge = (function(){
if(shiftsItem.keyChallenge === null)
{
return null;
}
if(typeof shiftsItem.keyChallenge !== 'string')
{
return String(shiftsItem.keyChallenge);
}
return shiftsItem.keyChallenge;
}());
}
else
{
shiftsItemObject.keyChallenge = null;
}
if(typeof shiftsItem === 'object' && 'focusMeetingsHeld' in shiftsItem)
{
shiftsItemObject.focusMeetingsHeld = (function(){
if(typeof shiftsItem.focusMeetingsHeld !== 'number')
{
return Number.isInteger(Number(shiftsItem.focusMeetingsHeld)) ? Number(shiftsItem.focusMeetingsHeld) : Math.floor(Number(shiftsItem.focusMeetingsHeld));
}
return Number.isInteger(shiftsItem.focusMeetingsHeld) ? shiftsItem.focusMeetingsHeld : Math.floor(shiftsItem.focusMeetingsHeld);
}());
}
else
{
shiftsItemObject.focusMeetingsHeld = 0;
}
if(typeof shiftsItem === 'object' && 'focusMeetingsExpected' in shiftsItem)
{
shiftsItemObject.focusMeetingsExpected = (function(){
if(typeof shiftsItem.focusMeetingsExpected !== 'number')
{
return Number.isInteger(Number(shiftsItem.focusMeetingsExpected)) ? Number(shiftsItem.focusMeetingsExpected) : Math.floor(Number(shiftsItem.focusMeetingsExpected));
}
return Number.isInteger(shiftsItem.focusMeetingsExpected) ? shiftsItem.focusMeetingsExpected : Math.floor(shiftsItem.focusMeetingsExpected);
}());
}
else
{
shiftsItemObject.focusMeetingsExpected = 0;
}
if(typeof shiftsItem === 'object' && 'focusMeetingsScore' in shiftsItem)
{
shiftsItemObject.focusMeetingsScore = (function(){
if(typeof shiftsItem.focusMeetingsScore !== 'number')
{
return Number.isInteger(Number(shiftsItem.focusMeetingsScore)) ? Number(shiftsItem.focusMeetingsScore) : Math.floor(Number(shiftsItem.focusMeetingsScore));
}
return Number.isInteger(shiftsItem.focusMeetingsScore) ? shiftsItem.focusMeetingsScore : Math.floor(shiftsItem.focusMeetingsScore);
}());
}
else
{
shiftsItemObject.focusMeetingsScore = 0;
}
if(typeof shiftsItem === 'object' && 'growerChangeMeetingsHeld' in shiftsItem)
{
shiftsItemObject.growerChangeMeetingsHeld = (function(){
if(typeof shiftsItem.growerChangeMeetingsHeld !== 'number')
{
return Number.isInteger(Number(shiftsItem.growerChangeMeetingsHeld)) ? Number(shiftsItem.growerChangeMeetingsHeld) : Math.floor(Number(shiftsItem.growerChangeMeetingsHeld));
}
return Number.isInteger(shiftsItem.growerChangeMeetingsHeld) ? shiftsItem.growerChangeMeetingsHeld : Math.floor(shiftsItem.growerChangeMeetingsHeld);
}());
}
else
{
shiftsItemObject.growerChangeMeetingsHeld = 0;
}
if(typeof shiftsItem === 'object' && 'growerChangeMeetingsExpected' in shiftsItem)
{
shiftsItemObject.growerChangeMeetingsExpected = (function(){
if(typeof shiftsItem.growerChangeMeetingsExpected !== 'number')
{
return Number.isInteger(Number(shiftsItem.growerChangeMeetingsExpected)) ? Number(shiftsItem.growerChangeMeetingsExpected) : Math.floor(Number(shiftsItem.growerChangeMeetingsExpected));
}
return Number.isInteger(shiftsItem.growerChangeMeetingsExpected) ? shiftsItem.growerChangeMeetingsExpected : Math.floor(shiftsItem.growerChangeMeetingsExpected);
}());
}
else
{
shiftsItemObject.growerChangeMeetingsExpected = 0;
}
if(typeof shiftsItem === 'object' && 'growerChangeMeetingsScore' in shiftsItem)
{
shiftsItemObject.growerChangeMeetingsScore = (function(){
if(typeof shiftsItem.growerChangeMeetingsScore !== 'number')
{
return Number.isInteger(Number(shiftsItem.growerChangeMeetingsScore)) ? Number(shiftsItem.growerChangeMeetingsScore) : Math.floor(Number(shiftsItem.growerChangeMeetingsScore));
}
return Number.isInteger(shiftsItem.growerChangeMeetingsScore) ? shiftsItem.growerChangeMeetingsScore : Math.floor(shiftsItem.growerChangeMeetingsScore);
}());
}
else
{
shiftsItemObject.growerChangeMeetingsScore = 0;
}
return shiftsItemObject;
}());
});
}());
}
else
{
resultObject.shifts = [];
}
if(typeof result === 'object' && 'shiftHourlyEntries' in result)
{
resultObject.shiftHourlyEntries = (function(){
if(Array.isArray(result.shiftHourlyEntries) !== true)
{
return [];
}
return result.shiftHourlyEntries.map((shiftHourlyEntriesItem) => {
return (function(){
let shiftHourlyEntriesItemObject = {};
if(typeof shiftHourlyEntriesItem === 'object' && 'siteId' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.siteId = (function(){
if(typeof shiftHourlyEntriesItem.siteId !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.siteId)) ? Number(shiftHourlyEntriesItem.siteId) : Math.floor(Number(shiftHourlyEntriesItem.siteId));
}
return Number.isInteger(shiftHourlyEntriesItem.siteId) ? shiftHourlyEntriesItem.siteId : Math.floor(shiftHourlyEntriesItem.siteId);
}());
}
else
{
shiftHourlyEntriesItemObject.siteId = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'siteName' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.siteName = (function(){
if(typeof shiftHourlyEntriesItem.siteName !== 'string')
{
return String(shiftHourlyEntriesItem.siteName);
}
return shiftHourlyEntriesItem.siteName;
}());
}
else
{
shiftHourlyEntriesItemObject.siteName = "";
}
if(typeof shiftHourlyEntriesItem === 'object' && 'packingLineId' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.packingLineId = (function(){
if(typeof shiftHourlyEntriesItem.packingLineId !== 'string')
{
return String(shiftHourlyEntriesItem.packingLineId);
}
return shiftHourlyEntriesItem.packingLineId;
}());
}
else
{
shiftHourlyEntriesItemObject.packingLineId = "";
}
if(typeof shiftHourlyEntriesItem === 'object' && 'packingLineName' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.packingLineName = (function(){
if(typeof shiftHourlyEntriesItem.packingLineName !== 'string')
{
return String(shiftHourlyEntriesItem.packingLineName);
}
return shiftHourlyEntriesItem.packingLineName;
}());
}
else
{
shiftHourlyEntriesItemObject.packingLineName = "";
}
if(typeof shiftHourlyEntriesItem === 'object' && 'shiftId' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.shiftId = (function(){
if(typeof shiftHourlyEntriesItem.shiftId !== 'string')
{
return String(shiftHourlyEntriesItem.shiftId);
}
return shiftHourlyEntriesItem.shiftId;
}());
}
else
{
shiftHourlyEntriesItemObject.shiftId = "";
}
if(typeof shiftHourlyEntriesItem === 'object' && 'shiftType' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.shiftType = (function(){
if(typeof shiftHourlyEntriesItem.shiftType !== 'string')
{
return String(shiftHourlyEntriesItem.shiftType);
}
return shiftHourlyEntriesItem.shiftType;
}());
}
else
{
shiftHourlyEntriesItemObject.shiftType = "";
}
if(typeof shiftHourlyEntriesItem === 'object' && 'isoWeek' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.isoWeek = (function(){
if(typeof shiftHourlyEntriesItem.isoWeek !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.isoWeek)) ? Number(shiftHourlyEntriesItem.isoWeek) : Math.floor(Number(shiftHourlyEntriesItem.isoWeek));
}
return Number.isInteger(shiftHourlyEntriesItem.isoWeek) ? shiftHourlyEntriesItem.isoWeek : Math.floor(shiftHourlyEntriesItem.isoWeek);
}());
}
else
{
shiftHourlyEntriesItemObject.isoWeek = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'startTimestamp' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.startTimestamp = (function(){
if(typeof shiftHourlyEntriesItem.startTimestamp !== 'string')
{
return new Date(String(shiftHourlyEntriesItem.startTimestamp));
}
return new Date(shiftHourlyEntriesItem.startTimestamp);
}());
}
else
{
shiftHourlyEntriesItemObject.startTimestamp = new Date();
}
if(typeof shiftHourlyEntriesItem === 'object' && 'endTimestamp' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.endTimestamp = (function(){
if(shiftHourlyEntriesItem.endTimestamp === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.endTimestamp !== 'string')
{
return new Date(String(shiftHourlyEntriesItem.endTimestamp));
}
return new Date(shiftHourlyEntriesItem.endTimestamp);
}());
}
else
{
shiftHourlyEntriesItemObject.endTimestamp = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'lineManagerName' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.lineManagerName = (function(){
if(shiftHourlyEntriesItem.lineManagerName === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.lineManagerName !== 'string')
{
return String(shiftHourlyEntriesItem.lineManagerName);
}
return shiftHourlyEntriesItem.lineManagerName;
}());
}
else
{
shiftHourlyEntriesItemObject.lineManagerName = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'qualityManagerName' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.qualityManagerName = (function(){
if(shiftHourlyEntriesItem.qualityManagerName === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.qualityManagerName !== 'string')
{
return String(shiftHourlyEntriesItem.qualityManagerName);
}
return shiftHourlyEntriesItem.qualityManagerName;
}());
}
else
{
shiftHourlyEntriesItemObject.qualityManagerName = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'varietyIds' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.varietyIds = (function(){
if(Array.isArray(shiftHourlyEntriesItem.varietyIds) !== true)
{
return [];
}
return shiftHourlyEntriesItem.varietyIds.map((varietyIdsItem) => {
return (function(){
if(typeof varietyIdsItem !== 'string')
{
return String(varietyIdsItem);
}
return varietyIdsItem;
}());
});
}());
}
else
{
shiftHourlyEntriesItemObject.varietyIds = [];
}
if(typeof shiftHourlyEntriesItem === 'object' && 'varietyCodes' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.varietyCodes = (function(){
if(Array.isArray(shiftHourlyEntriesItem.varietyCodes) !== true)
{
return [];
}
return shiftHourlyEntriesItem.varietyCodes.map((varietyCodesItem) => {
return (function(){
if(typeof varietyCodesItem !== 'string')
{
return String(varietyCodesItem);
}
return varietyCodesItem;
}());
});
}());
}
else
{
shiftHourlyEntriesItemObject.varietyCodes = [];
}
if(typeof shiftHourlyEntriesItem === 'object' && 'growingMethodIds' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.growingMethodIds = (function(){
if(Array.isArray(shiftHourlyEntriesItem.growingMethodIds) !== true)
{
return [];
}
return shiftHourlyEntriesItem.growingMethodIds.map((growingMethodIdsItem) => {
return (function(){
if(typeof growingMethodIdsItem !== 'string')
{
return String(growingMethodIdsItem);
}
return growingMethodIdsItem;
}());
});
}());
}
else
{
shiftHourlyEntriesItemObject.growingMethodIds = [];
}
if(typeof shiftHourlyEntriesItem === 'object' && 'growingMethodCodes' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.growingMethodCodes = (function(){
if(Array.isArray(shiftHourlyEntriesItem.growingMethodCodes) !== true)
{
return [];
}
return shiftHourlyEntriesItem.growingMethodCodes.map((growingMethodCodesItem) => {
return (function(){
if(typeof growingMethodCodesItem !== 'string')
{
return String(growingMethodCodesItem);
}
return growingMethodCodesItem;
}());
});
}());
}
else
{
shiftHourlyEntriesItemObject.growingMethodCodes = [];
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalBinsTipped' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalBinsTipped = (function(){
if(typeof shiftHourlyEntriesItem.totalBinsTipped !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalBinsTipped)) ? Number(shiftHourlyEntriesItem.totalBinsTipped) : Math.floor(Number(shiftHourlyEntriesItem.totalBinsTipped));
}
return Number.isInteger(shiftHourlyEntriesItem.totalBinsTipped) ? shiftHourlyEntriesItem.totalBinsTipped : Math.floor(shiftHourlyEntriesItem.totalBinsTipped);
}());
}
else
{
shiftHourlyEntriesItemObject.totalBinsTipped = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalProductionTime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalProductionTime = (function(){
if(typeof shiftHourlyEntriesItem.totalProductionTime !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalProductionTime)) ? Number(shiftHourlyEntriesItem.totalProductionTime) : Math.floor(Number(shiftHourlyEntriesItem.totalProductionTime));
}
return Number.isInteger(shiftHourlyEntriesItem.totalProductionTime) ? shiftHourlyEntriesItem.totalProductionTime : Math.floor(shiftHourlyEntriesItem.totalProductionTime);
}());
}
else
{
shiftHourlyEntriesItemObject.totalProductionTime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalScheduledBreakTime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalScheduledBreakTime = (function(){
if(typeof shiftHourlyEntriesItem.totalScheduledBreakTime !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalScheduledBreakTime)) ? Number(shiftHourlyEntriesItem.totalScheduledBreakTime) : Math.floor(Number(shiftHourlyEntriesItem.totalScheduledBreakTime));
}
return Number.isInteger(shiftHourlyEntriesItem.totalScheduledBreakTime) ? shiftHourlyEntriesItem.totalScheduledBreakTime : Math.floor(shiftHourlyEntriesItem.totalScheduledBreakTime);
}());
}
else
{
shiftHourlyEntriesItemObject.totalScheduledBreakTime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalDowntime = (function(){
if(typeof shiftHourlyEntriesItem.totalDowntime !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalDowntime)) ? Number(shiftHourlyEntriesItem.totalDowntime) : Math.floor(Number(shiftHourlyEntriesItem.totalDowntime));
}
return Number.isInteger(shiftHourlyEntriesItem.totalDowntime) ? shiftHourlyEntriesItem.totalDowntime : Math.floor(shiftHourlyEntriesItem.totalDowntime);
}());
}
else
{
shiftHourlyEntriesItemObject.totalDowntime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'downtimeEventsCount' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.downtimeEventsCount = (function(){
if(typeof shiftHourlyEntriesItem.downtimeEventsCount !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.downtimeEventsCount)) ? Number(shiftHourlyEntriesItem.downtimeEventsCount) : Math.floor(Number(shiftHourlyEntriesItem.downtimeEventsCount));
}
return Number.isInteger(shiftHourlyEntriesItem.downtimeEventsCount) ? shiftHourlyEntriesItem.downtimeEventsCount : Math.floor(shiftHourlyEntriesItem.downtimeEventsCount);
}());
}
else
{
shiftHourlyEntriesItemObject.downtimeEventsCount = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'downtimeEventsAverageDuration' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.downtimeEventsAverageDuration = (function(){
if(typeof shiftHourlyEntriesItem.downtimeEventsAverageDuration !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration)) ? Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration) : Math.floor(Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration));
}
return Number.isInteger(shiftHourlyEntriesItem.downtimeEventsAverageDuration) ? shiftHourlyEntriesItem.downtimeEventsAverageDuration : Math.floor(shiftHourlyEntriesItem.downtimeEventsAverageDuration);
}());
}
else
{
shiftHourlyEntriesItemObject.downtimeEventsAverageDuration = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1ManningTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1ManningTarget = (function(){
if(shiftHourlyEntriesItem.class1ManningTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1ManningTarget !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class1ManningTarget)) ? Number(shiftHourlyEntriesItem.class1ManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.class1ManningTarget));
}
return Number.isInteger(shiftHourlyEntriesItem.class1ManningTarget) ? shiftHourlyEntriesItem.class1ManningTarget : Math.floor(shiftHourlyEntriesItem.class1ManningTarget);
}());
}
else
{
shiftHourlyEntriesItemObject.class1ManningTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1Manning' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1Manning = (function(){
if(shiftHourlyEntriesItem.class1Manning === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1Manning !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class1Manning)) ? Number(shiftHourlyEntriesItem.class1Manning) : Math.floor(Number(shiftHourlyEntriesItem.class1Manning));
}
return Number.isInteger(shiftHourlyEntriesItem.class1Manning) ? shiftHourlyEntriesItem.class1Manning : Math.floor(shiftHourlyEntriesItem.class1Manning);
}());
}
else
{
shiftHourlyEntriesItemObject.class1Manning = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1ManningPercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1ManningPercentage = (function(){
if(shiftHourlyEntriesItem.class1ManningPercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1ManningPercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.class1ManningPercentage);
}
return shiftHourlyEntriesItem.class1ManningPercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.class1ManningPercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2ManningTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2ManningTarget = (function(){
if(shiftHourlyEntriesItem.class2ManningTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2ManningTarget !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class2ManningTarget)) ? Number(shiftHourlyEntriesItem.class2ManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.class2ManningTarget));
}
return Number.isInteger(shiftHourlyEntriesItem.class2ManningTarget) ? shiftHourlyEntriesItem.class2ManningTarget : Math.floor(shiftHourlyEntriesItem.class2ManningTarget);
}());
}
else
{
shiftHourlyEntriesItemObject.class2ManningTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2Manning' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2Manning = (function(){
if(shiftHourlyEntriesItem.class2Manning === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2Manning !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class2Manning)) ? Number(shiftHourlyEntriesItem.class2Manning) : Math.floor(Number(shiftHourlyEntriesItem.class2Manning));
}
return Number.isInteger(shiftHourlyEntriesItem.class2Manning) ? shiftHourlyEntriesItem.class2Manning : Math.floor(shiftHourlyEntriesItem.class2Manning);
}());
}
else
{
shiftHourlyEntriesItemObject.class2Manning = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2ManningPercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2ManningPercentage = (function(){
if(shiftHourlyEntriesItem.class2ManningPercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2ManningPercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.class2ManningPercentage);
}
return shiftHourlyEntriesItem.class2ManningPercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.class2ManningPercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalManningTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalManningTarget = (function(){
if(shiftHourlyEntriesItem.totalManningTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.totalManningTarget !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalManningTarget)) ? Number(shiftHourlyEntriesItem.totalManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.totalManningTarget));
}
return Number.isInteger(shiftHourlyEntriesItem.totalManningTarget) ? shiftHourlyEntriesItem.totalManningTarget : Math.floor(shiftHourlyEntriesItem.totalManningTarget);
}());
}
else
{
shiftHourlyEntriesItemObject.totalManningTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalManning' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalManning = (function(){
if(shiftHourlyEntriesItem.totalManning === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.totalManning !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalManning)) ? Number(shiftHourlyEntriesItem.totalManning) : Math.floor(Number(shiftHourlyEntriesItem.totalManning));
}
return Number.isInteger(shiftHourlyEntriesItem.totalManning) ? shiftHourlyEntriesItem.totalManning : Math.floor(shiftHourlyEntriesItem.totalManning);
}());
}
else
{
shiftHourlyEntriesItemObject.totalManning = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalManningPercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalManningPercentage = (function(){
if(shiftHourlyEntriesItem.totalManningPercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.totalManningPercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.totalManningPercentage);
}
return shiftHourlyEntriesItem.totalManningPercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.totalManningPercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'costPerManningUnitHour' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.costPerManningUnitHour = (function(){
if(shiftHourlyEntriesItem.costPerManningUnitHour === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.costPerManningUnitHour !== 'number')
{
return Number(shiftHourlyEntriesItem.costPerManningUnitHour);
}
return shiftHourlyEntriesItem.costPerManningUnitHour;
}());
}
else
{
shiftHourlyEntriesItemObject.costPerManningUnitHour = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalMinutesWorked' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalMinutesWorked = (function(){
if(typeof shiftHourlyEntriesItem.totalMinutesWorked !== 'number')
{
return Number(shiftHourlyEntriesItem.totalMinutesWorked);
}
return shiftHourlyEntriesItem.totalMinutesWorked;
}());
}
else
{
shiftHourlyEntriesItemObject.totalMinutesWorked = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalMinutesWorkedExcludingDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalMinutesWorkedExcludingDowntime = (function(){
if(typeof shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime !== 'number')
{
return Number(shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime);
}
return shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime;
}());
}
else
{
shiftHourlyEntriesItemObject.totalMinutesWorkedExcludingDowntime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalMinutesPaid' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalMinutesPaid = (function(){
if(typeof shiftHourlyEntriesItem.totalMinutesPaid !== 'number')
{
return Number(shiftHourlyEntriesItem.totalMinutesPaid);
}
return shiftHourlyEntriesItem.totalMinutesPaid;
}());
}
else
{
shiftHourlyEntriesItemObject.totalMinutesPaid = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1TotalManningCost' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1TotalManningCost = (function(){
if(shiftHourlyEntriesItem.class1TotalManningCost === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1TotalManningCost !== 'number')
{
return Number(shiftHourlyEntriesItem.class1TotalManningCost);
}
return shiftHourlyEntriesItem.class1TotalManningCost;
}());
}
else
{
shiftHourlyEntriesItemObject.class1TotalManningCost = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2TotalManningCost' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2TotalManningCost = (function(){
if(shiftHourlyEntriesItem.class2TotalManningCost === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2TotalManningCost !== 'number')
{
return Number(shiftHourlyEntriesItem.class2TotalManningCost);
}
return shiftHourlyEntriesItem.class2TotalManningCost;
}());
}
else
{
shiftHourlyEntriesItemObject.class2TotalManningCost = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1DowntimeManningCost' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1DowntimeManningCost = (function(){
if(shiftHourlyEntriesItem.class1DowntimeManningCost === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1DowntimeManningCost !== 'number')
{
return Number(shiftHourlyEntriesItem.class1DowntimeManningCost);
}
return shiftHourlyEntriesItem.class1DowntimeManningCost;
}());
}
else
{
shiftHourlyEntriesItemObject.class1DowntimeManningCost = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2DowntimeManningCost' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2DowntimeManningCost = (function(){
if(shiftHourlyEntriesItem.class2DowntimeManningCost === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2DowntimeManningCost !== 'number')
{
return Number(shiftHourlyEntriesItem.class2DowntimeManningCost);
}
return shiftHourlyEntriesItem.class2DowntimeManningCost;
}());
}
else
{
shiftHourlyEntriesItemObject.class2DowntimeManningCost = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1CostPerTrayTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1CostPerTrayTarget = (function(){
if(shiftHourlyEntriesItem.class1CostPerTrayTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1CostPerTrayTarget !== 'number')
{
return Number(shiftHourlyEntriesItem.class1CostPerTrayTarget);
}
return shiftHourlyEntriesItem.class1CostPerTrayTarget;
}());
}
else
{
shiftHourlyEntriesItemObject.class1CostPerTrayTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1CostPerTrayActual' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1CostPerTrayActual = (function(){
if(shiftHourlyEntriesItem.class1CostPerTrayActual === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1CostPerTrayActual !== 'number')
{
return Number(shiftHourlyEntriesItem.class1CostPerTrayActual);
}
return shiftHourlyEntriesItem.class1CostPerTrayActual;
}());
}
else
{
shiftHourlyEntriesItemObject.class1CostPerTrayActual = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2CostPerTrayActual' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2CostPerTrayActual = (function(){
if(shiftHourlyEntriesItem.class2CostPerTrayActual === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2CostPerTrayActual !== 'number')
{
return Number(shiftHourlyEntriesItem.class2CostPerTrayActual);
}
return shiftHourlyEntriesItem.class2CostPerTrayActual;
}());
}
else
{
shiftHourlyEntriesItemObject.class2CostPerTrayActual = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalClass1Trays' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalClass1Trays = (function(){
if(typeof shiftHourlyEntriesItem.totalClass1Trays !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalClass1Trays)) ? Number(shiftHourlyEntriesItem.totalClass1Trays) : Math.floor(Number(shiftHourlyEntriesItem.totalClass1Trays));
}
return Number.isInteger(shiftHourlyEntriesItem.totalClass1Trays) ? shiftHourlyEntriesItem.totalClass1Trays : Math.floor(shiftHourlyEntriesItem.totalClass1Trays);
}());
}
else
{
shiftHourlyEntriesItemObject.totalClass1Trays = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'totalClass2Trays' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.totalClass2Trays = (function(){
if(typeof shiftHourlyEntriesItem.totalClass2Trays !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.totalClass2Trays)) ? Number(shiftHourlyEntriesItem.totalClass2Trays) : Math.floor(Number(shiftHourlyEntriesItem.totalClass2Trays));
}
return Number.isInteger(shiftHourlyEntriesItem.totalClass2Trays) ? shiftHourlyEntriesItem.totalClass2Trays : Math.floor(shiftHourlyEntriesItem.totalClass2Trays);
}());
}
else
{
shiftHourlyEntriesItemObject.totalClass2Trays = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1TraysPerHourExcludingDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntime = (function(){
if(typeof shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime)) ? Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime));
}
return Number.isInteger(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime) ? shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime : Math.floor(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime);
}());
}
else
{
shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntimeTarget = (function(){
if(typeof shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget));
}
return Number.isInteger(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget) ? shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget);
}());
}
else
{
shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1TraysPerManHourExcludingDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1TraysPerManHourExcludingDowntime = (function(){
if(shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime !== 'number')
{
return Number(shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime);
}
return shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime;
}());
}
else
{
shiftHourlyEntriesItemObject.class1TraysPerManHourExcludingDowntime = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2TraysPerHourExcludingDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2TraysPerHourExcludingDowntime = (function(){
if(typeof shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime !== 'number')
{
return Number.isInteger(Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime)) ? Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime));
}
return Number.isInteger(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime) ? shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime : Math.floor(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime);
}());
}
else
{
shiftHourlyEntriesItemObject.class2TraysPerHourExcludingDowntime = 0;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class2TraysPerManHourExcludingDowntime' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class2TraysPerManHourExcludingDowntime = (function(){
if(shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime !== 'number')
{
return Number(shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime);
}
return shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime;
}());
}
else
{
shiftHourlyEntriesItemObject.class2TraysPerManHourExcludingDowntime = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1LayeredPercentageTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1LayeredPercentageTarget = (function(){
if(shiftHourlyEntriesItem.class1LayeredPercentageTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1LayeredPercentageTarget !== 'number')
{
return Number(shiftHourlyEntriesItem.class1LayeredPercentageTarget);
}
return shiftHourlyEntriesItem.class1LayeredPercentageTarget;
}());
}
else
{
shiftHourlyEntriesItemObject.class1LayeredPercentageTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1LayeredPercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1LayeredPercentage = (function(){
if(shiftHourlyEntriesItem.class1LayeredPercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1LayeredPercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.class1LayeredPercentage);
}
return shiftHourlyEntriesItem.class1LayeredPercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.class1LayeredPercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'class1BulkPercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.class1BulkPercentage = (function(){
if(shiftHourlyEntriesItem.class1BulkPercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.class1BulkPercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.class1BulkPercentage);
}
return shiftHourlyEntriesItem.class1BulkPercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.class1BulkPercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'averageClass1Percentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.averageClass1Percentage = (function(){
if(shiftHourlyEntriesItem.averageClass1Percentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.averageClass1Percentage !== 'number')
{
return Number(shiftHourlyEntriesItem.averageClass1Percentage);
}
return shiftHourlyEntriesItem.averageClass1Percentage;
}());
}
else
{
shiftHourlyEntriesItemObject.averageClass1Percentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'qualityR600IdealSamplesTarget' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.qualityR600IdealSamplesTarget = (function(){
if(shiftHourlyEntriesItem.qualityR600IdealSamplesTarget === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.qualityR600IdealSamplesTarget !== 'number')
{
return Number(shiftHourlyEntriesItem.qualityR600IdealSamplesTarget);
}
return shiftHourlyEntriesItem.qualityR600IdealSamplesTarget;
}());
}
else
{
shiftHourlyEntriesItemObject.qualityR600IdealSamplesTarget = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'qualityR600IdealSamplesActual' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.qualityR600IdealSamplesActual = (function(){
if(shiftHourlyEntriesItem.qualityR600IdealSamplesActual === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.qualityR600IdealSamplesActual !== 'number')
{
return Number(shiftHourlyEntriesItem.qualityR600IdealSamplesActual);
}
return shiftHourlyEntriesItem.qualityR600IdealSamplesActual;
}());
}
else
{
shiftHourlyEntriesItemObject.qualityR600IdealSamplesActual = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'primaryIssueCategory' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.primaryIssueCategory = (function(){
if(shiftHourlyEntriesItem.primaryIssueCategory === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.primaryIssueCategory !== 'string')
{
return String(shiftHourlyEntriesItem.primaryIssueCategory);
}
return shiftHourlyEntriesItem.primaryIssueCategory;
}());
}
else
{
shiftHourlyEntriesItemObject.primaryIssueCategory = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'primaryIssueTag' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.primaryIssueTag = (function(){
if(shiftHourlyEntriesItem.primaryIssueTag === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.primaryIssueTag !== 'string')
{
return String(shiftHourlyEntriesItem.primaryIssueTag);
}
return shiftHourlyEntriesItem.primaryIssueTag;
}());
}
else
{
shiftHourlyEntriesItemObject.primaryIssueTag = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'primaryIssuePercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.primaryIssuePercentage = (function(){
if(shiftHourlyEntriesItem.primaryIssuePercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.primaryIssuePercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.primaryIssuePercentage);
}
return shiftHourlyEntriesItem.primaryIssuePercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.primaryIssuePercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'secondaryIssueCategory' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.secondaryIssueCategory = (function(){
if(shiftHourlyEntriesItem.secondaryIssueCategory === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.secondaryIssueCategory !== 'string')
{
return String(shiftHourlyEntriesItem.secondaryIssueCategory);
}
return shiftHourlyEntriesItem.secondaryIssueCategory;
}());
}
else
{
shiftHourlyEntriesItemObject.secondaryIssueCategory = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'secondaryIssueTag' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.secondaryIssueTag = (function(){
if(shiftHourlyEntriesItem.secondaryIssueTag === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.secondaryIssueTag !== 'string')
{
return String(shiftHourlyEntriesItem.secondaryIssueTag);
}
return shiftHourlyEntriesItem.secondaryIssueTag;
}());
}
else
{
shiftHourlyEntriesItemObject.secondaryIssueTag = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'secondaryIssuePercentage' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.secondaryIssuePercentage = (function(){
if(shiftHourlyEntriesItem.secondaryIssuePercentage === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.secondaryIssuePercentage !== 'number')
{
return Number(shiftHourlyEntriesItem.secondaryIssuePercentage);
}
return shiftHourlyEntriesItem.secondaryIssuePercentage;
}());
}
else
{
shiftHourlyEntriesItemObject.secondaryIssuePercentage = null;
}
if(typeof shiftHourlyEntriesItem === 'object' && 'nextHourFocus' in shiftHourlyEntriesItem)
{
shiftHourlyEntriesItemObject.nextHourFocus = (function(){
if(shiftHourlyEntriesItem.nextHourFocus === null)
{
return null;
}
if(typeof shiftHourlyEntriesItem.nextHourFocus !== 'string')
{
return String(shiftHourlyEntriesItem.nextHourFocus);
}
return shiftHourlyEntriesItem.nextHourFocus;
}());
}
else
{
shiftHourlyEntriesItemObject.nextHourFocus = null;
}
return shiftHourlyEntriesItemObject;
}());
});
}());
}
else
{
resultObject.shiftHourlyEntries = [];
}
if(typeof result === 'object' && 'downtimeEvents' in result)
{
resultObject.downtimeEvents = (function(){
if(Array.isArray(result.downtimeEvents) !== true)
{
return [];
}
return result.downtimeEvents.map((downtimeEventsItem) => {
return (function(){
let downtimeEventsItemObject = {};
if(typeof downtimeEventsItem === 'object' && 'siteId' in downtimeEventsItem)
{
downtimeEventsItemObject.siteId = (function(){
if(typeof downtimeEventsItem.siteId !== 'number')
{
return Number.isInteger(Number(downtimeEventsItem.siteId)) ? Number(downtimeEventsItem.siteId) : Math.floor(Number(downtimeEventsItem.siteId));
}
return Number.isInteger(downtimeEventsItem.siteId) ? downtimeEventsItem.siteId : Math.floor(downtimeEventsItem.siteId);
}());
}
else
{
downtimeEventsItemObject.siteId = 0;
}
if(typeof downtimeEventsItem === 'object' && 'siteName' in downtimeEventsItem)
{
downtimeEventsItemObject.siteName = (function(){
if(typeof downtimeEventsItem.siteName !== 'string')
{
return String(downtimeEventsItem.siteName);
}
return downtimeEventsItem.siteName;
}());
}
else
{
downtimeEventsItemObject.siteName = "";
}
if(typeof downtimeEventsItem === 'object' && 'packingLineId' in downtimeEventsItem)
{
downtimeEventsItemObject.packingLineId = (function(){
if(typeof downtimeEventsItem.packingLineId !== 'string')
{
return String(downtimeEventsItem.packingLineId);
}
return downtimeEventsItem.packingLineId;
}());
}
else
{
downtimeEventsItemObject.packingLineId = "";
}
if(typeof downtimeEventsItem === 'object' && 'packingLineName' in downtimeEventsItem)
{
downtimeEventsItemObject.packingLineName = (function(){
if(typeof downtimeEventsItem.packingLineName !== 'string')
{
return String(downtimeEventsItem.packingLineName);
}
return downtimeEventsItem.packingLineName;
}());
}
else
{
downtimeEventsItemObject.packingLineName = "";
}
if(typeof downtimeEventsItem === 'object' && 'shiftId' in downtimeEventsItem)
{
downtimeEventsItemObject.shiftId = (function(){
if(typeof downtimeEventsItem.shiftId !== 'string')
{
return String(downtimeEventsItem.shiftId);
}
return downtimeEventsItem.shiftId;
}());
}
else
{
downtimeEventsItemObject.shiftId = "";
}
if(typeof downtimeEventsItem === 'object' && 'shiftType' in downtimeEventsItem)
{
downtimeEventsItemObject.shiftType = (function(){
if(typeof downtimeEventsItem.shiftType !== 'string')
{
return String(downtimeEventsItem.shiftType);
}
return downtimeEventsItem.shiftType;
}());
}
else
{
downtimeEventsItemObject.shiftType = "";
}
if(typeof downtimeEventsItem === 'object' && 'isoWeek' in downtimeEventsItem)
{
downtimeEventsItemObject.isoWeek = (function(){
if(typeof downtimeEventsItem.isoWeek !== 'number')
{
return Number.isInteger(Number(downtimeEventsItem.isoWeek)) ? Number(downtimeEventsItem.isoWeek) : Math.floor(Number(downtimeEventsItem.isoWeek));
}
return Number.isInteger(downtimeEventsItem.isoWeek) ? downtimeEventsItem.isoWeek : Math.floor(downtimeEventsItem.isoWeek);
}());
}
else
{
downtimeEventsItemObject.isoWeek = 0;
}
if(typeof downtimeEventsItem === 'object' && 'startTimestamp' in downtimeEventsItem)
{
downtimeEventsItemObject.startTimestamp = (function(){
if(typeof downtimeEventsItem.startTimestamp !== 'string')
{
return new Date(String(downtimeEventsItem.startTimestamp));
}
return new Date(downtimeEventsItem.startTimestamp);
}());
}
else
{
downtimeEventsItemObject.startTimestamp = new Date();
}
if(typeof downtimeEventsItem === 'object' && 'endTimestamp' in downtimeEventsItem)
{
downtimeEventsItemObject.endTimestamp = (function(){
if(downtimeEventsItem.endTimestamp === null)
{
return null;
}
if(typeof downtimeEventsItem.endTimestamp !== 'string')
{
return new Date(String(downtimeEventsItem.endTimestamp));
}
return new Date(downtimeEventsItem.endTimestamp);
}());
}
else
{
downtimeEventsItemObject.endTimestamp = null;
}
if(typeof downtimeEventsItem === 'object' && 'reasonCategory' in downtimeEventsItem)
{
downtimeEventsItemObject.reasonCategory = (function(){
if(downtimeEventsItem.reasonCategory === null)
{
return null;
}
if(typeof downtimeEventsItem.reasonCategory !== 'string')
{
return String(downtimeEventsItem.reasonCategory);
}
return downtimeEventsItem.reasonCategory;
}());
}
else
{
downtimeEventsItemObject.reasonCategory = null;
}
if(typeof downtimeEventsItem === 'object' && 'reasonTag' in downtimeEventsItem)
{
downtimeEventsItemObject.reasonTag = (function(){
if(downtimeEventsItem.reasonTag === null)
{
return null;
}
if(typeof downtimeEventsItem.reasonTag !== 'string')
{
return String(downtimeEventsItem.reasonTag);
}
return downtimeEventsItem.reasonTag;
}());
}
else
{
downtimeEventsItemObject.reasonTag = null;
}
if(typeof downtimeEventsItem === 'object' && 'remedyAction' in downtimeEventsItem)
{
downtimeEventsItemObject.remedyAction = (function(){
if(downtimeEventsItem.remedyAction === null)
{
return null;
}
if(typeof downtimeEventsItem.remedyAction !== 'string')
{
return String(downtimeEventsItem.remedyAction);
}
return downtimeEventsItem.remedyAction;
}());
}
else
{
downtimeEventsItemObject.remedyAction = null;
}
return downtimeEventsItemObject;
}());
});
}());
}
else
{
resultObject.downtimeEvents = [];
}
if(typeof result === 'object' && 'packagingConsumption' in result)
{
resultObject.packagingConsumption = (function(){
if(Array.isArray(result.packagingConsumption) !== true)
{
return [];
}
return result.packagingConsumption.map((packagingConsumptionItem) => {
return (function(){
let packagingConsumptionItemObject = {};
if(typeof packagingConsumptionItem === 'object' && 'siteId' in packagingConsumptionItem)
{
packagingConsumptionItemObject.siteId = (function(){
if(typeof packagingConsumptionItem.siteId !== 'number')
{
return Number.isInteger(Number(packagingConsumptionItem.siteId)) ? Number(packagingConsumptionItem.siteId) : Math.floor(Number(packagingConsumptionItem.siteId));
}
return Number.isInteger(packagingConsumptionItem.siteId) ? packagingConsumptionItem.siteId : Math.floor(packagingConsumptionItem.siteId);
}());
}
else
{
packagingConsumptionItemObject.siteId = 0;
}
if(typeof packagingConsumptionItem === 'object' && 'siteName' in packagingConsumptionItem)
{
packagingConsumptionItemObject.siteName = (function(){
if(typeof packagingConsumptionItem.siteName !== 'string')
{
return String(packagingConsumptionItem.siteName);
}
return packagingConsumptionItem.siteName;
}());
}
else
{
packagingConsumptionItemObject.siteName = "";
}
if(typeof packagingConsumptionItem === 'object' && 'packingLineId' in packagingConsumptionItem)
{
packagingConsumptionItemObject.packingLineId = (function(){
if(typeof packagingConsumptionItem.packingLineId !== 'string')
{
return String(packagingConsumptionItem.packingLineId);
}
return packagingConsumptionItem.packingLineId;
}());
}
else
{
packagingConsumptionItemObject.packingLineId = "";
}
if(typeof packagingConsumptionItem === 'object' && 'packingLineName' in packagingConsumptionItem)
{
packagingConsumptionItemObject.packingLineName = (function(){
if(typeof packagingConsumptionItem.packingLineName !== 'string')
{
return String(packagingConsumptionItem.packingLineName);
}
return packagingConsumptionItem.packingLineName;
}());
}
else
{
packagingConsumptionItemObject.packingLineName = "";
}
if(typeof packagingConsumptionItem === 'object' && 'packrunId' in packagingConsumptionItem)
{
packagingConsumptionItemObject.packrunId = (function(){
if(typeof packagingConsumptionItem.packrunId !== 'string')
{
return String(packagingConsumptionItem.packrunId);
}
return packagingConsumptionItem.packrunId;
}());
}
else
{
packagingConsumptionItemObject.packrunId = "";
}
if(typeof packagingConsumptionItem === 'object' && 'packrunName' in packagingConsumptionItem)
{
packagingConsumptionItemObject.packrunName = (function(){
if(typeof packagingConsumptionItem.packrunName !== 'string')
{
return String(packagingConsumptionItem.packrunName);
}
return packagingConsumptionItem.packrunName;
}());
}
else
{
packagingConsumptionItemObject.packrunName = "";
}
if(typeof packagingConsumptionItem === 'object' && 'varietyId' in packagingConsumptionItem)
{
packagingConsumptionItemObject.varietyId = (function(){
if(typeof packagingConsumptionItem.varietyId !== 'string')
{
return String(packagingConsumptionItem.varietyId);
}
return packagingConsumptionItem.varietyId;
}());
}
else
{
packagingConsumptionItemObject.varietyId = "";
}
if(typeof packagingConsumptionItem === 'object' && 'varietyCode' in packagingConsumptionItem)
{
packagingConsumptionItemObject.varietyCode = (function(){
if(typeof packagingConsumptionItem.varietyCode !== 'string')
{
return String(packagingConsumptionItem.varietyCode);
}
return packagingConsumptionItem.varietyCode;
}());
}
else
{
packagingConsumptionItemObject.varietyCode = "";
}
if(typeof packagingConsumptionItem === 'object' && 'isoWeek' in packagingConsumptionItem)
{
packagingConsumptionItemObject.isoWeek = (function(){
if(typeof packagingConsumptionItem.isoWeek !== 'number')
{
return Number.isInteger(Number(packagingConsumptionItem.isoWeek)) ? Number(packagingConsumptionItem.isoWeek) : Math.floor(Number(packagingConsumptionItem.isoWeek));
}
return Number.isInteger(packagingConsumptionItem.isoWeek) ? packagingConsumptionItem.isoWeek : Math.floor(packagingConsumptionItem.isoWeek);
}());
}
else
{
packagingConsumptionItemObject.isoWeek = 0;
}
if(typeof packagingConsumptionItem === 'object' && 'startTimestamp' in packagingConsumptionItem)
{
packagingConsumptionItemObject.startTimestamp = (function(){
if(typeof packagingConsumptionItem.startTimestamp !== 'string')
{
return new Date(String(packagingConsumptionItem.startTimestamp));
}
return new Date(packagingConsumptionItem.startTimestamp);
}());
}
else
{
packagingConsumptionItemObject.startTimestamp = new Date();
}
if(typeof packagingConsumptionItem === 'object' && 'endTimestamp' in packagingConsumptionItem)
{
packagingConsumptionItemObject.endTimestamp = (function(){
if(packagingConsumptionItem.endTimestamp === null)
{
return null;
}
if(typeof packagingConsumptionItem.endTimestamp !== 'string')
{
return new Date(String(packagingConsumptionItem.endTimestamp));
}
return new Date(packagingConsumptionItem.endTimestamp);
}());
}
else
{
packagingConsumptionItemObject.endTimestamp = null;
}
if(typeof packagingConsumptionItem === 'object' && 'packType' in packagingConsumptionItem)
{
packagingConsumptionItemObject.packType = (function(){
if(typeof packagingConsumptionItem.packType !== 'string')
{
return String(packagingConsumptionItem.packType);
}
return packagingConsumptionItem.packType;
}());
}
else
{
packagingConsumptionItemObject.packType = "";
}
if(typeof packagingConsumptionItem === 'object' && 'quantity' in packagingConsumptionItem)
{
packagingConsumptionItemObject.quantity = (function(){
if(typeof packagingConsumptionItem.quantity !== 'number')
{
return Number.isInteger(Number(packagingConsumptionItem.quantity)) ? Number(packagingConsumptionItem.quantity) : Math.floor(Number(packagingConsumptionItem.quantity));
}
return Number.isInteger(packagingConsumptionItem.quantity) ? packagingConsumptionItem.quantity : Math.floor(packagingConsumptionItem.quantity);
}());
}
else
{
packagingConsumptionItemObject.quantity = 0;
}
return packagingConsumptionItemObject;
}());
});
}());
}
else
{
resultObject.packagingConsumption = [];
}
return resultObject;
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Retrieve Production Data as an Excel Spreadsheet [GET /packhouse/production-data-export/excel]
*
* Request a Production Data Export in the form of an Excel Spreadsheet
*
* @static
* @public
* @return {Promise<boolean>}
*/
static excelExport()
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/packhouse/production-data-export/excel`)
.then((result) => {
resolve(result ?? true);
})
.catch(error => reject(error));
});
}
/**
* Retrieve Production Data as a CSV File [GET /packhouse/production-data-export/csv]
*
* Request a Production Data Export in the form of a CSV File
*
* @static
* @public
* @return {Promise<boolean>}
*/
static csvExport()
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/packhouse/production-data-export/csv`)
.then((result) => {
resolve(result ?? true);
})
.catch(error => reject(error));
});
}
}
export default ProductionDataExportController;
/**
* The Optional Query Parameters for the jsonExport Function
*
* @typedef {Object} ProductionDataExportController.JsonExportQueryParameters
* @property {number[]} [siteIds] A List of Site IDs to Filter by
* @property {string[]} [packingLineIds] A List of Packing Line IDs to Filter by
* @memberof Controllers.Packhouse
*/
/**
* A **PackrunData** Type
*
* @typedef {Object} ProductionDataExportController.PackrunData
* @property {number} siteId ID of the Site where this Packrun occurred
* @property {string} siteName Name of the Site where this Packrun occurred
* @property {string} packingLineId ID of the Packing Line where this Packrun occurred
* @property {string} packingLineName Name of the Packing Line where this Packrun occurred
* @property {number} isoWeek ISO Week when this Packrun occurred
* @property {Date} startTimestamp Timestamp when this Packrun was Started
* @property {?Date} finishTimestamp Timestamp when this Packrun was Finished
* @property {string} packrunId ID of the Packrun
* @property {string} packrunName Name of the Packrun
* @property {string} varietyId ID of the Variety associated with this Packrun
* @property {string} varietyCode Code of the Variety associated with this Packrun
* @property {string} growingMethodId ID of the Growing Method associated with this Packrun
* @property {string} growingMethodCode Code of the Growing Method associated with this Packrun
* @property {string} growerCode Grower Code of the Packrun
* @property {string} growerName Grower Name of the Packrun
* @property {string} maturityArea Maturity Area of the Packrun
* @property {number} allocatedBins Number of Bins Allocated to this Packrun
* @property {number} totalBinsTipped Number of Bins Tipped during this Packrun
* @property {number} totalNetWeightTipped Total Net Fruit Weight Tipped during this Packrun
* @property {number} averageNetWeightPerBin Average Net Fruit Weight per Bin for this Packrun
* @property {number} averageBinsTippedPerHour Average Bins Tipped per Hour during this Packrun
* @property {number} averageBinsTippedPerHourExcludingDowntime Average Bins Tipped per Hour excluding Downtime during this Packrun
* @property {number} averageTimePerTippedBin Average Time Taken in Seconds to Tip a Bin during this Packrun
* @property {number} averageBinTipWeightThroughput Average Throughput in Kilograms per Hour for the Bin Tip during this Packrun
* @property {number} softSortEventsPerBin Number of Soft-Sort Events per Bin Tipped during this Packrun
* @property {number} totalSoftSortEventsCount Total Number of Soft-Sort Events that occurred during this Packrun
* @property {number} averageSoftSortEventsDuration Average Duration in Seconds of a Soft-Sort Event during this Packrun
* @property {number} totalSoftSortEventsDuration Total Duration in Seconds of all Soft-Sort Events that occurred during this Packrun
* @property {?boolean} softSortEventsAccurate Whether the Soft-Sort Events for this Packrun were Accurate according to the Line Manager
* @property {?string} softSortEventsNotAccurateReason A Reason for why the Soft-Sort Events were not Accurate
* @property {number} class1Percentage Class 1 Percentage for this Packrun
* @property {number} class2Percentage Class 2 Percentage for this Packrun
* @property {number} class3Percentage Class 3 Percentage for this Packrun
* @property {number} nssPercentage Non-Standard Supply Percentage for this Packrun
* @property {number} undersizePercentage Undersize Percentage for this Packrun
* @property {number} cdmPercentage Culled / Low Dry Matter Percentage for this Packrun
* @property {number} wastePercentage Waste Percentage for this Packrun
* @property {number} softSortPercentage Soft-Sort Percentage for this Packrun
* @property {number} totalNonClass1Percentage Total Non-Class 1 Percentage for this Packrun
* @property {number} class1Weight Total Class 1 Weight in Kilograms for this Packrun
* @property {number} class2Weight Total Class 2 Weight in Kilograms for this Packrun
* @property {number} class3Weight Total Class 3 Weight in Kilograms for this Packrun
* @property {number} nssWeight Total Non-Standard Supply Weight in Kilograms for this Packrun
* @property {number} undersizeWeight Total Undersize Weight in Kilograms for this Packrun
* @property {number} cdmWeight Total Culled / Low Dry Matter Weight in Kilograms for this Packrun
* @property {number} wasteWeight Total Waste Weight in Kilograms for this Packrun
* @property {number} softSortWeight Total Soft-Sort Weight in Kilograms for this Packrun
* @property {number} totalNonClass1Weight Total Non-Class 1 Weight in Kilograms for this Packrun
* @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Packrun
* @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Packrun
* @property {number} totalClass1FruitCount Total Number of Class 1 Fruit that were Packed during this Packrun
* @property {number} totalClass2FruitCount Total Number of Class 2 Fruit that were Packed during this Packrun
* @property {number} averageClass1TrayWeight Average Class 1 Tray Equivalent Weight in Kilograms for this Packrun
* @property {number} averageClass2TrayWeight Average Class 2 Tray Equivalent Weight in Kilograms for this Packrun
* @property {number} class1TraysPerBin Average Class 1 Trays Produced per Bin Tipped for this Packrun
* @property {number} averageFruitSize Average Fruit Size for this Packrun
* @property {number} averageFruitWeight Average Fruit Weight in Grams for this Packrun
* @property {number} totalRejectBinsCount Total Number of Reject Bins Weighed during this Packrun
* @property {number} totalRejectBinsNetWeight Total Net Fruit Weight in Kilograms captured in Reject Bins during this Packrun
* @property {?number} qualityR600TotalFruitSampled Total Number of R600 Class 1 Fruit Sampled by Quality Control during this Packrun
* @property {?number} qualityR600FruitSampledPercentage Percentage of R600 Class 1 Fruit Sampled by Quality Control during this Packrun
* @property {?number} qualityR600AverageSampledFruitSize Average R600 Class 1 Fruit Size that was Sampled by Quality Control during this Packrun
* @property {?number} qualityR600TotalSamplesCount Total Number of Class 1 R600 Samples Collected by Quality Control during this Packrun
* @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Packrun
* @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Packrun
* @property {?number} qualityR600MinorPackingDefects Percentage of Minor Packing Defects found in Class 1 R600 Samples during this Packrun
* @property {?number} qualityR600MajorPackingDefects Percentage of Major Packing Defects found in Class 1 R600 Samples during this Packrun
* @property {?number} qualityR600Softs Percentage of Soft Fruit found in Class 1 R600 Samples during this Packrun
* @property {?number} qualityR600Cuts Percentage of Cut (Flesh Damaged) Fruit found in Class 1 R600 Samples during this Packrun
* @property {?number} qualityR600Rots Percentage of Rotten Fruit found in Class 1 R600 Samples during this Packrun
* @property {?number} qualityExportFruitInClass2 Percentage of Export Fruit found in Class 2 during this Packrun
* @property {?number} qualityExportFruitInClass3 Percentage of Export Fruit found in Class 3 during this Packrun
* @property {?number} qualityExportFruitInWaste Percentage of Export Fruit found in Waste during this Packrun
* @property {string[]} shiftIds An Array of Shift IDs this Packrun is associated with
* @property {string[]} shiftTypes An Array of Shift Types that were encountered during this Packrun
* @property {string[]} lineManagerNames An Array of Line Managers who were involved with this Packrun
* @property {string[]} qualityManagerNames An Array of Quality Managers who were involved with this Packrun
* @property {number} totalProductionTime Total Shift Production Time in Seconds for this Packrun
* @property {number} totalScheduledBreakTime Total Shift Scheduled Break Time in Seconds for this Packrun
* @property {number} totalDowntime Total Shift Downtime in Seconds for this Packrun
* @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Packrun
* @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Packrun
* @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Packrun
* @property {?number} averageClass1Manning Average Number of People working on the Packing Line (excluding Class 2) during this Packrun
* @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Packrun
* @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Packrun
* @property {?number} averageClass2Manning Average Number of People working in the Class 2 area of the Packing Line during this Packrun
* @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Packrun
* @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Packrun
* @property {?number} averageTotalManning Average Number of People working on the Packing Line during this Packrun
* @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Packrun
* @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Packrun
* @property {number} totalHoursWorked Total Hours Worked during this Packrun. Directly relates to Production Time
* @property {number} totalHoursWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Packrun. Directly relates to Production Time less Downtime
* @property {number} totalHoursPaid Total Hours Paid during this Packrun. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
* @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Packrun
* @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Packrun
* @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Packrun
* @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Packrun
* @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Packrun
* @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Packrun
* @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Packrun
* @property {number} class1TraysPerHour Average Class 1 Tray Equivalents Produced per Hour during this Packrun
* @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Packrun
* @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Packrun
* @property {?number} class1TraysPerManHour Average Class 1 Tray Equivalents Produced per Person per Hour during this Packrun
* @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Packrun
* @property {number} class2TraysPerHour Average Class 2 Tray Equivalents Produced per Hour during this Packrun
* @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Packrun
* @property {?number} class2TraysPerManHour Average Class 2 Tray Equivalents Produced per Person per Hour during this Packrun
* @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Packrun
* @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Packrun
* @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Packrun
* @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Packrun
* @memberof Controllers.Packhouse
*/
/**
* A **ShiftData** Type
*
* @typedef {Object} ProductionDataExportController.ShiftData
* @property {number} siteId ID of the Site where this Shift took place
* @property {string} siteName Name of the Site where this Shift took place
* @property {string} packingLineId ID of the Packing Line where this Shift took place
* @property {string} packingLineName Name of the Packing Line where this Shift took place
* @property {string} shiftId ID of the Shift
* @property {string} shiftType Type of the Shift
* @property {number} isoWeek ISO Week when this Shift occurred
* @property {Date} startTimestamp Timestamp when this Shift was Started
* @property {?Date} finishTimestamp Timestamp when this Shift was Finished
* @property {?string} lineManagerName Name of the Line Manager who ran this Shift
* @property {?string} qualityManagerName Name of the Quality Manager who ran this Shift
* @property {string[]} varietyIds An Array of Variety IDs that were Packed during this Shift
* @property {string[]} varietyCodes An Array of Variety Codes that were Packed during this Shift
* @property {string[]} growingMethodIds An Array of Growing Method IDs that were Packed during this Shift
* @property {string[]} growingMethodCodes An Array of Growing Method Codes that were Packed during this Shift
* @property {number} binsTippedTarget Target Number of Bins to Tip during this Shift
* @property {number} totalBinsTipped Total Number of Bins Tipped during this Shift
* @property {number} binsTippedPerHour Number of Bins Tipped per Hour during this Shift
* @property {number} binsTippedPerHourExcludingDowntime Number of Bins Tipped per Hour excluding Downtime during this Shift
* @property {number} totalProductionTime Total Production Time in Seconds for this Shift
* @property {number} totalScheduledBreakTime Total Scheduled Break Time in Seconds for this Shift
* @property {number} totalDowntime Total Downtime in Seconds for this Shift
* @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Shift
* @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Shift
* @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Shift
* @property {?number} averageClass1Manning Average Number of People working on the Packing Line (excluding Class 2) during this Shift
* @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Shift
* @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Shift
* @property {?number} averageClass2Manning Average Number of People working in the Class 2 area of the Packing Line during this Shift
* @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Shift
* @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Shift
* @property {?number} averageTotalManning Average Number of People working on the Packing Line during this Shift
* @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Shift
* @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Shift
* @property {number} totalHoursWorked Total Hours Worked during this Shift. Directly relates to Production Time
* @property {number} totalHoursWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Shift. Directly relates to Production Time less Downtime
* @property {number} totalHoursPaid Total Hours Paid during this Shift. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
* @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Shift
* @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Shift
* @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Shift
* @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Shift
* @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Shift
* @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Shift
* @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Shift
* @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Shift
* @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Shift
* @property {number} class1TraysPerHour Average Class 1 Tray Equivalents Produced per Hour during this Shift
* @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Shift
* @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Shift
* @property {?number} class1TraysPerManHour Average Class 1 Tray Equivalents Produced per Person per Hour during this Shift
* @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Shift
* @property {number} class2TraysPerHour Average Class 2 Tray Equivalents Produced per Hour during this Shift
* @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Shift
* @property {?number} class2TraysPerManHour Average Class 2 Tray Equivalents Produced per Person per Hour during this Shift
* @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Shift
* @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Shift
* @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Shift
* @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Shift
* @property {?number} averageClass1Percentage Average Class 1 Packout Percentage during this Shift
* @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Shift
* @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Shift
* @property {?number} satisfactionRating An Optional Satisfaction Rating between 1 and 10 from the Line Manager of this Shift
* @property {?string} keyCelebration An Optional Key Celebration the Line Manager observed during this Shift
* @property {?string} keyChallenge An Optional Key Challenge the Line Manager observed during this Shift
* @property {number} focusMeetingsHeld Number of Focus Meetings Held during this Shift
* @property {number} focusMeetingsExpected Number of Expected Focus Meetings during this Shift
* @property {number} focusMeetingsScore Score Percentage of the Focus Meetings KPI
* @property {number} growerChangeMeetingsHeld Number of Grower Change Meetings Held during this Shift
* @property {number} growerChangeMeetingsExpected Number of Expected Grower Change Meetings during this Shift
* @property {number} growerChangeMeetingsScore Score Percentage of the Grower Change Meetings KPI
* @memberof Controllers.Packhouse
*/
/**
* A **ShiftHourlyData** Type
*
* @typedef {Object} ProductionDataExportController.ShiftHourlyData
* @property {number} siteId ID of the Site where this Hour took place
* @property {string} siteName Name of the Site where this Hour took place
* @property {string} packingLineId ID of the Packing Line where this Hour took place
* @property {string} packingLineName Name of the Packing Line where this Hour took place
* @property {string} shiftId ID of the Shift associated with this Hourly Entry
* @property {string} shiftType Type of the Shift associated with this Hourly Entry
* @property {number} isoWeek ISO Week when this Hour Started
* @property {Date} startTimestamp Timestamp when this Hour Started
* @property {?Date} endTimestamp Timestamp when this Hour Ended
* @property {?string} lineManagerName Name of the Line Manager who ran this Hour
* @property {?string} qualityManagerName Name of the Quality Manager who ran this Hour
* @property {string[]} varietyIds An Array of Variety IDs that were Packed during this Hour
* @property {string[]} varietyCodes An Array of Variety Codes that were Packed during this Hour
* @property {string[]} growingMethodIds An Array of Growing Method IDs that were Packed during this Hour
* @property {string[]} growingMethodCodes An Array of Growing Method Codes that were Packed during this Hour
* @property {number} totalBinsTipped Total Number of Bins Tipped during this Hour
* @property {number} totalProductionTime Total Production Time in Seconds for this Hour
* @property {number} totalScheduledBreakTime Total Scheduled Break Time in Seconds for this Hour
* @property {number} totalDowntime Total Downtime in Seconds for this Hour
* @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Hour
* @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Hour
* @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Hour
* @property {?number} class1Manning Actual Number of People working on the Packing Line (excluding Class 2) during this Hour
* @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Hour
* @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Hour
* @property {?number} class2Manning Actual Number of People working in the Class 2 area of the Packing Line during this Hour
* @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Hour
* @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Hour
* @property {?number} totalManning Actual Number of People working on the Packing Line during this Hour
* @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Hour
* @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Hour
* @property {number} totalMinutesWorked Total Hours Worked during this Hour. Directly relates to Production Time
* @property {number} totalMinutesWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Hour. Directly relates to Production Time less Downtime
* @property {number} totalMinutesPaid Total Hours Paid during this Hour. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
* @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Hour
* @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Hour
* @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Hour
* @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Hour
* @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Hour
* @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Hour
* @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Hour
* @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Hour
* @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Hour
* @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Hour
* @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Hour
* @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Hour
* @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Hour
* @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Hour
* @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Hour
* @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Hour
* @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Hour
* @property {?number} averageClass1Percentage Average Class 1 Packout Percentage during this Hour
* @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Hour
* @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Hour
* @property {?string} primaryIssueCategory Category of the Primary Issue that constrained throughput during this Hour
* @property {?string} primaryIssueTag Tag of the Primary Issue that constrained throughput during this Hour
* @property {?number} primaryIssuePercentage Percentage representing how much the Primary Issue constrained throughput during this Hour
* @property {?string} secondaryIssueCategory Category of the Secondary Issue that constrained throughput during this Hour
* @property {?string} secondaryIssueTag Tag of the Secondary Issue that constrained throughput during this Hour
* @property {?number} secondaryIssuePercentage Percentage representing how much the Secondary Issue constrained throughput during this Hour
* @property {?string} nextHourFocus An Optional Focus for the Next Hour based on experiences and review during this Hour
* @memberof Controllers.Packhouse
*/
/**
* A **DowntimeData** Type
*
* @typedef {Object} ProductionDataExportController.DowntimeData
* @property {number} siteId ID of the Site where this Downtime Event occurred
* @property {string} siteName Name of the Site where this Downtime Event occurred
* @property {string} packingLineId ID of the Packing Line where this Downtime Event occurred
* @property {string} packingLineName Name of the Packing Line where this Downtime Event occurred
* @property {string} shiftId ID of the Shift associated with this Downtime Event
* @property {string} shiftType Type of the Shift associated with this Downtime Event
* @property {number} isoWeek ISO Week when this Downtime Event occurred
* @property {Date} startTimestamp Timestamp when this Downtime Event Started
* @property {?Date} endTimestamp Timestamp when this Downtime Event Ended
* @property {?string} reasonCategory Reason Category for this Downtime Event
* @property {?string} reasonTag Reason Tag for this Downtime Event
* @property {?string} remedyAction An Optional Summary of the Action taken to Remedy this Downtime Event
* @memberof Controllers.Packhouse
*/
/**
* A **PackagingConsumptionData** Type
*
* @typedef {Object} ProductionDataExportController.PackagingConsumptionData
* @property {number} siteId ID of the Site where this Packaging Consumption occurred
* @property {string} siteName Name of the Site where this Packaging Consumption occurred
* @property {string} packingLineId ID of the Packing Line where this Packaging Consumption occurred
* @property {string} packingLineName Name of the Packing Line where this Packaging Consumption occurred
* @property {string} packrunId ID of the Packrun associated with this Packaging Consumption
* @property {string} packrunName Name of the Packrun associated with this Packaging Consumption
* @property {string} varietyId ID of the Variety associated with this Packaging Consumption
* @property {string} varietyCode Code of the Variety associated with this Packaging Consumption
* @property {number} isoWeek ISO Week when this Packaging Consumption occurred
* @property {Date} startTimestamp Timestamp when this Packaging Consumption Started
* @property {?Date} endTimestamp Timestamp when this Packaging Consumption Ended
* @property {string} packType Pack Type of the Packaging Consumed
* @property {number} quantity Quantity of Packaging Consumed
* @memberof Controllers.Packhouse
*/
/**
* A **ProductionData** Type
*
* @typedef {Object} ProductionDataExportController.ProductionData
* @property {Array<ProductionDataExportController.PackrunData>} packruns An Array of Packrun Data
* @property {Array<ProductionDataExportController.ShiftData>} shifts An Array of Shift Data
* @property {Array<ProductionDataExportController.ShiftHourlyData>} shiftHourlyEntries An Array of Shift Hourly Entry Data
* @property {Array<ProductionDataExportController.DowntimeData>} downtimeEvents An Array of Downtime Event Data
* @property {Array<ProductionDataExportController.PackagingConsumptionData>} packagingConsumption An Array of Packaging Consumption Data
* @memberof Controllers.Packhouse
*/
source