diff --git a/apps/wpm/services_2.py b/apps/wpm/services_2.py index 9ff9241f..d2a25062 100644 --- a/apps/wpm/services_2.py +++ b/apps/wpm/services_2.py @@ -5,7 +5,7 @@ from apps.inm.models import MIOItem from apps.qm.models import FtestWork from django.utils import timezone from datetime import datetime -from server.conf import BASE_PROJECT_CODE +from django.conf import settings import json from apps.utils.tools import MyJSONEncoder import decimal @@ -17,6 +17,7 @@ def get_alldata_with_batch_and_store(batch: str): 获取某个批次的整体生产数据并保存 """ need_update = False + BASE_PROJECT_CODE = getattr(settings, "BASE_PROJECT_CODE", None) if BASE_PROJECT_CODE == "gzerp": need_update = True last_time, data = get_alldata_with_batch(batch)