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 class
FormulaStep.FormulaStepType
The type of a formula step.static class
FormulaStep.LossType
The type of loss the step will experience.
-
Field Summary
Fields Modifier and Type Field Description int
autoConsume
Boolean value to specify whether this step should be automatically consumedTerminal
bagScanTerminal
The Terminal where the bags are scanned when using bagging modejava.lang.String
bulkInstructions
Instructions to be sent with a bulk messagejava.lang.Integer
bulkTime
Time to be sent for a bulk messagejava.lang.Integer
collationSequence
Commodity
commodity
The commodity that is associated with this step.int
consumptionValue
java.lang.String
customField1
A custom field used for storing, printing and reporting datajava.lang.String
customField2
A custom field used for storing, printing and reporting datajava.lang.String
customField3
A custom field used for storing, printing and reporting datajava.lang.String
customField4
A custom field used for storing, printing and reporting datajava.lang.String
customField5
A custom field used for storing, printing and reporting datajava.lang.String
customField6
A custom field used for storing, printing and reporting datajava.lang.String
customField7
A custom field used for storing, printing and reporting dataBulkPlatform
defaultBulkPlatform
The default bulk platform to run this step on should this step be of type BulkDispenseFormula
formula
*Primary Key* The formula that this step belongs toboolean
isBeingAMixStep
FormulaStep
linkedStep
With bagging mode 2, this is the sequence is which the terminal will have the user scan the bags in.boolean
linkedStepComplete
Location
location
The location this step should appear at if you are using a flat formulation approach rather than hierarchicaljava.lang.String
loss
The loss this step experiences in the production environment.int
lossType
The type of loss to experience.java.lang.Double
lowerTol
The lower tolerance of this step, this should be set relative to the target, not as an absolute value.Location
mixLocation
The location where this item will ultimately get mixed if using bagging mode 5java.lang.Integer
mixStepSequence
A reference to another step within this formula which should be mixed in whilst weighing this formula step.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 itint
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 levelOptionalGroup
optionalGroup
The optional group that this step belongs toint
primaryOptional
For reporting purposes, this is used to tell the system which is the primary optional step.Question
question
A question object which can be used when prompting questions or messagesint
requiresApproval
Boolean value to indicate whether this formula step requries approval prior to weighingint
scalePackaging
Used in conjunction with Multi-lot (Key Entry).int
scaleTol
Boolean value to indicate whether the tolerance should scale with the batch size.int
schedBaseSize
An overriden base size to schedule should this step be a submixint
schedule
Boolean value to indicate whether this step should be scheduled if this step's commodity is a formula typeint
sequence
The sequence in the formula this step belongs at.java.lang.Double
tare
The tare value if using a preset tarejava.lang.Double
targetQty
The target quantity for this step, should the step be scheduled at theFormula.defaultSize
java.lang.Integer
time
The time it should take to complete this stepint
type
The step type.WeightUnit
unit
The unit that thetargetQty
refers tojava.lang.Double
upperTol
The 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 void
addStockLot(java.lang.Object stock)
int
compareTo(FormulaStep o)
boolean
containsStockLot(java.lang.Object stock)
LotContainer
getActiveLotContainer()
ContainerLink
getActivePallet()
StockLocation
getActiveStock()
java.util.List<java.lang.Object>
getActiveStockLots()
java.lang.Double
getActiveStockLotsQuantity()
int
getAutoConsume()
Terminal
getBagScanTerminal()
java.lang.String
getBulkInstructions()
java.lang.Integer
getBulkTime()
java.lang.Integer
getCollationSequence()
Commodity
getCommodity()
double
getCommodityConversionRate()
int
getConsumptionValue()
java.lang.Double
getConvertedCost()
java.lang.Double
getConvertedTotalCost()
java.lang.String
getCustomField1()
java.lang.String
getCustomField2()
java.lang.String
getCustomField3()
java.lang.String
getCustomField4()
java.lang.String
getCustomField5()
java.lang.String
getCustomField6()
java.lang.String
getCustomField7()
BulkPlatform
getDefaultBulkPlatform()
java.util.Date
getDeleted()
java.lang.Double
getEditValue()
java.lang.Double
getExpectedCost()
Formula
getFormula()
FormulaStep
getLinkedStep()
Location
getLocation()
java.lang.String
getLoss()
int
getLossType()
FormulaStep.LossType
getLossTypeEnum()
int
getLotCount()
java.lang.Double
getLowerTol()
Location
getMixLocation()
java.lang.Integer
getMixStepSequence()
int
getNegativeAddition()
int
getNonTraced()
OptionalGroup
getOptionalGroup()
OptionalGroup
getPredeterminedGroupChoice()
int
getPrimaryOptional()
double
getProductDivisor()
double
getQuantityAdded()
double
getQuantityAddedActual()
Question
getQuestion()
int
getRequiresApproval()
int
getScalePackaging()
int
getScaleTol()
java.lang.String
getScaleTolStr()
int
getSchedBaseSize()
int
getSchedule()
int
getSequence()
double
getStepConversionRate()
java.lang.Double
getTare()
java.lang.Double
getTargetQty()
java.lang.Integer
getTime()
java.lang.Double
getTotalCost()
int
getType()
FormulaStep.FormulaStepType
getTypeEnum()
java.lang.String
getTypeEnumStr()
WeightUnit
getUnit()
java.lang.Double
getUpperTol()
boolean
isBeingAMixStep()
boolean
isBeingShifted()
boolean
isComplete()
boolean
isLinkedStepComplete()
boolean
isStepSkipped()
void
setActiveLotContainer(LotContainer activeLotContainer)
void
setActivePallet(ContainerLink activePallet)
void
setActiveStock(StockLocation stock)
void
setActiveStockLots(java.util.List<java.lang.Object> activeStockLots)
void
setAutoConsume(int autoConsume)
void
setBagScanTerminal(Terminal bagScanTerminal)
void
setBeingAMixStep(boolean isBeingAMixStep)
void
setBeingShifted(boolean isBeingShifted)
void
setBulkInstructions(java.lang.String bulkInstructions)
void
setBulkTime(java.lang.Integer bulkTime)
void
setCollationSequence(java.lang.Integer collationSequence)
void
setCommodity(Commodity commodity)
void
setCommodityConversionRate(double commodityConversionRate)
void
setComplete(boolean complete)
void
setConsumptionValue(int consumptionValue)
void
setCustomField1(java.lang.String customField1)
void
setCustomField2(java.lang.String customField2)
void
setCustomField3(java.lang.String customField3)
void
setCustomField4(java.lang.String customField4)
void
setCustomField5(java.lang.String customField5)
void
setCustomField6(java.lang.String customField6)
void
setCustomField7(java.lang.String customField7)
void
setDefaultBulkPlatform(BulkPlatform defaultBulkPlatform)
void
setDeleted(java.util.Date deleted)
void
setEditValue(java.lang.Double editValue)
void
setExpectedCost(java.lang.Double stockCost, java.lang.Double targetQty)
void
setFormula(Formula formula)
void
setLinkedStep(FormulaStep linkedStep)
void
setLinkedStepComplete(boolean linkedStepComplete)
void
setLocation(Location location)
void
setLoss(java.lang.String loss)
void
setLossType(int lossType)
void
setLowerTol(java.lang.Double lowerTol)
void
setMixLocation(Location mixLocation)
void
setMixStepSequence(java.lang.Integer mixStepSequence)
void
setNegativeAddition(int negativeAddition)
void
setNonTraced(int nonTraced)
void
setOptionalGroup(OptionalGroup optionalGroup)
void
setPredeterminedGroupChoice(OptionalGroup predeterminedGroupChoice)
void
setPrimaryOptional(int primaryOptional)
void
setProductDivisor(double productDivisor)
void
setQuantityAdded(double quantityAdded)
void
setQuestion(Question question)
void
setRequiresApproval(int requiresApproval)
void
setScalePackaging(int scalePackaging)
void
setScaleTol(int scaleTol)
void
setSchedBaseSize(int schedBaseSize)
void
setSchedule(int schedule)
void
setSequence(int sequence)
void
setStepConversionRate(double stepConversionRate)
void
setStepSkipped(boolean stepSkipped)
void
setTare(java.lang.Double tare)
void
setTargetQty(java.lang.Double targetQty)
void
setTime(java.lang.Integer time)
void
setType(int type)
void
setUnit(WeightUnit unit)
void
setUpperTol(java.lang.Double upperTol)
java.lang.String
toString()
-
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 thetargetQty
refers 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:
compareTo
in 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:
toString
in 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)
-
-