陈昶聿
2 天以前 d9281d43e27ab6c510d390ddb26eaffc8ccc1add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.smartor.mapper;
 
import com.smartor.domain.PatSpecificArchiveGenerateLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
/**
 * 专科档案生成日志Mapper接口。
 *
 * @author ruoyi
 * @date 2026-11-11
 */
@Mapper
public interface PatSpecificArchiveGenerateLogMapper {
 
    /**
     * 按来源 + 随访子任务 + 配置查询日志。
     *
     * @param sourceType  来源类型
     * @param sourceSubId 来源随访子任务ID
     * @param configId    配置ID,未命中配置传0
     * @return 日志记录,不存在返回 null
     */
    PatSpecificArchiveGenerateLog selectBySourceSubAndConfig(@Param("sourceType") String sourceType,
                                                             @Param("sourceSubId") Long sourceSubId,
                                                             @Param("configId") Integer configId);
 
    /**
     * 查询来源随访子任务下是否已有成功/跳过/未匹配的结果。
     *
     * @param sourceType  来源类型
     * @param sourceSubId 来源随访子任务ID
     * @return 已处理条数
     */
    int countProcessedBySourceSub(@Param("sourceType") String sourceType,
                                  @Param("sourceSubId") Long sourceSubId);
 
    int insertPatSpecificArchiveGenerateLog(PatSpecificArchiveGenerateLog log);
 
    int updatePatSpecificArchiveGenerateLog(PatSpecificArchiveGenerateLog log);
}