新增工程数据

This commit is contained in:
wanyaokun
2024-08-30 19:12:40 +08:00
parent c4088fe963
commit ced3199550
37 changed files with 157 additions and 35 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import asyncio
import json
import logging
@@ -555,7 +556,7 @@ def upload_file(request: ChatFileUploadRequest):
logger.error(f"Error processing file: {e}", exc_info=True)
raise HTTPException(status_code=500, detail="Error processing file")
@v.post("/applications")
@v.post("/project")
def upload_file(request: ChatFileUploadRequest):
try:
logger.info("Processing file")
+7 -5
View File
@@ -161,11 +161,13 @@ class ProjectInfo:
dbManage.createTable(self._tableName)
def add(self,name:str,flag:str):
record = {
'prjectName': name,
'prjFlag': flag
}
dbManage.addRecord(self._tableName,record)
info = dbManage.query(self._tableName,prjFlag = flag)
if len(info) == 0:
record = {
'prjectName': name,
'prjFlag': flag
}
dbManage.addRecord(self._tableName,record)
def projectNames(self)->List[str]:
records = dbManage.query(self._tableName)
@@ -39,7 +39,7 @@ class BaseConfig(BaseModel):
"type": "select",
"max_length": 48,
"required": True,
"options": [projectInfo]
"options": projectInfo
}
}
],