diff --git a/index.js b/index.js index 36e3103..4e5cc86 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,12 @@ import moment from 'moment'; import * as vnUtils from './utils.js'; -import cliProgress from 'cli-progress'; +//import cliProgress from 'cli-progress'; import dotenv from 'dotenv'; dotenv.config(); import { models } from './models/index.js'; -import suppliers from './suppliersGln.js'; - console.log = function () { let args = Array.prototype.slice.call(arguments); args.unshift(new moment().format('HH:mm:ss') + ' -'); @@ -17,48 +15,22 @@ console.log = function () { let tokenExpirationDate = await vnUtils.getClientToken(models); +process.env.SYNC_SEQUENCE ? await vnUtils.syncSequence() : null; +process.env.SYNC_SUPPLIER ? await vnUtils.syncSuppliers() : null; +process.env.SYNC_TRADEITEM ? await vnUtils.syncTradeItems() : null; + try { - - if (process.env.QUERYSUPPLIERS) { - - process.env.HowManySuppliers ??= suppliers.suppliers.length; - - console.log('Querying suppliers...'); - console.log(process.env.HowManySuppliers + ' suppliers will be queried.'); - - const bar1 = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic); - bar1.start(process.env.HowManySuppliers, 0); - - let functionQueue = []; - - // vnUtils.getTradeitems(suppliers.suppliers[i].SupplierGLN) - for (let i = 0; i < process.env.HowManySuppliers; i++) { - functionQueue.push(async () => { - await vnUtils.getTradeitems(suppliers.suppliers[i].SupplierGLN); - bar1.increment(); - }); - } - - await vnUtils.asyncQueue(functionQueue, 10); - - bar1.stop(); - - console.log('Done querying trade items.'); - - } - // eslint-disable-next-line no-constant-condition while (true) { try{ console.log('Querying the API to check for new data...'); console.log('Current token expiration date: ', tokenExpirationDate); - await vnUtils.getStock(); - if (moment().isAfter(tokenExpirationDate)) { console.log('Token expired, getting a new one...'); tokenExpirationDate = await vnUtils.getClientToken(models); } + } catch (error) { console.error(error); } diff --git a/models/conf/sequenceNumber.js b/models/conf/sequenceNumber.js new file mode 100644 index 0000000..e29b4c7 --- /dev/null +++ b/models/conf/sequenceNumber.js @@ -0,0 +1,34 @@ +import { Sequelize } from 'sequelize'; + +const sequenceNumber = { + id: { + type: Sequelize.INTEGER, + primaryKey: true, + autoIncrement: true, + }, + sequenceNumber: { + type: Sequelize.INTEGER, + allowNull: false, + defaultValue: 0, + }, + maximumSequenceNumber: { + type: Sequelize.INTEGER, + allowNull: false, + defaultValue: 0, + }, + model: { + type: Sequelize.STRING, + }, +}; + +export default (sequelize) => { + const sequenceNumbers = sequelize.define( + 'FDsequenceNumber', + sequenceNumber, + { + timestamps: false, + freezeTableName: true, + } + ); + return sequenceNumbers; +}; diff --git a/models/index.js b/models/index.js index 0b8fcf8..e9b3142 100644 --- a/models/index.js +++ b/models/index.js @@ -4,24 +4,36 @@ dotenv.config(); let sequelize = createConnection(); +// Supply Line Models +import supplyLine from './supplyLine/supplyLine.js'; +import volumePrices from './supplyLine/volumePrices.js'; + +// Conf Models +import clientConfig from './conf/clientConfig.js'; +import sequenceNumber from './conf/sequenceNumber.js'; + +// Supplier Models +import suppliers from './supplier/suppliers.js'; +import connections from './supplier/connections.js'; + +// TradeItem Models +import tradeItem from './tradeItem/tradeItem.js'; import botanicalNames from './tradeItem/botanicalNames.js'; import countryOfOriginIsoCodes from './tradeItem/countryOfOriginIsoCodes.js'; import packageModel from './tradeItem/package.js'; import packingConfigurations from './tradeItem/packingConfigurations.js'; import photos from './tradeItem/photos.js'; import seasonalPeriod from './tradeItem/seasonalPeriod.js'; -import tradeItem from './tradeItem/tradeItem.js'; -import clientConfig from './conf/clientConfig.js'; import characteristics from './tradeItem/characteristics.js'; -import supplyLine from './supplyLine/supplyLine.js'; -import volumePrices from './supplyLine/volumePrices.js'; -import suppliers from './supplier/suppliers.js'; + + + /** * Contains all the models that are related to the application. * * @example - * models.tradeItem.findAll(); + * models.@modelName@.findAll(); * * @example * models.tradeItem.findAll().then((data) => { @@ -38,6 +50,7 @@ import suppliers from './supplier/suppliers.js'; * @type {Object.} */ let models = { + sequelize: sequelize, tradeItem: tradeItem(sequelize), packingConfigurations: packingConfigurations(sequelize), photos: photos(sequelize), @@ -50,6 +63,8 @@ let models = { supplyLines: supplyLine(sequelize), volumePrices: volumePrices(sequelize), suppliers: suppliers(sequelize), + sequenceNumber: sequenceNumber(sequelize), + connections: connections(sequelize), }; models.characteristics.belongsTo(models.tradeItem, { @@ -125,9 +140,12 @@ models.supplyLines.belongsTo(models.tradeItem, { targetKey: 'tradeItemId', }); -if (process.env.FORCE_SYNC) { - console.log('Syncing the models...'); +if (process.env.FORCE_SYNC == true) { + console.log('Forcing the models...'); await sequelize.sync({ force: true }); +} else { + console.log('Altering the models...'); + await sequelize.sync({ alter: true }); } if (process.env.SECRETS) { diff --git a/models/supplier/connections.js b/models/supplier/connections.js new file mode 100644 index 0000000..39cf292 --- /dev/null +++ b/models/supplier/connections.js @@ -0,0 +1,25 @@ +import { Sequelize } from 'sequelize'; + +const connections = { + organizationId: { + type: Sequelize.STRING, + primaryKey: true, + allowNull: false, + }, + connect: { + type: Sequelize.BOOLEAN, + defaultValue: false, + }, +}; + +export default (sequelize) => { + const connection = sequelize.define( + 'FDconnections', + connections, + { + timestamps: false, + freezeTableName: true, + } + ); + return connection; +}; diff --git a/models/supplier/suppliers.js b/models/supplier/suppliers.js index 7414170..86ac3ad 100644 --- a/models/supplier/suppliers.js +++ b/models/supplier/suppliers.js @@ -1,16 +1,56 @@ import { Sequelize } from 'sequelize'; const suppliers = { - id: { - type: Sequelize.INTEGER, - primaryKey: true, - autoIncrement: true, + isConnected: { + type: Sequelize.BOOLEAN, + defaultValue: false, }, - supplierId: { + commercialName: { type: Sequelize.STRING, - unique: true, + allowNull: false, }, - supplierGln: { + email: { + type: Sequelize.STRING, + }, + phone: { + type: Sequelize.STRING, + }, + website: { + type: Sequelize.STRING, + }, + mailingAddress: { + type: Sequelize.JSON, + }, + physicalAddress: { + type: Sequelize.JSON, + }, + pythosanitaryNumber: { + type: Sequelize.STRING, + }, + sequenceNumber: { + type: Sequelize.INTEGER, + allowNull: false, + }, + organizationId: { + type: Sequelize.STRING, + primaryKey: true, + }, + companyGln: { + type: Sequelize.STRING, + }, + name: { + type: Sequelize.STRING, + }, + endDate: { + type: Sequelize.DATE, + }, + rfhRelationId: { + type: Sequelize.INTEGER, + }, + organizationType: { + type: Sequelize.STRING, + }, + paymentProviders: { type: Sequelize.STRING, }, }; diff --git a/package.json b/package.json index fe93ed8..dd4034f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev-sync": "FORCE_SYNC=true node --max-old-space-size=4096 index.js", "dev-secrets": "SECRETS=true node --max-old-space-size=4096 index.js", "dev-both": "FORCE_SYNC=true SECRETS=true node --max-old-space-size=4096 index.js", - "dev-query": "QUERYSUPPLIERS=true FORCE_SYNC=true SECRETS=true node --max-old-space-size=4096 index.js" + "dev-query": "QUERYSUPPLIERS=true SECRETS=true node --max-old-space-size=4096 index.js" }, "dependencies": { "cli-progress": "^3.11.2", diff --git a/suppliersGln.js b/suppliersGln.js index 9a65b52..0692031 100644 --- a/suppliersGln.js +++ b/suppliersGln.js @@ -1,4462 +1,9 @@ -const suppliers = -{ - 'suppliers': [ - { - 'SupplierGLN' : '8713783858301' - }, - { - 'SupplierGLN' : '8714231200505' - }, - { - 'SupplierGLN' : '8713783439081' - }, - { - 'SupplierGLN' : '8713783439043' - }, - { - 'SupplierGLN' : '8713783439074' - }, - { - 'SupplierGLN' : '8713783478363' - }, - { - 'SupplierGLN' : '8714231190370' - }, - { - 'SupplierGLN' : '8713783438862' - }, - { - 'SupplierGLN' : '8713783853665' - }, - { - 'SupplierGLN' : '8714231192756' - }, - { - 'SupplierGLN' : '8713782685830' - }, - { - 'SupplierGLN' : '8713783435335' - }, - { - 'SupplierGLN' : '8714231196389' - }, - { - 'SupplierGLN' : '8714231190103' - }, - { - 'SupplierGLN' : '8713783419137' - }, - { - 'SupplierGLN' : '8718288040305' - }, - { - 'SupplierGLN' : '8714231205142' - }, - { - 'SupplierGLN' : '8713783479360' - }, - { - 'SupplierGLN' : '8713782639734' - }, - { - 'SupplierGLN' : '8718288082503' - }, - { - 'SupplierGLN' : '8713783860250' - }, - { - 'SupplierGLN' : '8718288003072' - }, - { - 'SupplierGLN' : '8713783461365' - }, - { - 'SupplierGLN' : '8713783253359' - }, - { - 'SupplierGLN' : '8718288052872' - }, - { - 'SupplierGLN' : '8718288023971' - }, - { - 'SupplierGLN' : '8713782682334' - }, - { - 'SupplierGLN' : '8714231185147' - }, - { - 'SupplierGLN' : '8713782574073' - }, - { - 'SupplierGLN' : '8713782638331' - }, - { - 'SupplierGLN' : '8713782572048' - }, - { - 'SupplierGLN' : '8713782552934' - }, - { - 'SupplierGLN' : '8713783890868' - }, - { - 'SupplierGLN' : '8713783447451' - }, - { - 'SupplierGLN' : '8713783447536' - }, - { - 'SupplierGLN' : '8713782612546' - }, - { - 'SupplierGLN' : '8713782503219' - }, - { - 'SupplierGLN' : '8713782596174' - }, - { - 'SupplierGLN' : '8713783852309' - }, - { - 'SupplierGLN' : '8713782571287' - }, - { - 'SupplierGLN' : '8714231204862' - }, - { - 'SupplierGLN' : '8713782567990' - }, - { - 'SupplierGLN' : '8714231224228' - }, - { - 'SupplierGLN' : '8713782612324' - }, - { - 'SupplierGLN' : '8718288040411' - }, - { - 'SupplierGLN' : '8713782570556' - }, - { - 'SupplierGLN' : '8714231207849' - }, - { - 'SupplierGLN' : '8714231190882' - }, - { - 'SupplierGLN' : '8713782570624' - }, - { - 'SupplierGLN' : '8713782638225' - }, - { - 'SupplierGLN' : '8714231204954' - }, - { - 'SupplierGLN' : '8713782523514' - }, - { - 'SupplierGLN' : '8713783243503' - }, - { - 'SupplierGLN' : '8714231208570' - }, - { - 'SupplierGLN' : '8713782605364' - }, - { - 'SupplierGLN' : '8713782639598' - }, - { - 'SupplierGLN' : '8713782574233' - }, - { - 'SupplierGLN' : '8718288007711' - }, - { - 'SupplierGLN' : '8713782506357' - }, - { - 'SupplierGLN' : '8713782611044' - }, - { - 'SupplierGLN' : '8713782615226' - }, - { - 'SupplierGLN' : '8713782528908' - }, - { - 'SupplierGLN' : '8713782503738' - }, - { - 'SupplierGLN' : '8713783469828' - }, - { - 'SupplierGLN' : '8713783893029' - }, - { - 'SupplierGLN' : '8713782545271' - }, - { - 'SupplierGLN' : '8713783893012' - }, - { - 'SupplierGLN' : '8714231154815' - }, - { - 'SupplierGLN' : '8713782543659' - }, - { - 'SupplierGLN' : '8713783892978' - }, - { - 'SupplierGLN' : '8713783892930' - }, - { - 'SupplierGLN' : '8713783892947' - }, - { - 'SupplierGLN' : '8714231217596' - }, - { - 'SupplierGLN' : '8718288072177' - }, - { - 'SupplierGLN' : '8713783892985' - }, - { - 'SupplierGLN' : '8713782626567' - }, - { - 'SupplierGLN' : '8719604206771' - }, - { - 'SupplierGLN' : '8718288071125' - }, - { - 'SupplierGLN' : '8713782527352' - }, - { - 'SupplierGLN' : '8713782687681' - }, - { - 'SupplierGLN' : '8718288020611' - }, - { - 'SupplierGLN' : '8713782687520' - }, - { - 'SupplierGLN' : '5790000600045' - }, - { - 'SupplierGLN' : '8714231141594' - }, - { - 'SupplierGLN' : '8713782581064' - }, - { - 'SupplierGLN' : '8713782577951' - }, - { - 'SupplierGLN' : '8713782552033' - }, - { - 'SupplierGLN' : '8713782555768' - }, - { - 'SupplierGLN' : '8713783455753' - }, - { - 'SupplierGLN' : '8713782535197' - }, - { - 'SupplierGLN' : '8713782509488' - }, - { - 'SupplierGLN' : '8713782580791' - }, - { - 'SupplierGLN' : '8713782518435' - }, - { - 'SupplierGLN' : '8713782513591' - }, - { - 'SupplierGLN' : '8713782541877' - }, - { - 'SupplierGLN' : '8713782573724' - }, - { - 'SupplierGLN' : '8713783252604' - }, - { - 'SupplierGLN' : '8713782641393' - }, - { - 'SupplierGLN' : '8713782603322' - }, - { - 'SupplierGLN' : '8713782596242' - }, - { - 'SupplierGLN' : '8718288040541' - }, - { - 'SupplierGLN' : '8719604246760' - }, - { - 'SupplierGLN' : '8713782540245' - }, - { - 'SupplierGLN' : '8713782525341' - }, - { - 'SupplierGLN' : '8713782529493' - }, - { - 'SupplierGLN' : '8713782571928' - }, - { - 'SupplierGLN' : '8713783853160' - }, - { - 'SupplierGLN' : '8718288062833' - }, - { - 'SupplierGLN' : '8713782551067' - }, - { - 'SupplierGLN' : '8713782602356' - }, - { - 'SupplierGLN' : '8713782570112' - }, - { - 'SupplierGLN' : '8713782568805' - }, - { - 'SupplierGLN' : '8713782585130' - }, - { - 'SupplierGLN' : '8713783867990' - }, - { - 'SupplierGLN' : '8713782553184' - }, - { - 'SupplierGLN' : '8713783852262' - }, - { - 'SupplierGLN' : '8713783804612' - }, - { - 'SupplierGLN' : '8718288099204' - }, - { - 'SupplierGLN' : '8713782537641' - }, - { - 'SupplierGLN' : '8713783858615' - }, - { - 'SupplierGLN' : '8713782672113' - }, - { - 'SupplierGLN' : '8713782670584' - }, - { - 'SupplierGLN' : '8713782583860' - }, - { - 'SupplierGLN' : '8713782506715' - }, - { - 'SupplierGLN' : '8713782576381' - }, - { - 'SupplierGLN' : '8713782548487' - }, - { - 'SupplierGLN' : '8713783818565' - }, - { - 'SupplierGLN' : '8713782572659' - }, - { - 'SupplierGLN' : '8714231207375' - }, - { - 'SupplierGLN' : '8713783810217' - }, - { - 'SupplierGLN' : '8713783478455' - }, - { - 'SupplierGLN' : '8713782567945' - }, - { - 'SupplierGLN' : '8714231222606' - }, - { - 'SupplierGLN' : '8718288021700' - }, - { - 'SupplierGLN' : '8713782614045' - }, - { - 'SupplierGLN' : '8713782504483' - }, - { - 'SupplierGLN' : '8719604902451' - }, - { - 'SupplierGLN' : '8713783852842' - }, - { - 'SupplierGLN' : '8713782694924' - }, - { - 'SupplierGLN' : '8718288066473' - }, - { - 'SupplierGLN' : '8714231140047' - }, - { - 'SupplierGLN' : '8713782546865' - }, - { - 'SupplierGLN' : '8713782600437' - }, - { - 'SupplierGLN' : '8713782527376' - }, - { - 'SupplierGLN' : '8713782580166' - }, - { - 'SupplierGLN' : '8713782505916' - }, - { - 'SupplierGLN' : '8718288032041' - }, - { - 'SupplierGLN' : '8718288077813' - }, - { - 'SupplierGLN' : '8713782525631' - }, - { - 'SupplierGLN' : '8713782626956' - }, - { - 'SupplierGLN' : '8714231214854' - }, - { - 'SupplierGLN' : '8714231205760' - }, - { - 'SupplierGLN' : '8713783858769' - }, - { - 'SupplierGLN' : '5790001082307' - }, - { - 'SupplierGLN' : '8713782665238' - }, - { - 'SupplierGLN' : '8718288047519' - }, - { - 'SupplierGLN' : '8713782518572' - }, - { - 'SupplierGLN' : '8713782502960' - }, - { - 'SupplierGLN' : '8713782504636' - }, - { - 'SupplierGLN' : '8718288062956' - }, - { - 'SupplierGLN' : '8713783418437' - }, - { - 'SupplierGLN' : '8714231206439' - }, - { - 'SupplierGLN' : '8713782580661' - }, - { - 'SupplierGLN' : '8713783484197' - }, - { - 'SupplierGLN' : '8713783823392' - }, - { - 'SupplierGLN' : '8713782570396' - }, - { - 'SupplierGLN' : '8718288077776' - }, - { - 'SupplierGLN' : '8713783859353' - }, - { - 'SupplierGLN' : '8713782530222' - }, - { - 'SupplierGLN' : '8713783467350' - }, - { - 'SupplierGLN' : '8713782650302' - }, - { - 'SupplierGLN' : '8718288099259' - }, - { - 'SupplierGLN' : '8718288063205' - }, - { - 'SupplierGLN' : '8713782576015' - }, - { - 'SupplierGLN' : '8718288021007' - }, - { - 'SupplierGLN' : '8718288015372' - }, - { - 'SupplierGLN' : '8713782639550' - }, - { - 'SupplierGLN' : '8713782582009' - }, - { - 'SupplierGLN' : '8713783894019' - }, - { - 'SupplierGLN' : '8718288047465' - }, - { - 'SupplierGLN' : '8713782669670' - }, - { - 'SupplierGLN' : '8713782583570' - }, - { - 'SupplierGLN' : '8713783478394' - }, - { - 'SupplierGLN' : '8713783478370' - }, - { - 'SupplierGLN' : '8713782623917' - }, - { - 'SupplierGLN' : '8718288020000' - }, - { - 'SupplierGLN' : '8713782567501' - }, - { - 'SupplierGLN' : '8714231204541' - }, - { - 'SupplierGLN' : '8713782682884' - }, - { - 'SupplierGLN' : '8713782575957' - }, - { - 'SupplierGLN' : '8714231140399' - }, - { - 'SupplierGLN' : '8713783814574' - }, - { - 'SupplierGLN' : '8718288056436' - }, - { - 'SupplierGLN' : '8713782615301' - }, - { - 'SupplierGLN' : '8714231141372' - }, - { - 'SupplierGLN' : '8713783478387' - }, - { - 'SupplierGLN' : '8713783478417' - }, - { - 'SupplierGLN' : '8718288083708' - }, - { - 'SupplierGLN' : '8713782588353' - }, - { - 'SupplierGLN' : '8713782611990' - }, - { - 'SupplierGLN' : '8713783898482' - }, - { - 'SupplierGLN' : '8713782571416' - }, - { - 'SupplierGLN' : '8714231206750' - }, - { - 'SupplierGLN' : '8714231140979' - }, - { - 'SupplierGLN' : '8713782604671' - }, - { - 'SupplierGLN' : '8713782672984' - }, - { - 'SupplierGLN' : '8714231140313' - }, - { - 'SupplierGLN' : '8713782529011' - }, - { - 'SupplierGLN' : '8713782584737' - }, - { - 'SupplierGLN' : '8718288092410' - }, - { - 'SupplierGLN' : '8714231141600' - }, - { - 'SupplierGLN' : '8713782567761' - }, - { - 'SupplierGLN' : '8713782667706' - }, - { - 'SupplierGLN' : '8713782512174' - }, - { - 'SupplierGLN' : '8718288057297' - }, - { - 'SupplierGLN' : '8713783815786' - }, - { - 'SupplierGLN' : '8713783858318' - }, - { - 'SupplierGLN' : '8713782577975' - }, - { - 'SupplierGLN' : '8713783852187' - }, - { - 'SupplierGLN' : '8713782518794' - }, - { - 'SupplierGLN' : '8719604203701' - }, - { - 'SupplierGLN' : '8713783440100' - }, - { - 'SupplierGLN' : '8713782582528' - }, - { - 'SupplierGLN' : '8713782570389' - }, - { - 'SupplierGLN' : '8718288089595' - }, - { - 'SupplierGLN' : '8713782540474' - }, - { - 'SupplierGLN' : '8713782580159' - }, - { - 'SupplierGLN' : '8713783894002' - }, - { - 'SupplierGLN' : '8718288059246' - }, - { - 'SupplierGLN' : '8713783243145' - }, - { - 'SupplierGLN' : '8718288012883' - }, - { - 'SupplierGLN' : '8713782571409' - }, - { - 'SupplierGLN' : '8714231218234' - }, - { - 'SupplierGLN' : '8713782502410' - }, - { - 'SupplierGLN' : '8713782575421' - }, - { - 'SupplierGLN' : '8713782623696' - }, - { - 'SupplierGLN' : '8713782598390' - }, - { - 'SupplierGLN' : '8713782507842' - }, - { - 'SupplierGLN' : '8718288061782' - }, - { - 'SupplierGLN' : '8713782521343' - }, - { - 'SupplierGLN' : '8713782614861' - }, - { - 'SupplierGLN' : '8713783853917' - }, - { - 'SupplierGLN' : '8718288098207' - }, - { - 'SupplierGLN' : '8713782576879' - }, - { - 'SupplierGLN' : '8713782584553' - }, - { - 'SupplierGLN' : '8713782580456' - }, - { - 'SupplierGLN' : '8713782591261' - }, - { - 'SupplierGLN' : '8714231141570' - }, - { - 'SupplierGLN' : '8713783893586' - }, - { - 'SupplierGLN' : '8718288050373' - }, - { - 'SupplierGLN' : '8713783813751' - }, - { - 'SupplierGLN' : '8713782577500' - }, - { - 'SupplierGLN' : '8713783481653' - }, - { - 'SupplierGLN' : '8713782503035' - }, - { - 'SupplierGLN' : '8713782627564' - }, - { - 'SupplierGLN' : '8714231140559' - }, - { - 'SupplierGLN' : '8719604203718' - }, - { - 'SupplierGLN' : '8713782577708' - }, - { - 'SupplierGLN' : '8719604206528' - }, - { - 'SupplierGLN' : '8713782598918' - }, - { - 'SupplierGLN' : '8713783817810' - }, - { - 'SupplierGLN' : '8713783490600' - }, - { - 'SupplierGLN' : '8713782505183' - }, - { - 'SupplierGLN' : '8713782568027' - }, - { - 'SupplierGLN' : '8718288064127' - }, - { - 'SupplierGLN' : '8714231206026' - }, - { - 'SupplierGLN' : '8713783892732' - }, - { - 'SupplierGLN' : '8713782615141' - }, - { - 'SupplierGLN' : '8718288033536' - }, - { - 'SupplierGLN' : '8713782669854' - }, - { - 'SupplierGLN' : '8713782506463' - }, - { - 'SupplierGLN' : '8713783446362' - }, - { - 'SupplierGLN' : '8713783440025' - }, - { - 'SupplierGLN' : '8713782523378' - }, - { - 'SupplierGLN' : '8713782538662' - }, - { - 'SupplierGLN' : '8713782557755' - }, - { - 'SupplierGLN' : '8713782648248' - }, - { - 'SupplierGLN' : '8713783241660' - }, - { - 'SupplierGLN' : '8713782541174' - }, - { - 'SupplierGLN' : '8713782681108' - }, - { - 'SupplierGLN' : '8713782536989' - }, - { - 'SupplierGLN' : '8713782675411' - }, - { - 'SupplierGLN' : '8718288006059' - }, - { - 'SupplierGLN' : '8713782575094' - }, - { - 'SupplierGLN' : '8713782570860' - }, - { - 'SupplierGLN' : '8713782572758' - }, - { - 'SupplierGLN' : '8713783460962' - }, - { - 'SupplierGLN' : '8713782650678' - }, - { - 'SupplierGLN' : '8719604986857' - }, - { - 'SupplierGLN' : '8718288057273' - }, - { - 'SupplierGLN' : '8713782569192' - }, - { - 'SupplierGLN' : '8713782612157' - }, - { - 'SupplierGLN' : '8713782572086' - }, - { - 'SupplierGLN' : '8718288055743' - }, - { - 'SupplierGLN' : '8713782575650' - }, - { - 'SupplierGLN' : '8713782546292' - }, - { - 'SupplierGLN' : '8718288010278' - }, - { - 'SupplierGLN' : '8713783891988' - }, - { - 'SupplierGLN' : '8713782569635' - }, - { - 'SupplierGLN' : '8713782522562' - }, - { - 'SupplierGLN' : '8713783461532' - }, - { - 'SupplierGLN' : '8713782520353' - }, - { - 'SupplierGLN' : '8713782583013' - }, - { - 'SupplierGLN' : '8713782610856' - }, - { - 'SupplierGLN' : '8718288057235' - }, - { - 'SupplierGLN' : '8718288030665' - }, - { - 'SupplierGLN' : '8713782571775' - }, - { - 'SupplierGLN' : '8713782506487' - }, - { - 'SupplierGLN' : '8713782588049' - }, - { - 'SupplierGLN' : '8713782518527' - }, - { - 'SupplierGLN' : '8713782568508' - }, - { - 'SupplierGLN' : '8713782552248' - }, - { - 'SupplierGLN' : '8713782501666' - }, - { - 'SupplierGLN' : '8713783468883' - }, - { - 'SupplierGLN' : '8718288021694' - }, - { - 'SupplierGLN' : '8719604990830' - }, - { - 'SupplierGLN' : '8713782588551' - }, - { - 'SupplierGLN' : '8718288063151' - }, - { - 'SupplierGLN' : '8713782569901' - }, - { - 'SupplierGLN' : '8713782578736' - }, - { - 'SupplierGLN' : '8718288047533' - }, - { - 'SupplierGLN' : '8713782523774' - }, - { - 'SupplierGLN' : '8713783894941' - }, - { - 'SupplierGLN' : '8713782582757' - }, - { - 'SupplierGLN' : '8718288038616' - }, - { - 'SupplierGLN' : '8713782545523' - }, - { - 'SupplierGLN' : '8713782514079' - }, - { - 'SupplierGLN' : '8719604985867' - }, - { - 'SupplierGLN' : '8713783872833' - }, - { - 'SupplierGLN' : '8718288076625' - }, - { - 'SupplierGLN' : '8713783822463' - }, - { - 'SupplierGLN' : '8713782574677' - }, - { - 'SupplierGLN' : '8713782546537' - }, - { - 'SupplierGLN' : '8714231205302' - }, - { - 'SupplierGLN' : '8713782517889' - }, - { - 'SupplierGLN' : '8713783814031' - }, - { - 'SupplierGLN' : '8713783852354' - }, - { - 'SupplierGLN' : '8719604206856' - }, - { - 'SupplierGLN' : '8713782611716' - }, - { - 'SupplierGLN' : '8713783467565' - }, - { - 'SupplierGLN' : '8713782571874' - }, - { - 'SupplierGLN' : '8713782580821' - }, - { - 'SupplierGLN' : '8713782572031' - }, - { - 'SupplierGLN' : '8714231212188' - }, - { - 'SupplierGLN' : '8713782584850' - }, - { - 'SupplierGLN' : '8714231149088' - }, - { - 'SupplierGLN' : '8713782583433' - }, - { - 'SupplierGLN' : '8714231140153' - }, - { - 'SupplierGLN' : '8713782640167' - }, - { - 'SupplierGLN' : '8713783483886' - }, - { - 'SupplierGLN' : '8713783860403' - }, - { - 'SupplierGLN' : '8713782582108' - }, - { - 'SupplierGLN' : '8713782573694' - }, - { - 'SupplierGLN' : '8713782510958' - }, - { - 'SupplierGLN' : '8713782662015' - }, - { - 'SupplierGLN' : '8713782671406' - }, - { - 'SupplierGLN' : '8713782572857' - }, - { - 'SupplierGLN' : '8713782550794' - }, - { - 'SupplierGLN' : '8713782573731' - }, - { - 'SupplierGLN' : '8713782586755' - }, - { - 'SupplierGLN' : '8719604207921' - }, - { - 'SupplierGLN' : '8714231141655' - }, - { - 'SupplierGLN' : '8713783478400' - }, - { - 'SupplierGLN' : '8718288094056' - }, - { - 'SupplierGLN' : '8718288010643' - }, - { - 'SupplierGLN' : '8713783821183' - }, - { - 'SupplierGLN' : '8713782502069' - }, - { - 'SupplierGLN' : '8718288083029' - }, - { - 'SupplierGLN' : '8713782581255' - }, - { - 'SupplierGLN' : '8713783804629' - }, - { - 'SupplierGLN' : '8718288072528' - }, - { - 'SupplierGLN' : '8713783820308' - }, - { - 'SupplierGLN' : '8713782538556' - }, - { - 'SupplierGLN' : '8713783812693' - }, - { - 'SupplierGLN' : '8713782575919' - }, - { - 'SupplierGLN' : '8713782538310' - }, - { - 'SupplierGLN' : '8714231140856' - }, - { - 'SupplierGLN' : '8719604204357' - }, - { - 'SupplierGLN' : '8713782598420' - }, - { - 'SupplierGLN' : '8713782598307' - }, - { - 'SupplierGLN' : '8713782673004' - }, - { - 'SupplierGLN' : '8713782573021' - }, - { - 'SupplierGLN' : '8713783850558' - }, - { - 'SupplierGLN' : '8713782574134' - }, - { - 'SupplierGLN' : '8713782575308' - }, - { - 'SupplierGLN' : '8719604207006' - }, - { - 'SupplierGLN' : '8714231140795' - }, - { - 'SupplierGLN' : '8713783808122' - }, - { - 'SupplierGLN' : '8713782572918' - }, - { - 'SupplierGLN' : '8713782532370' - }, - { - 'SupplierGLN' : '8713782539706' - }, - { - 'SupplierGLN' : '8713782522159' - }, - { - 'SupplierGLN' : '8718288068873' - }, - { - 'SupplierGLN' : '8713782647890' - }, - { - 'SupplierGLN' : '8713782671093' - }, - { - 'SupplierGLN' : '8713782673363' - }, - { - 'SupplierGLN' : '8713782570273' - }, - { - 'SupplierGLN' : '8714231211303' - }, - { - 'SupplierGLN' : '8713782613024' - }, - { - 'SupplierGLN' : '8713783478745' - }, - { - 'SupplierGLN' : '8719604986062' - }, - { - 'SupplierGLN' : '8718288021731' - }, - { - 'SupplierGLN' : '8713782581873' - }, - { - 'SupplierGLN' : '8719604203923' - }, - { - 'SupplierGLN' : '8713783445174' - }, - { - 'SupplierGLN' : '8713782519845' - }, - { - 'SupplierGLN' : '8713782572215' - }, - { - 'SupplierGLN' : '8714231141969' - }, - { - 'SupplierGLN' : '8713782574752' - }, - { - 'SupplierGLN' : '8718288001153' - }, - { - 'SupplierGLN' : '8718288062307' - }, - { - 'SupplierGLN' : '8713782552477' - }, - { - 'SupplierGLN' : '8713783252338' - }, - { - 'SupplierGLN' : '8713783461563' - }, - { - 'SupplierGLN' : '8713782572611' - }, - { - 'SupplierGLN' : '8713783467312' - }, - { - 'SupplierGLN' : '8713782648972' - }, - { - 'SupplierGLN' : '8713782644837' - }, - { - 'SupplierGLN' : '8713782575346' - }, - { - 'SupplierGLN' : '8718288067326' - }, - { - 'SupplierGLN' : '8713782571294' - }, - { - 'SupplierGLN' : '8713782557762' - }, - { - 'SupplierGLN' : '8713782571485' - }, - { - 'SupplierGLN' : '8713782507958' - }, - { - 'SupplierGLN' : '8714231151289' - }, - { - 'SupplierGLN' : '8713783889602' - }, - { - 'SupplierGLN' : '8713782612928' - }, - { - 'SupplierGLN' : '8718288055859' - }, - { - 'SupplierGLN' : '8713782549460' - }, - { - 'SupplierGLN' : '8713782509617' - }, - { - 'SupplierGLN' : '8713782582313' - }, - { - 'SupplierGLN' : '8713782662343' - }, - { - 'SupplierGLN' : '8713782584386' - }, - { - 'SupplierGLN' : '8714231152507' - }, - { - 'SupplierGLN' : '8713783447444' - }, - { - 'SupplierGLN' : '8713783889251' - }, - { - 'SupplierGLN' : '8713782638041' - }, - { - 'SupplierGLN' : '8713783849262' - }, - { - 'SupplierGLN' : '8713782508641' - }, - { - 'SupplierGLN' : '8718288082633' - }, - { - 'SupplierGLN' : '8714231223023' - }, - { - 'SupplierGLN' : '8719604900495' - }, - { - 'SupplierGLN' : '8714231222224' - }, - { - 'SupplierGLN' : '8713783893753' - }, - { - 'SupplierGLN' : '8713782691916' - }, - { - 'SupplierGLN' : '8713783813072' - }, - { - 'SupplierGLN' : '8718288039736' - }, - { - 'SupplierGLN' : '8719604986376' - }, - { - 'SupplierGLN' : '8713783893562' - }, - { - 'SupplierGLN' : '8714231208488' - }, - { - 'SupplierGLN' : '8719604986437' - }, - { - 'SupplierGLN' : '8719604986369' - }, - { - 'SupplierGLN' : '8719604986390' - }, - { - 'SupplierGLN' : '8713783462041' - }, - { - 'SupplierGLN' : '8714231221364' - }, - { - 'SupplierGLN' : '8719604986406' - }, - { - 'SupplierGLN' : '8713782606729' - }, - { - 'SupplierGLN' : '8713783849101' - }, - { - 'SupplierGLN' : '8713782581613' - }, - { - 'SupplierGLN' : '8713783898734' - }, - { - 'SupplierGLN' : '8719604986383' - }, - { - 'SupplierGLN' : '8713782518466' - }, - { - 'SupplierGLN' : '8713783479032' - }, - { - 'SupplierGLN' : '8713782549903' - }, - { - 'SupplierGLN' : '8716982000085' - }, - { - 'SupplierGLN' : '8713782568423' - }, - { - 'SupplierGLN' : '8719604206702' - }, - { - 'SupplierGLN' : '8713783819630' - }, - { - 'SupplierGLN' : '8713783251690' - }, - { - 'SupplierGLN' : '8713782546605' - }, - { - 'SupplierGLN' : '8714231218845' - }, - { - 'SupplierGLN' : '8718288030627' - }, - { - 'SupplierGLN' : '8713782543536' - }, - { - 'SupplierGLN' : '8714231149958' - }, - { - 'SupplierGLN' : '8718288053930' - }, - { - 'SupplierGLN' : '8713782521503' - }, - { - 'SupplierGLN' : '8713782568362' - }, - { - 'SupplierGLN' : '8713782677378' - }, - { - 'SupplierGLN' : '8713782521855' - }, - { - 'SupplierGLN' : '8713782549385' - }, - { - 'SupplierGLN' : '8713783461860' - }, - { - 'SupplierGLN' : '8713782506227' - }, - { - 'SupplierGLN' : '8713783295472' - }, - { - 'SupplierGLN' : '8713782668031' - }, - { - 'SupplierGLN' : '8718288073136' - }, - { - 'SupplierGLN' : '8713783851418' - }, - { - 'SupplierGLN' : '8713782536484' - }, - { - 'SupplierGLN' : '8713783898727' - }, - { - 'SupplierGLN' : '8713782513652' - }, - { - 'SupplierGLN' : '8713782569055' - }, - { - 'SupplierGLN' : '8713782577982' - }, - { - 'SupplierGLN' : '8713782642666' - }, - { - 'SupplierGLN' : '8713782568300' - }, - { - 'SupplierGLN' : '8718288047229' - }, - { - 'SupplierGLN' : '8714231207580' - }, - { - 'SupplierGLN' : '8713783255568' - }, - { - 'SupplierGLN' : '8713783498521' - }, - { - 'SupplierGLN' : '8718288082497' - }, - { - 'SupplierGLN' : '8713783461679' - }, - { - 'SupplierGLN' : '8713782610245' - }, - { - 'SupplierGLN' : '8713782522807' - }, - { - 'SupplierGLN' : '8713782575278' - }, - { - 'SupplierGLN' : '8718288006028' - }, - { - 'SupplierGLN' : '8713783858530' - }, - { - 'SupplierGLN' : '8713782527192' - }, - { - 'SupplierGLN' : '8713782518855' - }, - { - 'SupplierGLN' : '8713782580975' - }, - { - 'SupplierGLN' : '8713783818022' - }, - { - 'SupplierGLN' : '8713782617039' - }, - { - 'SupplierGLN' : '8718288054104' - }, - { - 'SupplierGLN' : '8713783889848' - }, - { - 'SupplierGLN' : '8713782573441' - }, - { - 'SupplierGLN' : '8713782689999' - }, - { - 'SupplierGLN' : '8713783893647' - }, - { - 'SupplierGLN' : '8713782571836' - }, - { - 'SupplierGLN' : '8713783461594' - }, - { - 'SupplierGLN' : '8718288030610' - }, - { - 'SupplierGLN' : '8714231213642' - }, - { - 'SupplierGLN' : '8718288093936' - }, - { - 'SupplierGLN' : '8713782549392' - }, - { - 'SupplierGLN' : '8719604992063' - }, - { - 'SupplierGLN' : '8713782644035' - }, - { - 'SupplierGLN' : '8719604902819' - }, - { - 'SupplierGLN' : '8713782682587' - }, - { - 'SupplierGLN' : '8714231140870' - }, - { - 'SupplierGLN' : '8713782597638' - }, - { - 'SupplierGLN' : '8713783894385' - }, - { - 'SupplierGLN' : '8713783466872' - }, - { - 'SupplierGLN' : '8713782524870' - }, - { - 'SupplierGLN' : '8718288077899' - }, - { - 'SupplierGLN' : '8713782612232' - }, - { - 'SupplierGLN' : '8718288069153' - }, - { - 'SupplierGLN' : '8713782578064' - }, - { - 'SupplierGLN' : '8718288055842' - }, - { - 'SupplierGLN' : '8713782523064' - }, - { - 'SupplierGLN' : '8713782545172' - }, - { - 'SupplierGLN' : '8713783892336' - }, - { - 'SupplierGLN' : '8714231206941' - }, - { - 'SupplierGLN' : '8713782580678' - }, - { - 'SupplierGLN' : '8713782501307' - }, - { - 'SupplierGLN' : '8714231154969' - }, - { - 'SupplierGLN' : '8718288057686' - }, - { - 'SupplierGLN' : '8713782575674' - }, - { - 'SupplierGLN' : '8718288084224' - }, - { - 'SupplierGLN' : '8713782651514' - }, - { - 'SupplierGLN' : '8713782651095' - }, - { - 'SupplierGLN' : '8718288083647' - }, - { - 'SupplierGLN' : '8713782572802' - }, - { - 'SupplierGLN' : '8713782573120' - }, - { - 'SupplierGLN' : '8718288004482' - }, - { - 'SupplierGLN' : '8713782649948' - }, - { - 'SupplierGLN' : '8713782640174' - }, - { - 'SupplierGLN' : '8713782651668' - }, - { - 'SupplierGLN' : '8713782630496' - }, - { - 'SupplierGLN' : '8713783479308' - }, - { - 'SupplierGLN' : '8718288035974' - }, - { - 'SupplierGLN' : '8713782508573' - }, - { - 'SupplierGLN' : '8718288010711' - }, - { - 'SupplierGLN' : '8713782511696' - }, - { - 'SupplierGLN' : '8713782649931' - }, - { - 'SupplierGLN' : '8713783814444' - }, - { - 'SupplierGLN' : '8719604209048' - }, - { - 'SupplierGLN' : '8713782526126' - }, - { - 'SupplierGLN' : '8718288030498' - }, - { - 'SupplierGLN' : '8713783852958' - }, - { - 'SupplierGLN' : '8713782667676' - }, - { - 'SupplierGLN' : '8713782579030' - }, - { - 'SupplierGLN' : '8714231215936' - }, - { - 'SupplierGLN' : '8713783242322' - }, - { - 'SupplierGLN' : '8718288089359' - }, - { - 'SupplierGLN' : '8713782550206' - }, - { - 'SupplierGLN' : '8714231147220' - }, - { - 'SupplierGLN' : '8713783893555' - }, - { - 'SupplierGLN' : '8713782510859' - }, - { - 'SupplierGLN' : '8713782518428' - }, - { - 'SupplierGLN' : '8714231144915' - }, - { - 'SupplierGLN' : '8713782536613' - }, - { - 'SupplierGLN' : '8718288085979' - }, - { - 'SupplierGLN' : '8714231222668' - }, - { - 'SupplierGLN' : '8713782579139' - }, - { - 'SupplierGLN' : '8713782522234' - }, - { - 'SupplierGLN' : '8713782641119' - }, - { - 'SupplierGLN' : '8713782517742' - }, - { - 'SupplierGLN' : '8718288053282' - }, - { - 'SupplierGLN' : '8713782613987' - }, - { - 'SupplierGLN' : '8713782631479' - }, - { - 'SupplierGLN' : '8714231210924' - }, - { - 'SupplierGLN' : '8713782550534' - }, - { - 'SupplierGLN' : '8714231152569' - }, - { - 'SupplierGLN' : '8713783852835' - }, - { - 'SupplierGLN' : '8713782567730' - }, - { - 'SupplierGLN' : '8713782545134' - }, - { - 'SupplierGLN' : '8713782607900' - }, - { - 'SupplierGLN' : '8719604203688' - }, - { - 'SupplierGLN' : '8713782673059' - }, - { - 'SupplierGLN' : '8713782571669' - }, - { - 'SupplierGLN' : '8713782647500' - }, - { - 'SupplierGLN' : '8718288004611' - }, - { - 'SupplierGLN' : '8719604986352' - }, - { - 'SupplierGLN' : '8713782670935' - }, - { - 'SupplierGLN' : '8713782578897' - }, - { - 'SupplierGLN' : '8718288008626' - }, - { - 'SupplierGLN' : '8713783894767' - }, - { - 'SupplierGLN' : '8713782525914' - }, - { - 'SupplierGLN' : '8714231205739' - }, - { - 'SupplierGLN' : '8718288061713' - }, - { - 'SupplierGLN' : '8719604207631' - }, - { - 'SupplierGLN' : '8718288062697' - }, - { - 'SupplierGLN' : '8713783488430' - }, - { - 'SupplierGLN' : '8713782594903' - }, - { - 'SupplierGLN' : '8719604986413' - }, - { - 'SupplierGLN' : '8714231152095' - }, - { - 'SupplierGLN' : '8713783850367' - }, - { - 'SupplierGLN' : '8713783850138' - }, - { - 'SupplierGLN' : '8714231205210' - }, - { - 'SupplierGLN' : '8713782570617' - }, - { - 'SupplierGLN' : '8713782530109' - }, - { - 'SupplierGLN' : '8713782673585' - }, - { - 'SupplierGLN' : '8713783852538' - }, - { - 'SupplierGLN' : '8713782610061' - }, - { - 'SupplierGLN' : '8713783895153' - }, - { - 'SupplierGLN' : '8713782695143' - }, - { - 'SupplierGLN' : '8713782514062' - }, - { - 'SupplierGLN' : '8719604985843' - }, - { - 'SupplierGLN' : '8713782515236' - }, - { - 'SupplierGLN' : '8714231213628' - }, - { - 'SupplierGLN' : '8718288072207' - }, - { - 'SupplierGLN' : '8719604206955' - }, - { - 'SupplierGLN' : '8713782572338' - }, - { - 'SupplierGLN' : '8714231211877' - }, - { - 'SupplierGLN' : '8713782668710' - }, - { - 'SupplierGLN' : '8718288056498' - }, - { - 'SupplierGLN' : '8718288011756' - }, - { - 'SupplierGLN' : '8714231211792' - }, - { - 'SupplierGLN' : '8713782536118' - }, - { - 'SupplierGLN' : '8713782553764' - }, - { - 'SupplierGLN' : '8713782605739' - }, - { - 'SupplierGLN' : '8713782580357' - }, - { - 'SupplierGLN' : '8718288078537' - }, - { - 'SupplierGLN' : '8713782552842' - }, - { - 'SupplierGLN' : '8713782593609' - }, - { - 'SupplierGLN' : '8713783489550' - }, - { - 'SupplierGLN' : '8718288051042' - }, - { - 'SupplierGLN' : '8714231223276' - }, - { - 'SupplierGLN' : '8713782503875' - }, - { - 'SupplierGLN' : '8713783813034' - }, - { - 'SupplierGLN' : '8713782617442' - }, - { - 'SupplierGLN' : '8713782571201' - }, - { - 'SupplierGLN' : '8713782571607' - }, - { - 'SupplierGLN' : '8713783855799' - }, - { - 'SupplierGLN' : '8714231140931' - }, - { - 'SupplierGLN' : '8713783814642' - }, - { - 'SupplierGLN' : '8713783243718' - }, - { - 'SupplierGLN' : '8719604985812' - }, - { - 'SupplierGLN' : '8713782579238' - }, - { - 'SupplierGLN' : '8713782582542' - }, - { - 'SupplierGLN' : '8718288050168' - }, - { - 'SupplierGLN' : '8713782552385' - }, - { - 'SupplierGLN' : '8713783872734' - }, - { - 'SupplierGLN' : '8713782605357' - }, - { - 'SupplierGLN' : '8713782612287' - }, - { - 'SupplierGLN' : '8713782600710' - }, - { - 'SupplierGLN' : '8713782635613' - }, - { - 'SupplierGLN' : '8713782630601' - }, - { - 'SupplierGLN' : '8718288001184' - }, - { - 'SupplierGLN' : '8713782665412' - }, - { - 'SupplierGLN' : '8713782515281' - }, - { - 'SupplierGLN' : '8718288004048' - }, - { - 'SupplierGLN' : '8713782519067' - }, - { - 'SupplierGLN' : '8713782671468' - }, - { - 'SupplierGLN' : '8718288052339' - }, - { - 'SupplierGLN' : '8713782573748' - }, - { - 'SupplierGLN' : '8718288012395' - }, - { - 'SupplierGLN' : '8713783850145' - }, - { - 'SupplierGLN' : '8713782621586' - }, - { - 'SupplierGLN' : '8713782512792' - }, - { - 'SupplierGLN' : '8714231205623' - }, - { - 'SupplierGLN' : '8718288085191' - }, - { - 'SupplierGLN' : '8713782520872' - }, - { - 'SupplierGLN' : '8713782513577' - }, - { - 'SupplierGLN' : '8718288020116' - }, - { - 'SupplierGLN' : '8719604991424' - }, - { - 'SupplierGLN' : '8713782611815' - }, - { - 'SupplierGLN' : '8713782525099' - }, - { - 'SupplierGLN' : '8713782567556' - }, - { - 'SupplierGLN' : '8713782606057' - }, - { - 'SupplierGLN' : '8713783895085' - }, - { - 'SupplierGLN' : '8713782508153' - }, - { - 'SupplierGLN' : '8713782689609' - }, - { - 'SupplierGLN' : '8713783886106' - }, - { - 'SupplierGLN' : '8713782506180' - }, - { - 'SupplierGLN' : '8718288045973' - }, - { - 'SupplierGLN' : '8713782644042' - }, - { - 'SupplierGLN' : '8713782546391' - }, - { - 'SupplierGLN' : '8713782500898' - }, - { - 'SupplierGLN' : '8713782567457' - }, - { - 'SupplierGLN' : '8713782501277' - }, - { - 'SupplierGLN' : '8713783439562' - }, - { - 'SupplierGLN' : '8713782549118' - }, - { - 'SupplierGLN' : '8713782695129' - }, - { - 'SupplierGLN' : '8714231147404' - }, - { - 'SupplierGLN' : '8713782605036' - }, - { - 'SupplierGLN' : '8713782651316' - }, - { - 'SupplierGLN' : '8713782568782' - }, - { - 'SupplierGLN' : '8713783854334' - }, - { - 'SupplierGLN' : '8719604209611' - }, - { - 'SupplierGLN' : '8713782570822' - }, - { - 'SupplierGLN' : '8713782500164' - }, - { - 'SupplierGLN' : '8718288015730' - }, - { - 'SupplierGLN' : '8718288073259' - }, - { - 'SupplierGLN' : '8719604206603' - }, - { - 'SupplierGLN' : '8714231211518' - }, - { - 'SupplierGLN' : '8718288008077' - }, - { - 'SupplierGLN' : '8714231213369' - }, - { - 'SupplierGLN' : '8713782524771' - }, - { - 'SupplierGLN' : '8713782520865' - }, - { - 'SupplierGLN' : '8718288047373' - }, - { - 'SupplierGLN' : '8713782627694' - }, - { - 'SupplierGLN' : '8713782629995' - }, - { - 'SupplierGLN' : '8718288015778' - }, - { - 'SupplierGLN' : '8718288032188' - }, - { - 'SupplierGLN' : '8713782570747' - }, - { - 'SupplierGLN' : '8714231219668' - }, - { - 'SupplierGLN' : '8713782544267' - }, - { - 'SupplierGLN' : '8713782503158' - }, - { - 'SupplierGLN' : '8713782580463' - }, - { - 'SupplierGLN' : '8718288083593' - }, - { - 'SupplierGLN' : '8713782570921' - }, - { - 'SupplierGLN' : '8718288050397' - }, - { - 'SupplierGLN' : '8714231215950' - }, - { - 'SupplierGLN' : '8713782644189' - }, - { - 'SupplierGLN' : '8713782523576' - }, - { - 'SupplierGLN' : '8713782525556' - }, - { - 'SupplierGLN' : '8713782649917' - }, - { - 'SupplierGLN' : '8713782518978' - }, - { - 'SupplierGLN' : '8713782585055' - }, - { - 'SupplierGLN' : '8713783488836' - }, - { - 'SupplierGLN' : '8713782589589' - }, - { - 'SupplierGLN' : '8713782650760' - }, - { - 'SupplierGLN' : '8713782502212' - }, - { - 'SupplierGLN' : '8718288008596' - }, - { - 'SupplierGLN' : '8713782505107' - }, - { - 'SupplierGLN' : '8713782604947' - }, - { - 'SupplierGLN' : '8718288030955' - }, - { - 'SupplierGLN' : '8719604205460' - }, - { - 'SupplierGLN' : '8713783243060' - }, - { - 'SupplierGLN' : '8714231144854' - }, - { - 'SupplierGLN' : '8713782526577' - }, - { - 'SupplierGLN' : '8713782572352' - }, - { - 'SupplierGLN' : '8713783252598' - }, - { - 'SupplierGLN' : '8714231206934' - }, - { - 'SupplierGLN' : '8713783818534' - }, - { - 'SupplierGLN' : '8713782602585' - }, - { - 'SupplierGLN' : '8718288082237' - }, - { - 'SupplierGLN' : '8714231218449' - }, - { - 'SupplierGLN' : '8713782508450' - }, - { - 'SupplierGLN' : '8713782568478' - }, - { - 'SupplierGLN' : '8713782639482' - }, - { - 'SupplierGLN' : '8713782545790' - }, - { - 'SupplierGLN' : '8713782577623' - }, - { - 'SupplierGLN' : '8713782581743' - }, - { - 'SupplierGLN' : '8713782520957' - }, - { - 'SupplierGLN' : '8713783438473' - }, - { - 'SupplierGLN' : '8713783849323' - }, - { - 'SupplierGLN' : '8713782577432' - }, - { - 'SupplierGLN' : '8713783479049' - }, - { - 'SupplierGLN' : '8713782571973' - }, - { - 'SupplierGLN' : '8713782507866' - }, - { - 'SupplierGLN' : '8713782590448' - }, - { - 'SupplierGLN' : '8713782674032' - }, - { - 'SupplierGLN' : '8718288003270' - }, - { - 'SupplierGLN' : '8713782635248' - }, - { - 'SupplierGLN' : '8713783249598' - }, - { - 'SupplierGLN' : '8714231224624' - }, - { - 'SupplierGLN' : '8713783242339' - }, - { - 'SupplierGLN' : '8713783452196' - }, - { - 'SupplierGLN' : '8714231212119' - }, - { - 'SupplierGLN' : '8713782585093' - }, - { - 'SupplierGLN' : '8713782605043' - }, - { - 'SupplierGLN' : '8713783889725' - }, - { - 'SupplierGLN' : '8714231141563' - }, - { - 'SupplierGLN' : '8718288090195' - }, - { - 'SupplierGLN' : '8714231147527' - }, - { - 'SupplierGLN' : '8718288004031' - }, - { - 'SupplierGLN' : '8713782538709' - }, - { - 'SupplierGLN' : '8713782628028' - }, - { - 'SupplierGLN' : '8713782503356' - }, - { - 'SupplierGLN' : '8713782520438' - }, - { - 'SupplierGLN' : '8719604990984' - }, - { - 'SupplierGLN' : '8713782509433' - }, - { - 'SupplierGLN' : '8713782589046' - }, - { - 'SupplierGLN' : '8714231205715' - }, - { - 'SupplierGLN' : '8713782520605' - }, - { - 'SupplierGLN' : '8714231212942' - }, - { - 'SupplierGLN' : '8718288003942' - }, - { - 'SupplierGLN' : '8713782571430' - }, - { - 'SupplierGLN' : '8713782577272' - }, - { - 'SupplierGLN' : '8713782576411' - }, - { - 'SupplierGLN' : '8713782620510' - }, - { - 'SupplierGLN' : '8719604204869' - }, - { - 'SupplierGLN' : '8713782645254' - }, - { - 'SupplierGLN' : '8713782520841' - }, - { - 'SupplierGLN' : '8718288004185' - }, - { - 'SupplierGLN' : '8713783893395' - }, - { - 'SupplierGLN' : '8719604900853' - }, - { - 'SupplierGLN' : '8713782536286' - }, - { - 'SupplierGLN' : '8714231211419' - }, - { - 'SupplierGLN' : '8713783250006' - }, - { - 'SupplierGLN' : '8713782582986' - }, - { - 'SupplierGLN' : '8713783254530' - }, - { - 'SupplierGLN' : '8713782681702' - }, - { - 'SupplierGLN' : '8713782617794' - }, - { - 'SupplierGLN' : '8713782502014' - }, - { - 'SupplierGLN' : '8713782536477' - }, - { - 'SupplierGLN' : '8713782513454' - }, - { - 'SupplierGLN' : '8713782609577' - }, - { - 'SupplierGLN' : '8714231205562' - }, - { - 'SupplierGLN' : '8714231224693' - }, - { - 'SupplierGLN' : '8713782513874' - }, - { - 'SupplierGLN' : '8713782625560' - }, - { - 'SupplierGLN' : '8713782681634' - }, - { - 'SupplierGLN' : '8713782504919' - }, - { - 'SupplierGLN' : '8713782516981' - }, - { - 'SupplierGLN' : '8713782664125' - }, - { - 'SupplierGLN' : '8713782605876' - }, - { - 'SupplierGLN' : '8713782515045' - }, - { - 'SupplierGLN' : '8713782505664' - }, - { - 'SupplierGLN' : '8713782625508' - }, - { - 'SupplierGLN' : '8713782544885' - }, - { - 'SupplierGLN' : '8714231149941' - }, - { - 'SupplierGLN' : '8719604901072' - }, - { - 'SupplierGLN' : '8713782528175' - }, - { - 'SupplierGLN' : '8713782504384' - }, - { - 'SupplierGLN' : '8718288082183' - }, - { - 'SupplierGLN' : '8714231204527' - }, - { - 'SupplierGLN' : '8714231217428' - }, - { - 'SupplierGLN' : '8713782610153' - }, - { - 'SupplierGLN' : '8713782544199' - }, - { - 'SupplierGLN' : '8718288046215' - }, - { - 'SupplierGLN' : '8713782513911' - }, - { - 'SupplierGLN' : '8713782612515' - }, - { - 'SupplierGLN' : '8718288086259' - }, - { - 'SupplierGLN' : '8713782571119' - }, - { - 'SupplierGLN' : '8713783457276' - }, - { - 'SupplierGLN' : '8713782568997' - }, - { - 'SupplierGLN' : '8718288087195' - }, - { - 'SupplierGLN' : '8713782584393' - }, - { - 'SupplierGLN' : '8714231212201' - }, - { - 'SupplierGLN' : '8713782573625' - }, - { - 'SupplierGLN' : '8713783850121' - }, - { - 'SupplierGLN' : '8713782571331' - }, - { - 'SupplierGLN' : '8718288087416' - }, - { - 'SupplierGLN' : '8713782551937' - }, - { - 'SupplierGLN' : '8713782573526' - }, - { - 'SupplierGLN' : '8718288047359' - }, - { - 'SupplierGLN' : '8713783887592' - }, - { - 'SupplierGLN' : '8713782501017' - }, - { - 'SupplierGLN' : '8713782605562' - }, - { - 'SupplierGLN' : '8713782510538' - }, - { - 'SupplierGLN' : '8713783479018' - }, - { - 'SupplierGLN' : '8713782516783' - }, - { - 'SupplierGLN' : '8713782535012' - }, - { - 'SupplierGLN' : '8713782574479' - }, - { - 'SupplierGLN' : '8713782516202' - }, - { - 'SupplierGLN' : '8714231215141' - }, - { - 'SupplierGLN' : '8718288087720' - }, - { - 'SupplierGLN' : '8713783452189' - }, - { - 'SupplierGLN' : '8713782545103' - }, - { - 'SupplierGLN' : '8713782573564' - }, - { - 'SupplierGLN' : '8718288038180' - }, - { - 'SupplierGLN' : '8713782519364' - }, - { - 'SupplierGLN' : '8713782512907' - }, - { - 'SupplierGLN' : '8713782518602' - }, - { - 'SupplierGLN' : '8713782520858' - }, - { - 'SupplierGLN' : '8713783243206' - }, - { - 'SupplierGLN' : '8713782580708' - }, - { - 'SupplierGLN' : '8713783461662' - }, - { - 'SupplierGLN' : '8713782508313' - }, - { - 'SupplierGLN' : '8713782610771' - }, - { - 'SupplierGLN' : '8713782549859' - }, - { - 'SupplierGLN' : '8719604208652' - }, - { - 'SupplierGLN' : '8713783814598' - }, - { - 'SupplierGLN' : '8718288051103' - }, - { - 'SupplierGLN' : '8713782507392' - }, - { - 'SupplierGLN' : '8713783859117' - }, - { - 'SupplierGLN' : '8713783816134' - }, - { - 'SupplierGLN' : '8713782682891' - }, - { - 'SupplierGLN' : '8713783818466' - }, - { - 'SupplierGLN' : '8713782517971' - }, - { - 'SupplierGLN' : '8718288047267' - }, - { - 'SupplierGLN' : '8713782606583' - }, - { - 'SupplierGLN' : '8713783493915' - }, - { - 'SupplierGLN' : '8713782574554' - }, - { - 'SupplierGLN' : '8713782689463' - }, - { - 'SupplierGLN' : '8713783898499' - }, - { - 'SupplierGLN' : '8713782514796' - }, - { - 'SupplierGLN' : '8718288047366' - }, - { - 'SupplierGLN' : '8713782505039' - }, - { - 'SupplierGLN' : '8713782595009' - }, - { - 'SupplierGLN' : '8713783443767' - }, - { - 'SupplierGLN' : '8713782553337' - }, - { - 'SupplierGLN' : '8713783438213' - }, - { - 'SupplierGLN' : '8713782547169' - }, - { - 'SupplierGLN' : '8713782605500' - }, - { - 'SupplierGLN' : '8713782603674' - }, - { - 'SupplierGLN' : '8713782521756' - }, - { - 'SupplierGLN' : '8714231211228' - }, - { - 'SupplierGLN' : '8713783892466' - }, - { - 'SupplierGLN' : '8718288015303' - }, - { - 'SupplierGLN' : '8713782570518' - }, - { - 'SupplierGLN' : '8713783852972' - }, - { - 'SupplierGLN' : '8713782507552' - }, - { - 'SupplierGLN' : '8713782505558' - }, - { - 'SupplierGLN' : '8713782573854' - }, - { - 'SupplierGLN' : '8713782538600' - }, - { - 'SupplierGLN' : '8713782574097' - }, - { - 'SupplierGLN' : '8713782572789' - }, - { - 'SupplierGLN' : '8718288092434' - }, - { - 'SupplierGLN' : '8713782502618' - }, - { - 'SupplierGLN' : '8713782639369' - }, - { - 'SupplierGLN' : '8713783478592' - }, - { - 'SupplierGLN' : '8718288002655' - }, - { - 'SupplierGLN' : '8713782553993' - }, - { - 'SupplierGLN' : '8713782538839' - }, - { - 'SupplierGLN' : '8714231152149' - }, - { - 'SupplierGLN' : '8713783856888' - }, - { - 'SupplierGLN' : '8713783856024' - }, - { - 'SupplierGLN' : '8713782500089' - }, - { - 'SupplierGLN' : '8713782536941' - }, - { - 'SupplierGLN' : '8713782617381' - }, - { - 'SupplierGLN' : '8713782545417' - }, - { - 'SupplierGLN' : '8713782514048' - }, - { - 'SupplierGLN' : '8713783817896' - }, - { - 'SupplierGLN' : '8713782573953' - }, - { - 'SupplierGLN' : '8713782573267' - }, - { - 'SupplierGLN' : '8713782578859' - }, - { - 'SupplierGLN' : '8714231205074' - }, - { - 'SupplierGLN' : '8713783893890' - }, - { - 'SupplierGLN' : '8713782567396' - }, - { - 'SupplierGLN' : '8713782546971' - }, - { - 'SupplierGLN' : '8713782677835' - }, - { - 'SupplierGLN' : '8718288052124' - }, - { - 'SupplierGLN' : '8713782575612' - }, - { - 'SupplierGLN' : '8713782614229' - }, - { - 'SupplierGLN' : '8714231205166' - }, - { - 'SupplierGLN' : '8719604986987' - }, - { - 'SupplierGLN' : '8719604207525' - }, - { - 'SupplierGLN' : '8713782587196' - }, - { - 'SupplierGLN' : '8713782601137' - }, - { - 'SupplierGLN' : '8713782521190' - }, - { - 'SupplierGLN' : '8713782638621' - }, - { - 'SupplierGLN' : '8713782575131' - }, - { - 'SupplierGLN' : '8713782682709' - }, - { - 'SupplierGLN' : '8714231217633' - }, - { - 'SupplierGLN' : '8718288031518' - }, - { - 'SupplierGLN' : '8713782605609' - }, - { - 'SupplierGLN' : '8713782686271' - }, - { - 'SupplierGLN' : '8713782666693' - }, - { - 'SupplierGLN' : '8713783249260' - }, - { - 'SupplierGLN' : '8713783822418' - }, - { - 'SupplierGLN' : '8713782500041' - }, - { - 'SupplierGLN' : '8713782548555' - }, - { - 'SupplierGLN' : '8713782585031' - }, - { - 'SupplierGLN' : '8713782520834' - }, - { - 'SupplierGLN' : '8713782682419' - }, - { - 'SupplierGLN' : '8713782553887' - }, - { - 'SupplierGLN' : '8713782518718' - }, - { - 'SupplierGLN' : '8713782552453' - }, - { - 'SupplierGLN' : '8713783893593' - }, - { - 'SupplierGLN' : '8713782610016' - }, - { - 'SupplierGLN' : '8713782585109' - }, - { - 'SupplierGLN' : '8713782568126' - }, - { - 'SupplierGLN' : '8713782532745' - }, - { - 'SupplierGLN' : '8713782551357' - }, - { - 'SupplierGLN' : '8713782521169' - }, - { - 'SupplierGLN' : '8713782582436' - }, - { - 'SupplierGLN' : '8713782605593' - }, - { - 'SupplierGLN' : '8713782515212' - }, - { - 'SupplierGLN' : '8713782614847' - }, - { - 'SupplierGLN' : '8713782513508' - }, - { - 'SupplierGLN' : '8714231220244' - }, - { - 'SupplierGLN' : '8718288039194' - }, - { - 'SupplierGLN' : '8719604246036' - }, - { - 'SupplierGLN' : '8713782611976' - }, - { - 'SupplierGLN' : '8713782608259' - }, - { - 'SupplierGLN' : '8718288001368' - }, - { - 'SupplierGLN' : '8714231204633' - }, - { - 'SupplierGLN' : '8713782691442' - }, - { - 'SupplierGLN' : '8713782606514' - }, - { - 'SupplierGLN' : '8713782609010' - }, - { - 'SupplierGLN' : '8713782516493' - }, - { - 'SupplierGLN' : '8713782500324' - }, - { - 'SupplierGLN' : '8713782678283' - }, - { - 'SupplierGLN' : '8713782690469' - }, - { - 'SupplierGLN' : '8713782520278' - }, - { - 'SupplierGLN' : '8714231217800' - }, - { - 'SupplierGLN' : '8713782605432' - }, - { - 'SupplierGLN' : '8714231145585' - }, - { - 'SupplierGLN' : '8713782608990' - }, - { - 'SupplierGLN' : '8713782608983' - }, - { - 'SupplierGLN' : '8713782568539' - }, - { - 'SupplierGLN' : '8713782503257' - }, - { - 'SupplierGLN' : '8713782520711' - }, - { - 'SupplierGLN' : '8713783461877' - }, - { - 'SupplierGLN' : '8718288038784' - }, - { - 'SupplierGLN' : '8713782694085' - }, - { - 'SupplierGLN' : '8713782506449' - }, - { - 'SupplierGLN' : '8713782521183' - }, - { - 'SupplierGLN' : '8713782567952' - }, - { - 'SupplierGLN' : '8713782502892' - }, - { - 'SupplierGLN' : '8718288050861' - }, - { - 'SupplierGLN' : '8713782530727' - }, - { - 'SupplierGLN' : '8713782513539' - }, - { - 'SupplierGLN' : '8713783452219' - }, - { - 'SupplierGLN' : '8718288062796' - }, - { - 'SupplierGLN' : '8713783439937' - }, - { - 'SupplierGLN' : '8713782610726' - }, - { - 'SupplierGLN' : '8713782678146' - }, - { - 'SupplierGLN' : '8713782606026' - }, - { - 'SupplierGLN' : '8713782572437' - }, - { - 'SupplierGLN' : '8713782582115' - }, - { - 'SupplierGLN' : '8713783440148' - }, - { - 'SupplierGLN' : '8713782572383' - }, - { - 'SupplierGLN' : '8713782574103' - }, - { - 'SupplierGLN' : '8713782569550' - }, - { - 'SupplierGLN' : '8713782576008' - }, - { - 'SupplierGLN' : '8719604204791' - }, - { - 'SupplierGLN' : '8713782516936' - }, - { - 'SupplierGLN' : '8713782570761' - }, - { - 'SupplierGLN' : '8713783438749' - }, - { - 'SupplierGLN' : '8713782519777' - }, - { - 'SupplierGLN' : '8713782567518' - }, - { - 'SupplierGLN' : '8713782520568' - }, - { - 'SupplierGLN' : '8714231208518' - }, - { - 'SupplierGLN' : '8713782544977' - }, - { - 'SupplierGLN' : '8713782537450' - }, - { - 'SupplierGLN' : '8713782578217' - }, - { - 'SupplierGLN' : '8713782622996' - }, - { - 'SupplierGLN' : '8713782550749' - }, - { - 'SupplierGLN' : '8714231206897' - }, - { - 'SupplierGLN' : '8713782539690' - }, - { - 'SupplierGLN' : '8713782519395' - }, - { - 'SupplierGLN' : '8713782665658' - }, - { - 'SupplierGLN' : '8713782616483' - }, - { - 'SupplierGLN' : '8713782516547' - }, - { - 'SupplierGLN' : '8713782514666' - }, - { - 'SupplierGLN' : '8713782639048' - }, - { - 'SupplierGLN' : '8713782606941' - }, - { - 'SupplierGLN' : '8714231214151' - }, - { - 'SupplierGLN' : '8713782608921' - }, - { - 'SupplierGLN' : '8713782581033' - }, - { - 'SupplierGLN' : '8713782571737' - }, - { - 'SupplierGLN' : '8713782694993' - }, - { - 'SupplierGLN' : '8714231141648' - }, - { - 'SupplierGLN' : '8713782505701' - }, - { - 'SupplierGLN' : '8713782517667' - }, - { - 'SupplierGLN' : '8713783889893' - }, - { - 'SupplierGLN' : '8713782617541' - }, - { - 'SupplierGLN' : '8713783816462' - }, - { - 'SupplierGLN' : '8713782572949' - }, - { - 'SupplierGLN' : '8713782653662' - }, - { - 'SupplierGLN' : '8713782505770' - }, - { - 'SupplierGLN' : '8718288083944' - }, - { - 'SupplierGLN' : '8714231211235' - }, - { - 'SupplierGLN' : '8713782574851' - }, - { - 'SupplierGLN' : '8713782518831' - }, - { - 'SupplierGLN' : '8713782615059' - }, - { - 'SupplierGLN' : '8713782592060' - }, - { - 'SupplierGLN' : '8718288018373' - }, - { - 'SupplierGLN' : '8713782585123' - }, - { - 'SupplierGLN' : '8713782689470' - }, - { - 'SupplierGLN' : '8713782525549' - }, - { - 'SupplierGLN' : '8713783851425' - }, - { - 'SupplierGLN' : '8718288079022' - }, - { - 'SupplierGLN' : '8718288003812' - }, - { - 'SupplierGLN' : '8713782508979' - }, - { - 'SupplierGLN' : '8713782638270' - }, - { - 'SupplierGLN' : '8713783466841' - }, - { - 'SupplierGLN' : '8713782574219' - }, - { - 'SupplierGLN' : '8713782516882' - }, - { - 'SupplierGLN' : '8713782621609' - }, - { - 'SupplierGLN' : '8718288021441' - }, - { - 'SupplierGLN' : '8713782519005' - }, - { - 'SupplierGLN' : '8713782664576' - }, - { - 'SupplierGLN' : '8719604205873' - }, - { - 'SupplierGLN' : '8718288053565' - }, - { - 'SupplierGLN' : '8713782614380' - }, - { - 'SupplierGLN' : '8713782553054' - }, - { - 'SupplierGLN' : '8713783822869' - }, - { - 'SupplierGLN' : '8713782605623' - }, - { - 'SupplierGLN' : '8713782615134' - }, - { - 'SupplierGLN' : '8719604901225' - }, - { - 'SupplierGLN' : '8713782670485' - }, - { - 'SupplierGLN' : '8713783859599' - }, - { - 'SupplierGLN' : '8718288064585' - }, - { - 'SupplierGLN' : '8713783815366' - }, - { - 'SupplierGLN' : '8713782551753' - }, - { - 'SupplierGLN' : '8713782591179' - }, - { - 'SupplierGLN' : '8713782568072' - }, - { - 'SupplierGLN' : '8713783481844' - }, - { - 'SupplierGLN' : '8713782681658' - }, - { - 'SupplierGLN' : '8713782584966' - }, - { - 'SupplierGLN' : '8714231221333' - }, - { - 'SupplierGLN' : '8713783818046' - }, - { - 'SupplierGLN' : '8713782567822' - }, - { - 'SupplierGLN' : '8719604992261' - }, - { - 'SupplierGLN' : '8713783254509' - }, - { - 'SupplierGLN' : '8718288056511' - }, - { - 'SupplierGLN' : '8714231216780' - }, - { - 'SupplierGLN' : '8713782581026' - }, - { - 'SupplierGLN' : '8718288084712' - }, - { - 'SupplierGLN' : '8718288009739' - }, - { - 'SupplierGLN' : '8718288046017' - }, - { - 'SupplierGLN' : '8713782569888' - }, - { - 'SupplierGLN' : '8713782583990' - }, - { - 'SupplierGLN' : '8713783888919' - }, - { - 'SupplierGLN' : '8718288064707' - }, - { - 'SupplierGLN' : '8713782572055' - }, - { - 'SupplierGLN' : '8713782577814' - }, - { - 'SupplierGLN' : '8713782552897' - }, - { - 'SupplierGLN' : '8713782528618' - }, - { - 'SupplierGLN' : '8713783453131' - }, - { - 'SupplierGLN' : '8713782573335' - }, - { - 'SupplierGLN' : '8718288050267' - }, - { - 'SupplierGLN' : '8713782522517' - }, - { - 'SupplierGLN' : '8713783888896' - }, - { - 'SupplierGLN' : '8713783849026' - }, - { - 'SupplierGLN' : '8713783885109' - }, - { - 'SupplierGLN' : '8713782539911' - }, - { - 'SupplierGLN' : '8713782568676' - }, - { - 'SupplierGLN' : '8713782681818' - }, - { - 'SupplierGLN' : '8713782666242' - }, - { - 'SupplierGLN' : '8713782624754' - }, - { - 'SupplierGLN' : '8713783452479' - }, - { - 'SupplierGLN' : '8718288005922' - }, - { - 'SupplierGLN' : '8713782508795' - }, - { - 'SupplierGLN' : '8713782522203' - }, - { - 'SupplierGLN' : '8713783916568' - }, - { - 'SupplierGLN' : '8713782688961' - }, - { - 'SupplierGLN' : '8713782605630' - }, - { - 'SupplierGLN' : '8713782515694' - }, - { - 'SupplierGLN' : '8713782575667' - }, - { - 'SupplierGLN' : '8713782578163' - }, - { - 'SupplierGLN' : '8713782505886' - }, - { - 'SupplierGLN' : '8713783814659' - }, - { - 'SupplierGLN' : '8713782504728' - }, - { - 'SupplierGLN' : '8713782584355' - }, - { - 'SupplierGLN' : '8713783469538' - }, - { - 'SupplierGLN' : '8718288045645' - }, - { - 'SupplierGLN' : '8713782606477' - }, - { - 'SupplierGLN' : '8713782569147' - }, - { - 'SupplierGLN' : '8714231140702' - }, - { - 'SupplierGLN' : '8718288099747' - }, - { - 'SupplierGLN' : '8713782583518' - }, - { - 'SupplierGLN' : '8713782537696' - }, - { - 'SupplierGLN' : '8718288086266' - }, - { - 'SupplierGLN' : '8713782605319' - }, - { - 'SupplierGLN' : '8713782507316' - }, - { - 'SupplierGLN' : '8713782536743' - }, - { - 'SupplierGLN' : '8714231206477' - }, - { - 'SupplierGLN' : '8713783894972' - }, - { - 'SupplierGLN' : '8713782541693' - }, - { - 'SupplierGLN' : '8713782516769' - }, - { - 'SupplierGLN' : '8713782606606' - }, - { - 'SupplierGLN' : '8713782596952' - }, - { - 'SupplierGLN' : '8718288050076' - }, - { - 'SupplierGLN' : '8713783853535' - }, - { - 'SupplierGLN' : '8713782635606' - }, - { - 'SupplierGLN' : '8713782508689' - }, - { - 'SupplierGLN' : '8714231147190' - }, - { - 'SupplierGLN' : '8718288085665' - }, - { - 'SupplierGLN' : '8713782679457' - }, - { - 'SupplierGLN' : '8713783469002' - }, - { - 'SupplierGLN' : '8713782501260' - }, - { - 'SupplierGLN' : '8713782516554' - }, - { - 'SupplierGLN' : '8714231147589' - }, - { - 'SupplierGLN' : '8718288087805' - }, - { - 'SupplierGLN' : '8713782518886' - }, - { - 'SupplierGLN' : '8713783853177' - }, - { - 'SupplierGLN' : '8713783822449' - }, - { - 'SupplierGLN' : '8718288045218' - }, - { - 'SupplierGLN' : '8713782519906' - }, - { - 'SupplierGLN' : '8713782500140' - }, - { - 'SupplierGLN' : '8713782574189' - }, - { - 'SupplierGLN' : '8714231204671' - }, - { - 'SupplierGLN' : '8713783889008' - }, - { - 'SupplierGLN' : '8714231218593' - }, - { - 'SupplierGLN' : '8713783843765' - }, - { - 'SupplierGLN' : '8714231222323' - }, - { - 'SupplierGLN' : '8714231147794' - }, - { - 'SupplierGLN' : '8713782526652' - }, - { - 'SupplierGLN' : '8713783860571' - }, - { - 'SupplierGLN' : '8713782643403' - }, - { - 'SupplierGLN' : '8718288051028' - }, - { - 'SupplierGLN' : '8713782688756' - }, - { - 'SupplierGLN' : '8713782589268' - }, - { - 'SupplierGLN' : '8718288069351' - }, - { - 'SupplierGLN' : '8713783251591' - }, - { - 'SupplierGLN' : '8718288049834' - }, - { - 'SupplierGLN' : '8713783894163' - }, - { - 'SupplierGLN' : '8713783467602' - }, - { - 'SupplierGLN' : '8718288071163' - }, - { - 'SupplierGLN' : '8714231214113' - }, - { - 'SupplierGLN' : '8714231196648' - }, - { - 'SupplierGLN' : '8718288048059' - }, - { - 'SupplierGLN' : '8713782567358' - }, - { - 'SupplierGLN' : '8713782570150' - }, - { - 'SupplierGLN' : '8718288049179' - }, - { - 'SupplierGLN' : '8713782604893' - }, - { - 'SupplierGLN' : '8713782626376' - }, - { - 'SupplierGLN' : '8713782505015' - }, - { - 'SupplierGLN' : '8713783419922' - }, - { - 'SupplierGLN' : '8713783478431' - }, - { - 'SupplierGLN' : '8713783847381' - }, - { - 'SupplierGLN' : '8718288059789' - }, - { - 'SupplierGLN' : '8718288056764' - }, - { - 'SupplierGLN' : '8713782639680' - }, - { - 'SupplierGLN' : '8713783490587' - }, - { - 'SupplierGLN' : '8713782508856' - }, - { - 'SupplierGLN' : '8713782535005' - }, - { - 'SupplierGLN' : '8713782574059' - }, - { - 'SupplierGLN' : '8713782510880' - }, - { - 'SupplierGLN' : '8713782512761' - }, - { - 'SupplierGLN' : '8713782573236' - }, - { - 'SupplierGLN' : '8714231220794' - }, - { - 'SupplierGLN' : '8713782571638' - }, - { - 'SupplierGLN' : '8713782609249' - }, - { - 'SupplierGLN' : '8713782674131' - }, - { - 'SupplierGLN' : '8714231211099' - }, - { - 'SupplierGLN' : '8718288015938' - }, - { - 'SupplierGLN' : '8713782591643' - }, - { - 'SupplierGLN' : '8713782619385' - }, - { - 'SupplierGLN' : '8718288004550' - }, - { - 'SupplierGLN' : '8718288033796' - }, - { - 'SupplierGLN' : '8713782514345' - }, - { - 'SupplierGLN' : '8713782607085' - }, - { - 'SupplierGLN' : '8713782520308' - }, - { - 'SupplierGLN' : '8719604986246' - }, - { - 'SupplierGLN' : '8713782679075' - }, - { - 'SupplierGLN' : '8713783468470' - }, - { - 'SupplierGLN' : '8713783852613' - }, - { - 'SupplierGLN' : '8713782574967' - }, - { - 'SupplierGLN' : '8719604902123' - }, - { - 'SupplierGLN' : '8713782682006' - }, - { - 'SupplierGLN' : '8713783821626' - }, - { - 'SupplierGLN' : '8718288031396' - }, - { - 'SupplierGLN' : '8713782690100' - }, - { - 'SupplierGLN' : '8713782573465' - }, - { - 'SupplierGLN' : '8714231207795' - }, - { - 'SupplierGLN' : '8714231218111' - }, - { - 'SupplierGLN' : '8718288069825' - }, - { - 'SupplierGLN' : '8713782606248' - }, - { - 'SupplierGLN' : '8713782678412' - }, - { - 'SupplierGLN' : '8713782570525' - }, - { - 'SupplierGLN' : '8713782583549' - }, - { - 'SupplierGLN' : '8713782508955' - }, - { - 'SupplierGLN' : '8713782607108' - }, - { - 'SupplierGLN' : '8719604245190' - }, - { - 'SupplierGLN' : '8718288047618' - }, - { - 'SupplierGLN' : '8713783813287' - }, - { - 'SupplierGLN' : '8713782669328' - }, - { - 'SupplierGLN' : '8718288023551' - }, - { - 'SupplierGLN' : '8714231204596' - }, - { - 'SupplierGLN' : '8713782528298' - }, - { - 'SupplierGLN' : '8713782511757' - }, - { - 'SupplierGLN' : '8718288037145' - }, - { - 'SupplierGLN' : '8713782517391' - }, - { - 'SupplierGLN' : '8713782596167' - }, - { - 'SupplierGLN' : '8713782521961' - }, - { - 'SupplierGLN' : '8718288093950' - }, - { - 'SupplierGLN' : '8713782508511' - }, - { - 'SupplierGLN' : '8713783816073' - }, - { - 'SupplierGLN' : '8713782613925' - }, - { - 'SupplierGLN' : '8718288030719' - }, - { - 'SupplierGLN' : '8713782525921' - }, - { - 'SupplierGLN' : '8714231215530' - }, - { - 'SupplierGLN' : '8713782572062' - }, - { - 'SupplierGLN' : '8713782534923' - }, - { - 'SupplierGLN' : '8713782513799' - }, - { - 'SupplierGLN' : '8713782508320' - }, - { - 'SupplierGLN' : '8713782642604' - }, - { - 'SupplierGLN' : '8713782608457' - }, - { - 'SupplierGLN' : '8713782505824' - }, - { - 'SupplierGLN' : '8713783816813' - }, - { - 'SupplierGLN' : '8713782543529' - }, - { - 'SupplierGLN' : '8718288064837' - }, - { - 'SupplierGLN' : '8713782678351' - }, - { - 'SupplierGLN' : '8713783858134' - }, - { - 'SupplierGLN' : '8713782549507' - }, - { - 'SupplierGLN' : '8713782576237' - }, - { - 'SupplierGLN' : '8713783804971' - }, - { - 'SupplierGLN' : '8718288068033' - }, - { - 'SupplierGLN' : '8718288053596' - }, - { - 'SupplierGLN' : '8713783852361' - }, - { - 'SupplierGLN' : '8713782568911' - }, - { - 'SupplierGLN' : '8718288011930' - }, - { - 'SupplierGLN' : '8713782576138' - }, - { - 'SupplierGLN' : '8713782584881' - }, - { - 'SupplierGLN' : '8713782579917' - }, - { - 'SupplierGLN' : '8713782576152' - }, - { - 'SupplierGLN' : '8718288023575' - }, - { - 'SupplierGLN' : '8713782500737' - }, - { - 'SupplierGLN' : '8713782687810' - }, - { - 'SupplierGLN' : '8718288092403' - }, - { - 'SupplierGLN' : '8714231224686' - }, - { - 'SupplierGLN' : '8713782578071' - }, - { - 'SupplierGLN' : '8718288026958' - }, - { - 'SupplierGLN' : '5790001108670' - }, - { - 'SupplierGLN' : '8714231145875' - }, - { - 'SupplierGLN' : '8714231212072' - }, - { - 'SupplierGLN' : '8718288032157' - }, - { - 'SupplierGLN' : '8713782530178' - }, - { - 'SupplierGLN' : '8718288032478' - }, - { - 'SupplierGLN' : '8713782546773' - }, - { - 'SupplierGLN' : '8713782548142' - }, - { - 'SupplierGLN' : '8713783801772' - }, - { - 'SupplierGLN' : '8719604204210' - }, - { - 'SupplierGLN' : '8718288061706' - }, - { - 'SupplierGLN' : '8713782687278' - }, - { - 'SupplierGLN' : '8713782672311' - }, - { - 'SupplierGLN' : '8713782597027' - }, - { - 'SupplierGLN' : '8713782527635' - }, - { - 'SupplierGLN' : '8718288064950' - }, - { - 'SupplierGLN' : '8718288002150' - }, - { - 'SupplierGLN' : '8719604205163' - }, - { - 'SupplierGLN' : '8714231147350' - }, - { - 'SupplierGLN' : '8713782509211' - }, - { - 'SupplierGLN' : '8713782518107' - }, - { - 'SupplierGLN' : '8713782579184' - }, - { - 'SupplierGLN' : '8713782582917' - }, - { - 'SupplierGLN' : '8713783858363' - }, - { - 'SupplierGLN' : '8713782579863' - }, - { - 'SupplierGLN' : '8713782580517' - }, - { - 'SupplierGLN' : '8719604206481' - }, - { - 'SupplierGLN' : '8718288004710' - }, - { - 'SupplierGLN' : '8714231213987' - }, - { - 'SupplierGLN' : '8714231144908' - }, - { - 'SupplierGLN' : '8713782545301' - }, - { - 'SupplierGLN' : '8718288089342' - }, - { - 'SupplierGLN' : '8713782525396' - }, - { - 'SupplierGLN' : '8714231217022' - }, - { - 'SupplierGLN' : '8713782606200' - }, - { - 'SupplierGLN' : '8718288088277' - }, - { - 'SupplierGLN' : '8718288093899' - }, - { - 'SupplierGLN' : '8713782513225' - }, - { - 'SupplierGLN' : '8718288083463' - }, - { - 'SupplierGLN' : '8713782678931' - }, - { - 'SupplierGLN' : '8718288044785' - }, - { - 'SupplierGLN' : '8713782534466' - }, - { - 'SupplierGLN' : '8713782567785' - }, - { - 'SupplierGLN' : '8718288000521' - }, - { - 'SupplierGLN' : '8713782524962' - }, - { - 'SupplierGLN' : '8713783853702' - }, - { - 'SupplierGLN' : '8714231218081' - }, - { - 'SupplierGLN' : '8713783255933' - }, - { - 'SupplierGLN' : '8713783894026' - }, - { - 'SupplierGLN' : '8713782547114' - }, - { - 'SupplierGLN' : '8713783885697' - }, - { - 'SupplierGLN' : '8713782579085' - }, - { - 'SupplierGLN' : '8713782523965' - }, - { - 'SupplierGLN' : '8714231142102' - }, - { - 'SupplierGLN' : '8713782623160' - }, - { - 'SupplierGLN' : '8713782574646' - }, - { - 'SupplierGLN' : '8713783814666' - }, - { - 'SupplierGLN' : '8713782626253' - }, - { - 'SupplierGLN' : '8713782550435' - }, - { - 'SupplierGLN' : '8713782595122' - }, - { - 'SupplierGLN' : '8713782577418' - }, - { - 'SupplierGLN' : '8713783479339' - }, - { - 'SupplierGLN' : '8718288040404' - }, - { - 'SupplierGLN' : '8713782508900' - }, - { - 'SupplierGLN' : '8713782670928' - }, - { - 'SupplierGLN' : '8713782626420' - }, - { - 'SupplierGLN' : '8713782536293' - }, - { - 'SupplierGLN' : '8713782669700' - }, - { - 'SupplierGLN' : '8713782512181' - }, - { - 'SupplierGLN' : '8713782542522' - }, - { - 'SupplierGLN' : '8713783439517' - }, - { - 'SupplierGLN' : '8713782607337' - }, - { - 'SupplierGLN' : '8713782575117' - }, - { - 'SupplierGLN' : '8714231140894' - }, - { - 'SupplierGLN' : '8713782669595' - }, - { - 'SupplierGLN' : '8714231210887' - }, - { - 'SupplierGLN' : '8713783898772' - }, - { - 'SupplierGLN' : '8713782509402' - }, - { - 'SupplierGLN' : '8718288033192' - }, - { - 'SupplierGLN' : '8713782576572' - }, - { - 'SupplierGLN' : '8713782505817' - }, - { - 'SupplierGLN' : '8713783440032' - }, - { - 'SupplierGLN' : '8713782534817' - }, - { - 'SupplierGLN' : '8713782604497' - }, - { - 'SupplierGLN' : '8713782518800' - }, - { - 'SupplierGLN' : '8713782545257' - }, - { - 'SupplierGLN' : '8713782680095' - }, - { - 'SupplierGLN' : '8719604206719' - }, - { - 'SupplierGLN' : '8713782542232' - }, - { - 'SupplierGLN' : '8714231214366' - }, - { - 'SupplierGLN' : '8713782536187' - }, - { - 'SupplierGLN' : '8713782506098' - }, - { - 'SupplierGLN' : '8714231153382' - }, - { - 'SupplierGLN' : '8713782649566' - }, - { - 'SupplierGLN' : '8713782608136' - }, - { - 'SupplierGLN' : '8714231152859' - }, - { - 'SupplierGLN' : '8713782518954' - }, - { - 'SupplierGLN' : '8713782610580' - }, - { - 'SupplierGLN' : '8713782503837' - }, - { - 'SupplierGLN' : '8713782570570' - }, - { - 'SupplierGLN' : '8713782587868' - }, - { - 'SupplierGLN' : '8713782504155' - }, - { - 'SupplierGLN' : '8714231217954' - }, - { - 'SupplierGLN' : '8713782505527' - }, - { - 'SupplierGLN' : '8718288062970' - }, - { - 'SupplierGLN' : '8713782524146' - }, - { - 'SupplierGLN' : '8713782635385' - }, - { - 'SupplierGLN' : '8713782518589' - }, - { - 'SupplierGLN' : '8713782582078' - }, - { - 'SupplierGLN' : '8713782550343' - }, - { - 'SupplierGLN' : '8713782505251' - }, - { - 'SupplierGLN' : '8713782513935' - }, - { - 'SupplierGLN' : '8713782518787' - }, - { - 'SupplierGLN' : '8713782635002' - }, - { - 'SupplierGLN' : '8713782583617' - }, - { - 'SupplierGLN' : '8714231211839' - }, - { - 'SupplierGLN' : '8713783853993' - }, - { - 'SupplierGLN' : '8713782511993' - }, - { - 'SupplierGLN' : '8713782583624' - }, - { - 'SupplierGLN' : '8713782512167' - }, - { - 'SupplierGLN' : '8718288084057' - }, - { - 'SupplierGLN' : '8714231151128' - }, - { - 'SupplierGLN' : '8713782694009' - }, - { - 'SupplierGLN' : '8713782606408' - }, - { - 'SupplierGLN' : '8713783860106' - }, - { - 'SupplierGLN' : '8713783822319' - }, - { - 'SupplierGLN' : '8718288008046' - }, - { - 'SupplierGLN' : '8713782624624' - }, - { - 'SupplierGLN' : '8713782535173' - }, - { - 'SupplierGLN' : '8714231207078' - }, - { - 'SupplierGLN' : '8713782606903' - }, - { - 'SupplierGLN' : '8713782570419' - }, - { - 'SupplierGLN' : '8713782503455' - }, - { - 'SupplierGLN' : '8713782507507' - }, - { - 'SupplierGLN' : '8713782609874' - }, - { - 'SupplierGLN' : '8714231213574' - }, - { - 'SupplierGLN' : '8713782608112' - }, - { - 'SupplierGLN' : '8713782688671' - }, - { - 'SupplierGLN' : '8713782688169' - }, - { - 'SupplierGLN' : '8713783256169' - }, - { - 'SupplierGLN' : '8719604991912' - }, - { - 'SupplierGLN' : '8713782579894' - }, - { - 'SupplierGLN' : '8713783468890' - }, - { - 'SupplierGLN' : '8718288055835' - }, - { - 'SupplierGLN' : '8713783821565' - }, - { - 'SupplierGLN' : '8714231147572' - }, - { - 'SupplierGLN' : '8713782542270' - }, - { - 'SupplierGLN' : '8713782687780' - }, - { - 'SupplierGLN' : '8713783484029' - }, - { - 'SupplierGLN' : '8718288049698' - }, - { - 'SupplierGLN' : '8713782532288' - }, - { - 'SupplierGLN' : '8713783488317' - }, - { - 'SupplierGLN' : '8719604985997' - }, - { - 'SupplierGLN' : '8713782546759' - }, - { - 'SupplierGLN' : '8713782530543' - }, - { - 'SupplierGLN' : '8713782573342' - }, - { - 'SupplierGLN' : '8713782672212' - }, - { - 'SupplierGLN' : '8713782504230' - }, - { - 'SupplierGLN' : '8713783801963' - }, - { - 'SupplierGLN' : '8713782517421' - }, - { - 'SupplierGLN' : '8713782581200' - }, - { - 'SupplierGLN' : '8713782609218' - }, - { - 'SupplierGLN' : '8713782519043' - }, - { - 'SupplierGLN' : '8713782590028' - }, - { - 'SupplierGLN' : '8718288016065' - }, - { - 'SupplierGLN' : '8713783253557' - }, - { - 'SupplierGLN' : '8713782551876' - }, - { - 'SupplierGLN' : '8713782605241' - }, - { - 'SupplierGLN' : '8713783892282' - }, - { - 'SupplierGLN' : '8713782507989' - }, - { - 'SupplierGLN' : '8713782519470' - }, - { - 'SupplierGLN' : '8713782517766' - }, - { - 'SupplierGLN' : '8713783443439' - }, - { - 'SupplierGLN' : '8713782622514' - }, - { - 'SupplierGLN' : '8713782640242' - }, - { - 'SupplierGLN' : '8718288093882' - }, - { - 'SupplierGLN' : '8718288008411' - }, - { - 'SupplierGLN' : '8713782607047' - } - ]}; +let floraholland = [ + 8713783893456, + 8713782539218, + 8713782545820, + 8718288004970, +]; -export default suppliers; \ No newline at end of file +export default {floraholland}; \ No newline at end of file diff --git a/test.json b/test.json new file mode 100644 index 0000000..5fff6ef --- /dev/null +++ b/test.json @@ -0,0 +1,29 @@ +{ + "commercialName": "Viveros Las Cunas", + "email": null, + "phone": null, + "website": null, + "mailingAddress": { + "addressLine": "Carretera 0A-352", + "city": "Vera - Almeria", + "countryCode": "ES", + "postalCode": "04620", + "stateOrProvince": null + }, + "physicalAddress": { + "addressLine": "Carretera 0A-352", + "city": "Vera - Almeria", + "countryCode": "ES", + "postalCode": "04620", + "stateOrProvince": null + }, + "phytosanitaryNumber": null, + "sequenceNumber": 195803, + "organizationId": "ebc1894a-c3be-3a19-9de2-40b2e691cc9f", + "companyGln": "8718288089847", + "name": "Viveros Las Cunas", + "endDate": null, + "rfhRelationId": 0, + "organizationType": "SUPPLIER", + "paymentProviders": [] + } \ No newline at end of file diff --git a/utils.js b/utils.js index 70fa887..520e93c 100644 --- a/utils.js +++ b/utils.js @@ -2,8 +2,9 @@ import moment from 'moment'; import fetch from 'node-fetch'; import dotenv from 'dotenv'; import { models } from './models/index.js'; -import { v4 as uuidv4 } from 'uuid'; -import cliProgress from 'cli-progress'; +//import { v4 as uuidv4 } from 'uuid'; +//import cliProgress from 'cli-progress'; +import suppliersGln from './suppliersGln.js'; dotenv.config(); /** @@ -86,6 +87,7 @@ async function updateClientConfig(clientId, clientSecret, accessToken, tokenExpi clientSecret: clientSecret, currentToken: accessToken, tokenExpiration: tokenExpirationDate, + requestLimit : 500 }, { where: { @@ -123,25 +125,6 @@ async function sleep(ms) { }); } -/** - * Returns the uuidv4 string with the prefix 'Vn-' - * - * @param {string} uuidv4 - uuidv4 string - * @returns - */ -async function vnUuid(uuidv4) { - return 'Vn-' + uuidv4; -} -/** - * Returns the uuidv4 string without the prefix 'Vn-' - * - * @param {string} uuidv4 - uuidv4 string with prefix 'Vn-' - * @returns - */ -async function removeVnPrefix(uuidv4) { - return uuidv4.replace('Vn-', ''); -} - /** * Recieves an array of functions and executes them in a queue with the given concurrency * @@ -179,425 +162,252 @@ async function asyncQueue(fnArray, concurrency = 1) { // 4. Execute the run function while the concurrency is greater than 0 // 5. Return the results - /** + * Syncs the sequence number for the given model + * if no params are given it will reset all the sequence number to 0 * - * Inserts every tradeitem from the organization into the DB - * - * @param {*} organizationGln + * @param {Number} current - current sequence number + * @param {String} model - model name + * @param {Number} maximumSequenceNumber - maximum sequence number + * @returns */ -async function getTradeitems(organizationGln) { +async function syncSequence(current = 0, model = null ,maximumSequenceNumber = 0){ + if (model == null && current == 0){ + + let mockModels = ['suppliers','tradeItems','supplyLines',]; - const headers = { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer ' + await getJWT(), - 'X-Api-Key': process.env.API_KEY, - }; - - // Get the organization id from the organizationGln - - const organizationsUrl = `${BASE_CUSTOMER_URL}organizations/gln/${organizationGln}`; - const organizationsRequest = await fetch(organizationsUrl, { - method: 'GET', - headers: headers, - }); - - const organizationsResponse = await organizationsRequest.json(); - - const organizationId = organizationsResponse.organizationId; - console.log('Organization ID: ', organizationId); - - // Get the tradeitems from the organization - - const tradeitemsUrl = `${BASE_CUSTOMER_URL}trade-items?supplierOrganizationId=${organizationId}`; - const tradeitemsRequest = await fetch(tradeitemsUrl, { - method: 'GET', - headers: headers, - }); - - const tradeitemsResponse = await tradeitemsRequest.json(); - - // If there is no tradeitems - if (tradeitemsResponse.length == 0) { - return; - } - - // if there is at least one tradeitem, save it in the database - - //console.log(tradeitemsResponse[0]); - - try { - - if (tradeitemsResponse.length > 0 && tradeitemsResponse != null) { - - let bar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_grey); - bar.start(tradeitemsResponse.length, 0); - - await tradeitemsResponse.forEach(async item => { - - bar.increment(); - - try { - - item.tradeItemId = await vnUuid(item.tradeItemId); - - await models.suppliers.upsert({ - supplierId: await vnUuid(organizationId), - supplierGln: organizationGln, - }); - - await models.tradeItem.upsert({ - tradeItemId: item.tradeItemId, - supplierOrganizationId: organizationGln, - supplierOrganizationUuid: await vnUuid(organizationId), - code: item.code, - gtin: item.gtin, - vbnProductCode: item.vbnProductCode, - name: item.name, - isDeleted: item.isDeleted, - sequenceNumber: item.sequenceNumber, - tradeItemVersion: item.tradeItemVersion, - isCustomerSpecific: item.isCustomerSpecific, - isHiddenInCatalog: item.isHiddenInCatalog, - }); - - await item.characteristics.forEach((characteristic) => { - models.characteristics.upsert({ - tradeItemFk: item.tradeItemId, - vbnCode: characteristic.vbnCode, - vbnValueCode: characteristic.vbnValueCode, - }); - }); - - await item.seasonalPeriods.forEach((seasonalPeriod) => { - models.seasonalPeriod.upsert({ - tradeItemFk: item.tradeItemId, - startWeek: seasonalPeriod.startWeek, - endWeek: seasonalPeriod.endWeek, - }); - - }); - - await item.photos.forEach(async (photo) => { - - photo.id = await vnUuid(photo.id); - - models.photos.upsert({ - tradeItemFk: item.tradeItemId, - photoId: photo.id, - url: photo.url, - seasonalPeriodFk: JSON.stringify(photo.seasonalPeriod), - type: photo.type, - primary: photo.primary, - }); - }); - - await item.packingConfigurations.forEach(async (packagingConfiguration) => { - - let uuid = uuidv4(); - uuid = await vnUuid(uuid); - - await models.packingConfigurations.upsert({ - tradeItemFk: item.tradeItemId, - packingConfigurationId: uuid, - piecesPerPackage: packagingConfiguration.piecesPerPackage, - bunchesPerPackage: packagingConfiguration.bunchesPerPackage, - photoUrl: packagingConfiguration.photoUrl, - packagesPerLayer: packagingConfiguration.packagesPerLayer, - layersPerLoadCarrier: packagingConfiguration.layersPerLoadCarrier, - transportHeightInCm: packagingConfiguration.transportHeightInCm, - loadCarrierType: packagingConfiguration.loadCarrierType, - isPrimary: packagingConfiguration.isPrimary, - additionalPricePerPiece: JSON.stringify(packagingConfiguration.additionalPricePerPiece), - }); - - await models.package.upsert({ - packingConfigurationsId: uuid, - vbnPackageCode: packagingConfiguration.package.vbnPackageCode, - vbnPackageValueCode: packagingConfiguration.package.vbnPackageValueCode, - }); - - }); - - await item.botanicalNames.forEach((botanicalName) => { - models.botanicalNames.upsert({ - tradeItemFk: item.tradeItemId, - name: botanicalName, - }); - }); - - await item.countryOfOriginIsoCodes.forEach((countryOfOriginIsoCode) => { - models.countryOfOriginIsoCodes.upsert({ - tradeItemFk: item.tradeItemId, - isoCode: countryOfOriginIsoCode, - }); - }); - - } catch (error) { - console.log('Missing data for the tradeitem: ' + item.tradeItemId); - bar.stop(); - return; - } - - }); - bar.stop(); + for (let i = 0; i < mockModels.length; i++) { + const element = mockModels[i]; + console.log('Syncing sequence for: ', element); + await syncSequence(0, element); } - } catch (error) { - console.log('There was an error while saving the data to the database, trying again in 5 seconds...'); - await sleep(5000); - await getTradeitems(organizationGln); + } else { + + let tx = await models.sequelize.transaction(); + + try { + + await models.sequenceNumber.upsert({ + model: model, + sequenceNumber: current, + maximumSequenceNumber: maximumSequenceNumber + },{ transaction: tx }); + + await tx.commit(); + + } catch (error) { + await tx.rollback(); + console.log('Error while syncing sequence number for: ', model); + } } } -/** - * Gets a single tradeitem from the API and inserts it into the database - * - * @param {*} tradeItemId - */ -async function getTradeItem(tradeItemId) { +async function syncSuppliers(){ - try { - const headers = { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${await getJWT()}`, - 'X-Api-Key': process.env.API_KEY, - }; - - const tradeitemUrl = `${BASE_CUSTOMER_URL}trade-items/${tradeItemId}`; - - const tradeitemRequest = await fetch(tradeitemUrl, { - method: 'GET', - headers: headers, - }); - - const tradeitemResponse = await tradeitemRequest.json(); - - tradeitemResponse.tradeItemId = await vnUuid(tradeitemResponse.tradeItemId); - - await models.tradeItem.upsert({ - tradeItemId: tradeitemResponse.tradeItemId, - supplierOrganizationId: tradeitemResponse.supplierOrganizationGln, - supplierOrganizationUuid: await vnUuid(tradeitemResponse.supplierOrganizationId), - code: tradeitemResponse.code, - gtin: tradeitemResponse.gtin, - vbnProductCode: tradeitemResponse.vbnProductCode, - name: tradeitemResponse.name, - isDeleted: tradeitemResponse.isDeleted, - sequenceNumber: tradeitemResponse.sequenceNumber, - tradeItemVersion: tradeitemResponse.tradeItemVersion, - isCustomerSpecific: tradeitemResponse.isCustomerSpecific, - isHiddenInCatalog: tradeitemResponse.isHiddenInCatalog, - }); - - await tradeitemResponse.characteristics.forEach((characteristic) => { - models.characteristics.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - vbnCode: characteristic.vbnCode, - vbnValueCode: characteristic.vbnValueCode, - }); - }); - - await tradeitemResponse.seasonalPeriods.forEach((seasonalPeriod) => { - models.seasonalPeriod.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - startWeek: seasonalPeriod.startWeek, - endWeek: seasonalPeriod.endWeek, - }); - - }); - - await tradeitemResponse.photos.forEach(async (photo) => { - - photo.id = await vnUuid(photo.id); - - models.photos.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - photoId: photo.id, - url: photo.url, - seasonalPeriodFk: JSON.stringify(photo.seasonalPeriod), - type: photo.type, - primary: photo.primary, - }); - }); - - await tradeitemResponse.packingConfigurations.forEach(async (packagingConfiguration) => { - - let uuid = uuidv4(); - uuid = await vnUuid(uuid); - - await models.packingConfigurations.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - packingConfigurationId: uuid, - piecesPerPackage: packagingConfiguration.piecesPerPackage, - bunchesPerPackage: packagingConfiguration.bunchesPerPackage, - photoUrl: packagingConfiguration.photoUrl, - packagesPerLayer: packagingConfiguration.packagesPerLayer, - layersPerLoadCarrier: packagingConfiguration.layersPerLoadCarrier, - transportHeightInCm: packagingConfiguration.transportHeightInCm, - loadCarrierType: packagingConfiguration.loadCarrierType, - isPrimary: packagingConfiguration.isPrimary, - additionalPricePerPiece: JSON.stringify(packagingConfiguration.additionalPricePerPiece), - }); - - await models.package.upsert({ - packingConfigurationsId: uuid, - vbnPackageCode: packagingConfiguration.package.vbnPackageCode, - vbnPackageValueCode: packagingConfiguration.package.vbnPackageValueCode, - }); - - }); - - await tradeitemResponse.botanicalNames.forEach((botanicalName) => { - models.botanicalNames.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - name: botanicalName, - }); - }); - - await tradeitemResponse.countryOfOriginIsoCodes.forEach((countryOfOriginIsoCode) => { - models.countryOfOriginIsoCodes.upsert({ - tradeItemFk: tradeitemResponse.tradeItemId, - isoCode: countryOfOriginIsoCode, - }); - }); - - return true; - } catch (error) { - console.log('There was an error while saving the data to the database, trying again in 5 seconds...'); - console.log(error.message); - await sleep(5000); - await getTradeItem(tradeItemId); - } - -} - -/** - * Gets the stock for all suppliers - * - * Does this by getting all suppliers and then calling the getStockBySupplier function for each supplier - */ -async function getStock() { - - const suppliers = await models.suppliers.findAll(); - - const supplierQueue = []; - - suppliers.forEach(async (supplier) => { - supplierQueue.push(await getStockBySupplier(supplier.supplierId)); - }); - - await asyncQueue(supplierQueue); - -} - -/** - * Returns the stock for a given supplier - * - * @param {*} supplierId - * @returns void - inserts the stock into the database - */ -async function getStockBySupplier(supplierId) { - - supplierId = await removeVnPrefix(supplierId); - - const headers = { + let headers = { 'Content-Type': 'application/json', 'Authorization': `Bearer ${await getJWT()}`, - 'X-Api-Key': process.env.API_KEY, + 'X-Api-Key': process.env.API_KEY }; + + let rFloraHolland = suppliersGln.floraholland; - const stockUrl = `${BASE_CUSTOMER_URL}supply-lines?supplierOrganizationId=${supplierId}`; + let queryConnections = `${BASE_CUSTOMER_URL}connections`; - let stockRequest; + let responseConnections = await fetch(queryConnections, { + method: 'GET', + headers: headers + }); - try { - stockRequest = await fetch(stockUrl, { - method: 'GET', - headers: headers, + let dataConnections = await responseConnections.json(); + + for(let connection of dataConnections){ + await models.connections.findOrCreate({ + where: { + organizationId: connection + }, + defaults: { + organizationId: connection, + connect : true + } }); - } catch (error) { - console.log(error.message); - return; } - const stockResponse = await stockRequest.json(); + for(let producer of rFloraHolland){ - if (stockResponse.length == 0) { - return; - } + let query = `${BASE_CUSTOMER_URL}organizations/gln/${producer}`; - try { + let response = await fetch(query, { + method: 'GET', + headers: headers + }); - if (stockResponse.length > 0 && stockResponse != null) { + let data = await response.json(); - let bar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_grey); - bar.start(stockResponse.length, 0); + if (response.status === 200) { + console.log('Supplier request successful'); - await stockResponse.forEach(async supplyLine => { + let connection = await models.connections.findOne({ + where: { + organizationId: data.organizationId, + connect: true + } + }); - bar.increment(); + let isConnected = false; - let alreadyExists = await models.supplyLines.findOne({ + + + + if (connection != null) { + isConnected = true; + + let where = { + companyGln: producer, + isConnected: isConnected + }; + let defaults = { + isConnected: isConnected, + commercialName: data.commercialName, + email: data.email, + phone: data.phone, + website: data.website, + mailingAddress: data.mailingAddress, + physicalAddress: data.physicalAddress, + pythosanitaryNumber: data.phytosanitaryNumber, + sequenceNumber: data.sequenceNumber, + organizationId: data.organizationId, + companyGln: producer, + name: data.name, + endDate: data.endDate, + rfhRelationId: data.rfhRelationId, + organizationType: data.organizationType, + paymentProviders: JSON.stringify(data.paymentProviders), + }; + + await models.suppliers.destroy({ where: { - supplyLineId: supplyLine.supplyLineId, + companyGln: producer, + isConnected: false } }); - - if (alreadyExists) { - return; - } - - try { - - await models.supplyLines.upsert({ - supplyLineId: supplyLine.supplyLineId, - status: supplyLine.status, - supplierOrganizationId: await vnUuid(supplyLine.supplierOrganizationId), - pricePerPiece: supplyLine.pricePerPiece, - numberOfPieces: supplyLine.numberOfPieces, - deliveryPeriod: supplyLine.deliveryPeriod, - orderPeriod: supplyLine.orderPeriod, - warehouseId: await vnUuid(supplyLine.warehouseId), - sequenceNumber: supplyLine.sequenceNumber, - type: supplyLine.type, - isDeleted: supplyLine.isDeleted, - salesUnit: supplyLine.salesUnit, - agreementReferenceCode: supplyLine.agreementReference.code, - agreementReferenceDescription: supplyLine.agreementReference.description, - isLimited: supplyLine.isLimited, - isCustomerSpecific: supplyLine.isCustomerSpecific, - tradeItemFk: await vnUuid(supplyLine.tradeItemId), - }); - - supplyLine.volumePrices.forEach(async (volumePrice) => { - await models.volumePrices.upsert({ - supplyLineFk: supplyLine.supplyLineId, - unit: volumePrice.unit, - pricePerPiece: volumePrice.pricePerPiece, - }); - }); - - - } catch (error) { - if (error.name == 'SequelizeForeignKeyConstraintError') { - bar.stop(); - console.log('Missing data for the tradeitem: ' + supplyLine.tradeItemId); - console.log('Trying to get the tradeitem data...'); - await getTradeItem(supplyLine.tradeItemId); - return; + + await models.suppliers.findOrCreate({ + where : where, + defaults: defaults + }); + } else { + let where = { + companyGln: producer, + isConnected: isConnected + }; + let defaults = { + isConnected: isConnected, + commercialName: data.commercialName, + email: data.email, + phone: data.phone, + website: data.website, + mailingAddress: data.mailingAddress, + physicalAddress: data.physicalAddress, + pythosanitaryNumber: data.phytosanitaryNumber, + sequenceNumber: data.sequenceNumber, + organizationId: data.organizationId, + companyGln: producer, + name: data.name, + endDate: data.endDate, + rfhRelationId: data.rfhRelationId, + organizationType: data.organizationType, + paymentProviders: JSON.stringify(data.paymentProviders), + }; + await models.suppliers.destroy({ + where: { + companyGln: producer, + isConnected: true } - } + }); + await models.suppliers.findOrCreate({ + where: where, + defaults: defaults + }); + } + - }); - bar.stop(); + console.log(`DATA FOR SUPPLIER: ${data.name} OK`); + } else { + console.log('Supplier request failed with status ', response.status); + console.log('Supplier: ', data); + console.log('response: ', response); + console.log('query: ', query); } - } catch (error) { - console.log('There was an error while saving the data to the database, trying again in 5 seconds...'); - await sleep(5000); - await getStockBySupplier(supplierId); } - } -export { getClientToken, updateClientConfig, getJWT, getTradeitems, sleep, asyncQueue, getStock }; \ No newline at end of file +async function syncTradeItems(){ + + let suppliers = await models.suppliers.findAll({ + where: { + isConnected: true + } + }); + + let headers = { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${await getJWT()}`, + 'X-Api-Key': process.env.API_KEY + }; + + for (let i = 0; i < suppliers.length; i++) { + + let queryMaxSequence = `${BASE_CUSTOMER_URL}trade-items/current-max-sequence`; + + let responseMaxSequence = await fetch(queryMaxSequence, { + method: 'GET', + headers: headers + }); + + let maximumSequenceNumber = await responseMaxSequence.json(); + + await syncSequence(0, 'tradeItems', maximumSequenceNumber); + + let currentSequence = await models.sequenceNumber.findOne({ + where: { + model: 'tradeItems' + } + }); + + currentSequence = currentSequence.sequenceNumber; + + let estimatedIterations = Math.ceil(maximumSequenceNumber / 1000); + + let supplier = suppliers[i]; + + console.log('Syncing trade items for: ', supplier.name); + console.log('Supplier Id: ', supplier.organizationId); + console.log('Current sequence number: ', currentSequence); + console.log('Maximum sequence number: ', maximumSequenceNumber); + console.log('Estimated iterations: ', estimatedIterations); + + for (let j = 0; j < estimatedIterations; j++) { + + let query = `${BASE_CUSTOMER_URL}trade-items/sync/${currentSequence}?supplierOrganizationId=${supplier.organizationId}&limit=1000`; + + let request = await fetch(query, { + method: 'GET', + headers: headers + }); + + let data = await request.json(); + + let results = data.results; + + if (results.length == 0) { + console.log('No more trade items to sync'); + break; + } + + } + } +} + +export { getClientToken, updateClientConfig, getJWT, sleep, asyncQueue, syncSequence, syncSuppliers, syncTradeItems }; \ No newline at end of file