Methods
createTestMarker(ocNumber, markerUnique, fitType, location) → {Number}
This method is used to create a test marker - for testing
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
markerUnique |
String
|
The unique marker google id |
fitType |
String
|
The fit type |
location |
String
|
The location |
Returns:
-
Type
-
Number
fetchAllFitTypes()
getFabricItems(ocNumber, coid) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
coid |
String
|
The table header in MsSql |
Returns:
-
Type
-
Array.<Object>
getFabricItemsFromColor(ocNumber, coid) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
coid |
String
|
The table header in MsSql |
Returns:
-
Type
-
Array.<Object>
getMarkerAndItemCodes(ocNumber, location, fitType) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The OC number |
location |
String
|
The location |
fitType |
String
|
The fit type |
Returns:
-
Type
-
Array.<Object>
getMarkerDetailsForCloning(sourceOc) → {Array.<Object>}
This method fetches the marker details of the oc number to be cloned
Specific to the clone marker route - based on locations IDU7 and IDU10
Parameters:
| Name |
Type |
Description |
sourceOc |
String
|
The source oc number |
Returns:
-
Type
-
Array.<Object>
getMarkerFitTypes(ocNumber, location) → {Array.<Object>}
This method fetches all the marker fit types under the given oc number and location
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The OC number |
location |
String
|
The location |
Returns:
The list of objects with key 'fitType'
-
Type
-
Array.<Object>
getMarkerItemAndSizeList(markerUnique) → {Object}
This method returns the list of item codes and sizes present in the marker
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker id |
Returns:
-
Type
-
Object
getMarkerRatioDetails(markerUnique, ratioNumbers)
This method fetches the marker details including item codes, sizes, quantities, ratios and lay lengths for a marker
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker id |
ratioNumbers |
Array.<Object>
|
An array of objects with key 'ratioNumber' |
getOcNumberForTest() → {String}
This function is used to fetch a valid OC number for testing
Returns:
A random valid OC number
-
Type
-
String
getOcNumberForTest() → {String}
This function is used to fetch a valid OC number for testing
Returns:
A random valid OC number
-
Type
-
String
getRatioNumbers(markerUnique) → {Array.<Object>}
This method fetches the ratio numbers uploaded for a marker
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker id |
Returns:
An array of objects with key 'ratioNumber'
-
Type
-
Array.<Object>
getSizeWiseCompletedQuantity(markerUnique) → {Array.<Object>}
This method fetches the size wise completed quantities for a marker
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker id |
Returns:
-
Type
-
Array.<Object>
isMarkerUsed(markerUnique) → {Boolean}
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker google id |
Returns:
-
Type
-
Boolean
postClonedMarkerDetails(targetOc, orderQuantity, clonedMarkerDetails)
This method posts the fetched/cloned marker details into the target oc number
Specific to the clone marker route - based on locations IDU7 and IDU10
Parameters:
| Name |
Type |
Description |
targetOc |
String
|
The target oc number |
orderQuantity |
Number
|
The order quantity associated |
clonedMarkerDetails |
Array.<Object>
|
The marker details of the source oc number module:repository/marker~clonedMarkerDetails |
postMarkerDetails(ocNumber, bodyObject) → {Number}
Parameters:
Returns:
The marker table insert id
-
Type
-
Number
removeMarker(markerUnique) → {Number}
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker google id |
Returns:
-
Type
-
Number
validateMarker(markerUnique) → {Marker}
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker id |
Returns:
The marker entity
-
Type
-
Marker
validateMarkerWithItemCode(markerId, itemCode, location) → {Marker}
Parameters:
| Name |
Type |
Description |
markerId |
String
|
The unique marker google id |
itemCode |
String
|
The item code associated |
location |
String
|
The location |
Returns:
-
Type
-
Marker
validateOcAtLocation(ocNumber, location) → {Boolean}
This method checks if an oc number exists at a given location
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
location |
String
|
The location |
Returns:
-
Type
-
Boolean
validateOcNumberFromSage(ocNumber, coid) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
coid |
String
|
The table header in MsSql |
Returns:
-
Type
-
Array.<Object>
validateSourceOc(sourceOc) → {Boolean}
This method validates the oc number to be cloned
Specific to the clone marker route - based on locations IDU7 and IDU10
Parameters:
| Name |
Type |
Description |
sourceOc |
String
|
The source oc number to be cloned |
Returns:
-
Type
-
Boolean
Type Definitions
clonedMarkerDetails
Type:
Properties:
| Name |
Type |
Description |
clonedMarkerDetails.markerId |
Number
|
The marker table primary key |
clonedMarkerDetails.items |
Array.<Object>
|
The list of item objects
Properties
| Name |
Type |
Description |
itemCode |
String
|
The item code |
itemDescription |
String
|
The item description |
|
clonedMarkerDetails.customer |
String
|
The customer name |
clonedMarkerDetails.style |
String
|
The style |
clonedMarkerDetails.location |
String
|
The location |
clonedMarkerDetails.shrinkage |
String
|
The shrinkage |
clonedMarkerDetails.fitType |
String
|
The fit type |
clonedMarkerDetails.approvedConsumption |
Number
|
The approved consumption |
clonedMarkerDetails.sizeDetails |
Array.<Object>
|
The array of size objects
Properties
| Name |
Type |
Description |
size |
String
|
The size |
sizeRatios |
Array.<Object>
|
The array of ratio detail object
Properties
| Name |
Type |
Description |
ratio |
String
|
The ratio |
ratioNumber |
String
|
The unique ratio number |
ratioQuantity |
String
|
The associated quantity |
layLength |
String
|
The lay length |
|
|
fabricItemSage
Type:
Properties:
| Name |
Type |
Description |
fabricItemSage.item |
String
|
A concatenated string of item code and item description |
markerCloneDetails
Type:
Properties:
| Name |
Type |
Description |
markerCloneDetails.markerId |
Number
|
The marker table primary key |
markerCloneDetails.itemCode |
String
|
|
markerCloneDetails.itemDescription |
String
|
|
markerCloneDetails.customer |
String
|
|
markerCloneDetails.style |
String
|
|
markerCloneDetails.location |
String
|
|
markerCloneDetails.shrinkage |
String
|
|
markerCloneDetails.fitType |
String
|
The marker fit type |
markerCloneDetails.approvedConsumption |
Number
|
The approved consumption |
markerCloneDetails.sizeId |
Number
|
The marker size table primary key |
markerCloneDetails.size |
String
|
The size |
markerCloneDetails.ratio |
Number
|
The ratio |
markerCloneDetails.ratioNumber |
Number
|
The ratio number |
markerCloneDetails.ratioQuantity |
Number
|
The quantity associated with the ratio |
markerCloneDetails.layLength |
Number
|
The lay length |
markerItemCodes
Type:
Properties:
| Name |
Type |
Description |
markerItemCodes.markerUnique |
Number
|
The unique marker id |
markerItemCodes.shrinkage |
String
|
The fabric shrinkage |
markerItemCodes.itemCode |
String
|
The item code |
markerItemCodes.itemDesc |
String
|
The item description |
markerItemSize
Type:
Properties:
| Name |
Type |
Description |
markerItemSize.markerItemList |
Array.<String>
|
The array of item codes present in the marker |
markerItemSize.markerSizeList |
Array.<String>
|
The array of sizes present in the marker |
ocSageDetails
Type:
Properties:
| Name |
Type |
Description |
ocSageDetails.merchant |
String
|
The merchant name |
ocSageDetails.customer |
String
|
The customer name |
ocSageDetails.styleNo |
String
|
The style |
postMarkerDetails
Type:
Properties:
| Name |
Type |
Description |
postMarkerDetails.items |
Array.<Object>
|
The Items array object: {ItemNo, ItemDesc} |
postMarkerDetails.custName |
String
|
The customer name |
postMarkerDetails.styleNo |
String
|
The style number/name |
postMarkerDetails.shrinkage |
String
|
The fabric shrinkage |
postMarkerDetails.fitType |
String
|
The fit type |
postMarkerDetails.approvedConsumption |
Number
|
The approved consumption |
postMarkerDetails.factoryLocation |
String
|
The location of the factory |
postMarkerDetails.markerUnique |
String
|
The unique marker google id |
postMarkerDetails.sizeRatioDetails |
Array.<Object>
|
The size and ratio details
Properties
| Name |
Type |
Description |
Size |
String
|
The size |
Qty |
String
|
The quantity associated |
ratio |
Array.<Object>
|
The list of ratio details
Properties
| Name |
Type |
Description |
ratio |
Number
|
The ratio |
rationumber |
Number
|
The ratio number |
ratioqty |
Number
|
The quantity associated |
ratiolay |
Number
|
The lay length associated |
|
|
sizeWiseQuantities
Type:
Properties:
| Name |
Type |
Description |
sizeWiseQuantities.completedQty |
Number
|
The completed quantity |
sizeWiseQuantities.size |
String
|
The size |