This commit is contained in:
1 parent
98939fb310
commit
2eb366c25d
2 files changed
+22
-8
No files matched your search
+16
-8
@@ -124,8 +124,12 @@ def do_bitable_record_add(data) -> None:
|
||||
action_data["category"] = field.get("field_value")
|
||||
|
||||
if field.get("field_id") == "fldopqyyCG":
|
||||
pass
|
||||
action_data["status"] = field.get("field_value")
|
||||
|
||||
if field.get("field_id") == "fldaxMbywh":
|
||||
action_data["deal_person"] = (
|
||||
field.get("field_identity_value").get("users")[0].get("name")
|
||||
)
|
||||
|
||||
print(f"table_id: {table_id}")
|
||||
print(f"record_id: {record_id}")
|
||||
@@ -134,13 +138,17 @@ def do_bitable_record_add(data) -> None:
|
||||
|
||||
table_id = "tblESHsFZwtiFROB"
|
||||
|
||||
process_new_demand.delay(
|
||||
app_id,
|
||||
app_secret,
|
||||
table_id,
|
||||
record_id,
|
||||
action_data,
|
||||
)
|
||||
# 如果确定开发就创建应用, 根据不同的状态执行不同的任务
|
||||
if action_data["status"] == "optQgHmA8z":
|
||||
process_new_robot.delay()
|
||||
else:
|
||||
process_new_demand.delay(
|
||||
app_id,
|
||||
app_secret,
|
||||
table_id,
|
||||
record_id,
|
||||
action_data,
|
||||
)
|
||||
|
||||
|
||||
handler = (
|
||||
|
||||
@@ -10,6 +10,7 @@ from app.utils.utils import *
|
||||
from app.utils.yd_utils import get_token, get_activity_info
|
||||
from app.utils.feishu import create_doc, get_doc_block, create_doc_block, get_messages
|
||||
from app.utils.utils import update_record
|
||||
from app.utils.yd_utils import new_blank_robot
|
||||
|
||||
|
||||
def parse_history_message(data):
|
||||
@@ -271,3 +272,8 @@ def process_new_demand(app_id, app_secret, table_id, record_id, data):
|
||||
|
||||
update_data = {"需求文档链接": doc_node_url, "状态": "待评估"}
|
||||
update_record(client, bitable_token, table_id, record_id, update_data)
|
||||
|
||||
|
||||
@shared_task(include_result=False)
|
||||
def process_new_robot():
|
||||
new_blank_robot(name="测试-需求创建机器人")
|
||||
Reference in new issue
Block a user