فهرست منبع

Merge remote-tracking branch 'origin/master'

baoyubo 11 ماه پیش
والد
کامیت
ca02ccd015
2فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 2 1
      models/__init__.py
  2. 3 2
      routers/api/Knowledge/__init__.py

+ 2 - 1
models/__init__.py

@@ -6,4 +6,5 @@ from .jobs_base import *
 from .monitor_base import *
 from .oneshare_base import *
 from .ry_sys_base import *
-from .knowledge_base import *
+from .knowledge_base import *
+from .yjya import *

+ 3 - 2
routers/api/Knowledge/__init__.py

@@ -82,7 +82,7 @@ async def create_knowledge(request: Request, db: Session = Depends(get_db)):
 
         # 验证必需的字段
         required_fields = ['reportName', 'subject', 'eventType', 'publishingUnit', 'publishDate', 'summary',
-                           'notificationType', 'fileNames']
+                           'fileNames']
         missing_fields = [field for field in required_fields if field not in body]
         print('missing_fields',missing_fields)
         if missing_fields:
@@ -100,7 +100,8 @@ async def create_knowledge(request: Request, db: Session = Depends(get_db)):
         publishingUnit = body["publishingUnit"]
         publishDate = body["publishDate"]
         summary = body["summary"]
-        notificationType = body["notificationType"]
+        # notificationType = body["notificationType"]
+        notificationType = "总结报告"
         fileNames = body["fileNames"]  # 注意:这里假设它是列表
 
         # 创建 KnowledgeBase 实例