liusheng
8 天以前 34f78281cf395a24e1f3f1c3b861186ff8a03b7b
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
package com.ruoyi.inhospvisit.mapper;
 
import com.ruoyi.inhospvisit.domain.row.VisitTaskdeptRow;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * 长期随访任务·科室/病区维度({@code service_taskdept})Mapper —— 出入院随访模块自带。
 *
 * <h3>来源对照(@ b25c3b51)</h3>
 * 只搬随访侧用到的那一个查询:{@code ServiceTaskdeptMapper#selectServiceTaskdeptList}
 * (原 XML L40-72)。其余 CRUD 属任务配置端,<b>不搬</b>。
 *
 * <h3>⚠️ 原 XML 的一处 bug 必须原样保留</h3>
 * {@code dept_name} 那个条件写的是:
 * <pre>
 * &lt;if test="deptName != null  and <b>deptCode</b> != ''"&gt;   ← 判的是 deptCode,不是 deptName
 *     and dept_name = #{deptName}
 * &lt;/if&gt;
 * </pre>
 * 即"是否拼 dept_name 条件"由 {@code deptCode} 是否为空决定。
 * 随访调用点<b>从不设 deptName</b>(只设 deptCode),所以这个 bug 在随访链上不可达 ——
 * 但按第 6d 步学到的原则(不靠"不可达"来删条件),这里<b>照抄原样</b>。
 *
 * <h3>⚠️ 与 smartor 的 Mapper 是两套等价 SQL</h3>
 * 纪律同 {@code VisitInhospMapper}:改任一边必须同步另一边并重跑两个探针。
 */
@Mapper
public interface VisitTaskdeptMapper {
 
    /**
     * 按维度查长期任务(原 {@code selectServiceTaskdeptList})。
     * <p>
     * 固定条件 {@code del_flag = 0};可选条件(<b>顺序与内容逐条照抄</b>):
     * {@code task_id / task_name(=) / longtask / service_type / dept_type /
     * dept_id / dept_code / dept_name(bug 见类注释) / orgid}。
     */
    List<VisitTaskdeptRow> selectList(VisitTaskdeptRow query);
}