|
|
@@ -34,6 +34,8 @@ import com.etotem.cfc.service.HealthReportDraftService;
|
|
|
import com.etotem.cfc.service.HealthReportService;
|
|
|
import com.etotem.cfc.service.NutritionDeficiencyService;
|
|
|
import com.etotem.cfc.service.PdfParseService;
|
|
|
+import com.etotem.cfc.service.ReportBlockAssembler;
|
|
|
+import com.etotem.cfc.service.ReportBlockService;
|
|
|
import com.etotem.cfc.service.TongueDiagnosisService;
|
|
|
import com.etotem.cfc.service.api.WechatServiceInterface;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -137,6 +139,12 @@ public class HealthReportController {
|
|
|
@Resource
|
|
|
private UserMapper userMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private ReportBlockService reportBlockService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ReportBlockAssembler reportBlockAssembler;
|
|
|
+
|
|
|
/**
|
|
|
* 创建健康报告(含指标明细)
|
|
|
*/
|
|
|
@@ -940,6 +948,14 @@ public class HealthReportController {
|
|
|
|
|
|
healthReportDraftService.markConfirmed(draftId, created.getId());
|
|
|
|
|
|
+ // 落库通用展示块(blocks 组装失败不阻断确认)
|
|
|
+ try {
|
|
|
+ reportBlockService.save("gut_flora", created.getId(),
|
|
|
+ reportBlockAssembler.assembleGutFlora(payload));
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("保存gut_flora展示块失败 reportId={}: {}", created.getId(), e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, Object> detail = healthReportService.getReportDetail(created.getId());
|
|
|
if (subjectId != null) {
|
|
|
detail.put("subjectId", subjectId);
|