diff --git "a/air_case/cmdc_order_list/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.air/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.py" "b/air_case/cmdc_order_list/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.air/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.py" index 8d159584371c7d5e61e48fdc86569199665a1156..a595fe0f65d9e2f0fb5d3a97e79484f842b7b01b 100644 --- "a/air_case/cmdc_order_list/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.air/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.py" +++ "b/air_case/cmdc_order_list/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.air/\350\216\267\345\217\226\344\270\232\345\212\241\344\272\272\345\221\230\344\277\241\346\201\257.py" @@ -58,8 +58,8 @@ result = json.loads(result.content) # 生成随机数 department_random = random.randint(0, len(result["data"]) - 1) # 获取部门信息 -alesDepartmentNo = result["data"][department_random]["alesDepartmentNo"] -alesDepartmentName = result["data"][department_random]["alesDepartmentName"] +alesDepartmentNo = result["data"][0]["alesDepartmentNo"] +alesDepartmentName = result["data"][0]["alesDepartmentName"] # 第五步获取业务人员信息 url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url113") @@ -78,6 +78,7 @@ api_time = float(result.elapsed.total_seconds()) # 获取业务人员信息 result = json.loads(result.content) +print(result) result = {"total": len(result["data"])} # 将接口响应时间添加至result @@ -91,6 +92,7 @@ host, port, user, pwd = mysql_handle.getConf(db="cmdc_db") # 查询数据库中对应部门的业务人员数量 sql = "SELECT count(t.personId) FROM `cmdc-user`.cmdc_person t " \ "WHERE belong = 00102 and BussinessUnitDesc = '{}' and useFlag = 1".format(alesDepartmentName) +# print(sql) total = mysql_handle.selectSql(host, port, user, pwd, "cmdc-user", sql)[0][0] # 获取预期结果