|
|
@@ -1239,6 +1239,23 @@ public class HealthReportController {
|
|
|
return Result.success("报告已归档");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 批量归档报告(软删除)— 管理端选中删除
|
|
|
+ */
|
|
|
+ @Operation(summary = "批量归档健康报告(软删除)")
|
|
|
+ @PostMapping("/report/archive-batch")
|
|
|
+ public Result<String> archiveReportsBatch(
|
|
|
+ @RequestBody Map<String, Object> params,
|
|
|
+ @RequestAttribute(value = "role", required = false) String role) {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ List<Long> reportIds = (List<Long>) params.get("reportIds");
|
|
|
+ if (reportIds == null || reportIds.isEmpty()) {
|
|
|
+ return Result.error("reportIds不能为空");
|
|
|
+ }
|
|
|
+ int archived = healthReportService.archiveReportsBatch(reportIds);
|
|
|
+ return Result.success("已归档 " + archived + " 份报告");
|
|
|
+ }
|
|
|
+
|
|
|
@Operation(summary = "获取家庭成员食材推荐(含完整营养数据)")
|
|
|
@PostMapping("/foods/by-family")
|
|
|
public Result<Map<String, Object>> getFoodsByFamily(@RequestAttribute(value = "familyId", required = false) Long familyId) {
|