Package com.sgs.common.database
Class FormulaStep
- java.lang.Object
-
- com.sgs.common.database.HibernateObject
-
- com.sgs.common.database.FormulaStep
-
- All Implemented Interfaces:
java.lang.Comparable<FormulaStep>
public class FormulaStep extends HibernateObject implements java.lang.Comparable<FormulaStep>
This class represents a step of a formula A step can be several different actions, seeFormulaStep.FormulaStepType- Author:
- SGSystems
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormulaStep.FormulaStepTypeThe type of a formula step.static classFormulaStep.LossTypeThe type of loss the step will experience.
-
Field Summary
Fields Modifier and Type Field Description intautoConsumeBoolean value to specify whether this step should be automatically consumedTerminalbagScanTerminalThe Terminal where the bags are scanned when using bagging modejava.lang.StringbulkInstructionsInstructions to be sent with a bulk messagejava.lang.IntegerbulkTimeTime to be sent for a bulk messagejava.lang.IntegercollationSequenceCommoditycommodityThe commodity that is associated with this step.intconsumptionValuejava.lang.StringcustomField1A custom field used for storing, printing and reporting datajava.lang.StringcustomField2A custom field used for storing, printing and reporting datajava.lang.StringcustomField3A custom field used for storing, printing and reporting datajava.lang.StringcustomField4A custom field used for storing, printing and reporting datajava.lang.StringcustomField5A custom field used for storing, printing and reporting datajava.lang.StringcustomField6A custom field used for storing, printing and reporting datajava.lang.StringcustomField7A custom field used for storing, printing and reporting dataBulkPlatformdefaultBulkPlatformThe default bulk platform to run this step on should this step be of type BulkDispenseFormulaformula*Primary Key* The formula that this step belongs tobooleanisBeingAMixStepFormulaSteplinkedStepWith bagging mode 2, this is the sequence is which the terminal will have the user scan the bags in.booleanlinkedStepCompleteLocationlocationThe location this step should appear at if you are using a flat formulation approach rather than hierarchicaljava.lang.StringlossThe loss this step experiences in the production environment.intlossTypeThe type of loss to experience.java.lang.DoublelowerTolThe lower tolerance of this step, this should be set relative to the target, not as an absolute value.LocationmixLocationThe location where this item will ultimately get mixed if using bagging mode 5java.lang.IntegermixStepSequenceA reference to another step within this formula which should be mixed in whilst weighing this formula step.intnegativeAdditionBoolean value to indicate whether the terminal should operate in negative weighing mode for this step Negative weighing mode involves the operator removing the quantity from the scale rather than adding itintnonTracedUsed to indicate that this step in this formula should not prompt for stock and act as if record stock is not set at the commodity levelOptionalGroupoptionalGroupThe optional group that this step belongs tointprimaryOptionalFor reporting purposes, this is used to tell the system which is the primary optional step.QuestionquestionA question object which can be used when prompting questions or messagesintrequiresApprovalBoolean value to indicate whether this formula step requries approval prior to weighingintscalePackagingUsed in conjunction with Multi-lot (Key Entry).intscaleTolBoolean value to indicate whether the tolerance should scale with the batch size.intschedBaseSizeAn overriden base size to schedule should this step be a submixintscheduleBoolean value to indicate whether this step should be scheduled if this step's commodity is a formula typeintsequenceThe sequence in the formula this step belongs at.java.lang.DoubletareThe tare value if using a preset tarejava.lang.DoubletargetQtyThe target quantity for this step, should the step be scheduled at theFormula.defaultSizejava.lang.IntegertimeThe time it should take to complete this stepinttypeThe step type.WeightUnitunitThe unit that thetargetQtyrefers tojava.lang.DoubleupperTolThe upper tolerance of this step, this should be set relative to the target, not as an absolute value.-
Fields inherited from class com.sgs.common.database.HibernateObject
ID
-
-
Constructor Summary
Constructors Constructor Description FormulaStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStockLot(java.lang.Object stock)intcompareTo(FormulaStep o)booleancontainsStockLot(java.lang.Object stock)LotContainergetActiveLotContainer()ContainerLinkgetActivePallet()StockLocationgetActiveStock()java.util.List<java.lang.Object>getActiveStockLots()java.lang.DoublegetActiveStockLotsQuantity()intgetAutoConsume()TerminalgetBagScanTerminal()java.lang.StringgetBulkInstructions()java.lang.IntegergetBulkTime()java.lang.IntegergetCollationSequence()CommoditygetCommodity()doublegetCommodityConversionRate()intgetConsumptionValue()java.lang.DoublegetConvertedCost()java.lang.DoublegetConvertedTotalCost()java.lang.StringgetCustomField1()java.lang.StringgetCustomField2()java.lang.StringgetCustomField3()java.lang.StringgetCustomField4()java.lang.StringgetCustomField5()java.lang.StringgetCustomField6()java.lang.StringgetCustomField7()BulkPlatformgetDefaultBulkPlatform()java.util.DategetDeleted()java.lang.DoublegetEditValue()java.lang.DoublegetExpectedCost()FormulagetFormula()FormulaStepgetLinkedStep()LocationgetLocation()java.lang.StringgetLoss()intgetLossType()FormulaStep.LossTypegetLossTypeEnum()intgetLotCount()java.lang.DoublegetLowerTol()LocationgetMixLocation()java.lang.IntegergetMixStepSequence()intgetNegativeAddition()intgetNonTraced()OptionalGroupgetOptionalGroup()OptionalGroupgetPredeterminedGroupChoice()intgetPrimaryOptional()doublegetProductDivisor()doublegetQuantityAdded()doublegetQuantityAddedActual()QuestiongetQuestion()intgetRequiresApproval()intgetScalePackaging()intgetScaleTol()java.lang.StringgetScaleTolStr()intgetSchedBaseSize()intgetSchedule()intgetSequence()doublegetStepConversionRate()java.lang.DoublegetTare()java.lang.DoublegetTargetQty()java.lang.IntegergetTime()java.lang.DoublegetTotalCost()intgetType()FormulaStep.FormulaStepTypegetTypeEnum()java.lang.StringgetTypeEnumStr()WeightUnitgetUnit()java.lang.DoublegetUpperTol()booleanisBeingAMixStep()booleanisBeingShifted()booleanisComplete()booleanisLinkedStepComplete()booleanisStepSkipped()voidsetActiveLotContainer(LotContainer activeLotContainer)voidsetActivePallet(ContainerLink activePallet)voidsetActiveStock(StockLocation stock)voidsetActiveStockLots(java.util.List<java.lang.Object> activeStockLots)voidsetAutoConsume(int autoConsume)voidsetBagScanTerminal(Terminal bagScanTerminal)voidsetBeingAMixStep(boolean isBeingAMixStep)voidsetBeingShifted(boolean isBeingShifted)voidsetBulkInstructions(java.lang.String bulkInstructions)voidsetBulkTime(java.lang.Integer bulkTime)voidsetCollationSequence(java.lang.Integer collationSequence)voidsetCommodity(Commodity commodity)voidsetCommodityConversionRate(double commodityConversionRate)voidsetComplete(boolean complete)voidsetConsumptionValue(int consumptionValue)voidsetCustomField1(java.lang.String customField1)voidsetCustomField2(java.lang.String customField2)voidsetCustomField3(java.lang.String customField3)voidsetCustomField4(java.lang.String customField4)voidsetCustomField5(java.lang.String customField5)voidsetCustomField6(java.lang.String customField6)voidsetCustomField7(java.lang.String customField7)voidsetDefaultBulkPlatform(BulkPlatform defaultBulkPlatform)voidsetDeleted(java.util.Date deleted)voidsetEditValue(java.lang.Double editValue)voidsetExpectedCost(java.lang.Double stockCost, java.lang.Double targetQty)voidsetFormula(Formula formula)voidsetLinkedStep(FormulaStep linkedStep)voidsetLinkedStepComplete(boolean linkedStepComplete)voidsetLocation(Location location)voidsetLoss(java.lang.String loss)voidsetLossType(int lossType)voidsetLowerTol(java.lang.Double lowerTol)voidsetMixLocation(Location mixLocation)voidsetMixStepSequence(java.lang.Integer mixStepSequence)voidsetNegativeAddition(int negativeAddition)voidsetNonTraced(int nonTraced)voidsetOptionalGroup(OptionalGroup optionalGroup)voidsetPredeterminedGroupChoice(OptionalGroup predeterminedGroupChoice)voidsetPrimaryOptional(int primaryOptional)voidsetProductDivisor(double productDivisor)voidsetQuantityAdded(double quantityAdded)voidsetQuestion(Question question)voidsetRequiresApproval(int requiresApproval)voidsetScalePackaging(int scalePackaging)voidsetScaleTol(int scaleTol)voidsetSchedBaseSize(int schedBaseSize)voidsetSchedule(int schedule)voidsetSequence(int sequence)voidsetStepConversionRate(double stepConversionRate)voidsetStepSkipped(boolean stepSkipped)voidsetTare(java.lang.Double tare)voidsetTargetQty(java.lang.Double targetQty)voidsetTime(java.lang.Integer time)voidsetType(int type)voidsetUnit(WeightUnit unit)voidsetUpperTol(java.lang.Double upperTol)java.lang.StringtoString()-
Methods inherited from class com.sgs.common.database.HibernateObject
getExported, getID, isDontSave, isModified, setDontSave, setExported, setID, setModified
-
-
-
-
Field Detail
-
formula
public Formula formula
*Primary Key* The formula that this step belongs to
-
sequence
public int sequence
The sequence in the formula this step belongs at. Can be set to -1 if sequence is not required in formulation
-
commodity
public Commodity commodity
The commodity that is associated with this step. If this is a weigh step, it's the commodity to be weighed
-
lowerTol
public java.lang.Double lowerTol
The lower tolerance of this step, this should be set relative to the target, not as an absolute value.
-
upperTol
public java.lang.Double upperTol
The upper tolerance of this step, this should be set relative to the target, not as an absolute value.
-
targetQty
public java.lang.Double targetQty
The target quantity for this step, should the step be scheduled at theFormula.defaultSize
-
type
public int type
The step type. SeeFormulaStep.FormulaStepType
-
question
public Question question
A question object which can be used when prompting questions or messages
-
location
public Location location
The location this step should appear at if you are using a flat formulation approach rather than hierarchical
-
schedule
public int schedule
Boolean value to indicate whether this step should be scheduled if this step's commodity is a formula type
-
scaleTol
public int scaleTol
Boolean value to indicate whether the tolerance should scale with the batch size.JobLine.products
-
time
public java.lang.Integer time
The time it should take to complete this step
-
customField1
public java.lang.String customField1
A custom field used for storing, printing and reporting data
-
customField2
public java.lang.String customField2
A custom field used for storing, printing and reporting data
-
customField3
public java.lang.String customField3
A custom field used for storing, printing and reporting data
-
customField4
public java.lang.String customField4
A custom field used for storing, printing and reporting data
-
customField5
public java.lang.String customField5
A custom field used for storing, printing and reporting data
-
customField6
public java.lang.String customField6
A custom field used for storing, printing and reporting data
-
customField7
public java.lang.String customField7
A custom field used for storing, printing and reporting data
-
negativeAddition
public int negativeAddition
Boolean value to indicate whether the terminal should operate in negative weighing mode for this step Negative weighing mode involves the operator removing the quantity from the scale rather than adding it
-
defaultBulkPlatform
public BulkPlatform defaultBulkPlatform
The default bulk platform to run this step on should this step be of type BulkDispense
-
loss
public java.lang.String loss
The loss this step experiences in the production environment. Can be expressed fixed or as a percentile.
-
lossType
public int lossType
The type of loss to experience. SeeFormulaStep.LossType
-
unit
public WeightUnit unit
The unit that thetargetQtyrefers to
-
optionalGroup
public OptionalGroup optionalGroup
The optional group that this step belongs to
-
schedBaseSize
public int schedBaseSize
An overriden base size to schedule should this step be a submix
-
autoConsume
public int autoConsume
Boolean value to specify whether this step should be automatically consumed
-
requiresApproval
public int requiresApproval
Boolean value to indicate whether this formula step requries approval prior to weighing
-
mixLocation
public Location mixLocation
The location where this item will ultimately get mixed if using bagging mode 5
-
nonTraced
public int nonTraced
Used to indicate that this step in this formula should not prompt for stock and act as if record stock is not set at the commodity level
-
scalePackaging
public int scalePackaging
Used in conjunction with Multi-lot (Key Entry). Specifies whether packaging usage should scale up with the value entered on the key entry pad. I.e. producing a double sized pack results in double the packaging consumption
-
primaryOptional
public int primaryOptional
For reporting purposes, this is used to tell the system which is the primary optional step. (Only effective in the optionals dialog)
-
mixStepSequence
public java.lang.Integer mixStepSequence
A reference to another step within this formula which should be mixed in whilst weighing this formula step. Any partial additions will send the operator to the tied formula step After the mix addition is made, you are returned to the original formula step
-
collationSequence
public java.lang.Integer collationSequence
-
linkedStep
public FormulaStep linkedStep
With bagging mode 2, this is the sequence is which the terminal will have the user scan the bags in.
-
linkedStepComplete
public boolean linkedStepComplete
-
isBeingAMixStep
public boolean isBeingAMixStep
-
tare
public java.lang.Double tare
The tare value if using a preset tare
-
bagScanTerminal
public Terminal bagScanTerminal
The Terminal where the bags are scanned when using bagging mode
-
bulkInstructions
public java.lang.String bulkInstructions
Instructions to be sent with a bulk message
-
bulkTime
public java.lang.Integer bulkTime
Time to be sent for a bulk message
-
consumptionValue
public int consumptionValue
-
-
Method Detail
-
getFormula
public Formula getFormula()
-
setFormula
public void setFormula(Formula formula)
-
getSequence
public int getSequence()
-
setSequence
public void setSequence(int sequence)
-
getCommodity
public Commodity getCommodity()
-
setCommodity
public void setCommodity(Commodity commodity)
-
getLowerTol
public java.lang.Double getLowerTol()
-
setLowerTol
public void setLowerTol(java.lang.Double lowerTol)
-
getUpperTol
public java.lang.Double getUpperTol()
-
setUpperTol
public void setUpperTol(java.lang.Double upperTol)
-
getTargetQty
public java.lang.Double getTargetQty()
-
setTargetQty
public void setTargetQty(java.lang.Double targetQty)
-
getType
public int getType()
-
setType
public void setType(int type)
-
getTypeEnum
public FormulaStep.FormulaStepType getTypeEnum()
-
getTypeEnumStr
public java.lang.String getTypeEnumStr()
-
isComplete
public boolean isComplete()
-
setComplete
public void setComplete(boolean complete)
-
setQuantityAdded
public void setQuantityAdded(double quantityAdded)
-
getQuantityAdded
public double getQuantityAdded()
-
getQuantityAddedActual
public double getQuantityAddedActual()
-
isStepSkipped
public boolean isStepSkipped()
-
setStepSkipped
public void setStepSkipped(boolean stepSkipped)
-
getQuestion
public Question getQuestion()
-
setQuestion
public void setQuestion(Question question)
-
setActiveStock
public void setActiveStock(StockLocation stock)
-
getActiveStock
public StockLocation getActiveStock()
-
getLocation
public Location getLocation()
-
setLocation
public void setLocation(Location location)
-
getDeleted
public java.util.Date getDeleted()
-
setDeleted
public void setDeleted(java.util.Date deleted)
-
getSchedule
public int getSchedule()
-
setSchedule
public void setSchedule(int schedule)
-
getScaleTol
public int getScaleTol()
-
setScaleTol
public void setScaleTol(int scaleTol)
-
getTime
public java.lang.Integer getTime()
-
setTime
public void setTime(java.lang.Integer time)
-
isBeingShifted
public boolean isBeingShifted()
-
setBeingShifted
public void setBeingShifted(boolean isBeingShifted)
-
getCustomField1
public java.lang.String getCustomField1()
-
getCustomField2
public java.lang.String getCustomField2()
-
getCustomField3
public java.lang.String getCustomField3()
-
getCustomField4
public java.lang.String getCustomField4()
-
getCustomField5
public java.lang.String getCustomField5()
-
setCustomField1
public void setCustomField1(java.lang.String customField1)
-
setCustomField2
public void setCustomField2(java.lang.String customField2)
-
setCustomField3
public void setCustomField3(java.lang.String customField3)
-
setCustomField4
public void setCustomField4(java.lang.String customField4)
-
setCustomField5
public void setCustomField5(java.lang.String customField5)
-
compareTo
public int compareTo(FormulaStep o)
- Specified by:
compareToin interfacejava.lang.Comparable<FormulaStep>
-
getCustomField6
public java.lang.String getCustomField6()
-
getCustomField7
public java.lang.String getCustomField7()
-
setCustomField6
public void setCustomField6(java.lang.String customField6)
-
setCustomField7
public void setCustomField7(java.lang.String customField7)
-
getNegativeAddition
public int getNegativeAddition()
-
setNegativeAddition
public void setNegativeAddition(int negativeAddition)
-
getDefaultBulkPlatform
public BulkPlatform getDefaultBulkPlatform()
-
setDefaultBulkPlatform
public void setDefaultBulkPlatform(BulkPlatform defaultBulkPlatform)
-
getLoss
public java.lang.String getLoss()
-
setLoss
public void setLoss(java.lang.String loss)
-
getLossType
public int getLossType()
-
setLossType
public void setLossType(int lossType)
-
getUnit
public WeightUnit getUnit()
-
setUnit
public void setUnit(WeightUnit unit)
-
getOptionalGroup
public OptionalGroup getOptionalGroup()
-
setOptionalGroup
public void setOptionalGroup(OptionalGroup optionalGroup)
-
getActiveLotContainer
public LotContainer getActiveLotContainer()
-
setActiveLotContainer
public void setActiveLotContainer(LotContainer activeLotContainer)
-
getActivePallet
public ContainerLink getActivePallet()
-
setActivePallet
public void setActivePallet(ContainerLink activePallet)
-
getPredeterminedGroupChoice
public OptionalGroup getPredeterminedGroupChoice()
-
setPredeterminedGroupChoice
public void setPredeterminedGroupChoice(OptionalGroup predeterminedGroupChoice)
-
getTotalCost
public java.lang.Double getTotalCost()
-
getCommodityConversionRate
public double getCommodityConversionRate()
-
getStepConversionRate
public double getStepConversionRate()
-
setCommodityConversionRate
public void setCommodityConversionRate(double commodityConversionRate)
-
setStepConversionRate
public void setStepConversionRate(double stepConversionRate)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getScaleTolStr
public java.lang.String getScaleTolStr()
-
getSchedBaseSize
public int getSchedBaseSize()
-
setSchedBaseSize
public void setSchedBaseSize(int schedBaseSize)
-
getLotCount
public int getLotCount()
-
getActiveStockLots
public java.util.List<java.lang.Object> getActiveStockLots()
-
setActiveStockLots
public void setActiveStockLots(java.util.List<java.lang.Object> activeStockLots)
-
getActiveStockLotsQuantity
public java.lang.Double getActiveStockLotsQuantity()
-
addStockLot
public void addStockLot(java.lang.Object stock)
-
containsStockLot
public boolean containsStockLot(java.lang.Object stock)
-
getAutoConsume
public int getAutoConsume()
-
setAutoConsume
public void setAutoConsume(int autoConsume)
-
getConvertedCost
public java.lang.Double getConvertedCost()
-
getConvertedTotalCost
public java.lang.Double getConvertedTotalCost()
-
setExpectedCost
public void setExpectedCost(java.lang.Double stockCost, java.lang.Double targetQty)
-
getExpectedCost
public java.lang.Double getExpectedCost()
-
getRequiresApproval
public int getRequiresApproval()
-
setRequiresApproval
public void setRequiresApproval(int requiresApproval)
-
getLossTypeEnum
public FormulaStep.LossType getLossTypeEnum()
-
getMixLocation
public Location getMixLocation()
-
setMixLocation
public void setMixLocation(Location mixLocation)
-
getProductDivisor
public double getProductDivisor()
-
setProductDivisor
public void setProductDivisor(double productDivisor)
-
getNonTraced
public int getNonTraced()
-
setNonTraced
public void setNonTraced(int nonTraced)
-
getScalePackaging
public int getScalePackaging()
-
setScalePackaging
public void setScalePackaging(int scalePackaging)
-
getPrimaryOptional
public int getPrimaryOptional()
-
setPrimaryOptional
public void setPrimaryOptional(int primaryOptional)
-
setEditValue
public void setEditValue(java.lang.Double editValue)
-
getEditValue
public java.lang.Double getEditValue()
-
getMixStepSequence
public java.lang.Integer getMixStepSequence()
-
setMixStepSequence
public void setMixStepSequence(java.lang.Integer mixStepSequence)
-
getCollationSequence
public java.lang.Integer getCollationSequence()
-
setCollationSequence
public void setCollationSequence(java.lang.Integer collationSequence)
-
getLinkedStep
public FormulaStep getLinkedStep()
-
setLinkedStep
public void setLinkedStep(FormulaStep linkedStep)
-
isBeingAMixStep
public boolean isBeingAMixStep()
-
setBeingAMixStep
public void setBeingAMixStep(boolean isBeingAMixStep)
-
getTare
public java.lang.Double getTare()
-
setTare
public void setTare(java.lang.Double tare)
-
getBagScanTerminal
public Terminal getBagScanTerminal()
-
setBagScanTerminal
public void setBagScanTerminal(Terminal bagScanTerminal)
-
isLinkedStepComplete
public boolean isLinkedStepComplete()
-
setLinkedStepComplete
public void setLinkedStepComplete(boolean linkedStepComplete)
-
getBulkInstructions
public java.lang.String getBulkInstructions()
-
setBulkInstructions
public void setBulkInstructions(java.lang.String bulkInstructions)
-
getBulkTime
public java.lang.Integer getBulkTime()
-
setBulkTime
public void setBulkTime(java.lang.Integer bulkTime)
-
getConsumptionValue
public int getConsumptionValue()
-
setConsumptionValue
public void setConsumptionValue(int consumptionValue)
-
-