package com.ruoyi.outpatientvisit.api; import com.ruoyi.common.core.service.OuthospVisitApi; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * {@link OuthospVisitApi} 的归属模块实现 —— 门诊随访扫描。 * *

2026-11 归属调整

* 这个契约原先的实现是 smartor 侧的 {@code OuthospVisitApiBridge},它只做一件事: * 转发到 smartor 的 {@code IPatMedOuthospService#dealOutpatientInfo},而那又是一个 * 纯委托({@code PatMedOuthospServiceDelegatingImpl})→ 本模块的 {@code OuthospDataFacade}。 * 也就是说链路里有两层空转发。 *

* 现在把实现直接放到能力所在的模块:{@code ruoyi-inhospvisit} 仍只看到 * {@code ruoyi-common} 里的契约(它不依赖本模块),运行期由 Spring 注入本实现; * smartor 侧那个桥与 {@code IPatMedOuthospService#dealOutpatientInfo} 一并删除。 * *

⚠️ 开关判断不在本类

* 真正的开关({@code outpatientvisit.enabled})在 {@link OuthospVisitFacade#dealOutpatientInfo()} 里, * 这里按既有口径转发到 {@link OuthospDataFacade}(它再转发到带守卫的门面),不重复判断、避免两处口径漂移。 */ @Slf4j @Component public class OuthospVisitApiImpl implements OuthospVisitApi { @Autowired private OuthospDataFacade outhospDataFacade; @Override public int dealOutpatientInfo() { Integer n = outhospDataFacade.dealOutpatientInfo(); return n == null ? 0 : n; } }