From e516d86156aaf8293a21426125c9ba5bcb10ac1e Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Fri, 1 Nov 2024 15:42:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/db/sql/sql_del_branch_info.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/db/sql/sql_del_branch_info.py b/common/db/sql/sql_del_branch_info.py index 2b402db1..fec8086a 100644 --- a/common/db/sql/sql_del_branch_info.py +++ b/common/db/sql/sql_del_branch_info.py @@ -269,6 +269,18 @@ class delData(object): cursor.execute("commit;") print('内网供应关系删除成功 ') cursor.close() + def Del_supply_relation1(self): + connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", + charset="utf8") + cursor = connection.cursor() + # 删除供应关系 + info = FileUtils().r_info8('b5_spd3_core_business_flow', "供货关系申请2", 'message') + e_corpId = info['e_corpId'] + sql = "delete from supply_relation where prov_id in (select id from bas_company_info where cname like '%%国药集团公司_____%%') and prov_id!='%s';"%e_corpId + cursor.execute(sql) + cursor.execute("commit;") + print('内网供应关系删除成功 ') + cursor.close() def Del_reporter_data(self,type=1,branch_id='branch_id'): connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", @@ -1026,3 +1038,4 @@ class delData(object): # delData().Delete_business_Data_All() # delData().Delete_business_Data_All2() # delData().check_goods_info() +# delData().Del_supply_relation1() \ No newline at end of file -- GitLab