feat: gen_number_with_rule 偏离6小时

This commit is contained in:
caoqianming 2025-07-08 16:41:25 +08:00
parent 024cae6fa3
commit e2c7847c74
1 changed files with 2 additions and 1 deletions

View File

@ -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