diff --git "a/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" "b/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" new file mode 100644 index 0000000000000000000000000000000000000000..08b17a74f3b32a2dac64234ef72a749ef3732ac4 --- /dev/null +++ "b/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" @@ -0,0 +1,83 @@ +# -*- encoding=utf8 -*- +import sys + +from airtest.core.helper import using + +from common.db.sql.sql_del_branch_info import delData +from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo +from common.db.sql.sql_del_notices_info import delByNoticeName +from common.fileUtls import FileUtils +from common.timeUtils import timeUtils + +__author__ = "xiaohesheng" + +""" +case_tag:api,herp-web,p2科室管理_科室产品分配_请领模板维护_新增模板,id2263,id2263-183,sit,on +内网:p2科室管理_科室产品分配_请领模板维护_新增模板 +""" + +from common.common_func import commonFuc +from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system +module = "b2_herp3_bs" +def test1(): + """ + 场景:p2科室管理_科室产品分配_请领模板维护_新增模板 + 用例名称:p2科室管理_科室产品分配_请领模板维护_新增模板 + 输入:"test" + 输出:"rtn_msg": {"code": 0, "msg": null, "data":51660462cb564f2e84e93d70661f3ec8} + """ + #内网登录 + username = commonFuc().get_business_data(module, "username") + # # print('医院名称',username) + password = commonFuc().get_business_data(module, "password") + # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') + # 获取token和projectCode + token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + # print( token,projectCode,uxid,corpId,info) + # pro_path = commonFuc().get_pro_path() + # sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') + # using(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') + # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 + # id1= test1() + # print(id1) + #p1科室管理_科室产品分配_产品列表查询_条件查询 + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_goodsPurTemplate_insert_url") + + # 获取请求头信息 + 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"] + # str = commonFuc().get_business_data(module, 'data3') + # list2 = list(str.split(",")) + # print(list2) + # #获取日期 + # date1=timeUtils().get_time_hms(2) + # date2=timeUtils().get_time_hms(2) + # for i in list2: + + # dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] + # 请求体 + # for i in list2: + request_body = commonFuc().get_business_data(module, "payload59") +# request_body='['+str(request_body)+']' +# new_request_body = request_body.replace("'", '"') +# print(new_request_body) +# import json +# request_body_json = json.loads(new_request_body) +# # # 发送请求 + result = commonFuc().http_post(url, request_body,headers) + print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) +#断言 +# checkDict=commonFuc().get_business_data(module,'checkDict10') +# commonFuc().check_result(checkDict,result) + code=commonFuc().analysis_json('code',result) + data=commonFuc().analysis_json('data',result) + data1=commonFuc().analysis_json('data',data) + + if code==0 and len(data)>=1: + commonFuc().check_text_exist(0, result) + else: + commonFuc().check_text_exist('error', result) + +test1() diff --git "a/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.py" "b/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.py" new file mode 100644 index 0000000000000000000000000000000000000000..f927fe4f37d19752004c3608db610f67ce1d6abf --- /dev/null +++ "b/air_case/b2_herp3_bs/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.air/p2\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_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277_\351\207\215\345\244\215\346\226\260\345\242\236.py" @@ -0,0 +1,83 @@ +# -*- encoding=utf8 -*- +import sys + +from airtest.core.helper import using + +from common.db.sql.sql_del_branch_info import delData +from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo +from common.db.sql.sql_del_notices_info import delByNoticeName +from common.fileUtls import FileUtils +from common.timeUtils import timeUtils + +__author__ = "xiaohesheng" + +""" +case_tag:api,herp-web,p2科室管理_科室产品分配_请领模板维护_新增模板_重复新增,id2263,id2263-184,sit,on +内网:p2科室管理_科室产品分配_请领模板维护_新增模板_重复新增 +""" + +from common.common_func import commonFuc +from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system +module = "b2_herp3_bs" +def test1(): + """ + 场景:p2科室管理_科室产品分配_请领模板维护_新增模板 + 用例名称:p2科室管理_科室产品分配_请领模板维护_新增模板 + 输入:"test" + 输出:"rtn_msg": {"code": 0, "msg": null, "data":51660462cb564f2e84e93d70661f3ec8} + """ + #内网登录 + username = commonFuc().get_business_data(module, "username") + # # print('医院名称',username) + password = commonFuc().get_business_data(module, "password") + # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') + # 获取token和projectCode + token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + # print( token,projectCode,uxid,corpId,info) + # pro_path = commonFuc().get_pro_path() + # sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') + # using(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') + # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 + # id1= test1() + # print(id1) + #p1科室管理_科室产品分配_产品列表查询_条件查询 + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_goodsPurTemplate_insert_url") + + # 获取请求头信息 + 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"] + # str = commonFuc().get_business_data(module, 'data3') + # list2 = list(str.split(",")) + # print(list2) + # #获取日期 + # date1=timeUtils().get_time_hms(2) + # date2=timeUtils().get_time_hms(2) + # for i in list2: + + # dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] + # 请求体 + # for i in list2: + request_body = commonFuc().get_business_data(module, "payload59") +# request_body='['+str(request_body)+']' +# new_request_body = request_body.replace("'", '"') +# print(new_request_body) +# import json +# request_body_json = json.loads(new_request_body) +# # # 发送请求 + result = commonFuc().http_post(url, request_body,headers) + print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) +#断言 +# checkDict=commonFuc().get_business_data(module,'checkDict10') +# commonFuc().check_result(checkDict,result) + code=commonFuc().analysis_json('code',result) + data=commonFuc().analysis_json('data',result) + data1=commonFuc().analysis_json('data',data) + + if code==1100000 and data==None: + commonFuc().check_text_exist(0, result) + else: + commonFuc().check_text_exist('error', result) + +test1() diff --git a/data/b2_herp3_bs/data b/data/b2_herp3_bs/data index 9ea2a9cc05dacbcb66cb3f850486755024ebcedc..b23ae2abdcb582b55843a21bc25a8b8b5f787f55 100644 --- a/data/b2_herp3_bs/data +++ b/data/b2_herp3_bs/data @@ -72,7 +72,7 @@ "basic_mcmsGoodsInfo_insert": "/api/herpService/basic/mcmsDeptGoodsInfo/insert" "basic_mcmsDeptGoodsInfo_updateById": "/api/herpService/basic/mcmsDeptGoodsInfo/updateById" "basic_mcmsDeptGoodsInfo_page_url": "/api/herpService/basic/mcmsDeptGoodsInfo/page" - +"basic_goodsPurTemplate_insert_url": "/api/herpService/basic/goodsPurTemplate/insert" "basic_stockInfo_stockTree": "/api/herpService/basic/stockInfo/stockTree" @@ -386,6 +386,7 @@ json_headers2: { "payload58_14": {"queryObject":{"goodsName":"%s","goodsSpec":"SSY-001","purModes":["10"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50} "payload58_15": {"queryObject":{"goodsName":"","goodsSpec":"%s","purModes":["10"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50} "payload58_16": {"queryObject":{"goodsName":"","goodsSpec":"","purModes":["%s"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50} +"payload59": {"cname":"test","branchId":"h0347-2011","deptId":"d69a68df361a4289b2262e4ef75b55a5","hosId":"h0347","tbStatus":1} "payload60": {"hosId":"h0347","stockCode":"%s"} diff --git a/report/summary.html b/report/summary.html index a3ae9b9b5871431b1143a7e7a7375270aad92756..168c6028a9e1867810dac52e5787375cd6818ee5 100644 --- a/report/summary.html +++ b/report/summary.html @@ -54,9 +54,9 @@