AttributionAnalysisService.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.etotem.cfc.service;
  2. import com.etotem.cfc.dto.AttributionInput;
  3. import com.etotem.cfc.dto.AttributionReportVO;
  4. import java.util.Map;
  5. /**
  6. * 家庭归因分析服务(B1)。
  7. *
  8. * <p>门面服务:内部 5 段确定性规则引擎(常模比对 → 指标解读 → 五维归因 → 主因链 → 被证伪)
  9. * + 1 段 AI 叙述({@code AttributionNarrativeService},失败规则兜底)。
  10. * 合规红线 RL01-RL10 由规则层硬注入,AI 不负责合规。
  11. *
  12. * @author 家庭归因阶段二(ATT-S2-B1)
  13. */
  14. public interface AttributionAnalysisService {
  15. /**
  16. * 核心入口:档案 + 确认问卷 + 检测数据 + 常模 → 十节归因报告。
  17. *
  18. * @param input 归因入参
  19. * @return 归因报告视图(status=READY)
  20. */
  21. AttributionReportVO analyze(AttributionInput input);
  22. /**
  23. * 取报告(含十节结构)。
  24. *
  25. * @param attributionId 归因报告ID
  26. * @return 报告视图;不存在返回 null
  27. */
  28. AttributionReportVO getReport(Long attributionId);
  29. /**
  30. * ④调整后重算(B3 回填后调用;作废 ⑤ 由 AttributionPlanService 处理)。
  31. *
  32. * @param attributionId 归因报告ID
  33. * @param fieldDeltas 字段增量(回填后的中间态增量)
  34. * @return 重算后的报告视图;不存在返回 null
  35. */
  36. AttributionReportVO recompute(Long attributionId, Map<String, Object> fieldDeltas);
  37. }