diff --git "a/air_case/b5_spd3_core_business_flow/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" "b/air_case/b5_spd3_core_business_flow/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" index 16762619cc15b9fe960910fbe08cd68f7bb2fb63..804e6904a95f8d0741e4d39411e051a440adab39 100644 --- "a/air_case/b5_spd3_core_business_flow/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" +++ "b/air_case/b5_spd3_core_business_flow/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.air/a_b4\346\265\201\347\250\213\345\215\201\344\270\200\350\257\267\351\242\206\344\270\232\345\212\241\346\265\201_\344\272\214\347\272\247\345\272\223\345\220\221\344\272\214\347\272\247\345\272\223.py" @@ -295,9 +295,54 @@ def add_dept2(): # # # 发送请求 result = commonFuc().http_post(url, request_body, headers) print('result', result) +def add_new_deptinfo(): + module = "b2_herp3_bs" + # 内网登录 + 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_add_port_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) + data = commonFuc().analysis_json('data', result) + total = commonFuc().analysis_json('total', data) + if total == 5: + commonFuc().check_text_exist(0, result) + else: + commonFuc().check_text_exist('error', result) + # 将deptid写入文件 + data1 = commonFuc().analysis_json('data', data) + print('data1', data1) + info = [] + for i in data1: + deptid = commonFuc().analysis_json('id', i) + info.append(deptid) + titlename = ['deptid1', 'deptid2', 'deptid3', 'deptid4','deptid5'] + FileUtils().w_info8(info, module, '所有科室id', titlename, 'message6') + info1 = [] + for i in data1: + ename = commonFuc().analysis_json('ename', i) + info1.append(ename) + FileUtils().w_info8(info1, module, '所有科室name', titlename, 'message6') try: add_dept2() + add_new_deptinfo() # set_dept_lead() # 设置二级科室负责人 # # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0" # add_logic_stock() diff --git a/data/b2_herp3_bs/data b/data/b2_herp3_bs/data index 567244eb5ba4a5131a8c2e82187050de34d135ab..135430611219fdce93f4b17ff5086170ffa342ca 100644 --- a/data/b2_herp3_bs/data +++ b/data/b2_herp3_bs/data @@ -211,7 +211,7 @@ json_headers2: { "payload13": {"pageNum": 1,"pageSize": 50,"orderBy": "code asc","queryObject": {"ename": "","branchId": "院区id", "branchId": "%s", "hosId": "医院id", "hosId": "h0347" }} "payload14": {"branchId":"%s","cname":"","ename":"设备科001","erpCode":"001","address":"设备科001","contactWay":"13401003250","deptKind":1,"deptCate":1,"deptLevel":"1","flag":"1","hisDeptCodes":"","deptType":"1","packetType":"0","corpId":"h0347","corpKind":1} "payload15": {"branchId":"%s","cname":"","ename":"二级检验科002","erpCode":"002","address":"二级检验科002","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1} -"payload15_2": {"branchId":"%s","cname":"","ename":"二级检验科005","erpCode":"005","address":"二级检验科005","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"%s","corpKind":1} +"payload15_2": {"branchId":"%s","cname":"","ename":"二级科室005","erpCode":"005","address":"二级科室005","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"%s","corpKind":1} "payload16": {"branchId":"%s","pid":"%s","cname":"","ename":"三级检测组003","erpCode":"003","address":"三级检测组003","contactWay":"12401003250","deptKind":7,"deptCate":1,"deptLevel":"3","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1} "payload17": {"branchId":"%s","pid":"%s","cname":"","ename":"科室004","erpCode":"004","address":"三级科室004","contactWay":"三级科室004","deptKind":5,"deptCate":1,"deptLevel":"4","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1} diff --git a/data/b2_herp3_bs/message6 b/data/b2_herp3_bs/message6 index 7cc07f25d2bbc0b3fdcb5fbed9947aecb2909863..6758146cbce017fab235398c4fd531ba7c184972 100644 --- a/data/b2_herp3_bs/message6 +++ b/data/b2_herp3_bs/message6 @@ -3,8 +3,10 @@ deptid2: ebacb1842d234dfd9dbc59fc11bad8bf deptid3: 97dac712280c45a89bbe2ad3ae40280b deptid4: 05a182bdd747451882d4abec8fc7bc2f + deptid5: 15ac77f32ce84b5cb65a4034c2ef182e 所有科室name: deptid1: 设备科001 deptid2: 二级检验科002 deptid3: 三级检测组003 deptid4: 科室004 + deptid5: 二级检验科005 diff --git a/report/summary.html b/report/summary.html index 667802c7c8b467a747ce02d101a0e22fbae6cc78..06f3eac0e3a23c5fb0ddaf6068e9c0d48a3c6eef 100644 --- a/report/summary.html +++ b/report/summary.html @@ -76,9 +76,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间