diff --git a/common/db/sql/sql_del_branch_info.py b/common/db/sql/sql_del_branch_info.py index 2b402db184b6bfe8f111e498b5bd3b1df856a854..fec8086a75bece5188c27627fb3513339c55f101 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