zhaowenxuan
2025-02-06 06c12d2b42c343798d9476be66031b48967df639
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<?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.ltkj.hosp.mapper.DictOrgMapper">
 
    <resultMap type="DictOrg" id="DictOrgResult">
        <result property="orgId" column="org_id"/>
        <result property="orgPid" column="org_pid"/>
        <result property="orgCode" column="org_code"/>
        <result property="orgCnName" column="org_cn_name"/>
        <result property="orgEnName" column="org_en_name"/>
        <result property="spell" column="spell"/>
        <result property="wb" column="wb"/>
        <result property="orgType" column="org_type"/>
        <result property="principal" column="principal"/>
        <result property="phone" column="phone"/>
        <result property="contactPerson" column="contact_person"/>
        <result property="contactPhone" column="contact_phone"/>
        <result property="email" column="email"/>
        <result property="postalCode" column="postal_code"/>
        <result property="officialWeb" column="official_web"/>
        <result property="plaitBed" column="plait_bed"/>
        <result property="openBed" column="open_bed"/>
        <result property="buildDate" column="build_date"/>
        <result property="peofile" column="peofile"/>
        <result property="legalPerson" column="legal_person"/>
        <result property="medicalDepart" column="medical_depart"/>
        <result property="issueAuth" column="issue_auth"/>
        <result property="issueDate" column="issue_date"/>
        <result property="address" column="address"/>
        <result property="addrProviceCode" column="addr_provice_code"/>
        <result property="addrProviceDesc" column="addr_provice_desc"/>
        <result property="uscc" column="uscc"/>
        <result property="level" column="level"/>
        <result property="jgPeriodStart" column="jg_period_start"/>
        <result property="jgPeriodEnd" column="jg_period_end"/>
        <result property="mita" column="mita"/>
        <result property="hospManagerType" column="hosp_manager_type"/>
        <result property="hospType" column="hosp_type"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="orderNum" column="order_num"/>
        <result property="effective" column="effective"/>
        <result property="wbm" column="wbm"/>
        <result property="jgMultiArea" column="jg_multi_area"/>
        <result property="jgDeptArea" column="jg_dept_area"/>
        <result property="jgMcType" column="jg_mc_type"/>
        <result property="imgbase64" column="imgBase64"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
        <result property="deleted" column="deleted"/>
    </resultMap>
 
    <sql id="selectDictOrgVo">
        select org_id,
               org_pid,
               org_code,
               org_cn_name,
               org_en_name,
               spell,
               wb,
               org_type,
               principal,
               phone,
               contact_person,
               contact_phone,
               email,
               postal_code,
               official_web,
               plait_bed,
               open_bed,
               build_date,
               peofile,
               legal_person,
               medical_depart,
               issue_auth,
               issue_date,
               address,
               addr_provice_code,
               addr_provice_desc,
               uscc,
               level,
               jg_period_start,
               jg_period_end,
               mita,
               hosp_manager_type,
               hosp_type,
               create_by,
               create_time,
               order_num,
               effective,
               wbm,
               jg_multi_area,
               jg_dept_area,
               jg_mc_type,
               imgBase64,
               update_by,
               update_time,
               remark,
               deleted
        from dict_org
    </sql>
 
    <select id="selectDictOrgList" parameterType="DictOrg" resultMap="DictOrgResult">
        <include refid="selectDictOrgVo"/>
        <where>
            <if test="orgCode != null  and orgCode != ''">and org_code like concat('%', #{orgCode}, '%')</if>
            <if test="orgCnName != null  and orgCnName != ''">and org_cn_name like concat('%', #{orgCnName}, '%')</if>
            <if test="orgEnName != null  and orgEnName != ''">and org_en_name like concat('%', #{orgEnName}, '%')</if>
            <if test="spell != null  and spell != ''">and spell like concat('%', #{spell}, '%')</if>
            <if test="wb != null  and wb != ''">and wb like concat('%', #{wb}, '%')</if>
            <if test="orgType != null  and orgType != ''">and org_type like concat('%', #{orgType}, '%')</if>
            <if test="uscc != null  and uscc != ''">and uscc like concat('%', #{uscc}, '%')</if>
            <if test="level != null  and level != ''">and level = #{level}</if>
            <if test="mita != null  and mita != ''">and mita = #{mita}</if>
            <if test="jgMultiArea != null  and jgMultiArea != ''">and jg_multi_area = #{jgMultiArea}</if>
            <if test="jgDeptArea != null  and jgDeptArea != ''">and jg_dept_area = #{jgDeptArea}</if>
            <if test="jgMcType != null  and jgMcType != ''">and jg_mc_type = #{jgMcType}</if>
            <if test="imgbase64 != null  and imgbase64 != ''">and imgBase64 = #{imgbase64}</if>
        </where>
    </select>
 
    <select id="selectDictOrgByOrgId" parameterType="String" resultMap="DictOrgResult">
        <include refid="selectDictOrgVo"/>
        where org_id = #{orgId}
    </select>
 
    <insert id="insertDictOrg" parameterType="DictOrg">
        insert into dict_org
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="orgId != null">org_id,</if>
            <if test="orgPid != null and orgPid != ''">org_pid,</if>
            <if test="orgCode != null">org_code,</if>
            <if test="orgCnName != null">org_cn_name,</if>
            <if test="orgEnName != null">org_en_name,</if>
            <if test="spell != null">spell,</if>
            <if test="wb != null">wb,</if>
            <if test="orgType != null and orgType != ''">org_type,</if>
            <if test="principal != null">principal,</if>
            <if test="phone != null">phone,</if>
            <if test="contactPerson != null">contact_person,</if>
            <if test="contactPhone != null">contact_phone,</if>
            <if test="email != null">email,</if>
            <if test="postalCode != null">postal_code,</if>
            <if test="officialWeb != null">official_web,</if>
            <if test="plaitBed != null">plait_bed,</if>
            <if test="openBed != null">open_bed,</if>
            <if test="buildDate != null">build_date,</if>
            <if test="peofile != null">peofile,</if>
            <if test="legalPerson != null">legal_person,</if>
            <if test="medicalDepart != null">medical_depart,</if>
            <if test="issueAuth != null">issue_auth,</if>
            <if test="issueDate != null">issue_date,</if>
            <if test="address != null">address,</if>
            <if test="addrProviceCode != null">addr_provice_code,</if>
            <if test="addrProviceDesc != null">addr_provice_desc,</if>
            <if test="uscc != null and uscc != ''">uscc,</if>
            <if test="level != null and level != ''">level,</if>
            <if test="jgPeriodStart != null">jg_period_start,</if>
            <if test="jgPeriodEnd != null">jg_period_end,</if>
            <if test="mita != null and mita != ''">mita,</if>
            <if test="hospManagerType != null">hosp_manager_type,</if>
            <if test="hospType != null and hospType != ''">hosp_type,</if>
            <if test="createBy != null and createBy != ''">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="orderNum != null">order_num,</if>
            <if test="effective != null">effective,</if>
            <if test="wbm != null">wbm,</if>
            <if test="jgMultiArea != null and jgMultiArea != ''">jg_multi_area,</if>
            <if test="jgDeptArea != null and jgDeptArea != ''">jg_dept_area,</if>
            <if test="jgMcType != null">jg_mc_type,</if>
            <if test="imgbase64 != null">imgBase64,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="deleted != null">deleted,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="orgId != null">#{orgId},</if>
            <if test="orgPid != null and orgPid != ''">#{orgPid},</if>
            <if test="orgCode != null">#{orgCode},</if>
            <if test="orgCnName != null">#{orgCnName},</if>
            <if test="orgEnName != null">#{orgEnName},</if>
            <if test="spell != null">#{spell},</if>
            <if test="wb != null">#{wb},</if>
            <if test="orgType != null and orgType != ''">#{orgType},</if>
            <if test="principal != null">#{principal},</if>
            <if test="phone != null">#{phone},</if>
            <if test="contactPerson != null">#{contactPerson},</if>
            <if test="contactPhone != null">#{contactPhone},</if>
            <if test="email != null">#{email},</if>
            <if test="postalCode != null">#{postalCode},</if>
            <if test="officialWeb != null">#{officialWeb},</if>
            <if test="plaitBed != null">#{plaitBed},</if>
            <if test="openBed != null">#{openBed},</if>
            <if test="buildDate != null">#{buildDate},</if>
            <if test="peofile != null">#{peofile},</if>
            <if test="legalPerson != null">#{legalPerson},</if>
            <if test="medicalDepart != null">#{medicalDepart},</if>
            <if test="issueAuth != null">#{issueAuth},</if>
            <if test="issueDate != null">#{issueDate},</if>
            <if test="address != null">#{address},</if>
            <if test="addrProviceCode != null">#{addrProviceCode},</if>
            <if test="addrProviceDesc != null">#{addrProviceDesc},</if>
            <if test="uscc != null and uscc != ''">#{uscc},</if>
            <if test="level != null and level != ''">#{level},</if>
            <if test="jgPeriodStart != null">#{jgPeriodStart},</if>
            <if test="jgPeriodEnd != null">#{jgPeriodEnd},</if>
            <if test="mita != null and mita != ''">#{mita},</if>
            <if test="hospManagerType != null">#{hospManagerType},</if>
            <if test="hospType != null and hospType != ''">#{hospType},</if>
            <if test="createBy != null and createBy != ''">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="orderNum != null">#{orderNum},</if>
            <if test="effective != null">#{effective},</if>
            <if test="wbm != null">#{wbm},</if>
            <if test="jgMultiArea != null and jgMultiArea != ''">#{jgMultiArea},</if>
            <if test="jgDeptArea != null and jgDeptArea != ''">#{jgDeptArea},</if>
            <if test="jgMcType != null">#{jgMcType},</if>
            <if test="imgbase64 != null">#{imgbase64},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="deleted != null">#{deleted},</if>
        </trim>
    </insert>
 
    <update id="updateDictOrg" parameterType="DictOrg">
        update dict_org
        <trim prefix="SET" suffixOverrides=",">
            <if test="orgPid != null and orgPid != ''">org_pid = #{orgPid},</if>
            <if test="orgCode != null">org_code = #{orgCode},</if>
            <if test="orgCnName != null">org_cn_name = #{orgCnName},</if>
            <if test="orgEnName != null">org_en_name = #{orgEnName},</if>
            <if test="spell != null">spell = #{spell},</if>
            <if test="wb != null">wb = #{wb},</if>
            <if test="orgType != null and orgType != ''">org_type = #{orgType},</if>
            <if test="principal != null">principal = #{principal},</if>
            <if test="phone != null">phone = #{phone},</if>
            <if test="contactPerson != null">contact_person = #{contactPerson},</if>
            <if test="contactPhone != null">contact_phone = #{contactPhone},</if>
            <if test="email != null">email = #{email},</if>
            <if test="postalCode != null">postal_code = #{postalCode},</if>
            <if test="officialWeb != null">official_web = #{officialWeb},</if>
            <if test="plaitBed != null">plait_bed = #{plaitBed},</if>
            <if test="openBed != null">open_bed = #{openBed},</if>
            <if test="buildDate != null">build_date = #{buildDate},</if>
            <if test="peofile != null">peofile = #{peofile},</if>
            <if test="legalPerson != null">legal_person = #{legalPerson},</if>
            <if test="medicalDepart != null">medical_depart = #{medicalDepart},</if>
            <if test="issueAuth != null">issue_auth = #{issueAuth},</if>
            <if test="issueDate != null">issue_date = #{issueDate},</if>
            <if test="address != null">address = #{address},</if>
            <if test="addrProviceCode != null">addr_provice_code = #{addrProviceCode},</if>
            <if test="addrProviceDesc != null">addr_provice_desc = #{addrProviceDesc},</if>
            <if test="uscc != null and uscc != ''">uscc = #{uscc},</if>
            <if test="level != null and level != ''">level = #{level},</if>
            <if test="jgPeriodStart != null">jg_period_start = #{jgPeriodStart},</if>
            <if test="jgPeriodEnd != null">jg_period_end = #{jgPeriodEnd},</if>
            <if test="mita != null and mita != ''">mita = #{mita},</if>
            <if test="hospManagerType != null">hosp_manager_type = #{hospManagerType},</if>
            <if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if>
            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="orderNum != null">order_num = #{orderNum},</if>
            <if test="effective != null">effective = #{effective},</if>
            <if test="wbm != null">wbm = #{wbm},</if>
            <if test="jgMultiArea != null and jgMultiArea != ''">jg_multi_area = #{jgMultiArea},</if>
            <if test="jgDeptArea != null and jgDeptArea != ''">jg_dept_area = #{jgDeptArea},</if>
            <if test="jgMcType != null">jg_mc_type = #{jgMcType},</if>
            <if test="imgbase64 != null">imgBase64 = #{imgbase64},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="deleted != null">deleted = #{deleted},</if>
        </trim>
        where org_id = #{orgId}
    </update>
 
    <delete id="deleteDictOrgByOrgId" parameterType="String">
        delete
        from dict_org
        where org_id = #{orgId}
    </delete>
 
    <delete id="deleteDictOrgByOrgIds" parameterType="String">
        delete from dict_org where org_id in
        <foreach item="orgId" collection="array" open="(" separator="," close=")">
            #{orgId}
        </foreach>
    </delete>
</mapper>