19 lines
568 B
Java
19 lines
568 B
Java
package com.baiyue.firstleg.domain;
|
|
|
|
/** 智能装柜状态,只允许沿此方向推进。 */
|
|
public enum SmartLoadingStatus {
|
|
EDITING,
|
|
LOADING,
|
|
COMPLETED;
|
|
|
|
/** 装柜完成前可维护集装箱号和航次。 */
|
|
public boolean allowsTransportUpdate() { return this != COMPLETED; }
|
|
|
|
/** 编辑中和装柜中均允许维护尚未拣货的明细。 */
|
|
public boolean mutable() { return this != COMPLETED; }
|
|
|
|
public boolean canAdvanceTo(SmartLoadingStatus next) {
|
|
return next != null && next.ordinal() == ordinal() + 1;
|
|
}
|
|
}
|