function getPartNumber(query) {
    if (query && query.partNumber !== undefined) {
        return Number.isNaN(query.partNumber) ?
            0 : Number.parseInt(query.partNumber, 10);
    }
    return undefined;
}
Checks for partNumber in request query and returns the part number
@param {object} query - request query
@return {(Integer|undefined)} - part number, zero if part number is less than
1 and undefined if no partNumber is found in the request query