feat: mlog添加操作时间校验
This commit is contained in:
parent
30bb96cf6c
commit
28acc48768
|
@ -150,6 +150,8 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
|
|||
"""
|
||||
生产日志提交后需要执行的操作
|
||||
"""
|
||||
if mlog.work_start_time and mlog.work_end_time and mlog.work_end_time < mlog.work_start_time:
|
||||
raise ParseError('操作结束时间不能早于操作开始时间')
|
||||
if mlog.count_real == 0:
|
||||
raise ParseError('产出数量不能为0')
|
||||
if mlog.submit_time is not None:
|
||||
|
|
Loading…
Reference in New Issue