|
@@ -88,18 +88,64 @@ class shipping_details(BaseModel):
|
|
|
customer_contract_id: str
|
|
|
shipment_type:str
|
|
|
ship_date:str
|
|
|
+
|
|
|
|
|
|
@app.post("/op_doc/upload_orders",
|
|
|
summary="訂單明細上傳",
|
|
|
description=
|
|
|
"""
|
|
|
- 訂單明細上傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 客契代碼
|
|
|
- - shipment_type: 運單種類
|
|
|
- - ship_date: 出貨日期
|
|
|
+ parameters:
|
|
|
+ 訂單明細上傳(Excel格式)
|
|
|
+ - current_insite: 收單營業所
|
|
|
+ - transport_type: 配送類別
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_site: 入單營業所
|
|
|
+ - transport_contract_id: 客契代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+
|
|
|
+ - shipment_no: 運單號碼
|
|
|
+ - shipment_type: 運單種類(一單到底/換單)
|
|
|
+ - shipment_2: 是否二配
|
|
|
+ - shipment_date: 出貨日期
|
|
|
+
|
|
|
+ - package_id: 袋號
|
|
|
+ - order_id: 訂單編號
|
|
|
+
|
|
|
+ - sender_data: 送件人資料
|
|
|
+ {
|
|
|
+ sender_name: 送件人姓名
|
|
|
+ sender_mobileno: 送件人手機號碼
|
|
|
+ sender_addr: 送件人地址
|
|
|
+ sender_spot_id: 超商代碼
|
|
|
+ sender_spot_name: 超商名稱
|
|
|
+ sender_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
+ - recipient_data: 收件人資料
|
|
|
+ {
|
|
|
+ recipient_name: 收件人姓名
|
|
|
+ recipient_mobileno: 收件人手機號碼
|
|
|
+ recipient_addr: 收件人地址
|
|
|
+ recipient_spot_id: 超商代碼
|
|
|
+ recipient_spot_name: 超商名稱
|
|
|
+ recipient_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ }
|
|
|
+ - package: 貨件內容
|
|
|
+ {
|
|
|
+ package_charge: 代收貨款
|
|
|
+ package_weight: 貨件重量
|
|
|
+ package_contemt: 內容物
|
|
|
+ ...
|
|
|
+ }
|
|
|
+ - dInDtime: 建檔日期
|
|
|
+ - dInUser: 建檔人
|
|
|
+ - dInFilename: 檔案名稱
|
|
|
+ ...
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 上傳成功/失敗
|
|
|
"""
|
|
|
)
|
|
|
async def upload_orders(req:upload_orders_item):
|
|
@@ -112,19 +158,27 @@ response_model=shipping_details,
|
|
|
summary="出貨明細查詢",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 建檔日期
|
|
|
- - channel_id: 入單營業所
|
|
|
- - customer_contract_id: 收單營業所
|
|
|
- - shipment_type: 配送類別
|
|
|
- - ship_date: 通路商
|
|
|
- - ship_date: 運單種類
|
|
|
- - ship_date: 二配
|
|
|
- - ship_date: 建檔人
|
|
|
- - ship_date: 檔案名稱
|
|
|
- - ship_date: 上傳時間
|
|
|
- - ship_date: 傳送帳號
|
|
|
+ parameters:
|
|
|
+ 查詢條件
|
|
|
+ {
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
+ return:
|
|
|
+ dataset
|
|
|
+ [{
|
|
|
+ - dInDtime: 建檔日期
|
|
|
+ - transport_site: 入單營業所
|
|
|
+ - current_insite: 收單營業所
|
|
|
+ - transport_type: 配送類別
|
|
|
+ - transport_name: 通路商
|
|
|
+ - shipment_type: 運單種類
|
|
|
+ - shipment_2: 二配
|
|
|
+ - dInUser: 建檔人
|
|
|
+ - dInFilename: 檔案名稱
|
|
|
+ - upload_dtime: 上傳時間
|
|
|
+ - upload_account: 傳送帳號
|
|
|
+ }]
|
|
|
"""
|
|
|
)
|
|
|
async def query_shipping_details():
|
|
@@ -137,19 +191,39 @@ response_model=shipping_details,
|
|
|
summary="出貨面單",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 運單號碼
|
|
|
- - shipment_type: 收貨人
|
|
|
- - ship_date: 收貨人電話
|
|
|
- - ship_date: 收貨人地址
|
|
|
- - ship_date: 發貨人
|
|
|
- - ship_date: 發貨人電話
|
|
|
- - ship_date: 發貨人地址
|
|
|
- - ship_date: 品名
|
|
|
- - ship_date: 貨件重量
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - shipment_no: 運單號碼
|
|
|
+
|
|
|
+ return:
|
|
|
+ - sender_data: 送件人資料
|
|
|
+ {
|
|
|
+ sender_name: 送件人姓名
|
|
|
+ sender_mobileno: 送件人手機號碼
|
|
|
+ sender_addr: 送件人地址
|
|
|
+ sender_spot_id: 超商代碼
|
|
|
+ sender_spot_name: 超商名稱
|
|
|
+ sender_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - recipient_data: 收件人資料
|
|
|
+ {
|
|
|
+ recipient_name: 收件人姓名
|
|
|
+ recipient_mobileno: 收件人手機號碼
|
|
|
+ recipient_addr: 收件人地址
|
|
|
+ recipient_spot_id: 超商代碼
|
|
|
+ recipient_spot_name: 超商名稱
|
|
|
+ recipient_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - package: 貨件內容
|
|
|
+ {
|
|
|
+ package_charge: 代收貨款
|
|
|
+ package_weight: 貨件重量
|
|
|
+ package_contemt: 內容物
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
"""
|
|
|
)
|
|
|
async def shipment_out():
|
|
@@ -162,9 +236,11 @@ response_model=shipping_details,
|
|
|
summary="袋進倉",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 外袋條碼
|
|
|
+ parameters:
|
|
|
+ - package_id: 袋號
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def bag_in():
|
|
@@ -176,13 +252,14 @@ response_model=shipping_details,
|
|
|
summary="進站",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - objtype: 通路代碼
|
|
|
- - objtype: 配送單號
|
|
|
- - objtype: 運單號碼
|
|
|
- - objtype: 配送營業站
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+ - insite_comment: 其他說明
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def wh_in():
|
|
@@ -195,14 +272,15 @@ response_model=shipping_details,
|
|
|
summary="出站",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - objtype: 通路代碼
|
|
|
- - nextstop: 下一站
|
|
|
- - objtype: 配送單號
|
|
|
- - objtype: 運單號碼
|
|
|
- - objtype: 配送營業站
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - transport_next: 下一站代碼
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+ - insite_comment: 其他說明
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def wh_out():
|
|
@@ -213,13 +291,14 @@ response_model=shipping_details,
|
|
|
summary="配送",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - objtype: 通路代碼
|
|
|
- - objtype: 配送單號
|
|
|
- - objtype: 運單號碼
|
|
|
- - objtype: 配送營業站
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+ - insite_comment: 其他說明
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def deliver_out():
|
|
@@ -231,12 +310,15 @@ response_model=shipping_details,
|
|
|
summary="簽收",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - objtype: 簽收類別
|
|
|
- - objtype: 簽收人
|
|
|
- - objtype: 運單號碼
|
|
|
+ parameters:
|
|
|
+ - transport_type: 配送類別
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - transport_sign_status: 簽收類別(成功/異常)
|
|
|
+ - transport_sign: 簽收人(本人/代收/警衛)
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def sign():
|
|
@@ -248,19 +330,39 @@ response_model=shipping_details,
|
|
|
summary="二次出貨",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 運單號碼
|
|
|
- - shipment_type: 收貨人
|
|
|
- - ship_date: 收貨人電話
|
|
|
- - ship_date: 收貨人地址
|
|
|
- - ship_date: 發貨人
|
|
|
- - ship_date: 發貨人電話
|
|
|
- - ship_date: 發貨人地址
|
|
|
- - ship_date: 品名
|
|
|
- - ship_date: 貨件重量
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - shipment_no: 運單號碼
|
|
|
+
|
|
|
+ return:
|
|
|
+ - sender_data: 送件人資料
|
|
|
+ {
|
|
|
+ sender_name: 送件人姓名
|
|
|
+ sender_mobileno: 送件人手機號碼
|
|
|
+ sender_addr: 送件人地址
|
|
|
+ sender_spot_id: 超商代碼
|
|
|
+ sender_spot_name: 超商名稱
|
|
|
+ sender_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - recipient_data: 收件人資料
|
|
|
+ {
|
|
|
+ recipient_name: 收件人姓名
|
|
|
+ recipient_mobileno: 收件人手機號碼
|
|
|
+ recipient_addr: 收件人地址
|
|
|
+ recipient_spot_id: 超商代碼
|
|
|
+ recipient_spot_name: 超商名稱
|
|
|
+ recipient_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - package: 貨件內容
|
|
|
+ {
|
|
|
+ package_charge: 代收貨款
|
|
|
+ package_weight: 貨件重量
|
|
|
+ package_contemt: 內容物
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
"""
|
|
|
)
|
|
|
async def whout_again():
|
|
@@ -272,15 +374,17 @@ response_model=shipping_details,
|
|
|
summary="退貨",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 營業所
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 倉別
|
|
|
- - shipment_type: 儲區
|
|
|
- - ship_date: 運單號碼
|
|
|
- - ship_date: 其他說明
|
|
|
+ parameters:
|
|
|
+ - transport_site: 營業所
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - stock_id: 倉別(長慶倉庫)
|
|
|
+ - stock_storage_id: 儲區
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+ - insite_comment: 其他說明
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def s_return():
|
|
@@ -292,19 +396,38 @@ response_model=shipping_details,
|
|
|
summary="重印面單",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 運單號碼
|
|
|
- - shipment_type: 收貨人
|
|
|
- - ship_date: 收貨人電話
|
|
|
- - ship_date: 收貨人地址
|
|
|
- - ship_date: 發貨人
|
|
|
- - ship_date: 發貨人電話
|
|
|
- - ship_date: 發貨人地址
|
|
|
- - ship_date: 品名
|
|
|
- - ship_date: 貨件重量
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - shipment_no: 運單號碼
|
|
|
+
|
|
|
+ return:
|
|
|
+ - sender_data: 送件人資料
|
|
|
+ {
|
|
|
+ sender_name: 送件人姓名
|
|
|
+ sender_mobileno: 送件人手機號碼
|
|
|
+ sender_addr: 送件人地址
|
|
|
+ sender_spot_id: 超商代碼
|
|
|
+ sender_spot_name: 超商名稱
|
|
|
+ sender_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - recipient_data: 收件人資料
|
|
|
+ {
|
|
|
+ recipient_name: 收件人姓名
|
|
|
+ recipient_mobileno: 收件人手機號碼
|
|
|
+ recipient_addr: 收件人地址
|
|
|
+ recipient_spot_id: 超商代碼
|
|
|
+ recipient_spot_name: 超商名稱
|
|
|
+ recipient_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - package: 貨件內容
|
|
|
+ {
|
|
|
+ package_charge: 代收貨款
|
|
|
+ package_weight: 貨件重量
|
|
|
+ package_contemt: 內容物
|
|
|
+ ...
|
|
|
+ }
|
|
|
"""
|
|
|
)
|
|
|
async def reprint():
|
|
@@ -317,18 +440,43 @@ response_model=shipping_details,
|
|
|
summary="面單批次列印",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 運單號碼
|
|
|
- - shipment_type: 收貨人
|
|
|
- - ship_date: 收貨人電話
|
|
|
- - ship_date: 收貨人地址
|
|
|
- - ship_date: 發貨人
|
|
|
- - ship_date: 發貨人電話
|
|
|
- - ship_date: 發貨人地址
|
|
|
- - ship_date: 已列印次數
|
|
|
+ parameters:
|
|
|
+ 查詢條件
|
|
|
+ {
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
+ return:
|
|
|
+ dataset
|
|
|
+ [
|
|
|
+ - sender_data: 送件人資料
|
|
|
+ {
|
|
|
+ sender_name: 送件人姓名
|
|
|
+ sender_mobileno: 送件人手機號碼
|
|
|
+ sender_addr: 送件人地址
|
|
|
+ sender_spot_id: 超商代碼
|
|
|
+ sender_spot_name: 超商名稱
|
|
|
+ sender_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - recipient_data: 收件人資料
|
|
|
+ {
|
|
|
+ recipient_name: 收件人姓名
|
|
|
+ recipient_mobileno: 收件人手機號碼
|
|
|
+ recipient_addr: 收件人地址
|
|
|
+ recipient_spot_id: 超商代碼
|
|
|
+ recipient_spot_name: 超商名稱
|
|
|
+ recipient_spot_addr: 超商地址
|
|
|
+ ...
|
|
|
+ },
|
|
|
+ - package: 貨件內容
|
|
|
+ {
|
|
|
+ package_charge: 代收貨款
|
|
|
+ package_weight: 貨件重量
|
|
|
+ package_contemt: 內容物
|
|
|
+ ...
|
|
|
+ }
|
|
|
+ ]
|
|
|
"""
|
|
|
)
|
|
|
async def batch_print():
|
|
@@ -340,18 +488,12 @@ response_model=shipping_details,
|
|
|
summary="刷退條碼",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 運單號碼
|
|
|
- - shipment_type: 收貨人
|
|
|
- - ship_date: 收貨人電話
|
|
|
- - ship_date: 收貨人地址
|
|
|
- - ship_date: 發貨人
|
|
|
- - ship_date: 發貨人電話
|
|
|
- - ship_date: 發貨人地址
|
|
|
- - ship_date: 已列印次數
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def print_return():
|
|
@@ -363,13 +505,15 @@ response_model=shipping_details,
|
|
|
summary="入庫",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 倉庫
|
|
|
- - shipment_type: 儲區
|
|
|
- - ship_date: 配送號碼
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - stock_id: 倉別(長慶倉庫)
|
|
|
+ - stock_storage_id: 儲區
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def stock_in():
|
|
@@ -381,13 +525,15 @@ response_model=shipping_details,
|
|
|
summary="上架",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - objtype: 配送類別
|
|
|
- - channel_id: 通路代碼
|
|
|
- - customer_contract_id: 倉庫
|
|
|
- - shipment_type: 儲區
|
|
|
- - ship_date: 配送號碼
|
|
|
+ parameters:
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - transport_no: 配送單號
|
|
|
+ - stock_id: 倉別(長慶倉庫)
|
|
|
+ - stock_storage_id: 儲區
|
|
|
+ - if_cancel: 取消刷件
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def shelf():
|
|
@@ -399,10 +545,11 @@ response_model=shipping_details,
|
|
|
summary="出庫",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - customer_contract_id: 倉庫
|
|
|
- - ship_date: 配送號碼
|
|
|
+ parameters:
|
|
|
+ - stock_id: 倉庫(長慶倉庫)
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def stock_out():
|
|
@@ -415,12 +562,13 @@ response_model=shipping_details,
|
|
|
summary="移動儲位",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - customer_contract_id: 倉庫
|
|
|
- - ship_date: 來源儲區
|
|
|
- - ship_date: 目的儲區
|
|
|
-
|
|
|
+ parameters:
|
|
|
+ - stock_id: 倉別(長慶倉庫)
|
|
|
+ - source_stock_storage_id: 來源儲區
|
|
|
+ - target_stock_storage_id: 目的儲區
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def stock_move():
|
|
@@ -431,12 +579,13 @@ response_model=shipping_details,
|
|
|
summary="下架",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - customer_contract_id: 下架營業站
|
|
|
- - ship_date: 通路商
|
|
|
- - ship_date: 倉別
|
|
|
-
|
|
|
+ parameters:
|
|
|
+ - transport_site: 下架營業站
|
|
|
+ - transport_id: 通路代碼
|
|
|
+ - stock_id: 倉別(長慶倉庫)
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def outstock():
|
|
@@ -448,10 +597,15 @@ response_model=shipping_details,
|
|
|
summary="出庫檢核",
|
|
|
description=
|
|
|
"""
|
|
|
- 回傳:
|
|
|
-
|
|
|
- - customer_contract_id: 出庫檢核
|
|
|
-
|
|
|
+ parameters:
|
|
|
+ 匯入檢核單號(Excel格式)
|
|
|
+ dataset
|
|
|
+ [
|
|
|
+ - transport_no: 配送單號
|
|
|
+ ]
|
|
|
+
|
|
|
+ return:
|
|
|
+ {'success':'1'/'0'} 資料正常/異常
|
|
|
"""
|
|
|
)
|
|
|
async def outstock():
|