duhongyu 9 mesi fa
parent
commit
b5c267a702

+ 1 - 1
hjzx-mapper/src/main/java/api/mapper/report/ReportMapper.java

@@ -70,7 +70,7 @@ public interface ReportMapper {
70 70
     /**话务简报**/
71 71
     public  TelephoneBriefing selectTelephoneBriefing (String startTime,  String endTime  );
72 72
     /**话务数据**/
73
-    public  RecordDateView selectTelephoneData (String time  );
73
+    public  RecordDateView selectTelephoneData (String time ,Long note );
74 74
     /**区域关键词数量**/
75 75
     public  List<CompleteView> selectAreaKeywordCount (String time ,Long area  );
76 76
 

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

@@ -416,7 +416,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
416 416
 	</select>
417 417
 	<select id="selectTelephoneData"  parameterType="String" resultMap="RecordDateViewResult">
418 418
 		select count(1) total,
419
-		count(note=1 or null )	incoming,		count(note=2 or null )	exhalation  from rep_record
419
+		count(note=${note} and call_type = 1 or null )	incoming,		count(note=${note} and call_type = 2
420
+		or null )	exhalation  from rep_record
420 421
 		where 1=1
421 422
 		<if test="time != null and time !='' ">
422 423
 			and YEAR(create_time) = YEAR(CURRENT_DATE)

+ 11 - 2
hjzx-service/src/main/java/api/service/report/impl/DataAnalysisServiceImpl.java

@@ -72,7 +72,16 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
72 72
             }
73 73
         }
74 74
         HashMap<String,Object> obj=new HashMap<>();
75
-        obj.put("traffic", reportMapper.selectTelephoneData(time));//话务数据
75
+        RecordDateView view1=reportMapper.selectTelephoneData(time,1L);//八院话务数据
76
+        RecordDateView view2=reportMapper.selectTelephoneData(time,2L);//九院话务数据
77
+        RecordDateView view3=new RecordDateView();
78
+        view3.setTotal(view1.getTotal()+view2.getTotal());
79
+        view3.setIncoming(view1.getIncoming()+view2.getIncoming());
80
+        view3.setExhalation(view1.getExhalation()+view2.getExhalation());
81
+
82
+        obj.put("traffic",view3 );//话务数据
83
+        obj.put("eightTraffic",view1 );//八院话务数据
84
+        obj.put("nineTraffic", view2);//九院话务数据
76 85
         obj.put("order", reportMapper.selectRegionOrderCount(time,level,area));//工单数据
77 86
 
78 87
        return obj;
@@ -314,7 +323,7 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
314 323
         SatisfactionView view=      reportMapper.selectSatisfaction();
315 324
         long total=view.getBasically()+ view.getDissatisfied()+ view.getSatisfied();//总数
316 325
         HashMap<String,Object> obj=new HashMap<>();
317
-        DecimalFormat df = new DecimalFormat("#.00");
326
+        DecimalFormat df = new DecimalFormat("0.00");
318 327
         obj.put("basically",view.getBasically());
319 328
         obj.put("satisfied",view.getSatisfied());
320 329
         obj.put("dissatisfied",view.getDissatisfied());