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): """