Browse Source

话务简报 报表分析

liyuanyuan 9 months ago
parent
commit
ebb3308731
2 changed files with 9 additions and 10 deletions
  1. 0 1
      .gitignore
  2. 9 9
      hjzx-mapper/src/main/resources/mapper/report/ReportMapper.xml

+ 0 - 1
.gitignore

@@ -4,5 +4,4 @@ target/
4 4
 files/
5 5
 *.log
6 6
 *.iml
7
-*.xml
8 7
 logs/

+ 9 - 9
hjzx-mapper/src/main/resources/mapper/report/ReportMapper.xml

@@ -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 IFNULL(note,'1')='1'
249
+			AND  (note=1 or (call_type=2 and note is null ))
250 250
 		</if>
251 251
 
252 252
 		GROUP BY `callee_agent`
@@ -311,7 +311,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
311 311
 		from rep_record
312 312
 		where  DATE_FORMAT(create_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
313 313
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
314
-			AND IFNULL(note,'1')='1'
314
+			AND  (note=1 or (call_type=2 and note is null ))
315 315
 		</if>
316 316
 		GROUP BY DATE
317 317
 		ORDER BY DATE;
@@ -324,7 +324,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
324 324
 		from rep_record
325 325
 		where  1=1
326 326
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
327
-			AND IFNULL(note,'1')='1'
327
+			AND  (note=1 or (call_type=2 and note is null ))
328 328
 		</if>
329 329
 	</select>
330 330
 	<select id="selectTrafficMeasurement"  parameterType="Date" resultMap="TrafficMeasurementResult">
@@ -336,7 +336,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
336 336
 		from rep_record
337 337
 		WHERE `create_time`>=#{beginTime}  AND `create_time`<![CDATA[<=]]> #{endTime}
338 338
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
339
-			AND IFNULL(note,'1')='1'
339
+			AND  (note=1 or (call_type=2 and note is null ))
340 340
 		</if>
341 341
 	</select>
342 342
 
@@ -348,7 +348,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
348 348
 		WHERE `create_time`>=#{startTime}  AND `create_time`<![CDATA[<=]]> #{endTime}
349 349
 		and call_type=1
350 350
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
351
-			AND IFNULL(note,'1')='1'
351
+			AND  (note=1 or (call_type=2 and note is null ))
352 352
 		</if>
353 353
 		<if test="isAnswer >-1  ">
354 354
 			AND `is_answer`= #{isAnswer}
@@ -364,7 +364,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
364 364
 		from  rep_record where
365 365
 		DATE_FORMAT(  `create_time`, '%Y-%m' )= DATE_FORMAT( #{time}, '%Y-%m' )
366 366
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
367
-			AND IFNULL(note,'1')='1'
367
+			AND  (note=1 or (call_type=2 and note is null ))
368 368
 		</if>
369 369
 	</select>
370 370
 
@@ -384,7 +384,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
384 384
 		WHERE `create_time`>=#{startTime}  AND `create_time`<![CDATA[<=]]> #{endTime}
385 385
 		and call_type=1
386 386
 		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
387
-			AND IFNULL(note,'1')='1'
387
+			AND  (note=1 or (call_type=2 and note is null ))
388 388
 		</if>
389 389
 		group by DATE
390 390
 		order by DATE
@@ -482,8 +482,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
482 482
 		count(myd=3  or null  )  dissatisfied
483 483
 		from rep_record
484 484
 		where 1=1
485
-		<if test="@api.entity.view.config.GlobalConfig@isNote == 1">
486
-			AND IFNULL(note,'1')='1'
485
+		<if test="@api.entity.view.config.GlobalConfig@isNote == 1"  >
486
+			AND  (note=1 or (call_type=2 and note is null ))
487 487
 		</if>
488 488
 		<if test="startTime != null and startTime !=''">
489 489
 			AND UNIX_TIMESTAMP(`create_time`)>=UNIX_TIMESTAMP(#{startTime})