|
|
@@ -246,7 +246,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
246
|
246
|
AND `callee_agent`= #{usercode}
|
|
247
|
247
|
</if>
|
|
248
|
248
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
249
|
|
- AND note = '1'
|
|
|
249
|
+ AND IFNULL(note,'1')='1'
|
|
250
|
250
|
</if>
|
|
251
|
251
|
|
|
252
|
252
|
GROUP BY `callee_agent`
|
|
|
@@ -260,6 +260,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
260
|
260
|
where createtime >= CURDATE() - INTERVAL DAY(CURDATE()) - 1 DAY
|
|
261
|
261
|
AND createtime <![CDATA[<=]]> DATE_ADD(CURDATE() - DAY(CURDATE()) + 1, INTERVAL 1 MONTH)
|
|
262
|
262
|
and isdelete=0
|
|
|
263
|
+ <if test="time != null and time !='' ">
|
|
|
264
|
+ and YEAR(create_time) = YEAR(CURRENT_DATE)
|
|
|
265
|
+ AND ${time}(create_time) = ${time}(CURRENT_DATE)
|
|
|
266
|
+ </if>
|
|
|
267
|
+ <if test="area >0 ">
|
|
|
268
|
+ AND `area`= #{area}
|
|
|
269
|
+ </if>
|
|
263
|
270
|
group by ancestors) b on CONCAT(b.ancestors,',') LIKE CONCAT('%', a.ancestors,',' '%')
|
|
264
|
271
|
group by Name
|
|
265
|
272
|
|
|
|
@@ -285,7 +292,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
285
|
292
|
from rep_record
|
|
286
|
293
|
where DATE_FORMAT(create_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
|
|
287
|
294
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
288
|
|
- AND note = '1'
|
|
|
295
|
+ AND IFNULL(note,'1')='1'
|
|
289
|
296
|
</if>
|
|
290
|
297
|
GROUP BY DATE
|
|
291
|
298
|
ORDER BY DATE;
|
|
|
@@ -298,7 +305,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
298
|
305
|
from rep_record
|
|
299
|
306
|
where 1=1
|
|
300
|
307
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
301
|
|
- AND note = '1'
|
|
|
308
|
+ AND IFNULL(note,'1')='1'
|
|
302
|
309
|
</if>
|
|
303
|
310
|
</select>
|
|
304
|
311
|
<select id="selectTrafficMeasurement" parameterType="Date" resultMap="TrafficMeasurementResult">
|
|
|
@@ -310,7 +317,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
310
|
317
|
from rep_record
|
|
311
|
318
|
WHERE `create_time`>=#{beginTime} AND `create_time`<![CDATA[<=]]> #{endTime}
|
|
312
|
319
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
313
|
|
- AND note = '1'
|
|
|
320
|
+ AND IFNULL(note,'1')='1'
|
|
314
|
321
|
</if>
|
|
315
|
322
|
</select>
|
|
316
|
323
|
|
|
|
@@ -322,7 +329,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
322
|
329
|
WHERE `create_time`>=#{startTime} AND `create_time`<![CDATA[<=]]> #{endTime}
|
|
323
|
330
|
and call_type=1
|
|
324
|
331
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
325
|
|
- AND note = '1'
|
|
|
332
|
+ AND IFNULL(note,'1')='1'
|
|
326
|
333
|
</if>
|
|
327
|
334
|
<if test="isAnswer >-1 ">
|
|
328
|
335
|
AND `is_answer`= #{isAnswer}
|
|
|
@@ -338,7 +345,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
338
|
345
|
from rep_record where
|
|
339
|
346
|
DATE_FORMAT( `create_time`, '%Y-%m' )= DATE_FORMAT( #{time}, '%Y-%m' )
|
|
340
|
347
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
341
|
|
- AND note = '1'
|
|
|
348
|
+ AND IFNULL(note,'1')='1'
|
|
342
|
349
|
</if>
|
|
343
|
350
|
</select>
|
|
344
|
351
|
|
|
|
@@ -358,7 +365,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
358
|
365
|
WHERE `create_time`>=#{startTime} AND `create_time`<![CDATA[<=]]> #{endTime}
|
|
359
|
366
|
and call_type=1
|
|
360
|
367
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
361
|
|
- AND note = '1'
|
|
|
368
|
+ AND IFNULL(note,'1')='1'
|
|
362
|
369
|
</if>
|
|
363
|
370
|
group by DATE
|
|
364
|
371
|
order by DATE
|
|
|
@@ -403,7 +410,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
403
|
410
|
) v2 ON v1.workordercode = v2.workordercode
|
|
404
|
411
|
AND v1.visit_id = v2.visit_id
|
|
405
|
412
|
) lv ON wo.workordercode = lv.workordercode
|
|
406
|
|
- where a.type=3 and a.parent_id=1743
|
|
|
413
|
+ where 1=1
|
|
|
414
|
+ and a.type=#{type} and a.parent_id=#{area}
|
|
407
|
415
|
GROUP BY a.id ;
|
|
408
|
416
|
</select>
|
|
409
|
417
|
<select id="selectTelephoneData" parameterType="String" resultMap="RecordDateViewResult">
|
|
|
@@ -434,7 +442,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
434
|
442
|
from rep_record
|
|
435
|
443
|
where 1=1
|
|
436
|
444
|
<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
|
|
437
|
|
- AND note = '1'
|
|
|
445
|
+ AND IFNULL(note,'1')='1'
|
|
438
|
446
|
</if>
|
|
439
|
447
|
<if test="startTime != null and startTime !=''">
|
|
440
|
448
|
AND UNIX_TIMESTAMP(`create_time`)>=UNIX_TIMESTAMP(#{startTime})
|
|
|
@@ -443,6 +451,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
443
|
451
|
AND UNIX_TIMESTAMP(`create_time`) <![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
444
|
452
|
</if>
|
|
445
|
453
|
</select>
|
|
446
|
|
-
|
|
|
454
|
+ <select id="selectAreaKeywordCount" parameterType="Long" resultMap="CompleteView">
|
|
|
455
|
+ SELECT
|
|
|
456
|
+ keyword_text AS `Name`,
|
|
|
457
|
+ SUM(keyword_count) AS `number`
|
|
|
458
|
+ FROM
|
|
|
459
|
+ wo_workorderbase o
|
|
|
460
|
+ JOIN
|
|
|
461
|
+ rep_translate k ON o.call_id = k.callid
|
|
|
462
|
+ JOIN
|
|
|
463
|
+ JSON_TABLE(
|
|
|
464
|
+ k.translate_json,
|
|
|
465
|
+ '$[*]' COLUMNS (
|
|
|
466
|
+ keyword_text VARCHAR(255) PATH '$.text',
|
|
|
467
|
+ keyword_count INT PATH '$.count'
|
|
|
468
|
+ )
|
|
|
469
|
+ ) AS jt
|
|
|
470
|
+ WHERE
|
|
|
471
|
+ <if test="area >0 ">
|
|
|
472
|
+ o.area = #{area}
|
|
|
473
|
+ </if>
|
|
|
474
|
+ <if test="time != null and time !='' ">
|
|
|
475
|
+ and YEAR(create_time) = YEAR(CURRENT_DATE)
|
|
|
476
|
+ AND ${time}(create_time) = ${time}(CURRENT_DATE)
|
|
|
477
|
+ </if>
|
|
|
478
|
+ GROUP BY
|
|
|
479
|
+ keyword_text
|
|
|
480
|
+ ORDER BY
|
|
|
481
|
+ SUM(keyword_count) DESC
|
|
|
482
|
+ LIMIT 10;
|
|
|
483
|
+ </select>
|
|
447
|
484
|
|
|
448
|
485
|
</mapper>
|