From dbf8e00446998a90cc913ecd331723cf18940cfc Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Wed, 13 Mar 2024 11:02:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60\345\242\236\344\272\247\345\223\201.py" | 25 +++++++++++++------ common/db/sql/sql_del_branch_info.py | 12 ++++++++- data/b2_herp3_bs/message | 4 +-- report/summary.html | 12 ++++----- runner.py | 5 ++-- 5 files changed, 40 insertions(+), 18 deletions(-) diff --git "a/air_case/b2_herp3_bs/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.air/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.py" "b/air_case/b2_herp3_bs/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.air/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.py" index ee4daa95..5e919ffb 100644 --- "a/air_case/b2_herp3_bs/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.air/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.py" +++ "b/air_case/b2_herp3_bs/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.air/o7\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\347\247\221\345\256\244\346\226\260\345\242\236\344\272\247\345\223\201.py" @@ -40,13 +40,7 @@ def test1(): # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 # id1= test1() # print(id1) - #o5科室管理_科室产品分配_添加科室产品页面_查询全部 - url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_insert") - # 获取请求头信息 - headers = commonFuc().get_business_data(module, "json_headers2", - commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) # branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] branch_name= FileUtils().r_info(module, '院区新增')["branch_name"] name=branch_name+'中心库房' @@ -59,7 +53,13 @@ def test1(): # date2=timeUtils().get_time_hms(2) # for i in list2: - # dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] + dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] + #同步库房信息 + pro_path = commonFuc().get_pro_path() + sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b8库房管理_库区设置_同步库房信息.air') + using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b8库房管理_库区设置_同步库房信息.air') + from r_b8库房管理_库区设置_同步库房信息 import test1 + test1() #查询库房id pro_path = commonFuc().get_pro_path() sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b9库房管理_库区设置_库房查询_查询全部.air') @@ -67,11 +67,22 @@ def test1(): from r_b9库房管理_库区设置_库房查询_查询全部 import test1 stockId=test1(name) #调用库区设置脚本新增库区 + #新增前删除货位,库区 + delData().Delete_probeInfo() pro_path = commonFuc().get_pro_path() sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_c3库房管理_库区设置_新增库区.air') using(pro_path + r'\\air_case\\b2_herp3_bs\\r_c3库房管理_库区设置_新增库区.air') from r_c3库房管理_库区设置_新增库区 import test1 + print('stockId',stockId) test1(stockId) + + # o5科室管理_科室产品分配_添加科室产品页面_查询全部 + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_insert") + + # 获取请求头信息 + headers = commonFuc().get_business_data(module, "json_headers2", + commonFuc().get_business_data(module, "json_contentType"), token, + commonFuc().get_business_data(module, "X-APP-CODE")) # 请求体 request_body = commonFuc().get_business_data(module, "payload58_6",dept2_id) request_body='['+str(request_body)+']' diff --git a/common/db/sql/sql_del_branch_info.py b/common/db/sql/sql_del_branch_info.py index 62866d6d..1444545a 100644 --- a/common/db/sql/sql_del_branch_info.py +++ b/common/db/sql/sql_del_branch_info.py @@ -112,13 +112,23 @@ class delData(object): cursor.execute("commit;") print('库区信息删除成功 ') # 删除多余库房信息 + # sql = "delete from mcms_stock_info where stock_name like '%东土城路院区_____中心库房';" + # print(sql) + # cursor.execute(sql) + # cursor.execute("commit;") + # print('多余库房信息删除成功 ') + cursor.close() + def Delete_probeInfo_other(self): + 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 mcms_stock_info where stock_name like '%东土城路院区_____中心库房';" print(sql) cursor.execute(sql) cursor.execute("commit;") print('多余库房信息删除成功 ') cursor.close() - def Delete_role(self): connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", charset="utf8") diff --git a/data/b2_herp3_bs/message b/data/b2_herp3_bs/message index 437b15cc..41b13245 100644 --- a/data/b2_herp3_bs/message +++ b/data/b2_herp3_bs/message @@ -1,3 +1,3 @@ 院区新增: - branch_id: h0347-3358 - branch_name: 东土城路院区RkS*Z + branch_id: h0347-3359 + branch_name: 东土城路院区c#YBu diff --git a/report/summary.html b/report/summary.html index 3154431b..09db11d5 100644 --- a/report/summary.html +++ b/report/summary.html @@ -55,9 +55,9 @@ 1 - 1 - 0分2秒 - 100.0% + 0 + 0分0秒 + 0.0% @@ -72,9 +72,9 @@ - c0_新增科室_特殊科室_设备科_中心库房 - 成功 - 2.342 + o7科室管理_科室产品分配_科室新增产品 + 失败 + 0.838 xiaohesheng diff --git a/runner.py b/runner.py index c9ac97e7..39fb8f9a 100644 --- a/runner.py +++ b/runner.py @@ -94,6 +94,7 @@ if __name__ == '__main__': print('删了什么文件', del_file) #删除自动化脚本产生的数据 - # delData().Delete_branch_by_id() - # delData().Delete_goods_change_info() + delData().Delete_branch_by_id() + delData().Delete_goods_change_info() + delData().Delete_probeInfo_other() print('结束了') \ No newline at end of file -- GitLab