123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import os
- import django
- import sys
- def setup_django():
-
- project_path = "D:/Document/code/vue/greater_wms"
- sys.path.append(project_path)
-
-
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'greaterwms.settings')
- django.setup()
- def main():
- from container.views import OutTaskViewSet
- testtask = OutTaskViewSet()
- count =testtask.get_batch_count_by_boundlist("2")
- if not count:
- print("❌ 批次下没有可用的库位,请检查批次号")
- return
- print(f"[1]批次下可用的库位数:{count}")
- location_demand = testtask.generate_location_by_demand(count)
- if not location_demand:
- print("❌ 库位需求生成失败,请检查托盘编码")
- return
- print(f"[2]库位需求:{location_demand}")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if __name__ == "__main__":
- setup_django()
- main()
|