We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected]
v1.8.1 (build at 2024-12-12T09:58, commit: 0ed9a786)
函数在定义之后无法修改
1.定义函数库 2.输入日志中的函数内容 3.将 if staff_info.lower0.startswith('p'): 修改为if staff_info.lower().startswith('p'): (这里是lower0修改为lower())
No response
import requests import json from pydantic import BaseModel request_url="http://xx.xx.xx.xxx:9999/main-data/md/personnels/employeelnfoList" def get_employee_list(staff_info): params=[] if staff_info.lower0.startswith('p'): params.append(f"staffNo={staff_info}") else: params.append(f"staffName={staff_info}") # if len(params)==0:# return"部门编号、部门名称、员工号、员工姓名至少有一个不能为空! try: query_string="&".join(params) url=f"{request_url}?{query_string}" response= requests.get(url).json() emp_list= response.get("result",0).get("records",0) # 替换掉字段名,改为中文 for item in emp_list: del item["deptNo"] #item["部门编码"]=item,pop("deptNo”) item["部门名称"]=item.pop("deptName") item["工号"]=item.pop("staffNo") item["姓名"]=item.pop("staffName") item["手机号"]=item.pop("mobilePhone") return emp_list except Exception as e: return f"无端服务暂不可用,请联系管理员"
The text was updated successfully, but these errors were encountered:
感谢反馈,后续版本修复
Sorry, something went wrong.
v1.9版本已发布。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Version v1.9 has been released.
zyyfit
No branches or pull requests
联系方式
[email protected]
MaxKB 版本
v1.8.1 (build at 2024-12-12T09:58, commit: 0ed9a786)
问题描述
函数在定义之后无法修改
重现步骤
1.定义函数库
2.输入日志中的函数内容
3.将 if staff_info.lower0.startswith('p'): 修改为if staff_info.lower().startswith('p'): (这里是lower0修改为lower())
期待的正确结果
No response
相关日志输出
附加信息
_20241216_.mp4
The text was updated successfully, but these errors were encountered: