forked from erp-dev/erp
feat: celery_beat
This commit is contained in:
@@ -169,6 +169,17 @@ class PlateOrder(ModelBase):
|
||||
from stateflow.services import get_display_status
|
||||
return get_display_status(self.business_object)
|
||||
|
||||
@property
|
||||
def last_completed_state(self) -> str:
|
||||
"""
|
||||
返回最后一个已完成节点的名称,用于详情展示
|
||||
"""
|
||||
if not self.business_object:
|
||||
return ''
|
||||
from stateflow.services import get_last_completed_state
|
||||
last_state = get_last_completed_state(self.business_object)
|
||||
return last_state.name if last_state else ''
|
||||
|
||||
@property
|
||||
def status_id(self):
|
||||
"""返回当前状态ID(下一个待执行的状态ID)"""
|
||||
|
||||
Reference in New Issue
Block a user