Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
c8d9c597
提交
c8d9c597
authored
9月 24, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提货扫码查询提单时优化: 关务节点的package_state为空 或者 package_state的tally_state不在已提货/已理货/尾程交接状态
上级
fffc3ac5
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
6 行删除
+14
-6
order_controller.py
ccs_connect_tiktok/controllers/order_controller.py
+14
-6
没有找到文件。
ccs_connect_tiktok/controllers/order_controller.py
浏览文件 @
c8d9c597
...
...
@@ -626,7 +626,8 @@ class OrderController(http.Controller):
'zh'
:
'系统解析错误,错误原因是
%
s'
%
e
}
logging
.
info
(
'last_mile_delivery error:
%
s'
%
e
)
res
[
'message'
]
=
exceptions_msg_dic
[
pda_lang
]
# _('System parsing error, the reason for the error is %s', e) # 系统解析错误,错误原因是
res
[
'message'
]
=
exceptions_msg_dic
[
pda_lang
]
# _('System parsing error, the reason for the error is %s', e) # 系统解析错误,错误原因是
logging
.
info
(
'last_mile_delivery res:
%
s'
%
res
)
return
res
...
...
@@ -768,7 +769,8 @@ class OrderController(http.Controller):
current_time
=
request
.
env
[
'common.common'
]
.
sudo
()
.
get_utc_time
(
datetime
.
now
())
operation_time
=
latest_pickup_record
.
operation_time
time_diff
=
(
datetime
.
strptime
(
current_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
-
operation_time
)
.
total_seconds
()
/
60
logging
.
info
(
f
"tally_time_check current_time: {current_time}, pickup_time: {operation_time}, time_diff: {time_diff}"
)
logging
.
info
(
f
"tally_time_check current_time: {current_time}, pickup_time: {operation_time}, time_diff: {time_diff}"
)
# 如果时间差小于等于配置的参数,则存在风险
if
time_diff
<=
allowed_minutes
:
...
...
@@ -838,7 +840,8 @@ class OrderController(http.Controller):
current_time
=
request
.
env
[
'common.common'
]
.
sudo
()
.
get_utc_time
(
datetime
.
now
())
operation_time
=
latest_record
.
operation_time
time_diff
=
(
datetime
.
strptime
(
current_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
-
operation_time
)
.
total_seconds
()
/
60
logging
.
info
(
f
"delivery_time_check current_time: {current_time}, operation_time: {operation_time}, time_diff: {time_diff}"
)
logging
.
info
(
f
"delivery_time_check current_time: {current_time}, operation_time: {operation_time}, time_diff: {time_diff}"
)
# 如果时间差小于等于配置的参数,则存在风险
if
time_diff
<=
allowed_minutes
:
if
pallet_name
:
...
...
@@ -1315,9 +1318,14 @@ class OrderController(http.Controller):
# 查询符合条件的提单
# 1. 状态为未开始和清关中
# 2. 提单的关务节点状态不是已完成节点
bl_domain
=
[(
'state'
,
'in'
,
[
'draft'
,
'ccing'
]),
(
'customs_clearance_status.is_done'
,
'='
,
False
),
(
'customs_clearance_status.package_state.tally_state'
,
'not in'
,
[
'picked_up'
,
'checked_goods'
,
'handover_completed'
])]
# 3. 关务节点的package_state为空 或者 package_state的tally_state不在已提货/已理货/尾程交接状态
bl_domain
=
[
(
'state'
,
'in'
,
[
'draft'
,
'ccing'
]),
(
'customs_clearance_status.is_done'
,
'='
,
False
),
'|'
,
(
'customs_clearance_status.package_state'
,
'='
,
False
),
# package_state为空
(
'customs_clearance_status.package_state.tally_state'
,
'not in'
,
[
'picked_up'
,
'checked_goods'
,
'handover_completed'
])
# 或者tally_state不在指定状态
]
bl_objs
=
request
.
env
[
'cc.bl'
]
.
sudo
()
.
search
(
bl_domain
)
if
bl_objs
:
res
[
'bl_arr'
]
=
[
bl_obj
.
search_bl_info
(
pda_lang
=
pda_lang
,
type
=
'pickup'
,
is_all
=
False
)
for
bl_obj
in
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论