AnlaAnla hai 12 horas
pai
achega
50be43c233
Modificáronse 1 ficheiros con 2 adicións e 8 borrados
  1. 2 8
      app/api/rating_report.py

+ 2 - 8
app/api/rating_report.py

@@ -117,6 +117,7 @@ def _crop_defect_image(original_image_path_str: str, min_rect: List, output_file
 @router.get("/generate", status_code=200, summary="生成评级报告数据")
 def generate_rating_report(
         card_id: int,
+        cardNo: str,
         db_conn: PooledMySQLConnection = Depends(get_db_connection)
 ):
     top_n_defects = 3
@@ -132,7 +133,7 @@ def generate_rating_report(
     response_data = {
         "backImageUrl": "",
         "frontImageUrl": "",
-        "cardNo": "",
+        "cardNo": cardNo,
         "centerBack": "",
         "centerFront": "",
         "measureLength": 0.0,
@@ -143,15 +144,8 @@ def generate_rating_report(
         "cornerFrontNum": 0,
         "sideFrontNum": 0,
         "surfaceFrontNum": 0,
-        "popNum": 0,  # 暂时无数据来源,置0
         "scoreThreshold": float(card_data.get("detection_score") or 0),
         "evaluateNo": str(card_data.get("id")),
-        "recognizedInfoDTO": {
-            "cardSet": "",
-            "player": "",
-            "series": "",
-            "year": ""
-        },
         "defectDetailList": []
     }