Commit df6acd27 by 夏超

[fix] 上推数据修改

parent 89b467d3
......@@ -26,15 +26,14 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
cur = conn.cursor()
except Exception as e:
raise ValidationError("数据库链接失败,请检查数据库链接参数")
ids = results.ids
if not ids:
ids_str = [f"'{v.id}'" for v in results]
if not ids_str:
return super(InheritRokeResultPutWarehouseWizard, self).default_get()
ids_str = "', '".join(ids)
_logger.info(f"SQL____________{ids_str}")
_logger.info(f"SQL____________{' , '.join(ids_str)}")
sql = f"""
select WBCCB_CCID
from WBCCB
where WBCCB_CCID not in ('{ids_str}')
where WBCCB_CCID not in ({' , '.join(ids_str)})
"""
try:
cur.execute(sql)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment