From cdb4e65159af6a2027a6540ec99e48da24c3e694 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 8 May 2025 13:12:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E6=AD=A5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=85=89=E8=8A=AF=E7=9A=84=E6=89=B9=E6=AC=A1=E5=88=86=E6=9E=90?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/scripts/batch_gxerp.py | 7 +++++++ apps/wpm/services_2.py | 10 +++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 apps/wpm/scripts/batch_gxerp.py diff --git a/apps/wpm/scripts/batch_gxerp.py b/apps/wpm/scripts/batch_gxerp.py new file mode 100644 index 00000000..7b45e599 --- /dev/null +++ b/apps/wpm/scripts/batch_gxerp.py @@ -0,0 +1,7 @@ +def main(batch: str): + return None, None + + + +if __name__ == '__main__': + pass \ No newline at end of file diff --git a/apps/wpm/services_2.py b/apps/wpm/services_2.py index 1f0787ff..a1319b77 100644 --- a/apps/wpm/services_2.py +++ b/apps/wpm/services_2.py @@ -23,8 +23,9 @@ def get_alldata_with_batch_and_store(batch: str, need_update_time=True): last_time, data = get_alldata_with_batch(batch) elif BASE_PROJECT_CODE == "gxerp": need_update = True - last_time, data = get_alldata_with_batch_gx(batch) - + from apps.wpm.scripts.batch_gxerp import main + last_time, data = main(batch) + if need_update and last_time and data: bobj, _ = BatchSt.objects.get_or_create(batch=batch, defaults={ "last_time": last_time @@ -34,11 +35,6 @@ def get_alldata_with_batch_and_store(batch: str, need_update_time=True): bobj.data = json.loads(json.dumps(data, cls=MyJSONEncoder)) bobj.save() -def get_alldata_with_batch_gx(batch: str): - """ - 光芯获取batch的统计数据 - """ - return None, None def get_alldata_with_batch(batch: str): """