zhouhui.jiang

update

...@@ -42,6 +42,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str: ...@@ -42,6 +42,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str:
42 - message: 创建结果描述(成功时:"创建运单成功",失败时:具体的失败原因) 42 - message: 创建结果描述(成功时:"创建运单成功",失败时:具体的失败原因)
43 - consignmentCode: 运单编号 43 - consignmentCode: 运单编号
44 - waybill_id: 运单ID 44 - waybill_id: 运单ID
45 + - consStatus: 运单状态
45 - operate_unit_name: 操作单位名称 46 - operate_unit_name: 操作单位名称
46 - operate_unit_code: 操作单位代码 47 - operate_unit_code: 操作单位代码
47 - detailList: 明细列表 48 - detailList: 明细列表
...@@ -96,6 +97,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str: ...@@ -96,6 +97,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str:
96 result_data = { 97 result_data = {
97 "consignmentCode": code, 98 "consignmentCode": code,
98 "waybill_id": str(waybill_id) if waybill_id else "", 99 "waybill_id": str(waybill_id) if waybill_id else "",
100 + "consStatus": "",
99 "operate_unit_name": "", 101 "operate_unit_name": "",
100 "operate_unit_code": "", 102 "operate_unit_code": "",
101 "detailList": [] 103 "detailList": []
...@@ -118,6 +120,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str: ...@@ -118,6 +120,7 @@ def create_waybill_d(consignmentCode: str, Authorization: str = None) -> str:
118 if head_resp.status_code == 200: 120 if head_resp.status_code == 200:
119 head_json = head_resp.json() 121 head_json = head_resp.json()
120 head_extra = (head_json.get("data") or {}).get("extra") or {} 122 head_extra = (head_json.get("data") or {}).get("extra") or {}
123 + result_data["consStatus"] = head_extra.get("consStatus") or ""
121 result_data["operate_unit_name"] = head_extra.get("operateUnitName") or "" 124 result_data["operate_unit_name"] = head_extra.get("operateUnitName") or ""
122 result_data["operate_unit_code"] = head_extra.get("operateUnitCode") or "" 125 result_data["operate_unit_code"] = head_extra.get("operateUnitCode") or ""
123 except Exception: 126 except Exception:
...@@ -243,6 +246,7 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str: ...@@ -243,6 +246,7 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str:
243 - message: 查询结果描述(成功时:"查询详情成功",失败时:具体的失败原因) 246 - message: 查询结果描述(成功时:"查询详情成功",失败时:具体的失败原因)
244 - consignmentCode: 运单编号 247 - consignmentCode: 运单编号
245 - waybill_id: 运单ID 248 - waybill_id: 运单ID
249 + - consStatus: 运单状态
246 - operate_unit_name: 操作单位名称 250 - operate_unit_name: 操作单位名称
247 - operate_unit_code: 操作单位代码 251 - operate_unit_code: 操作单位代码
248 - detailList: 明细列表 252 - detailList: 明细列表
...@@ -257,6 +261,7 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str: ...@@ -257,6 +261,7 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str:
257 result_data = { 261 result_data = {
258 "consignmentCode": consignmentCode, 262 "consignmentCode": consignmentCode,
259 "waybill_id": "", 263 "waybill_id": "",
264 + "consStatus": "",
260 "operate_unit_name": "", 265 "operate_unit_name": "",
261 "operate_unit_code": "", 266 "operate_unit_code": "",
262 "detailList": [] 267 "detailList": []
...@@ -285,6 +290,9 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str: ...@@ -285,6 +290,9 @@ def query_waybill_info(consignmentCode: str, Authorization: str = None) -> str:
285 result_data["consignmentCode"] = returned_code 290 result_data["consignmentCode"] = returned_code
286 result_data["waybill_id"] = str(waybill_id) if waybill_id else "" 291 result_data["waybill_id"] = str(waybill_id) if waybill_id else ""
287 292
293 + # 提取运单状态
294 + result_data["consStatus"] = head_extra.get("consStatus") or ""
295 +
288 # 提取公司信息 296 # 提取公司信息
289 result_data["operate_unit_name"] = head_extra.get("operateUnitName") or "" 297 result_data["operate_unit_name"] = head_extra.get("operateUnitName") or ""
290 result_data["operate_unit_code"] = head_extra.get("operateUnitCode") or "" 298 result_data["operate_unit_code"] = head_extra.get("operateUnitCode") or ""
......