From bc0200669b8621418660d2bab3e27e371b352d4d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Oct 2025 16:33:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20gen=5Fnumber=5Fwith=5Frule=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 2fb9cbf8..d1dd67cb 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -948,6 +948,10 @@ class MlogbInViewSet(BulkCreateModelMixin, BulkUpdateModelMixin, BulkDestroyMode c_year2 = str(c_year)[-2:] c_month = handle_date.month m_model = material_out.model + if m_model is None: + raise ParseError("生成编号出错:产品型号不能为空") + elif m_model and m_model.is_lower(): + raise ParseError("生成编号出错:产品型号不能为小写") # 按生产日志查询 wpr = ( Wpr.objects.filter(