From bf3803a0e8e79406087ab8fe0238f412ec4767e3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 2 Sep 2025 15:17:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlog=5Fsubmit=20=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 45b0808b..f7dd0c0b 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -152,6 +152,8 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): """ 生产日志提交后需要执行的操作 """ + if mlog.work_start_time > timezone.now(): + raise ParseError('操作开始时间不能晚于当前时间') 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: