All of these routes are primarily related to scanning of barcodes
Methods
(static) get/fabscan/scan/rolls/:barcode() → {Array.<barcodeDetails>}
Route for reading details for a specific barcode from MySQL DB
Parameters:
| Name | Type | Description |
|---|---|---|
req.params.barcode |
String |
Returns:
The object array returned module:routers/v8/fabscan/scan/rolls~barcodeDetails
- Type
- Array.<barcodeDetails>
(static) post/fabscan/scan/rolls/:barcode() → {barcodeData}
Route for validating the barcode scanned
Does the following
- Checks if the barcode was scanned into the location, if not inserts a new record for the barcode and location
- Returns the PO Number, item code and roll length if the barcode already has an MIR number associated with it
- If it doesn't have an MIR number, then checks if scanning the barcode will exceed the MIR limit and returns data accordingly
Parameters:
| Name | Type | Description |
|---|---|---|
req.params.barcode |
String | The barcode |
req.body.location |
String | The location |
req.body.poAndItemWithQuantities |
Object | The nested object containing the total scanned length of each PO and item combination - { PO: { item: length } } |
Returns:
The barcode details module:routers/v8/fabscan/scan/rolls~barcodeData
- Type
- barcodeData
Type Definitions
barcodeData
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
barcodeData.poNumber |
String | The PO Number |
barcodeData.itemCode |
String | The item code |
barcodeData.rollLength |
Number | The roll length |
barcodeDetails
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
barcodeDetails.CUSTNAME |
String | The customer name |
barcodeDetails.STYLENO |
String | The style number |
barcodeDetails.STYLEDESC |
String | The style description |
barcodeDetails.LEFTOVER |
Number | The leftover roll length |