forked from erp-dev/erp
feat: refactor flower.utils to sub package, added some sync api in package, added plate_order sync result model but relation of plate_order was not query (do it next step)
This commit is contained in:
100
flower/utils/__init__.py
Normal file
100
flower/utils/__init__.py
Normal file
@@ -0,0 +1,100 @@
|
||||
"""工具包。
|
||||
|
||||
历史上 `flower.utils` 是一个单文件模块(`utils.py`)。
|
||||
为了降低耦合并便于扩展,现已拆分为目录包,并在此保留向后兼容的导出。
|
||||
|
||||
- 明道云相关:`flower.utils.mingdaoyun.*`
|
||||
"""
|
||||
|
||||
from .mingdaoyun import (
|
||||
HTTPMethod,
|
||||
MDY_APP_KEY,
|
||||
MDY_BASE_URL,
|
||||
MDY_ENDPOINT_GET_FILTER_ROWS,
|
||||
MDY_SIGN,
|
||||
MDY_WORKSHEET_ID_CUSTOMER,
|
||||
MDY_WORKSHEET_ID_FABRIC,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_COLORING,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_COLOR_SCHEME,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_DRAWING,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_IMAGE_DEVELOPMENT,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_MODIFY_DRAWING,
|
||||
MDY_WORKSHEET_ID_PLATE_ORDER_PATTERN_SET,
|
||||
MDY_WORKSHEET_ID_PRODUCT,
|
||||
Customer,
|
||||
Fabric,
|
||||
MDYAttachmentItem,
|
||||
MDYCollaboratorItem,
|
||||
MDYPlateOrder,
|
||||
MDYRelationItem,
|
||||
MingDaoYunClient,
|
||||
Product,
|
||||
ProductListResponse,
|
||||
customer_type_map,
|
||||
fabric_type_map,
|
||||
fetch_customers_from_mingdaoyun,
|
||||
fetch_plate_orders_from_mingdaoyun,
|
||||
fetch_products_from_mingdaoyun,
|
||||
fetch_row_by_rowid_from_mingdaoyun,
|
||||
get_default_mingdaoyun_client,
|
||||
mdy_table_map,
|
||||
pick_customer,
|
||||
pick_fabric,
|
||||
pick_product,
|
||||
plate_order_field_definitions,
|
||||
plate_order_related_worksheet_map,
|
||||
plate_order_related_worksheet_map_cn,
|
||||
plate_order_type_map,
|
||||
product_type_map,
|
||||
sync_fabric_from_mingdaoyun,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# client
|
||||
"HTTPMethod",
|
||||
"MingDaoYunClient",
|
||||
"get_default_mingdaoyun_client",
|
||||
"MDY_BASE_URL",
|
||||
"MDY_ENDPOINT_GET_FILTER_ROWS",
|
||||
"MDY_APP_KEY",
|
||||
"MDY_SIGN",
|
||||
# worksheet ids / maps
|
||||
"mdy_table_map",
|
||||
"MDY_WORKSHEET_ID_PRODUCT",
|
||||
"MDY_WORKSHEET_ID_CUSTOMER",
|
||||
"MDY_WORKSHEET_ID_FABRIC",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_DRAWING",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_COLORING",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_PATTERN_SET",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_MODIFY_DRAWING",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_COLOR_SCHEME",
|
||||
"MDY_WORKSHEET_ID_PLATE_ORDER_IMAGE_DEVELOPMENT",
|
||||
"product_type_map",
|
||||
"customer_type_map",
|
||||
"fabric_type_map",
|
||||
"plate_order_field_definitions",
|
||||
"plate_order_related_worksheet_map",
|
||||
"plate_order_related_worksheet_map_cn",
|
||||
"plate_order_type_map",
|
||||
# models
|
||||
"Product",
|
||||
"ProductListResponse",
|
||||
"Customer",
|
||||
"Fabric",
|
||||
"MDYRelationItem",
|
||||
"MDYAttachmentItem",
|
||||
"MDYCollaboratorItem",
|
||||
"MDYPlateOrder",
|
||||
# parsers
|
||||
"pick_product",
|
||||
"pick_customer",
|
||||
"pick_fabric",
|
||||
# fetch
|
||||
"fetch_products_from_mingdaoyun",
|
||||
"fetch_customers_from_mingdaoyun",
|
||||
"fetch_row_by_rowid_from_mingdaoyun",
|
||||
"fetch_plate_orders_from_mingdaoyun",
|
||||
"sync_fabric_from_mingdaoyun",
|
||||
]
|
||||
Reference in New Issue
Block a user