diff --git "a/air_case/a2_herp3_bs/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.air/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.py" "b/air_case/a2_herp3_bs/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.air/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.py" new file mode 100644 index 0000000000000000000000000000000000000000..065456d38d2ff66b76b9ea6f95c1b05a49802247 --- /dev/null +++ "b/air_case/a2_herp3_bs/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.air/b8_\345\216\202\345\225\206\347\256\241\347\220\206_\345\216\202\345\225\206\346\237\245\350\257\242byName.py" @@ -0,0 +1,57 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,b8_厂商管理_厂商查询byName,id2263,id2263-18,sit,on +主数据平台:b8_厂商管理_厂商查询byName +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def facturer_query_byID(): + """ + 场景:b8_厂商管理_厂商查询byName + 用例名称:b8_厂商管理_厂商查询byName + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #b8_厂商管理_厂商查询byName + notices_id = FileUtils().r_info3(module, '公告新增')["notices_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "firmpage_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")) + + # # print(notices_id,notices_title) + # expireDate=timeUtils().get_time_add(30) + # # print(expireDate) + # #请求体 + request_body=commonFuc().get_business_data(module, "payload12") + # print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # checkDict=commonFuc().get_business_data(module,'checkDict2') + # #断言 + # id=commonFuc().analysis_json('id',commonFuc().analysis_json('data',commonFuc().analysis_json('data',result))) + # print(id) + commonFuc().check_text_exist('国药集团浙江医疗器材有限公司',result) +facturer_query_byID() + diff --git "a/air_case/a2_herp3_bs/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.air/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.py" "b/air_case/a2_herp3_bs/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.air/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.py" new file mode 100644 index 0000000000000000000000000000000000000000..6f1066e2e0462cd933b2e4e8cd3e4107e05723a8 --- /dev/null +++ "b/air_case/a2_herp3_bs/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.air/b9_\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\347\231\273\350\256\260_\347\247\221\345\256\244\346\237\245\350\257\242.py" @@ -0,0 +1,52 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,b9_科室管理_科室登记_科室查询,id2263,id2263-19,sit,on +主数据平台:b9_科室管理_科室登记_科室查询 +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def dept_query_byID(): + """ + 场景:b9_科室管理_科室登记_科室查询 + 用例名称:b9_科室管理_科室登记_科室查询 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #b9_科室管理_科室登记_科室查询 + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "deptPage_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload13",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + commonFuc().check_text_exist('[]',result) +dept_query_byID() + diff --git "a/air_case/a2_herp3_bs/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.air/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.py" "b/air_case/a2_herp3_bs/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.air/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.py" new file mode 100644 index 0000000000000000000000000000000000000000..a621d4575bb8d3c82324158539df9a5b2b01a104 --- /dev/null +++ "b/air_case/a2_herp3_bs/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.air/c0_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\350\256\276\345\244\207\347\247\221_\344\270\255\345\277\203\345\272\223\346\210\277.py" @@ -0,0 +1,53 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,c0_新增科室_特殊科室_设备科_中心库房,id2263,id2263-20,sit,on +主数据平台:c0_新增科室_特殊科室_设备科_中心库房 +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def add_center_dept(): + """ + 场景:c0_新增科室_特殊科室_设备科_中心库房 + 用例名称:c0_新增科室_特殊科室_设备科_中心库房 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #c0_新增科室_特殊科室_设备科_中心库房 + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "dept_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload14",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + checkDict=commonFuc().get_business_data(module,'checkDict2') + commonFuc().check_result(checkDict,result) +add_center_dept() + diff --git "a/air_case/a2_herp3_bs/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.air/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.py" "b/air_case/a2_herp3_bs/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.air/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.py" new file mode 100644 index 0000000000000000000000000000000000000000..63385a26b5e4722edf2d5e8f60aeb588b31c39de --- /dev/null +++ "b/air_case/a2_herp3_bs/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.air/c1_\346\226\260\345\242\236\347\247\221\345\256\244_\347\247\221\345\256\244\345\267\262\345\255\230\345\234\250.py" @@ -0,0 +1,53 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,c1_新增科室_科室已存在,id2263,id2263-21,sit,on +主数据平台:c1_新增科室_科室已存在 +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def add_center_dept(): + """ + 场景:c1_新增科室_科室已存在 + 用例名称:c1_新增科室_科室已存在 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #c1_新增科室_科室已存在 + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "dept_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload14",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + checkDict=commonFuc().get_business_data(module,'checkDict7') + commonFuc().check_result(checkDict,result) +add_center_dept() + diff --git "a/air_case/a2_herp3_bs/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.air/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.py" "b/air_case/a2_herp3_bs/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.air/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.py" new file mode 100644 index 0000000000000000000000000000000000000000..92a0370f7419f425c50aa91edcf9e545db0a7397 --- /dev/null +++ "b/air_case/a2_herp3_bs/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.air/c2_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244.py" @@ -0,0 +1,56 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,c2_新增科室后查询科室,id2263,id2263-22,sit,on +主数据平台:c2_新增科室后查询科室 +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def add_select_dept(): + """ + 场景:c2_新增科室后查询科室 + 用例名称:c2_新增科室后查询科室 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #c2_新增科室后查询科室 + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "deptPage_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload13",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result)) + if total>=1: + commonFuc().check_text_exist('0',result) + else: + commonFuc().check_text_exist('500', result) +add_select_dept() + diff --git "a/air_case/a2_herp3_bs/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.air/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.py" "b/air_case/a2_herp3_bs/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.air/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.py" new file mode 100644 index 0000000000000000000000000000000000000000..63b2ce95f1b4eb6134107885d52f640cef9691d1 --- /dev/null +++ "b/air_case/a2_herp3_bs/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.air/c3_\346\226\260\345\242\236\347\247\221\345\256\244_\347\211\271\346\256\212\347\247\221\345\256\244_\344\272\214\347\272\247\345\272\223\346\210\277.py" @@ -0,0 +1,53 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,c0_新增科室_特殊科室_设备科_中心库房,id2263,id2263-23,sit,on +主数据平台:c0_新增科室_特殊科室_设备科_中心库房 +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def add_center_dept(): + """ + 场景:c0_新增科室_特殊科室_设备科_中心库房 + 用例名称:c0_新增科室_特殊科室_设备科_中心库房 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #c0_新增科室_特殊科室_设备科_中心库房 + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "dept_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload15",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + checkDict=commonFuc().get_business_data(module,'checkDict2') + commonFuc().check_result(checkDict,result) +add_center_dept() + diff --git "a/air_case/a2_herp3_bs/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.air/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.py" "b/air_case/a2_herp3_bs/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.air/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.py" new file mode 100644 index 0000000000000000000000000000000000000000..28510faece8a6a5fb9c36afb4b99c31fdec406e4 --- /dev/null +++ "b/air_case/a2_herp3_bs/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.air/c4_\346\226\260\345\242\236\347\247\221\345\256\244\345\220\216\346\237\245\350\257\242\347\247\221\345\256\244ID.py" @@ -0,0 +1,64 @@ +# -*- encoding=utf8 -*- +from common.db.sql.sql_del_branch_info import delByBranchId +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,c4_新增科室后查询科室ID,id2263,id2263-24,sit,on +主数据平台:c4_新增科室后查询科室ID +""" + +from common.common_func import commonFuc +from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system + +module = "a2_herp3_bs" +def add_select_dept(): + """ + 场景:c4_新增科室后查询科室ID + 用例名称:c4_新增科室后查询科室ID + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": 1} + """ + #内网登录 + 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) + #c4_新增科室后查询科室ID + branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] + url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "deptPage_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")) + + + # #请求体 + request_body=commonFuc().get_business_data(module, "payload13",branch_id) + print(request_body) + # # # 发送请求 + result = commonFuc().http_post(url,request_body,headers) + print('result', result) + # #断言 + total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result)) + if total>=2: + commonFuc().check_text_exist('0',result) + data=commonFuc().analysis_json('data',commonFuc().analysis_json('data',result)) + deptid2=commonFuc().analysis_json('id',data[1]) + ename2=commonFuc().analysis_json('ename',data[1]) + print('deptid2',deptid2,ename2) + info=(deptid2,ename2) + titlename=('科室id','科室名称') + #将二级科室id写入文件中 + FileUtils().w_info4(info,module,'科室信息',titlename) + else: + commonFuc().check_text_exist('500', result) +add_select_dept() + diff --git a/common/db/sql/sql_del_branch_info.py b/common/db/sql/sql_del_branch_info.py index b11a63370c49c617b8e547908db5833145e05ea5..b413f63d2661734c48260192f5d7f6a2f753dc1e 100644 --- a/common/db/sql/sql_del_branch_info.py +++ b/common/db/sql/sql_del_branch_info.py @@ -6,7 +6,7 @@ import pymysql class delByBranchId(object): def Delete_branch_by_id(self,id): - connection = pymysql.connect(host="10.17.65.108", user="root", password="Gyxc.2023", database="spd3_herp_test2", + connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", charset="utf8") cursor = connection.cursor() # 删除新增的院区数据,减少垃圾数据的产生,保证脚本下次还可以正常运行,接口脚本每次都使用新增数据 diff --git a/common/db/sql/sql_del_notices_info.py b/common/db/sql/sql_del_notices_info.py index ad34431c46aaa713891af860a8c3e716a93e3f11..7571d1d4e97ab5296308bc002e3ee5ec7c844f1d 100644 --- a/common/db/sql/sql_del_notices_info.py +++ b/common/db/sql/sql_del_notices_info.py @@ -6,7 +6,7 @@ import pymysql class delByNoticeName(object): def delete_ByNoticeName(self): - connection = pymysql.connect(host="10.17.65.108", user="root", password="Gyxc.2023", database="spd3_herp_test2", + connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", charset="utf8") cursor = connection.cursor() # 删除新增的院区数据,减少垃圾数据的产生,保证脚本下次还可以正常运行,接口脚本每次都使用新增数据 diff --git a/common/fileUtls.py b/common/fileUtls.py index bf0858a0d97bded44539b41d0b49e2a30b60de1f..72cf984e6bc33dc99af7708747bff27fa4eb47c4 100644 --- a/common/fileUtls.py +++ b/common/fileUtls.py @@ -52,7 +52,32 @@ class FileUtils(object): # 写入到yaml文件 with open(yamlpath, "w", encoding="utf-8") as f: yaml.dump(dict, f, Dumper=yaml.RoundTripDumper,allow_unicode=True) - + #写入院区数据,新函数,存在已有内容,替换掉旧内容 + def w_info2_new(self, newinfo, module, keyname, oldinfo): + module = module + dict = {} + value = {} + value['branch_id'] = newinfo[0] + value['branch_name'] = newinfo[1] + key = keyname + dict[key] = value + w_path = rootPath + os.sep + 'data' + os.sep + module + # print(w_path) + yamlpath = os.path.join(w_path, "message") + if (self.r_info(module, keyname) != None): + # 替换文件内容 + file = open(yamlpath, "r+", encoding="utf-8") + content = file.read() + for i in range(len(newinfo)): + new_content = content.replace(oldinfo[i], newinfo[i]) + file.seek(0) + file.write(new_content) + file.close() + else: + # 写入到yaml文件 + with open(yamlpath, "a", encoding="utf-8") as f: + yaml.dump(dict, f, Dumper=yaml.RoundTripDumper, allow_unicode=True) + #写入院区数据 def w_info2(self, info,module,keyname): module=module dict = {} @@ -101,6 +126,28 @@ class FileUtils(object): return None else: return None + #写入科室信息 + def w_info4(self, info,module,keyname,titlename): + module=module + dict = {} + value = {} + value[titlename[0]] = info[0] + value[titlename[1]] = info[1] + key=keyname + dict[key] = value + w_path=rootPath+os.sep+'data'+os.sep+module + # print(w_path) + yamlpath = os.path.join(w_path, "message") + if (self.r_info(module,keyname)!=None): + print('已有相同信息,不写入') + # 写入到yaml文件 + # with open(yamlpath, "w", encoding="utf-8") as f: + # yaml.dump(dict, f, Dumper=yaml.RoundTripDumper,allow_unicode=True) + else: + # 写入到yaml文件 + with open(yamlpath, "a", encoding="utf-8") as f: + yaml.dump(dict, f, Dumper=yaml.RoundTripDumper, allow_unicode=True) + if __name__ == '__main__': # info=("aaaa","bbbbbb","mdm3-pim") # FileUtils().w_info(info,"产品新增") diff --git a/data/a2_herp3_bs/data b/data/a2_herp3_bs/data index d584b28da89239023deff0a6743aba4a33c20a57..87b676c4d51a74c1e43aa612c7cf11e6c767d732 100644 --- a/data/a2_herp3_bs/data +++ b/data/a2_herp3_bs/data @@ -9,6 +9,8 @@ "update_url": "/hospitaltest2api/platformService/basic/notice/update" "del_url": "/hospitaltest2api/platformService/basic/notice/del/" "firmpage_url": "/hospitaltest2api/herpService/basic/firm/page/" +"deptPage_url": "/hospitaltest2api/platformService/sys/org/v2/deptPage/" +"dept_insert_url": "/hospitaltest2api/platformService/sys/org/v2/insert/" "username": "xhs1009" "password": "1qaz!QAZ" "X-APP-CODE": "herp.pc" @@ -75,6 +77,34 @@ json_headers2: { "payload9": {"pageNum": 1,"pageSize": 50,"queryObject": {"title": "不存在的公告","mgrRangeKind": "","publishDateBegin": "", "publishDateEnd": "", "corpId": "h0347"}} "payload10": {"content": "%s","expireDate": "%s","mgrRangeId": "","title": "%supdate","id": "%s","topFlag": "0","mgrRangeKind": "1","corpId": "h0347","noticeType": 1} "payload11": {"pageNum": 1,"pageSize": 50,"queryObject": {"hosId": "h0347","searchText": "p56a4","firmType": 1}} +"payload12": {"pageNum": 1,"pageSize": 50,"queryObject": {"hosId": "h0347","searchText": "国药集团浙江医疗器材有限公司","firmType": 1}} +"payload13": {"pageNum": 1,"pageSize": 50,"orderBy": "code asc","queryObject": {"ename": "","branchId": "院区id", "branchId": "%s", "hosId": "医院id", "hosId": "h0347" }} +"payload14": { + "branchId": "%s", + "cname": "", + "ename": "设备科室001", + "code": "001", + "address": "设备科室001001", + "contactWay": "设备科室001001", + "deptKind": 1, + "deptCate": 1, + "deptLevel": "1", + "flag": "1", + "corpId": "h0347" +} +"payload15": { + "branchId": "%s", + "cname": "", + "ename": "二级科室002", + "code": "002", + "address": "二级科室002", + "contactWay": "二级科室002", + "deptKind": 2, + "deptCate": 1, + "deptLevel": "2", + "flag": "1", + "corpId": "h0347" +} checkDict: {"code": 0,'msg': None,'data': True} checkDict1: { @@ -140,3 +170,5 @@ checkDict3: {"code": 400,'msg': '供销关系已存在!请勿重复添加','da checkDict4: {"code": 400,'msg': None,'data':None} checkDict5: {'code': 400, 'msg': '数据更新不成功,可能数据的版本不一致!请刷新页面重试', 'data': None} checkDict6: {'code': 0, 'msg': None, 'data': []} +checkDict7: {'code': 1100000, 'msg':'暂时没有定义异码,中文描述为:同一院区下科室编码不可重复','data':'/platformService:gyqx.spd.platform.sys.service.impl.SysOrgServiceImpl:156'} + diff --git a/data/a2_herp3_bs/message b/data/a2_herp3_bs/message index 20e96114ca99bc75f7cb1f3d21446f7a9ea7f2c1..0969fe8b40a15822f3b2402dad6ddc82a9c31d14 100644 --- a/data/a2_herp3_bs/message +++ b/data/a2_herp3_bs/message @@ -1,3 +1,6 @@ 院区新增: - branch_id: h0347-2011 - branch_name: 东土城路院区 \ No newline at end of file + branch_id: h0347-2658 + branch_name: 东土城路院区pOryX +科室信息: + 科室id: 8f3aed0a165c486a92721cccb4298abc + 科室名称: 二级科室002 diff --git a/report/summary.html b/report/summary.html index fec322cb05b8d817b36c3978bd43d9080f15fb48..6c57b76e9d8236329885843fc82fbe5b6208ab65 100644 --- a/report/summary.html +++ b/report/summary.html @@ -72,9 +72,9 @@ - b4_查询公告_精确查询_不存在 + c4_新增科室后查询科室ID 成功 - 0.604 + 0.69 xiaohesheng