Methods
assignJobToFollower(markerUnique, follower, location, layLength, jobDetails, layObject) → {Number}
Parameters:
| Name |
Type |
Description |
markerUnique |
String
|
The unique marker google id |
follower |
Follower
|
The follower |
location |
String
|
The location |
layLength |
Number
|
The lay length |
jobDetails |
Array.<jobDetails>
|
The object with job details module:repository/job~jobDetails |
layObject |
Object
|
The object with (item code, lay number) as its key - value pair |
Returns:
The inserted job id
-
Type
-
Number
checkNumberOfActiveJobs(deviceId, location) → {Number}
Parameters:
| Name |
Type |
Description |
deviceId |
String
|
The follower device id |
location |
String
|
The location |
Returns:
The number of active jobs assigned to the follower
-
Type
-
Number
completeJob(jobId) → {Number}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
-
Type
-
Number
deleteBarcodeFromJob(jobId, barcode) → {Number}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
barcode |
String
|
The barcode |
Returns:
-
Type
-
Number
deleteJob(jobId) → {Number}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
-
Type
-
Number
fetchAllBarcodesForJob(jobId) → {Array.<Object>}
This method fetches all the barcodes scanned under a job
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
-
Type
-
Array.<Object>
getAssignedJobDetails(deviceId, location) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
deviceId |
String
|
The follower device id |
location |
String
|
The location |
Returns:
-
Type
-
Array.<Object>
getLayNumberForJob(jobId, ocNumber, itemCode, fitType) → {Number}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
ocNumber |
String
|
The oc number associated |
itemCode |
String
|
The item code associated |
fitType |
String
|
The fit type of job |
Returns:
layNumber
-
Type
-
Number
getLayNumbersforjobs(location, The) → {Array.<jobUniqueWithLayNumber>}
Parameters:
Returns:
-
Type
-
Array.<jobUniqueWithLayNumber>
getTodaysJobDetailsAtLocation(location) → {Array.<Object>}
Parameters:
| Name |
Type |
Description |
location |
String
|
The location |
Returns:
-
Type
-
Array.<Object>
getTodaysJobsCountAtLocation(location) → {Array.<Object>}
This method fetches the number of jobs assigned at a given location on the current day grouped by OC - fit type - item code
Parameters:
| Name |
Type |
Description |
location |
String
|
The location |
Returns:
-
Type
-
Array.<Object>
getTotalJobsCountAtLocation(location) → {Array.<Object>}
This method fetches the total number of jobs assigned at a given location grouped by OC - fit type - item code
Parameters:
| Name |
Type |
Description |
location |
String
|
The location |
Returns:
-
Type
-
Array.<Object>
getTotalJobsPerItemCode(ocNumber, location, fitType) → {Array.<Object>}
This method returnrs the total number of jobs completed per item code under the given OC - location - fit type combination
Parameters:
| Name |
Type |
Description |
ocNumber |
String
|
The oc number |
location |
String
|
The location |
fitType |
String
|
The fit type |
Returns:
-
Type
-
Array.<Object>
getTotalScannedQuantity(jobId) → {Number}
This method fetches the total sum of quantities scanned under a job
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
The sum of quantities scanned under a job
-
Type
-
Number
isBarcodeUsedForJob(jobId, barcode) → {Boolean}
This method checks if a barcode had been previously scanned for the given job
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The job id |
barcode |
String
|
The barcode scanned |
Returns:
-
Type
-
Boolean
postBarcodeIntoJob(jobId, barcode, itemCode, actualRollQuantity) → {Number}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
barcode |
String
|
The barcode |
itemCode |
String
|
The item code |
actualRollQuantity |
Number
|
The actual roll quantity that is available for use |
Returns:
-
Type
-
Number
updateBarcodeInJob(jobId, barcode, actualQuantity) → {Number}
This method updates the actual quantity used for a barcode which was scanned under a job
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
barcode |
String
|
The barcode |
actualQuantity |
Number
|
The actual quantity used for the job |
Returns:
-
Type
-
Number
validateJob(jobId) → {Job}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
A job entity
-
Type
-
Job
validateJob(jobId) → {Job}
Parameters:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
Returns:
A job entity
-
Type
-
Job
Type Definitions
allJobDetail
Type:
Properties:
| Name |
Type |
Description |
allJobDetail.jobId |
Number
|
The unique job id |
allJobDetail.tableNum |
Number
|
The table number of the follower to which the job was assigned |
allJobDetail.location |
String
|
The location |
allJobDetail.jobStatus |
String
|
The job Status |
allJobDetail.jobQuantity |
String
|
The job Quantity |
allJobDetail.followerDeviceId |
String
|
The follower Device Id |
allJobDetail.followerStatus |
String
|
The follower Status |
allJobDetail.leaderUniqueId |
Number
|
The leader Unique Id |
fetchedBarcode
Type:
Properties:
| Name |
Type |
Description |
fetchedBarcode.barcode |
String
|
The barcode |
fetchedBarcode.numOfPlies |
Number
|
The number of plies used |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
follower
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
location |
String
|
The location |
followerDeviceId |
String
|
The follower Device Id |
followerStatus |
String
|
The follower Status |
followerUniqueId |
Number
|
The follower Unique Id |
followerJob
Type:
Properties:
| Name |
Type |
Description |
followerJob.ocNumber |
String
|
The oc number |
followerJob.itemCode |
String
|
The item code |
followerJob.itemDesc |
String
|
The item description |
followerJob.layLength |
Number
|
The job lay length |
followerJob.jobId |
Number
|
The unique job id |
followerJob.size |
String
|
The size |
followerJob.quanity |
Number
|
The quantity associated |
followerJob.ratio |
Number
|
The ratio associated |
jobDetails
Type:
Properties:
| Name |
Type |
Description |
jobDetails.itemCode |
String
|
The fabric item code |
jobDetails.itemDesc |
String
|
The fabric item description |
jobDetails.shade |
String
|
The fabric shade |
jobDetails.shrinkage |
String
|
The fabric shrinkage in percentage |
jobDetails.ratioDetails |
Array.<Object>
|
The ratios and corresponding sizes
Properties
| Name |
Type |
Description |
size |
String
|
The size of the garment |
quantity |
Number
|
The quantity associated with this size |
ratio |
Number
|
The fraction of the quantity for this size |
|
jobDetailsToFetchLaynumber
Type:
Properties:
| Name |
Type |
Description |
jobDetailsToFetchLaynumber.ocNo |
Number
|
The oc number |
jobDetailsToFetchLaynumber.itemCode |
Number
|
The item code associated with oc number |
jobDetailsToFetchLaynumber.fitType |
String
|
The fit type associated with oc number and item code |
jobUniqueWithLayNumber
Type:
Properties:
| Name |
Type |
Description |
jobUniqueWithLayNumber.jobId |
Number
|
The unique job id |
jobUniqueWithLayNumber.layNumber |
Number
|
The job lay number |
leader
Detail
Type:
Properties:
| Name |
Type |
Description |
date |
date
|
The leader created date |
leaderDeviceId |
String
|
The leader Device Id |
leaderUniqueId |
String
|
The leader Unique Id |
todaysJobDetail
Type:
Properties:
| Name |
Type |
Description |
todaysJobDetail.jobId |
Number
|
The unique job id |
todaysJobDetail.tableNum |
Number
|
The table number of the follower to which the job was assigned |
todaysJobDetail.ocNo |
String
|
The oc number associated |
todaysJobDetail.fitType |
String
|
The fit type associated |
todaysJobDetail.itemCode |
String
|
The item code associated |
todaysJobDetail.itemDesc |
String
|
The item description associated |
todaysJobDetail.size |
String
|
The size associated |
todaysJobDetail.quanity |
Number
|
The quantity associated |
todaysJobDetail.ratio |
Number
|
The ratio associated |
todaysJobsCount
Type:
Properties:
| Name |
Type |
Description |
todaysJobsCount.ocNo |
String
|
The oc number |
todaysJobsCount.fitType |
String
|
The fit type |
todaysJobsCount.itemCode |
String
|
The item code |
todaysJobsCount.todaysJobs |
Number
|
The number of jobs assigned on the current day for the above combination |
totalJobsCount
Type:
Properties:
| Name |
Type |
Description |
totalJobsCount.ocNo |
String
|
The oc number |
totalJobsCount.fitType |
String
|
The fit type |
totalJobsCount.itemCode |
String
|
The item code |
totalJobsCount.totalJobs |
Number
|
The total number of jobs for the above combination |
totalJobsPerItemCode
Type:
Properties:
| Name |
Type |
Description |
totalJobsPerItemCode.itemCode |
String
|
The item code |
totalJobsPerItemCode.totalJobs |
Number
|
The total number of jobs completed for this item code |