提交 ba85db0e authored 作者: Chris Harris's avatar Chris Harris

fix: 修复massupload/CAP接口子查询返回多列

上级 253c8dd1
...@@ -1838,7 +1838,7 @@ def label_bind(request, company_id, action, what, thirdparty=None): ...@@ -1838,7 +1838,7 @@ def label_bind(request, company_id, action, what, thirdparty=None):
g = d['cap'] # 盖内码 g = d['cap'] # 盖内码
o = d['outer'] # 盖外码 o = d['outer'] # 盖外码
if len(o) == 10 and len(b) == 12 and b.isdigit(): if len(o) == 10 and len(b) == 12 and b.isdigit():
g = "(select cap from bottlecap.fcty_binding_details where outter='" + o.upper() + "')" g = "(select cap from bottlecap.fcty_binding_details where outter='" + o.upper() + "' ORDER BY tm LIMIT 1)"
o = "'" + o + "'" o = "'" + o + "'"
a.append("('" + b + "'," + g + "," + o + "," + str(d['label_pkg']) + "," + \ a.append("('" + b + "'," + g + "," + o + "," + str(d['label_pkg']) + "," + \
"(select jsonb_agg(jsonb_build_object(" + \ "(select jsonb_agg(jsonb_build_object(" + \
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论