liusheng
5 天以前 0bbbd746e8c39d91ad7b47a4e36e29ab972dc98c
ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
@@ -4,6 +4,7 @@
import com.ruoyi.common.core.service.PublicityApi;
import com.ruoyi.common.core.service.PublicityDataPort;
import com.ruoyi.common.core.service.dto.InHospPublicityRowDto;
import com.ruoyi.common.core.service.dto.VisitInhospUpdateDto;
import com.ruoyi.common.core.service.dto.VisitTaskRuleDto;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.core.service.dto.VisitArchiveRow;
@@ -179,8 +180,7 @@
            // 原 L1692-1700:获取患者基本信息,为空则写 deptcheck=2 + reason
            VisitArchiveRow archive = archiveMapper.selectByPatid(row.getPatid());
            if (archive == null) {
                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u =
                        new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
                VisitInhospUpdateDto u = new VisitInhospUpdateDto();
                u.setInhospid(row.getInhospid());
                u.setDeptcheckFlag("2");
                u.setLongTaskReason("患者基本信息为空");
@@ -197,8 +197,7 @@
                // 原 L1839-1845(在编排器里也有,但外层遍历这一层原实现没有 try/catch;
                // 这里加一层是为了"单患者失败不影响其它患者",属健壮性改进,已登记)
                log.error("【基于规则】患者{}外层处理异常:{}", row.getInhospid(), e.getMessage());
                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u =
                        new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u = new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
                u.setInhospid(row.getInhospid());
                u.setDeptcheckFlag("2");
                u.setLongTaskReason("基于规则处理异常");
@@ -245,8 +244,7 @@
     * @return 原实现固定返回 1
     */
    public int dealOutHospInfoBySchedule(String config) {
        log.warn("【出入院随访】dealOutHospInfoBySchedule 本次未搬迁(含手术分支与任务组 builder,"
                + "属第二批 ruoyi-othervisit 范围),仍由 smartor 的实现承接。config={}", config);
        log.warn("【出入院随访】dealOutHospInfoBySchedule 本次未搬迁(含手术分支与任务组 builder," + "属第二批 ruoyi-othervisit 范围),仍由 smartor 的实现承接。config={}", config);
        return 1;
    }
@@ -254,12 +252,13 @@
    // 辅助
    // ==========================================================================
    /** 原 L1703-1707:按离院科室/病区查规则(取不到端口时返回 null = 未配置规则 → 全部生成) */
    /**
     * 原 L1703-1707:按离院科室/病区查规则(取不到端口时返回 null = 未配置规则 → 全部生成)
     */
    private VisitTaskRuleDto findTaskRule(VisitInhospRow row) {
        PublicityDataPort port = dataPort();
        if (port == null) {
            log.warn("【出入院随访】PublicityDataPort 不可用,规则按「未配置」处理(全部生成)。inhospid={}",
                    row.getInhospid());
            log.warn("【出入院随访】PublicityDataPort 不可用,规则按「未配置」处理(全部生成)。inhospid={}", row.getInhospid());
            return null;
        }
        try {
@@ -270,7 +269,9 @@
        }
    }
    /** 把端口的规则 DTO 适配成编排器内嵌的规则视图(字段一一对应,含拼错的 {@code wradRule}) */
    /**
     * 把端口的规则 DTO 适配成编排器内嵌的规则视图(字段一一对应,含拼错的 {@code wradRule})
     */
    private InhospTaskOrchestrator.VisitTaskRule toOrchestratorRule(VisitTaskRuleDto dto) {
        if (dto == null) {
            return null;
@@ -282,7 +283,7 @@
        return r;
    }
    private void updateInhosp(com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u) {
    private void updateInhosp(VisitInhospUpdateDto u) {
        PublicityDataPort port = dataPort();
        if (port == null) {
            log.warn("【出入院随访】PublicityDataPort 不可用,无法写回标志位。inhospid={}", u.getInhospid());