This commit is contained in:
1 parent
98939fb310
commit
2eb366c25d
2 files changed
+15
-1
No files matched your search
+9
-1
@@ -124,8 +124,12 @@ def do_bitable_record_add(data) -> None:
|
|||||||
action_data["category"] = field.get("field_value")
|
action_data["category"] = field.get("field_value")
|
||||||
|
|
||||||
if field.get("field_id") == "fldopqyyCG":
|
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"table_id: {table_id}")
|
||||||
print(f"record_id: {record_id}")
|
print(f"record_id: {record_id}")
|
||||||
@@ -134,6 +138,10 @@ def do_bitable_record_add(data) -> None:
|
|||||||
|
|
||||||
table_id = "tblESHsFZwtiFROB"
|
table_id = "tblESHsFZwtiFROB"
|
||||||
|
|
||||||
|
# 如果确定开发就创建应用, 根据不同的状态执行不同的任务
|
||||||
|
if action_data["status"] == "optQgHmA8z":
|
||||||
|
process_new_robot.delay()
|
||||||
|
else:
|
||||||
process_new_demand.delay(
|
process_new_demand.delay(
|
||||||
app_id,
|
app_id,
|
||||||
app_secret,
|
app_secret,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from app.utils.utils import *
|
|||||||
from app.utils.yd_utils import get_token, get_activity_info
|
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.feishu import create_doc, get_doc_block, create_doc_block, get_messages
|
||||||
from app.utils.utils import update_record
|
from app.utils.utils import update_record
|
||||||
|
from app.utils.yd_utils import new_blank_robot
|
||||||
|
|
||||||
|
|
||||||
def parse_history_message(data):
|
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_data = {"需求文档链接": doc_node_url, "状态": "待评估"}
|
||||||
update_record(client, bitable_token, table_id, record_id, update_data)
|
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