From 24d95f569cc47bd8c0f41397734573cfd8f7829f Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Thu, 25 Apr 2024 14:21:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=BA=94=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/db/sql/sql_del_branch_info.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/db/sql/sql_del_branch_info.py b/common/db/sql/sql_del_branch_info.py index e29dffad..7245dedf 100644 --- a/common/db/sql/sql_del_branch_info.py +++ b/common/db/sql/sql_del_branch_info.py @@ -3,6 +3,9 @@ import pymysql +from common.fileUtls import FileUtils + + class delData(object): def Delete_branch_by_id(self): @@ -221,8 +224,10 @@ class delData(object): connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", charset="utf8") cursor = connection.cursor() - # 删除产品信息 - sql = "delete from supply_relation where contact_way like '_____' and contact_user like '_____';" + # 删除供应关系 + info = FileUtils().r_info8('b5_spd3_core_business_flow', "供货关系申请2", 'message') + username = info['e_username'] + sql = "delete from supply_relation where prov_id in(select id from bas_company_info where cname = '%s');"%username print(sql) cursor.execute(sql) cursor.execute("commit;") -- GitLab