linwe
2024-05-29 c10d6358b9f014375a13821465bc978d0c0da22e
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<?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="org.springblade.modules.task.mapper.TaskPlaceSelfCheckMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="taskPlaceSelfCheckResultMap"
               type="org.springblade.modules.task.vo.TaskPlaceSelfCheckVO">
        <result property="id" column="id"/>
        <result property="taskId" column="task_id"/>
        <result property="taskName" column="task_name"/>
        <result property="placeName" column="place_name"/>
        <result property="remark" column="remark"/>
        <result property="updateTime" column="update_time"/>
        <result property="createTime" column="create_time"/>
        <result property="houseCode" column="house_code"/>
        <result property="rectificationEndTime" column="rectification_end_time"/>
        <result property="rectificationCompleteTime" column="rectification_complete_time"/>
        <result property="rectificationFlag" column="rectification_flag"/>
        <result property="policeStation" column="police_station"/>
        <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
        <result property="signaturePath" column="signature_path"/>
        <result property="createUser" column="create_user"/>
        <result property="imageUrls" column="image_urls"/>
        <result property="status" column="status"/>
        <result property="deleteFlag" column="delete_flag"/>
 
        <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
                    select="selectPlacePoiLabelList"
                    ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
                    autoMapping="true">
        </collection>
 
        <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
                    javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
                    autoMapping="true">
        </collection>
    </resultMap>
 
    <!--自定义分页查询-->
    <select id="selectTaskPlaceSelfCheckPage" resultMap="taskPlaceSelfCheckResultMap">
        select jpc.*,
        jp.id jpid,
        jp.place_name,
        jp.location,
        jg.grid_name,
        jp.principal,
        jp.principal_phone,
        jp.nine_type,
        jp.is_nine,
        br.town_name as streetName,
        br.village_name as communityName,
        bu.`name`,
        jpe.legal_tel,
        jpe.legal_person
        FROM jczz_task_place_self_check jpc
        LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
        LEFT JOIN blade_region br ON br.`code` = jg.community_code
        LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
        LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            and jp.house_code is not null
            <if test="place.id != null ">and jpc.id = #{place.id}</if>
            <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
            <if test="place.taskName != null  and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
            <if test="place.placeName != null  and place.placeName != ''">
                and jp.place_name like concat('%', #{place.placeName},'%')
            </if>
            <if test="place.principal != null  and place.principal != ''">
                and jp.principal like concat('%', #{place.principal},'%')
            </if>
 
            <if test="nineTypeList!=null and nineTypeList.size()>0">
                and jp.nine_type in
                <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
                    #{nineType}
                </foreach>
            </if>
            <if test="place.remark != null  and place.remark != ''">and jpc.remark = #{place.remark}</if>
            <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
            <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
            <if test="place.type != null  and place.type != ''">and jpc.type = #{place.type}</if>
            <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
                #{place.rectificationEndTime}
            </if>
            <if test="place.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
                #{place.rectificationCompleteTime}
            </if>
            <if test="place.rectificationFlag != null ">and jpc.rectification_flag = #{place.rectificationFlag}</if>
            <if test="place.policeStation != null  and place.policeStation != ''">and jpc.police_station =
                #{place.policeStation}
            </if>
            <if test="place.rectificationNoticeImgUrl != null  and place.rectificationNoticeImgUrl != ''">and
                jpc.rectification_notice_img_url = #{place.rectificationNoticeImgUrl}
            </if>
            <if test="place.signaturePath != null  and place.signaturePath != ''">and jpc.signature_path =
                #{place.signaturePath}
            </if>
 
            <if test="place.streetName!=null and place.streetName!=''">
                and br.town_name like concat('%', #{place.streetName},'%')
            </if>
 
            <if test="place.communityName!=null and place.communityName!=''">
                and br.village_name like concat('%', #{place.communityName},'%')
            </if>
            <if test="place.gridName!=null and place.gridName!=''">
                and jg.grid_name like concat('%', #{place.gridName},'%')
            </if>
            <if test="place.createUser != null ">and jpc.create_user = #{place.createUser}</if>
            <if test="place.imageUrls != null  and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
            <if test="place.status != null ">and jpc.status = #{place.status}</if>
            <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
 
            <if test="place.startTime != null and place.startTime != ''">
                and date_format(jpc.create_time,'%Y-%m-%d') &gt;= #{place.startTime}
            </if>
            <if test="place.endTime != null and place.endTime != ''">
                and date_format(jpc.create_time,'%Y-%m-%d') &lt;= #{place.endTime}
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="place.roleName != null and place.roleName != ''">
                        <if test="place.roleName=='wgy'">
                            <choose>
                                <when test="gridCodeList !=null and gridCodeList.size()>0">
                                    and jp.grid_code in
                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jp.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="place.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jpag.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jpag.community_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and
                                (
                                jg.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                or
                                jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
 
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
            <if test="place.houseCode != null  and place.houseCode != ''"> and jpc.house_code = #{place.houseCode}</if>
 
        </where>
        order by jpc.create_time desc
    </select>
 
    <resultMap type="org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO"
               id="TaskPlaceSelfCheckDTOResult">
        <result property="id" column="id"/>
        <result property="taskId" column="task_id"/>
        <result property="taskName" column="task_name"/>
        <result property="placeName" column="place_name"/>
        <result property="remark" column="remark"/>
        <result property="updateTime" column="update_time"/>
        <result property="createTime" column="create_time"/>
        <result property="houseCode" column="house_code"/>
        <result property="rectificationEndTime" column="rectification_end_time"/>
        <result property="rectificationCompleteTime" column="rectification_complete_time"/>
        <result property="rectificationFlag" column="rectification_flag"/>
        <result property="policeStation" column="police_station"/>
        <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
        <result property="signaturePath" column="signature_path"/>
        <result property="createUser" column="create_user"/>
        <result property="imageUrls" column="image_urls"/>
        <result property="status" column="status"/>
        <result property="deleteFlag" column="delete_flag"/>
        <result property="type" column="type"/>
 
        <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
                    select="selectPlacePoiLabelList"
                    ofType="org.springblade.modules.place.vo.PlacePoiLabelVO"
                    autoMapping="true">
        </collection>
 
        <collection property="taskPlaceRecordVOList" column="{id=id,type=type}" select="selectPatrolRecordList"
                    javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
                    autoMapping="true">
        </collection>
 
    </resultMap>
 
    <select id="selectPlacePoiLabelList" parameterType="Long"
            resultType="org.springblade.modules.place.vo.PlacePoiLabelVO">
            SELECT
            jppl.id,
            jppl.place_id,
            jppl.poi_code,
            jppl.type,
            jppl.color,
            jppl.remark,
            jc.category_name labelName
        FROM
            jczz_place_poi_label jppl
            LEFT JOIN jczz_category jc ON jppl.poi_code = jc.category_no
        WHERE
            jppl.type = '3'
             and  place_id = #{jpid}
        </select>
 
 
    <select id="selectPatrolRecordList"  parameterType="java.util.Map"
            resultType="org.springblade.modules.task.vo.TaskPlaceRecordVO">
        select jpr.id,
        jpr.item_id,
        jpr.task_place_self_check_id,
        jpr.state,
        jpr.remark,
        jpr.image_urls,
        jpr.create_user,
        jpr.create_time,
        jpr.is_deleted,
        jpr.rectification_image_urls,
        jpr.rectification_remark,
        jpr.rectification_time,
        jpgi.items_name
        from jczz_task_place_record jpr
        LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id = jpgi.id
        where task_place_self_check_id = #{id}
        <if test="type == 1">
            and jpr.type = 1
        </if>
        <if test="type == 2">
            and jpr.type = 3
        </if>
    </select>
 
    <sql id="selectTaskPlaceSelfCheck">
        select
            id,
            task_id,
            task_name,
            place_name,
            remark,
            update_time,
            create_time,
            house_code,
            rectification_end_time,
            rectification_complete_time,
            rectification_flag,
            police_station,
            rectification_notice_img_url,
            signature_path,
            create_user,
            image_urls,
            status,
            delete_flag
        from
            jczz_task_place_self_check
    </sql>
 
    <select id="selectTaskPlaceSelfCheckById" parameterType="long" resultMap="TaskPlaceSelfCheckDTOResult">
        SELECT
        jtpr.*,
        jp.id jpid,
        jp.place_name,
        jp.location,
        jg.grid_name,
        jp.principal,
        jp.principal_phone,
        br.town_name,
        br.village_name,
        bu.`name`,
        jpe.legal_tel,
        jpe.legal_person,
        jt.remark reasonFailure,
        jda.address_name
        FROM
        jczz_task_place_self_check jtpr
        LEFT JOIN jczz_task jt ON jt.id = jtpr.task_id
        LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
        LEFT JOIN blade_region br ON br.`code` = jg.community_code
        LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
        LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtpr.house_code
        <where>
            <if test="place.id != null ">and jtpr.id = #{place.id}</if>
            <if test="place.taskId != null ">and jtpr.task_id = #{place.taskId}</if>
        </where>
    </select>
 
    <select id="selectTaskPlaceSelfCheckList"
            parameterType="org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO"
            resultMap="TaskPlaceSelfCheckDTOResult">
        <include refid="selectTaskPlaceSelfCheck"/>
        <where>
            <if test="id != null ">and id = #{id}</if>
            <if test="taskId != null ">and task_id = #{taskId}</if>
            <if test="taskName != null  and taskName != ''">and task_name = #{taskName}</if>
            <if test="placeName != null  and placeName != ''">and place_name = #{placeName}</if>
            <if test="remark != null  and remark != ''">and remark = #{remark}</if>
            <if test="updateTime != null ">and update_time = #{updateTime}</if>
            <if test="createTime != null ">and create_time = #{createTime}</if>
            <if test="houseCode != null  and houseCode != ''">and house_code = #{houseCode}</if>
            <if test="rectificationEndTime != null ">and rectification_end_time = #{rectificationEndTime}</if>
            <if test="rectificationCompleteTime != null ">and rectification_complete_time =
                #{rectificationCompleteTime}
            </if>
            <if test="rectificationFlag != null ">and rectification_flag = #{rectificationFlag}</if>
            <if test="policeStation != null  and policeStation != ''">and police_station = #{policeStation}</if>
            <if test="rectificationNoticeImgUrl != null  and rectificationNoticeImgUrl != ''">and
                rectification_notice_img_url = #{rectificationNoticeImgUrl}
            </if>
            <if test="signaturePath != null  and signaturePath != ''">and signature_path = #{signaturePath}</if>
            <if test="createUser != null ">and create_user = #{createUser}</if>
            <if test="imageUrls != null  and imageUrls != ''">and image_urls = #{imageUrls}</if>
            <if test="status != null ">and status = #{status}</if>
            <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
        </where>
    </select>
 
 
    <!--导出消防自查信息-->
    <select id="exportTaskPlaceSelfCheck"
            resultType="org.springblade.modules.task.excel.TaskPlaceSelfCheckExcel">
        select
        jpc.id,
        case when jpc.status=1 then '待审核'
        when jpc.status=2 then '审核通过'
        when jpc.status=3 then '审核不通过'
        else '待完成' end as status,
        jpc.remark,
        jpc.create_time,
        jp.place_name,
        jp.location,
        jg.grid_name,
        jp.principal,
        jp.principal_phone,
        jp.nine_type,
        jp.is_nine,
        br.town_name as streetName,
        br.village_name as communityName,
        bu.`name`,
        jpe.legal_tel,
        jpe.legal_person
        FROM jczz_task_place_self_check jpc
        LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
        LEFT JOIN blade_region br ON br.`code` = jg.community_code
        LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
        LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            <if test="place.id != null ">and jpc.id = #{place.id}</if>
            <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
            <if test="place.taskName != null  and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
            <if test="place.placeName != null  and place.placeName != ''">
                and jp.place_name like concat('%', #{place.placeName},'%')
            </if>
            <if test="place.principal != null  and place.principal != ''">
                and jp.principal like concat('%', #{place.principal},'%')
            </if>
 
            <if test="nineTypeList!=null and nineTypeList.size()>0">
                and jp.nine_type in
                <foreach collection="nineTypeList" separator="," open="(" close=")" item="nineType">
                    #{nineType}
                </foreach>
            </if>
            <if test="place.remark != null  and place.remark != ''">and jpc.remark = #{place.remark}</if>
            <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
            <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
            <if test="place.houseCode != null  and place.houseCode != ''">and jpc.house_code = #{place.houseCode}</if>
            <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
                #{place.rectificationEndTime}
            </if>
            <if test="place.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
                #{place.rectificationCompleteTime}
            </if>
            <if test="place.rectificationFlag != null ">and jpc.rectification_flag = #{place.rectificationFlag}</if>
            <if test="place.policeStation != null  and place.policeStation != ''">and jpc.police_station =
                #{place.policeStation}
            </if>
            <if test="place.rectificationNoticeImgUrl != null  and place.rectificationNoticeImgUrl != ''">and
                jpc.rectification_notice_img_url = #{place.rectificationNoticeImgUrl}
            </if>
            <if test="place.signaturePath != null  and place.signaturePath != ''">and jpc.signature_path =
                #{place.signaturePath}
            </if>
 
            <if test="place.streetName!=null and place.streetName!=''">
                and br.town_name like concat('%', #{place.streetName},'%')
            </if>
 
            <if test="place.communityName!=null and place.communityName!=''">
                and br.village_name like concat('%', #{place.communityName},'%')
            </if>
            <if test="place.gridName!=null and place.gridName!=''">
                and jg.grid_name like concat('%', #{place.gridName},'%')
            </if>
            <if test="place.createUser != null ">and jpc.create_user = #{place.createUser}</if>
            <if test="place.imageUrls != null  and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
            <if test="place.status != null ">and jpc.status = #{place.status}</if>
            <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="place.roleName != null and place.roleName != ''">
                        <if test="place.roleName=='wgy'">
                            <choose>
                                <when test="gridCodeList !=null and gridCodeList.size()>0">
                                    and jp.grid_code in
                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jp.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="place.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jpag.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jpag.community_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and
                                (
                                jg.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                or
                                jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
 
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
        </where>
    </select>
    <select id="getCount" resultType="java.lang.Integer">
        SELECT count(1)
        FROM jczz_task_place_self_check jtpsc
                 LEFT JOIN jczz_place jp ON jp.house_code = jtpsc.house_code
                 LEFT JOIN jczz_grid jg on jg.grid_code=jp.grid_code
        WHERE jp.jw_grid_code IN
              (SELECT jpag.jw_grid_code FROM jczz_police_affairs_grid jpag WHERE jpag.police_user_id like concat('%',#{userId},'%') )
          AND jtpsc.`status` = 1
          AND jtpsc.`type` = #{type}
          AND jg.community_code=#{neiCode}
    </select>
 
 
 
    <select id="getDetailByTaskId" resultType="org.springblade.modules.task.entity.TaskPlaceSelfCheckEntity">
            SELECT
                jtpsc.*,
                jp.id jpid,
                jp.place_name,
                jp.location,
                jg.grid_name,
                jp.principal,
                jp.principal_phone,
                br.town_name,
                br.village_name,
                bu.`name`,
                jpe.legal_tel,
                jpe.legal_person,
                jt.remark reasonFailure,
                jda.address_name
            FROM
                    jczz_task_place_self_check jtpsc
                    LEFT JOIN jczz_task jt on jt.id = jtpsc.task_id
                    LEFT JOIN jczz_place jp ON jtpsc.house_code = jp.house_code
                    LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
                    LEFT JOIN blade_region br ON br.`code` = jg.community_code
                    LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
                    LEFT JOIN blade_user bu ON bu.id = jtpsc.create_user
                    LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpsc.house_code
            WHERE jtpsc.task_id = #{taskId}
    </select>
</mapper>