Module: fabstitch/repository/output

Methods

(static) getOutputDetails()

Query has been optimised for date filter to reduce latency

getCountryforPoNumberFromBatch(batchNumber, ocNumber, location, productCode, colourCode, fitType, poNumber) → {Array.<getPoNumberFromBatch>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
productCode String The product Code of the batch
colourCode String The colour Code of the batch
fitType String The fit Type of the batch
poNumber String The po Number of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<getPoNumberFromBatch>

getCountryforPoNumberFromBatchV7(batchNumber, ocNumber, location, productCode, fitType, poNumber) → {Array.<getPoNumberFromBatch>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
productCode String The product Code of the batch
fitType String The fit Type of the batch
poNumber String The po Number of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<getPoNumberFromBatch>

getCutDetailsFromSage(productCode, coid) → {Array.<packingAnalytics>}

This function is responsible to fetch packing analytics based on location and date
Parameters:
Name Type Description
productCode String The product code
coid String The company database ID
Returns:
Type
Array.<packingAnalytics>

getDispatchOutput(location, batchNumber, date) → {number}

This function is responsible to fetch total defect count for day
Parameters:
Name Type Description
location String The location
batchNumber String The batch number in location
date String The date in format of yyyymmdd
Returns:
Total defect count in return
Type
number

getDispatchOutput(location, batchNumber, date) → {number}

This function is responsible to fetch total defect count for day
Parameters:
Name Type Description
location String The location
batchNumber String The batch number in location
date String The date in format of yyyymmdd
Returns:
Total defect count in return
Type
number

getDispatchOutputForBatches(location, batchNumber, date) → {number}

This function is responsible to fetch total defect count for day
Parameters:
Name Type Description
location String The location
batchNumber String The batch number in location
date String The date in format of yyyymmdd
Returns:
Total defect count in return
Type
number

getFinishingDefectAnalytics(ocNumber, productCode) → {Array.<finishingDefectAnalytics>}

This function is responsible to fetch finishing defect analytics based on location and ocNumber and Product code
Parameters:
Name Type Description
ocNumber String The oc number
productCode String The product code
Returns:
Type
Array.<finishingDefectAnalytics>

getFinishingDetailsFromSage(productCode, coid) → {Array.<packingAnalytics>}

This function is responsible to fetch packing analytics based on location and date
Parameters:
Name Type Description
productCode String The product code
coid String The company database ID
Returns:
Type
Array.<packingAnalytics>

getFitTypesFromMarker(jobUniqueList) → {Array.<fitTypesFromMarker>}

This function is responsible to fetch list of fit types from marker tables based on job unique list
Parameters:
Name Type Description
jobUniqueList Array.<Number> The list of job unique
Returns:
List of fit Type from cutting marker linked to cutting parts barcode module:fabstitch/repository/output~fitTypesFromMarker
Type
Array.<fitTypesFromMarker>

getJobUniquesFromCuttingJobs(batchNumber, ocNumber, location) → {Array.<jobUniquesFromCuttingJobs>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<jobUniquesFromCuttingJobs>

getLocationBatchList(location) → {Array.<batches>}

This function is responsible to fetch list of batches for specified location
Parameters:
Name Type Description
location String The location
Returns:
List Of batch number for specified location module:fabstitch/repository/output~batches
Type
Array.<batches>

getOcNumberListFromDHU(batchNumber, location, filterDate) → {Array.<ocNumbers>}

Fetch the list of OC numbers from DHU process for last 72 hours in batch
Parameters:
Name Type Description
batchNumber String The batch number
location String The location of batch
filterDate String The date in ISO string format yyyy-mm-dd
Returns:
The list of oc numbers
Type
Array.<ocNumbers>

getOutputDetails(location) → {Array.<outputDetails>}

Fetch output details associated with location and date
Parameters:
Name Type Description
location String The location
Returns:
List Of product Qr code details module:fabstitch/repository/output~outputDetails
Type
Array.<outputDetails>

getOutputDetailsForLocationBatch(location, batchNumber, ocNumber, productCode, colourCode, fitType) → {Array.<batchOutputSizeDetails>}

This function is responsible to fetch ouput size quantities associate with location and batch based on oc number,product, colour and fit type
Parameters:
Name Type Description
location String The location of the batch
batchNumber String The batch number
ocNumber String The oc number
productCode String The product code
colourCode String The colour code of product
fitType String The fit type of product
Returns:
The list of batch output size details module:fabstitch/repository/output~batchOutputSizeDetails
Type
Array.<batchOutputSizeDetails>

getPackingAnalyticsByAllLocation(fromDate, toDate) → {Array.<packingAnalytics>}

This function is responsible to fetch packing analytics based on location and date
Parameters:
Name Type Description
fromDate String The from date in ISO string format yyyy-mm-dd
toDate String The to date in ISO string format yyyy-mm-dd
Returns:
Type
Array.<packingAnalytics>

getPackingAnalyticsByLocation(location, fromDate, toDate) → {Array.<packingAnalytics>}

This function is responsible to fetch packing analytics based on location and date
Parameters:
Name Type Description
location String The location of the batch
fromDate String The from date in ISO string format yyyy-mm-dd
toDate String The to date in ISO string format yyyy-mm-dd
Returns:
Type
Array.<packingAnalytics>

getPackingBarcodeExistOrNot() → {Array.<packingAnalytics>}

This function is responsible to fetch packing analytics based on location and date
Returns:
Type
Array.<packingAnalytics>

getPoNumberFromBatch(batchNumber, ocNumber, location, productCode, fitType) → {Array.<getPoNumberFromBatch>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
productCode String The product Code of the batch
fitType String The fit Type of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<getPoNumberFromBatch>

getPoNumberFromBatch(batchNumber, ocNumber, location, productCode, colourCode, fitType) → {Array.<getPoNumberFromBatch>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
productCode String The product Code of the batch
colourCode String The colour Code of the batch
fitType String The fit Type of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<getPoNumberFromBatch>

getPoNumberFromBatch-(batchNumber, ocNumber, location, productCode, colourCode, fitType) → {Array.<getPoNumberFromBatch>}

This function is responsible to fetch list of all job uniques from cutting jobs based on batch input process scanned barcodes
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
productCode String The product Code of the batch
colourCode String The colour Code of the batch
fitType String The fit Type of the batch
Returns:
List of job uniques from cutting job to get fit types from marker module:fabstitch/repository/output~jobUniquesFromCuttingJobs
Type
Array.<getPoNumberFromBatch>

getProductColoursListFromDHU(ocNumber, productCode, location, batchNumber) → {Array.<coloursList>}

Fetch the list of colours from DHU process based on oc number, product, location And batch
Parameters:
Name Type Description
ocNumber String The oc number in DHU process
productCode String The product code associated with oc number
location String The location
batchNumber String The batch number associated with location
Returns:
Type
Array.<coloursList>

getProductListFromDHU(ocNumber, location, batchNumber) → {Array.<productList>}

Fetch the list of product from DHU process based on oc number, location And batch
Parameters:
Name Type Description
ocNumber String The oc number in DHU process
location String The location
batchNumber String The batch number associated with location
Returns:
List Of product from DHU process module:fabstitch/repository/output~productList
Type
Array.<productList>

getSizesFromMarker(jobUniqueList, fitType) → {Array.<sizesFromMarker>}

This function is responsible to fetch list of all sizes from marker tables
Parameters:
Name Type Description
jobUniqueList Array.<Number> The list of job unique
fitType String The fit type of product
Returns:
List of sizes from cutting marker linked to cutting parts barcode module:fabstitch/repository/output~sizesFromMarker
Type
Array.<sizesFromMarker>

getSizesFromMarkerBasedOnOc(ocNumber, fitType) → {Array.<sizesFromMarker>}

This function is responsible to fetch list of all sizes from marker basd on Location, Oc number and fit type
Parameters:
Name Type Description
ocNumber String The ocNumber
fitType String The fit type of product
Returns:
List of sizes from cutting marker linked to cutting parts barcode module:fabstitch/repository/output~sizesFromMarker
Type
Array.<sizesFromMarker>

getValidOcNumberForTest() → {String}

This function is used to fetch a valid OC number for testing
Returns:
A random valid OC number
Type
String

postOutputLocationBatch(batchNumber, location, ocNumber, productCode, productDescription, colourCode, colourName, fitType, orderType, qrCode, poNumber, country, outputSizeQuantites) → {number}

This function is responsible to post ouput size quantities along with location, batch, oc number, colour and fit type
Parameters:
Name Type Description
batchNumber String The batch number
location String The location of the batch
ocNumber String The oc number
productCode String The product code
productDescription String The product description
colourCode String The colour code of product
colourName String The colour name of product
fitType String The fit type of product
orderType String The order type
qrCode String The qr code
poNumber String The po Number
country String The country
outputSizeQuantites Array.<outputSizeQuantity> The list of output size quantites module:fabstitch/repository/output~outputSizeQuantity
Returns:
Type
number

validateDHUProductQrCode(qrCode) → {Array.<dhuProductQrCodeDetails>}

Fetch the DHU product qr code details
Parameters:
Name Type Description
qrCode String The product qr code
Returns:
Type
Array.<dhuProductQrCodeDetails>

validateLocationBatchCountry(batchNumber, ocNumber, location, countryCode) → {Boolean}

This function is responsible to validate country existence and return boolean
Parameters:
Name Type Description
batchNumber String The batch number
ocNumber String The oc number
location String The location of the batch
countryCode String The country code based on barcode scanned in input process
Returns:
Type
Boolean

validateQrCodeIfAlreadyScannedInDispatch(qrCode) → {Array.<Boolean>}

This function is responsible to check if Qr Code already scanned in dispatch process
Parameters:
Name Type Description
qrCode String The Qr Code
Returns:
The status of qrCode validation
Type
Array.<Boolean>

Type Definitions

batches

Type:
  • Object
Properties:
Name Type Description
batches.batchNumber String The batch number for specified location

batchOutputSizeDetails

Type:
  • Object
Properties:
Name Type Description
batchOutputSizeDetails.outputSize String The output size
batchOutputSizeDetails.outputQuantity String The output quantity
batchOutputSizeDetails.outputDateTime String The output date time stamp

coloursList

Type:
  • Object
Properties:
Name Type Description
coloursList.colourCode String The colour code associated with OC number and product
coloursList.colourDescription String The colour description for colour code

dhuProductQrCodeDetails

Type:
  • Object
Properties:
Name Type Description
dhuProductQrCodeDetails.location String The location
dhuProductQrCodeDetails.batchNumber String The batch number
dhuProductQrCodeDetails.ocNumber String The oc number
dhuProductQrCodeDetails.productCode String The product code
dhuProductQrCodeDetails.productDescription String The product description
dhuProductQrCodeDetails.colourCode String The colour code
dhuProductQrCodeDetails.colourDescription String The colour description associated colour code
dhuProductQrCodeDetails.fitType String The fit type
dhuProductQrCodeDetails.size String The size

finishingDefectAnalytics

Type:
  • Object
Properties:
Name Type Description
finishingDefectAnalytics.ocNumber String The oc number
finishingDefectAnalytics.productCode String The product code
finishingDefectAnalytics.defectFinishing String The defect finishing
finishingDefectAnalytics.defectAction String The defect action
location String The location

fitTypesFromMarker

Type:
  • Object
Properties:
Name Type Description
fitTypesFromMarker.fitType String The fit type of product from cutting marker process

getCountryforPoNumberFromBatch

Type:
  • Object
Properties:
Name Type Description
getPoNumberFromBatch.data String The job unique of product from cutting job process

getCountryforPoNumberFromBatch

Type:
  • Object
Properties:
Name Type Description
getPoNumberFromBatch.data String The job unique of product from cutting job process

getPoNumberFromBatch

Type:
  • Object
Properties:
Name Type Description
getPoNumberFromBatch.data String The job unique of product from cutting job process

getPoNumberFromBatchV7

Type:
  • Object
Properties:
Name Type Description
getPoNumberFromBatch.data String The job unique of product from cutting job process

jobUniquesFromCuttingJobs

Type:
  • Object
Properties:
Name Type Description
jobUniquesFromCuttingJobs.jobUnique String The job unique of product from cutting job process

locationLabelBarcodeDetails

Type:
  • Object
Properties:
Name Type Description
locationLabelBarcodeDetails.ocNumber String The oc number
locationLabelBarcodeDetails.location String The location
locationLabelBarcodeDetails.productCode String The product code
locationLabelBarcodeDetails.productDescription String The product description
locationLabelBarcodeDetails.poNumber String The po number
locationLabelBarcodeDetails.shipTo String The ship to
locationLabelBarcodeDetails.colourCode String The colour code
locationLabelBarcodeDetails.size String The size
locationLabelBarcodeDetails.quantity Number The quantity
locationLabelBarcodeDetails.labelBarcode String The label barcode
locationLabelBarcodeDetails.orderQuantity Number The order quantity

locationLabelBarcodeDetails

Type:
  • Object
Properties:
Name Type Description
locationLabelBarcodeDetails.ocNumber String The oc number
locationLabelBarcodeDetails.location String The location
locationLabelBarcodeDetails.productCode String The product code
locationLabelBarcodeDetails.productDescription String The product description
locationLabelBarcodeDetails.poNumber String The po number
locationLabelBarcodeDetails.shipTo String The ship to
locationLabelBarcodeDetails.colourCode String The colour code
locationLabelBarcodeDetails.size String The size
locationLabelBarcodeDetails.quantity Number The quantity
locationLabelBarcodeDetails.labelBarcode String The label barcode
locationLabelBarcodeDetails.orderQuantity Number The order quantity

ocNumbers

Type:
  • Object
Properties:
Name Type Description
ocNumbers.ocNumber String The oc number from batch

outputDetails

Type:
  • Object
Properties:
Name Type Description
outputDetails.batchNumber String The batch number
outputDetails.location String The location
outputDetails.ocNumber String The oc number
outputDetails.productCode String The product code
outputDetails.productDescription String The product description
outputDetails.colourCode String The colour code
outputDetails.colourDescription String The colour description associated colour code
outputDetails.orderType String The order type
outputDetails.fitType String The fit type
outputDetails.totalOutputQuantity number The total output quantity

outputSizeQuantity

Type:
  • Object
Properties:
Name Type Description
outputSizeQuantity.size String The output size
outputSizeQuantity.outputQuantity String The output quantity

outputSizeQuantity

Type:
  • Object
Properties:
Name Type Description
outputSizeQuantity.size String The output size
outputSizeQuantity.outputQuantity String The output quantity

packingAnalytics

Type:
  • Object
Properties:
Name Type Description
packingAnalytics.garmentBarcode String The garment barcode

packingAnalytics

Type:
  • Object
Properties:
Name Type Description
packingAnalytics.garmentBarcode String The garment barcode
packingAnalytics.ocNumber String The oc number
packingAnalytics.batchNumber String The batch number
packingAnalytics.customerName String The customer name
packingAnalytics.style String The style
packingAnalytics.styleDescription String The style description
packingAnalytics.productCode String The product code
packingAnalytics.fit String The fit type
packingAnalytics.colourCode String The colour code
packingAnalytics.size String The size
packingAnalytics.layNumber String The lay number
packingAnalytics.serialNumber String The serial number
packingAnalytics.poNumber String The po number
packingAnalytics.country String The country
packingAnalytics.transactionNumber String The transaction number
packingAnalytics.bundleBarcode String The bundle barcode
packingAnalytics.orderQty String The order quantity
packingAnalytics.defectFinishing String The defect finishing
packingAnalytics.defectAction String The defect action
packingAnalytics.handedTo String The handed to
packingAnalytics.dateOfDefect String The date of defect

packingAnalytics

Type:
  • Object
Properties:
Name Type Description
packingAnalytics.garmentBarcode String The garment barcode
packingAnalytics.ocNumber String The oc number
packingAnalytics.batchNumber String The batch number
packingAnalytics.customerName String The customer name
packingAnalytics.style String The style
packingAnalytics.styleDescription String The style description
packingAnalytics.productCode String The product code
packingAnalytics.fit String The fit type
packingAnalytics.colourCode String The colour code
packingAnalytics.size String The size
packingAnalytics.layNumber String The lay number
packingAnalytics.serialNumber String The serial number
packingAnalytics.poNumber String The po number
packingAnalytics.country String The country
packingAnalytics.transactionNumber String The transaction number
packingAnalytics.bundleBarcode String The bundle barcode
packingAnalytics.orderQty String The order quantity
packingAnalytics.defectFinishing String The defect finishing
packingAnalytics.defectAction String The defect action
packingAnalytics.handedTo String The handed to
packingAnalytics.dateOfDefect String The date of defect

productList

Type:
  • Object
Properties:
Name Type Description
productList.productCode String The product code
productList.productDescription String The product description

sizesFromMarker

Type:
  • Object
Properties:
Name Type Description
sizesFromMarker.markerSize String The size of product from cutting marker process

sizesFromMarker

Type:
  • Object
Properties:
Name Type Description
sizesFromMarker.markerSize String The size of product from cutting marker process