liusheng
9 天以前 f0a09ee996ab2605869844d6a3d812709e2bf0fa
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.inhospvisit.mapper.VisitTaskdiagMapper">
 
    <!--
      ============================================================================
      出入院随访模块自带的 service_taskdiag 只读查询。
      ============================================================================
      对应 smartor 的 ServiceTaskdiagMapper.xml#selectServiceTaskdiagListByIcdName(L104-154)。
      原 XML 用 <sql id="selectServiceTaskdiagVo"> 共享片段;这里显式列出同一批列。
      条件顺序与内容逐条照抄(含 guid/pguid/pid/dept_name/ward_name 这些随访侧不用的条件)。
      ============================================================================
    -->
 
    <resultMap type="com.ruoyi.inhospvisit.domain.row.VisitTaskdiagRow" id="VisitTaskdiagRowResult">
        <result property="id" column="id"/>
        <result property="taskId" column="task_id"/>
        <result property="longtask" column="longtask"/>
        <result property="taskName" column="task_name"/>
        <result property="serviceType" column="service_type"/>
        <result property="icd10id" column="icd10id"/>
        <result property="icd10code" column="icd10code"/>
        <result property="icd10name" column="icd10name"/>
        <result property="delFlag" column="del_flag"/>
        <result property="orgid" column="orgid"/>
        <result property="guid" column="guid"/>
        <result property="pguid" column="pguid"/>
        <result property="pid" column="pid"/>
        <result property="deptCode" column="dept_code"/>
        <result property="deptName" column="dept_name"/>
        <result property="wardCode" column="ward_code"/>
        <result property="wardName" column="ward_name"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>
 
    <select id="selectListByIcdName" parameterType="com.ruoyi.inhospvisit.domain.row.VisitTaskdiagRow"
            resultMap="VisitTaskdiagRowResult">
        select id,
               task_id,
               longtask,
               task_name,
               service_type,
               icd10id,
               icd10code,
               icd10name,
               del_flag,
               create_time,
               update_time,
               orgid,
               guid,
               pguid,
               pid,
               dept_code,
               dept_name,
               ward_code,
               ward_name
        from service_taskdiag
        where 1=1
        and del_flag = 0
        <if test="taskId != null ">
            and task_id = #{taskId}
        </if>
        <if test="longtask != null ">
            and longtask = #{longtask}
        </if>
        <if test="taskName != null  and taskName != ''">
            and task_name like concat('%', #{taskName}, '%')
        </if>
        <if test="serviceType != null  and serviceType != ''">
            and service_type = #{serviceType}
        </if>
        <if test="icd10id != null ">
            and icd10id = #{icd10id}
        </if>
        <if test="icd10code != null  and icd10code != ''">
            and icd10code = #{icd10code}
        </if>
        <if test="icd10name != null  and icd10name != ''">
            and icd10name = #{icd10name}
        </if>
        <if test="orgid != null  and orgid != ''">
            and orgid = #{orgid}
        </if>
        <if test="guid != null  and guid != ''">
            and guid = #{guid}
        </if>
        <if test="pguid != null  and pguid != ''">
            and pguid = #{pguid}
        </if>
        <if test="pid != null ">
            and pid = #{pid}
        </if>
        <if test="deptCode != null  and deptCode != ''">
            and dept_code = #{deptCode}
        </if>
        <if test="deptName != null  and deptName != ''">
            and dept_name = #{deptName}
        </if>
        <if test="wardCode != null  and wardCode != ''">
            and ward_code = #{wardCode}
        </if>
        <if test="wardName != null  and wardName != ''">
            and ward_name = #{wardName}
        </if>
    </select>
 
</mapper>