Class Formula


  • public class Formula
    extends HibernateObject
    This class represents a Formula or Recipe in a system This is the header element of a set of instructions for processing at a terminal
    Author:
    SGSystems
    • Field Detail

      • commodity

        public Commodity commodity
        *Primary Key - Commodity Code* Every Formula object must have an underlying Commodity object. All of the underlying commodity object attributes can be used to apply to a formula. Formulas are dynamic in that they can also be treated as other commodities, hence the need for the underlying commodity object.
      • defaultSize

        public java.lang.Double defaultSize
        The default size or base size of the formula. For a batch recipe this represents how much the combined total of the formula steps should yeild after production. If we have this set to 100, we can scale a batch up by double by specifying 200 products at the job level, or by half by specfiying 50 at the job level.
      • productionLocation

        public Location productionLocation
        The default production location for this formula. When scheduled, this informs the scheduler where abouts in the production facility this job should be made. This production location could be seen by multiple terminals or just one. See TerminalLocation
      • lastUsed

        public java.util.Date lastUsed
        The date this formula was last executed
      • minsToComplete

        public double minsToComplete
        The minutes it should take to complete this formula. For reporting purposes
      • totalStockQuantity

        public double totalStockQuantity
        The total stock quantity for the formula
      • version

        public int version
        The version of the formula
      • latest

        public int latest
        boolean value indicating whether this is the latest version of the formula
      • minimumProducts

        public double minimumProducts
        The minimum products per batch this formula is allowed to produce
      • maximumProducts

        public double maximumProducts
        The maximum products per batch this formula is allowed to produce
      • defaultBatchLabels

        public java.lang.Integer defaultBatchLabels
        The default number of batch labels to print on production. Can be used to prepopulate bulk quantity input for products
      • overheadCost

        public java.lang.Double overheadCost
        The average overhead cost of producing this formula
      • labourCost

        public java.lang.Double labourCost
        The average labour cost for producing this formula
      • approvalRequired

        public int approvalRequired
        Boolean value stating whether approval is required to run this formula
      • stockLocation

        public Location stockLocation
        The default location that stock should be produced to when this formula is complete
      • loss

        public java.lang.String loss
        The loss factor. Can be specified as a % by including the % symbol.
      • lastEditedBy

        public User lastEditedBy
        The user who last edited this formula
      • instructions

        public java.lang.String instructions
        Any instructions for creating this formula
      • tare

        public java.lang.Double tare
        The tare value if using a preset tare
      • maxPalletCount

        public java.lang.Integer maxPalletCount
        The maximum number of finished products that will fit on a pallet
      • expectedWeight

        public java.lang.Double expectedWeight
        The expected weight of a finished product
      • protectedFormula

        public int protectedFormula
        Boolean value to indicate whether the formula is protected and hence can only be accessed by operators with access to protected formulas
      • defaultScheduleQty

        public java.lang.Double defaultScheduleQty
        The default quantity to schedule when scheduling through the production plan. If not set, defaultSize will be used.
      • autoProduce

        public int autoProduce
        Not used
      • mixTime

        public java.lang.Integer mixTime
        The total mix time for this formula
      • dischargeTime

        public java.lang.Integer dischargeTime
        The total discharge time for this formula
      • signoffRequired

        public int signoffRequired
        boolean value to indicate whether signoff is required
      • dataField1

        public java.lang.String dataField1
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField2

        public java.lang.String dataField2
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField3

        public java.lang.String dataField3
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField4

        public java.lang.String dataField4
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField5

        public java.lang.String dataField5
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField6

        public java.lang.String dataField6
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField7

        public java.lang.String dataField7
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField8

        public java.lang.String dataField8
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • dataField9

        public java.lang.String dataField9
        An additional datafield used for storing data for label printing, reporting, prompting, etc.
      • maxBulkLabels

        public java.lang.Integer maxBulkLabels
        The maximum number of product labels to be produced for this formula
      • formulaSteps

        public java.util.List<FormulaStep> formulaSteps
        A list of steps in the formula
      • customJobNumberFormat

        public java.lang.String customJobNumberFormat
        A custom job number format for this formula
      • unsequenced

        public int unsequenced
        Used in conjunction with common ingredient weighing, this allows for the system to be both sequenced and unseqenced depending on formula
      • produceAs

        public int produceAs
        Produce As controls if a batch is produced as a count value or a weight
      • acs

        public java.lang.String acs
        ACS number for the job
      • retainCustomBatchNumber

        public int retainCustomBatchNumber
        Retains the custom batch number rather than updating it on a daily basis if using product.generateCustomBatchNumber.mode greater than 0
      • lastEditedOn

        public java.util.Date lastEditedOn
        The date the formula was last edited
      • equalizeMaxProducts

        public int equalizeMaxProducts
        When enabled, this divides the total product count per the number of batches and uses that value for the formulas max products
      • autoHoldPallet

        public int autoHoldPallet
        Flag whether to automatically hold produced pallets
      • designatedJobNo

        public java.lang.String designatedJobNo
        Job number that this formula relates to for pegging formulas to jobs
      • detectUOMScale

        public int detectUOMScale
        Searches attached platforms/scales for a scale that is calibrated to the same UoM as the Formula being processed
      • signOffTerminal

        public Terminal signOffTerminal
      • baggingRequiresDoubleVerification

        public int baggingRequiresDoubleVerification
        Having this set will require the Operator to first scan the bags to confirm the absence and then scan again to collate them.
      • countPerCarton

        public java.lang.Double countPerCarton
      • lossType

        public int lossType
      • ignoreContainerChange

        public int ignoreContainerChange
        Ignores alwaysChangeContainer configuration - still allows change containers in the formulation
      • importExempt

        public int importExempt
        This Formula will not be imported if it is referenced in a CSV file
      • equalizeBatchCount

        public int equalizeBatchCount
        When enabled, the child batches will have the same batch count as its parent.
      • workflowTemplateForBatchSignOff

        public ApprovalTemplate workflowTemplateForBatchSignOff
        When the signoff method is set to workflow, this is the workflow template that it uses to signoff the batch.
      • workflowTemplateForChanges

        public ApprovalTemplate workflowTemplateForChanges
        When formula.approval.enabled is enabled, if this template is set then the a workflow is created for approval, otherwise use the existing approval method
      • approvalWorkflow

        public ApprovalProcess approvalWorkflow
        Approval Process Link
      • assetsRequired

        public int assetsRequired
    • Constructor Detail

      • Formula

        public Formula()
    • Method Detail

      • getType

        public int getType()
      • setType

        public void setType​(int type)
      • getDefaultSize

        public java.lang.Double getDefaultSize()
      • setDefaultSize

        public void setDefaultSize​(java.lang.Double defaultSize)
      • getGtin

        public java.lang.String getGtin()
      • setGtin

        public void setGtin​(java.lang.String gtin)
      • getProductionLocation

        public Location getProductionLocation()
      • setProductionLocation

        public void setProductionLocation​(Location productionLocation)
      • getLastUsed

        public java.util.Date getLastUsed()
      • setLastUsed

        public void setLastUsed​(java.util.Date lastUsed)
      • getCommodity

        public Commodity getCommodity()
      • setCommodity

        public void setCommodity​(Commodity commodity)
      • getDescription

        public java.lang.String getDescription()
      • getMinsToComplete

        public double getMinsToComplete()
      • setMinsToComplete

        public void setMinsToComplete​(double minsToComplete)
      • getTotalStockQuantity

        public java.lang.Double getTotalStockQuantity()
      • setTotalStockQuantity

        public void setTotalStockQuantity​(double totalStockQuantity)
      • getCountPerCarton

        public java.lang.Double getCountPerCarton()
      • setCountPerCarton

        public void setCountPerCarton​(java.lang.Double countPerCarton)
      • getVersion

        public int getVersion()
      • setVersion

        public void setVersion​(int version)
      • getLatest

        public int getLatest()
      • setLatest

        public void setLatest​(int latest)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setCode

        public void setCode​(java.lang.String code)
      • getCode

        public java.lang.String getCode()
      • getMinimumProducts

        public double getMinimumProducts()
      • getMaximumProducts

        public double getMaximumProducts()
      • setMinimumProducts

        public void setMinimumProducts​(double minimumProducts)
      • setMaximumProducts

        public void setMaximumProducts​(double maximumProducts)
      • getDefaultBatchLabels

        public java.lang.Integer getDefaultBatchLabels()
      • setDefaultBatchLabels

        public void setDefaultBatchLabels​(java.lang.Integer defaultBatchLabels)
      • setDefaultLabelSet

        public void setDefaultLabelSet​(LabelFormatSet defaultLabelSet)
      • getProductionStyle

        public int getProductionStyle()
      • setProductionStyle

        public void setProductionStyle​(int productionStyle)
      • getProduceAs

        public int getProduceAs()
      • setProduceAs

        public void setProduceAs​(int produceAs)
      • getOverheadCost

        public java.lang.Double getOverheadCost()
      • getLabourCost

        public java.lang.Double getLabourCost()
      • setOverheadCost

        public void setOverheadCost​(java.lang.Double overheadCost)
      • setLabourCost

        public void setLabourCost​(java.lang.Double labourCost)
      • getOperationalMode

        public int getOperationalMode()
      • setOperationalMode

        public void setOperationalMode​(int operationalMode)
      • getTareMode

        public int getTareMode()
      • setTareMode

        public void setTareMode​(int tareMode)
      • isAllergenPresent

        public boolean isAllergenPresent()
      • setAllergenPresent

        public void setAllergenPresent​(boolean allergenPresent)
      • getApprovalRequired

        public int getApprovalRequired()
      • setApprovalRequired

        public void setApprovalRequired​(int approvalRequired)
      • getStockLocation

        public Location getStockLocation()
      • setStockLocation

        public void setStockLocation​(Location stockLocation)
      • getLoss

        public java.lang.String getLoss()
      • setLoss

        public void setLoss​(java.lang.String loss)
      • getLastEditedBy

        public User getLastEditedBy()
      • setLastEditedBy

        public void setLastEditedBy​(User lastEditedBy)
      • getInstructions

        public java.lang.String getInstructions()
      • setInstructions

        public void setInstructions​(java.lang.String instructions)
      • getExpiryMode

        public int getExpiryMode()
      • setExpiryMode

        public void setExpiryMode​(int expiryMode)
      • getTare

        public java.lang.Double getTare()
      • setTare

        public void setTare​(java.lang.Double tare)
      • getMaxPalletCount

        public java.lang.Integer getMaxPalletCount()
      • setMaxPalletCount

        public void setMaxPalletCount​(java.lang.Integer maxPalletCount)
      • getExpectedWeight

        public java.lang.Double getExpectedWeight()
      • setExpectedWeight

        public void setExpectedWeight​(java.lang.Double expectedWeight)
      • getProtectedFormula

        public int getProtectedFormula()
      • setProtectedFormula

        public void setProtectedFormula​(int protectedFormula)
      • getDefaultScheduleQty

        public java.lang.Double getDefaultScheduleQty()
      • setDefaultScheduleQty

        public void setDefaultScheduleQty​(java.lang.Double defaultScheduleQty)
      • getTotalWeight

        public java.lang.Double getTotalWeight()
      • setTotalWeight

        public void setTotalWeight​(java.lang.Double totalWeight)
      • getAutoProduce

        public int getAutoProduce()
      • setAutoProduce

        public void setAutoProduce​(int autoProduce)
      • getMixTime

        public java.lang.Integer getMixTime()
      • setMixTime

        public void setMixTime​(java.lang.Integer mixTime)
      • getDischargeTime

        public java.lang.Integer getDischargeTime()
      • setDischargeTime

        public void setDischargeTime​(java.lang.Integer dischargeTime)
      • getSignoffRequired

        public int getSignoffRequired()
      • setSignoffRequired

        public void setSignoffRequired​(int signoffRequired)
      • getDataField1

        public java.lang.String getDataField1()
      • setDataField1

        public void setDataField1​(java.lang.String dataField1)
      • getDataField2

        public java.lang.String getDataField2()
      • setDataField2

        public void setDataField2​(java.lang.String dataField2)
      • getDataField3

        public java.lang.String getDataField3()
      • setDataField3

        public void setDataField3​(java.lang.String dataField3)
      • getDataField4

        public java.lang.String getDataField4()
      • setDataField4

        public void setDataField4​(java.lang.String dataField4)
      • getDataField5

        public java.lang.String getDataField5()
      • setDataField5

        public void setDataField5​(java.lang.String dataField5)
      • getFormulaSteps

        public java.util.List<FormulaStep> getFormulaSteps()
      • setFormulaSteps

        public void setFormulaSteps​(java.util.List<FormulaStep> formulaSteps)
      • getMaxBulkLabels

        public java.lang.Integer getMaxBulkLabels()
      • setMaxBulkLabels

        public void setMaxBulkLabels​(java.lang.Integer maxBulkLabels)
      • getDataField6

        public java.lang.String getDataField6()
      • setDataField6

        public void setDataField6​(java.lang.String dataField6)
      • getDataField7

        public java.lang.String getDataField7()
      • setDataField7

        public void setDataField7​(java.lang.String dataField7)
      • getCustomJobNumberFormat

        public java.lang.String getCustomJobNumberFormat()
      • setCustomJobNumberFormat

        public void setCustomJobNumberFormat​(java.lang.String customJobNumberFormat)
      • getUnsequenced

        public int getUnsequenced()
      • setUnsequenced

        public void setUnsequenced​(int unsequenced)
      • getAcs

        public java.lang.String getAcs()
      • setAcs

        public void setAcs​(java.lang.String acs)
      • getRetainCustomBatchNumber

        public int getRetainCustomBatchNumber()
      • setRetainCustomBatchNumber

        public void setRetainCustomBatchNumber​(int retainCustomBatchNumber)
      • getLastEditedOn

        public java.util.Date getLastEditedOn()
      • setLastEditedOn

        public void setLastEditedOn​(java.util.Date lastEditedOn)
      • getEqualizeMaxProducts

        public int getEqualizeMaxProducts()
      • setEqualizeMaxProducts

        public void setEqualizeMaxProducts​(int equalizeMaxProducts)
      • getAutoHoldPallet

        public int getAutoHoldPallet()
      • setAutoHoldPallet

        public void setAutoHoldPallet​(int autoHoldPallet)
      • getDesignatedJobNo

        public java.lang.String getDesignatedJobNo()
      • setDesignatedJobNo

        public void setDesignatedJobNo​(java.lang.String designatedJobNo)
      • getDataField8

        public java.lang.String getDataField8()
      • setDataField8

        public void setDataField8​(java.lang.String dataField8)
      • getDataField9

        public java.lang.String getDataField9()
      • setDataField9

        public void setDataField9​(java.lang.String dataField9)
      • getDetectUOMScale

        public int getDetectUOMScale()
      • setDetectUOMScale

        public void setDetectUOMScale​(int detectUOMScale)
      • getSignOffTerminal

        public Terminal getSignOffTerminal()
      • setSignOffTerminal

        public void setSignOffTerminal​(Terminal signOffTerminal)
      • getBaggingRequiresDoubleVerification

        public int getBaggingRequiresDoubleVerification()
      • setBaggingRequiresDoubleVerification

        public void setBaggingRequiresDoubleVerification​(int baggingRequiresDoubleVerification)
      • getLossType

        public int getLossType()
      • setLossType

        public void setLossType​(int lossType)
      • getIgnoreContainerChange

        public int getIgnoreContainerChange()
      • setIgnoreContainerChange

        public void setIgnoreContainerChange​(int ignoreContainerChange)
      • getImportExempt

        public int getImportExempt()
      • setImportExempt

        public void setImportExempt​(int importExempt)
      • getEqualizeBatchCount

        public int getEqualizeBatchCount()
      • setEqualizeBatchCount

        public void setEqualizeBatchCount​(int equalizeBatchCount)
      • getWorkflowTemplateForBatchSignOff

        public ApprovalTemplate getWorkflowTemplateForBatchSignOff()
      • setWorkflowTemplateForBatchSignOff

        public void setWorkflowTemplateForBatchSignOff​(ApprovalTemplate workflowTemplateForBatchSignOff)
      • getWorkflowTemplateForChanges

        public ApprovalTemplate getWorkflowTemplateForChanges()
      • setWorkflowTemplateForChanges

        public void setWorkflowTemplateForChanges​(ApprovalTemplate workflowTemplateForChanges)
      • setApprovalWorkflow

        public void setApprovalWorkflow​(ApprovalProcess approvalWorkflow)
      • getAssetsRequired

        public int getAssetsRequired()
      • setAssetsRequired

        public void setAssetsRequired​(int assetsRequired)