diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 2d69ea39..6d9a1636 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -706,9 +706,9 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust raise ParseError(f"获取该类产品最后编号错误: {str(e)}") try: if gen_count == 1: - return rule.format(c_year=c_year, c_month=c_month, m_model=m_model, n_count=n_count, c_year2=c_year2) + return rule.format(c_year=c_year, c_month=c_month, m_model=m_model, n_count=n_count+1, c_year2=c_year2) else: - return [rule.format(c_year=c_year, c_month=c_month, m_model=m_model, n_count=n_count+i, c_year2=c_year2) for i in range(gen_count)] + return [rule.format(c_year=c_year, c_month=c_month, m_model=m_model, n_count=n_count+i+1, c_year2=c_year2) for i in range(gen_count)] except Exception as e: raise ParseError(f"个号生成错误: {e}")