From e2c7847c74a761e19c4a0cbd965ba5b690fcf63b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 8 Jul 2025 16:41:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20gen=5Fnumber=5Fwith=5Frule=20=E5=81=8F?= =?UTF-8?q?=E7=A6=BB6=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 6ad0d962..45db024f 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -36,6 +36,7 @@ from apps.enm.models import EnStat from django.db.models import Q from apps.utils.tools import convert_ordereddict, update_dict from django.db.models import Count +from datetime import datetime, timedelta # Create your views here. @@ -720,7 +721,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust @classmethod def gen_number_with_rule(cls, rule, material_out:Material, gen_count=1): from apps.wpmw.models import Wpr - now = timezone.now() + now = datetime.now() - timedelta(hours=6, minutes=20) c_year = now.year c_year2 = str(c_year)[-2:] c_month = now.month