فهرست منبع

chore: auto bump version and changelog [skip ci]

iwt 1 ماه پیش
والد
کامیت
c0907b7757

+ 11 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/HealthReportController.java

@@ -259,6 +259,17 @@ public class HealthReportController {
         return Result.success(reports);
     }
 
+    @Operation(summary = "获取全家健康报告列表(方案页选择用)")
+    @PostMapping("/reports/family")
+    public Result<List<HealthReport>> listFamilyReports(
+            @RequestAttribute(value = "familyId", required = false) Long familyId) {
+        if (familyId == null) {
+            return Result.error("familyId不能为空");
+        }
+        List<HealthReport> reports = healthReportService.getFamilyReports(familyId);
+        return Result.success(reports);
+    }
+
     /**
      * 管理端分页查询所有报告
      */

+ 12 - 0
cfc-backend/src/main/java/com/etotem/cfc/service/HealthReportService.java

@@ -161,6 +161,18 @@ public class HealthReportService {
         );
     }
 
+    /**
+     * 获取全家所有健康报告(用于方案页选择已有报告)
+     */
+    public List<HealthReport> getFamilyReports(Long familyId) {
+        return healthReportMapper.selectList(
+                new LambdaQueryWrapper<HealthReport>()
+                        .eq(HealthReport::getFamilyId, familyId)
+                        .eq(HealthReport::getStatus, "active")
+                        .orderByDesc(HealthReport::getReportDate)
+        );
+    }
+
     /**
      * 获取某份报告的所有指标
      */

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-d3f713d3ddfbf6ed6ce2acadbf212068bb1cdb11
+d942c726b102dca6466a1f419e0e099a15f827b2