Commit e0e684b3 by 夏超

[fix] 大东联推送

parent dcf1adeb
......@@ -64,7 +64,7 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
if v.id in insert_id:
continue
insert_sql_data.append(f"""
({_uuid}, '{v.product_id.code}', '{v.wo_id.code}', {v.qty or 0}, {v.id}, '{v.pt_id.code}', '{v.pt_id.task_type}',
('{_uuid}', '{v.product_id.code}', '{v.wo_id.code}', {v.qty or 0}, {v.id}, '{v.pt_id.code}', '{v.pt_id.task_type}',
'{datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")}', '{em.code or ""}', '{em.name or ""}')
""")
sql = """
......@@ -75,11 +75,10 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
return super(InheritRokeResultPutWarehouseWizard, self).default_get(field_names)
sql += " , ".join(insert_sql_data)
try:
_logger.info(f"数据SQL{sql}")
cur.execute(sql)
conn.commit()
# cur.execute(f"EXEC sp_pp_kcrkdj @psUUID='{_uuid}'")
# conn.commit()
cur.execute(f"EXEC sp_pp_kcrkdj @psUUID='{_uuid}'")
conn.commit()
except Exception as e:
_logger.info("数据上传失败")
raise ValidationError("数据上传失败")
......
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