cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
package cn.ksource.web.controller.tj;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
 
import com.jhlabs.image.BumpFilter;
 
import sun.swing.StringUIClientPropertyKey;
 
import cn.ksource.core.util.ConvertUtil;
import cn.ksource.core.util.DateUtil;
import cn.ksource.core.util.JsonUtil;
import cn.ksource.core.util.NumberUtil;
import cn.ksource.core.util.ParamsMapUtil;
import cn.ksource.core.util.StringUtil;
import cn.ksource.core.web.WebUtil;
import cn.ksource.web.Constants;
import cn.ksource.web.facade.customermanage.CustomerManageFacade;
import cn.ksource.web.facade.timetask.TimeTaskFacade;
import cn.ksource.web.facade.tj.IncidentStatisFacade;
import cn.ksource.web.service.DataDictionaryService;
 
@Controller
@RequestMapping("/business/pages/tj/incidentStatis")
public class IncidentStatisController {
 
    @Resource(name="incidentStatisFacade")
    private IncidentStatisFacade incidentStatisFacade;
    
    @Resource
    private CustomerManageFacade customerFacade;
    @Autowired
    private TimeTaskFacade timeTaskFacade;
    @Autowired
    private DataDictionaryService dataDictionaryService;
    
    /**
     * 查询事件类型统计占比
     */
    @RequestMapping("incidentTypePie.html")
    public void incidentTypePie(HttpServletRequest request,HttpServletResponse response) {
        List attitude = incidentStatisFacade.incidentTypePie(request);
        WebUtil.write(response, JsonUtil.list2Json(attitude));
    }
    
    
    /**
     * 查询事件类型时间走势
     */
    @RequestMapping("incidentTypeLine.html")
    public void incidentTypeLine(HttpServletRequest request,HttpServletResponse response) {
        Map scoreLine = incidentStatisFacade.incidentTypeLine(request);
        WebUtil.write(response, JsonUtil.map2Json(scoreLine));
    }
    
    /**
     * 事件发生时间
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentHappenTime.html")
    public ModelAndView incidentRole(HttpServletRequest request,HttpServletResponse response) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentHappenTime");
        //获取当前session中的客户信息
        List cusList = customerFacade.getCusList();
        
        modelAndView.addObject("cusList", cusList);
        modelAndView.addObject("selDay", DateUtil.getCurrentDate8());
        return modelAndView;
    }
    
    /**
     * 查询事件类型时间走势
     */
    @RequestMapping("incidentHappenTimeLine.html")
    public void incidentHappenTimeLine(HttpServletRequest request,HttpServletResponse response) {
        Map scoreLine = incidentStatisFacade.incidentTimeLine(request);
        WebUtil.write(response, JsonUtil.map2Json(scoreLine));
    }
 
    
    /**
     * 事件解决率页面
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentDealRate.html")
    public ModelAndView incidentDealRate(HttpServletRequest request,HttpServletResponse response) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentDealRate");
        //获取当前session中的客户信息
        List cusList = customerFacade.getCusList();
        
        long month = DateUtil.getCurrentDate6();
        long monthFirstDate = ConvertUtil.obj2Long(month+"01");
        String beginTime = DateUtil.format("yyyy-MM-dd", monthFirstDate);
        String endTime = DateUtil.getToday("yyyy-MM-dd");
        modelAndView.addObject("beginTime", beginTime.replaceAll("-", ""));
        modelAndView.addObject("endTime",  endTime.replaceAll("-", ""));
        modelAndView.addObject("cusList", cusList);
        return modelAndView;
    }
    
    /**
     * 查询事件解决率
     */
    @RequestMapping("incidentDealRateColumn.html")
    public void incidentDealRateColumn(HttpServletRequest request,HttpServletResponse response) {
        Map resMap = incidentStatisFacade.incidentDealRateColumn(request);
        WebUtil.write(response, JsonUtil.map2Json(resMap));
    }
    
    /**
     * 查询事件解决率
     */
    @RequestMapping("incidentDealRateLine.html")
    public void incidentDealRateLine(HttpServletRequest request,HttpServletResponse response) {
        Map resMap = incidentStatisFacade.incidentDealRateLine(request);
        //System.out.println("---------"+JsonUtil.map2Json(resMap));
        WebUtil.write(response, JsonUtil.map2Json(resMap));
    }
    
    
    @RequestMapping("incidentTotalChartIndex.html")
    public ModelAndView incidentTotalChartIndex(HttpServletRequest request,HttpServletResponse response) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentTotalChartIndex");
        //获取当前session中的客户信息
        List cusList = customerFacade.getCusList();
        
        long month = DateUtil.getCurrentDate6();
        long monthFirstDate = ConvertUtil.obj2Long(month+"01");
        String beginTime = DateUtil.format("yyyy-MM-dd", monthFirstDate);
        String endTime = DateUtil.getToday("yyyy-MM-dd");
        modelAndView.addObject("beginTime", beginTime.replaceAll("-", ""));
        modelAndView.addObject("endTime",  endTime.replaceAll("-", ""));
        modelAndView.addObject("cusList", cusList);
        return modelAndView;
    }
    
    
    @RequestMapping("incidentTotalChart.html")
    public ModelAndView incidentTotalChart(HttpServletRequest request,HttpServletResponse response) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentTotalChart");
        //获取当前session中的客户信息
        String cusId = request.getParameter("cusId");
        String beginTime = request.getParameter("beginDay");
        String endTime = request.getParameter("endDay");
        Map resMap = incidentStatisFacade.incidentTotalChart(cusId,"",beginTime,endTime);
        String cusName = resMap.get("cusName").toString(); 
        List<Map> typeList = (List<Map>)resMap.get("typeList"); 
        List<Map> sourceList = (List<Map>)resMap.get("sourceList");
        List<Map> closeList = (List<Map>)resMap.get("closeList");
        List<Map> priList = (List<Map>)resMap.get("priList");
        List<Map> effectList = (List<Map>)resMap.get("effectList");
        List<Map> levelList = (List<Map>)resMap.get("levelList");
        List<Map> timeoutList = (List<Map>)resMap.get("timeoutList");
        List<Map> resolveList = (List<Map>)resMap.get("resolveList");
        List<Map> stateList = (List<Map>)resMap.get("stateList");
        List<Map> resList = (List<Map>)resMap.get("resList");
        modelAndView.addObject("typeList",typeList);
        modelAndView.addObject("sourceList",sourceList);
        modelAndView.addObject("closeList",closeList);
        modelAndView.addObject("priList",priList);
        modelAndView.addObject("effectList",effectList);
        modelAndView.addObject("levelList",levelList);
        modelAndView.addObject("timeoutList",timeoutList);
        modelAndView.addObject("resolveList",resolveList);
        modelAndView.addObject("stateList",stateList);
        modelAndView.addObject("resList",resList);
        modelAndView.addObject("cusName",cusName);
        return modelAndView;
    }
    /**
     * 跳转到办公网络保修统计页面
     * @param request
     * @return
     * @author 李云鹏
     */
    @RequestMapping("incidentStatisIndex.html")
    public ModelAndView incidentStatisIndex(HttpServletRequest request){
        List cusList = customerFacade.getCusList();
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentStatisIndex");
        long month = DateUtil.getCurrentDate6();
        long monthFirstDate = ConvertUtil.obj2Long(month+"01");
        String beginTime = DateUtil.format("yyyy-MM-dd", monthFirstDate);
        String endTime = DateUtil.getToday("yyyy-MM-dd");
        modelAndView.addObject("beginTime", beginTime.replaceAll("-", ""));
        modelAndView.addObject("endTime",  endTime.replaceAll("-", ""));
        modelAndView.addObject("cusList", cusList);
        List<Map> userList=incidentStatisFacade.getGcsList(new HashMap());
        modelAndView.addObject("userList", userList);
        //查询事件类型数据字典
        List<Map> types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
        modelAndView.addObject("types", types);
        return modelAndView;
    }
    /**
     * 办公网络保修统计
     * @param request
     * @return
     * @author 李云鹏
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    @RequestMapping("incidentStatis.html")
    public ModelAndView incidentStatis(HttpServletRequest request){
        ModelAndView modelAndView=new ModelAndView("/business/pages/tj/incidentStatis/incidentStatis");
         boolean result = timeTaskFacade.updateIncidentTime();
            if(result) {
                System.out.println("定时更新事件工单的响应状态和处理状态成功");
            } else {
                System.out.println("定时更新事件工单的响应状态和处理状态失败");
            }
        String cusId = request.getParameter("cusId");
        String beginTime = request.getParameter("beginDay");
        String endTime = request.getParameter("endDay");
        String sub_customer_id = request.getParameter("sub_customer_id");
        String jjState=request.getParameter("jjState");
        String csState=request.getParameter("csState");
        String jjrId=request.getParameter("jjrId");
        String type_id=request.getParameter("type_id");
        List<Map> incidentList=incidentStatisFacade.queryIncidentStatisTwo(cusId,sub_customer_id,beginTime,endTime,jjState,csState,jjrId,type_id);
        if(incidentList!=null && incidentList.size()>0){
            for(Map map:incidentList){
                //map.put("STATE", Constants.getmapSC_WORKFLOW_RELEASE_STATE(map.get("STATE").toString()));
                //查询要求响应时间和实际响应时间
                long create_time = ConvertUtil.obj2Long(map.get("CREATE_TIME"));
                String answer_time = ConvertUtil.obj2StrBlank(map.get("ANSWER_TIME"));
                if(!StringUtil.notEmpty(answer_time)) {
                    answer_time =  DateUtil.getCurrentDate14().toString();
                }
                long seconds = DateUtil.getSecondsFormDate2Date(create_time, ConvertUtil.obj2Long(answer_time));
                //将秒转化为分钟
                double sjxysj = NumberUtil.div(ConvertUtil.obj2Double(seconds), ConvertUtil.obj2Double(60), 1);
                double xycs=NumberUtil.sub(sjxysj, ConvertUtil.obj2Double(map.get("REQUEST_ANSWER_TIME")));
                if(xycs>0){
                    map.put("xycssj", xycs);
                }
                //处理超时操作
                //1.判断当前工单有没有解决时间,如果有解决时间 说明已完成,如果没有解决时间 说明未完成
                String resolveTime = ConvertUtil.obj2StrBlank(map.get("RESOLVE_TIME"));
                if(!StringUtil.notEmpty(resolveTime)) {
                    resolveTime = DateUtil.getCurrentDate14().toString();
                }
                //计算第解决时间和创建事件的事件差 将时间差转化为小时
                long jjSeconds = DateUtil.getSecondsFormDate2Date(create_time, ConvertUtil.obj2Long(resolveTime));
                //将秒转化为小时
                double sjjjsj = NumberUtil.div(ConvertUtil.obj2Double(jjSeconds), ConvertUtil.obj2Double(3600), 2);
                double clcssj=NumberUtil.sub(sjjjsj, ConvertUtil.obj2Double(map.get("REQUEST_DEAL_TIME")));
                if(clcssj>0){
                    map.put("clcssj", clcssj);
                }
            }
        }
        modelAndView.addObject("incidentList",incidentList);
        modelAndView.addObject("beginTime",request.getParameter("beginDay"));
        modelAndView.addObject("endTime",request.getParameter("endDay"));
        modelAndView.addObject("cusName",request.getParameter("cusName"));
        return modelAndView;
    }
    
    
    
    /**
     * 事件达成率统计
     */
    @RequestMapping("incidentDcl.html")
    public ModelAndView incidentDcl(Model model,HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentDcl");
        initModel(request, model);
        return modelAndView;
    }
    
    
    /**
     * 跳转到事件达成率信息页面
     */
    @RequestMapping("incidentDclStatis.html")
    public ModelAndView incidentDclStatis(HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentDclStatis");
        String cusId = request.getParameter("cusId");
        String beginTime = request.getParameter("beginTime");
        String endTime = request.getParameter("endTime");
        String subCustomerId = request.getParameter("sub_customer_id");
        List<Map> reports = incidentStatisFacade.queryIncidentDclStatis(cusId,subCustomerId,beginTime,endTime);
        
        modelAndView.addObject("reports", reports);
        String cusName = request.getParameter("cusName");
        modelAndView.addObject("cusName", cusName);
        
        return modelAndView;
    }
    
    
    /**
     * 跳转到事件处理情况页面
     */
    @RequestMapping("incidentClqk.html")
    public ModelAndView incidentClqk(HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentClqk");
        List cusList = customerFacade.getCusList();
        modelAndView.addObject("cusList", cusList);
        return modelAndView;
    }
    
    
    /**
     * 跳转到事件处理情况信息页面
     */
    @RequestMapping("incidentClStatis.html")
    public ModelAndView incidentClStatis(HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView("/business/pages/tj/incidentStatis/incidentClStatis");
        
        Map result = incidentStatisFacade.queryOrderClStatis(request,Constants.WORKFLOW_BASE_BUSINESS_TYPE_INCIDENT);
        
        modelAndView.addObject("result", result);
        String cusName = request.getParameter("cusName");
        modelAndView.addObject("cusName", cusName);
        
        return modelAndView;
    }
    
    
    /**
     * 事件关闭原因
     * @return
     */
    @RequestMapping("incidentCloseReport.html")
    public String incidentCloseReport(Model model,HttpServletRequest request){
        initModel(request, model);
        return "/business/pages/tj/incidentStatis/incidentCloseReport";
    }
    
    @RequestMapping("incidentCloseReportData.html")
    public String incidentCloseReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        String cusId = request.getParameter("cusId");
        String beginDay = request.getParameter("beginDay");
        String endDay = request.getParameter("endDay");
        Map report = incidentStatisFacade.queryCloseReport(cusId,beginDay,endDay);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentCloseReportData";
    }
    
    /**
     * 事件类型
     * @return
     */
    @RequestMapping("incidentTypeReport.html")
    public String incidentTypeReport(Model model,HttpServletRequest request){
        initModel(request, model);
        return "/business/pages/tj/incidentStatis/incidentTypeReport";
    }
    
    @RequestMapping("incidentTypeReportData.html")
    public String incidentTypeReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        String cusId = request.getParameter("cusId");
        String beginDay = request.getParameter("beginDay");
        String endDay = request.getParameter("endDay");
        Map report = incidentStatisFacade.queryTypeReport(cusId,beginDay,endDay);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentTypeReportData";
    }
    
    /**
     * 事件处理时长
     * @return
     */
    @RequestMapping("incidentDealTimeReport.html")
    public String incidentDealTimeReport(Model model,HttpServletRequest request){
        initModel(request, model);
        return "/business/pages/tj/incidentStatis/incidentDealTimeReport";
    }
    
    @RequestMapping("incidentDealTimeReportData.html")
    public String incidentDealTimeReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        String cusId = request.getParameter("cusId");
        String beginDay = request.getParameter("beginDay");
        String endDay = request.getParameter("endDay");
        Map report = incidentStatisFacade.queryDealTimeReport(cusId,beginDay,endDay);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentDealTimeReportData";
    }
    
    /**
     * 事件处理情况
     * @return
     */
    @RequestMapping("incidentDealSatuationReport.html")
    public String incidentDealSatuationReport(Model model,HttpServletRequest request){
        initModel(request, model);
        return "/business/pages/tj/incidentStatis/incidentDealSatuationReport";
    }
    
    @RequestMapping("incidentDealSatuatioReportData.html")
    public String incidentDealSatuatioReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        String cusId = request.getParameter("cusId");
        String beginDay = request.getParameter("beginDay");
        String endDay = request.getParameter("endDay");
        Map report = incidentStatisFacade.queryDealSituationReport(cusId,beginDay,endDay);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentDealSatuatioReportData";
    }
    
    /**
     * 事件工程师统计
     * @return
     */
    @RequestMapping("incidentEngineerReport.html")
    public String incidentEngineerReport(Model model,HttpServletRequest request){
        List cusList = customerFacade.getCusList();
        model.addAttribute("cusList", cusList);
        return "/business/pages/tj/incidentStatis/incidentEngineerReport";
    }
    
    @RequestMapping("incidentEngineerReportData.html")
    public String incidentEngineerReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        Map report = incidentStatisFacade.queryEngineerDealReport(request);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentEngineerReportData";
    }
    /**
     * 事件服务台统计
     * @return
     */
    @RequestMapping("incidentServiceReport.html")
    public String incidentServiceReport(Model model,HttpServletRequest request){
        List cusList = customerFacade.getCusList();
        model.addAttribute("cusList", cusList);
        return "/business/pages/tj/incidentStatis/incidentServiceReport";
    }
    
    @RequestMapping("incidentServiceReportData.html")
    public String incidentServiceReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        Map report = incidentStatisFacade.queryServiceDealReport(request);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentServiceReportData";
    }
    
    
    
    
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /**
     * 初始化页面数据
     * @author chenlong
     * @param request
     * @param model
     */
    private void initModel(HttpServletRequest request,Model model){
        //获取当前session中的客户信息
        List cusList = customerFacade.getCusList();
        model.addAttribute("cusList", cusList);
        long month = DateUtil.getCurrentDate6();
        long monthFirstDate = ConvertUtil.obj2Long(month+"01");
        String beginTime = DateUtil.format("yyyy-MM-dd", monthFirstDate);
        String endTime = DateUtil.getToday("yyyy-MM-dd");
        model.addAttribute("beginTime", beginTime.replaceAll("-", ""));
        model.addAttribute("endTime",  endTime.replaceAll("-", ""));
        int beginMonth = DateUtil.getYear();
        String endMonth = DateUtil.getToday("yyyyMM");
        model.addAttribute("beginMonth", beginMonth+"01");
        model.addAttribute("endMonth", endMonth);
    }
    
    /**
     * 事件来源页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentType.html")
    public String incidentType(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentType";
    }
    
    /**
     * 事件来源页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidenttj.html")
    public String incidenttj(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidenttj";
    }
    
    /**
     * 获取事件类型饼状图
     * @author chenlong
     */
    @RequestMapping("getIncidentTypePie.html")
    public void getIncidentTypePie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        Map chartMap = incidentStatisFacade.incidentTypePie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap));
    }
    
    /**
     * 事件来源页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentSource.html")
    public String incidentSource(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentSource";
    }
    
    /**
     * 获取事件来源饼状图
     * @author chenlong
     */
    @RequestMapping("getIncidentSourcePie.html")
    public void getIncidentSourcePie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentSourcePie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap));
    }
    
    /**
     * 事件关闭方式页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentClose.html")
    public String incidentClose(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentClose";
    }
    
    /**
     * 获取事件关闭方式柱状图
     * @author chenlong
     */
    @RequestMapping("getIncidentCloseCol.html")
    public void getIncidentCloseCol(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentCloseCol(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap));
    }
    
    /**
     * 事件优先级页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentPri.html")
    public String incidentPri(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentPri";
    }
    
    /**
     * 获取事件优先级饼状图图
     * @author chenlong
     */
    @RequestMapping("getIncidentPriPie.html")
    public void getIncidentPriPie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentPriPie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap)); 
    }
    
    
    /**
     * 事件影响度页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentInfluence.html")
    public String incidentInfluence(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentInfluence";
    }
    
    /**
     * 获取事件影响度柱状图
     * @author chenlong
     */
    @RequestMapping("getIncidentInfluenceCol.html")
    public void getIncidentInfluenceCol(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentInfluenceCol(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap));
    }
    
    /**
     * 事件服务级别页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentLv.html")
    public String incidentLv(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentLv";
    }
    
    /**
     * 获取事件服务级别饼状图图
     * @author chenlong
     */
    @RequestMapping("getIncidentLvPie.html")
    public void getIncidentLvPie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentLvPie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap)); 
    }
    
    /**
     * 事件响应统计页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentResponse.html")
    public String incidentResponse(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentResponse";
    }
    
    /**
     * 获取事件响应饼状图图
     * @author chenlong
     */
    @RequestMapping("getIncidentResponsePie.html")
    public void getIncidentResponsePie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        
        
        Map chartMap = incidentStatisFacade.incidentResponsePie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap)); 
    }
    
    
    /**
     * 事件处理统计页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentDeal.html")
    public String incidentDeal(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentDeal";
    }
    
    /**
     * 获取事件响应饼状图图
     * @author chenlong
     */
    @RequestMapping("getIncidentDealPie.html")
    public void getIncidentDealPie(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        Map chartMap = incidentStatisFacade.incidentDealPie(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap)); 
    }
    
    /**
     * 事件影响度页面
     * @author chenlong
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentHappendTime.html")
    public String incidentHappendTime(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentHappendTime";
    }
    
    /**
     * 获取事件影响度线形图
     * @author chenlong
     */
    @RequestMapping("getIncidentHappendTimeLine.html")
    public void getIncidentHappendTimeLine(HttpServletRequest request,HttpServletResponse response){
        String frequency = request.getParameter("type");
        String startDate = request.getParameter("beginTime");
        String endDate = request.getParameter("endTime");
        String cusId = request.getParameter("cusId");
        Map chartMap = incidentStatisFacade.incidentHappendTimeLine(frequency,cusId,startDate,endDate);
        WebUtil.write(response, JsonUtil.map2Json(chartMap));
    }
    /**
     * 工程师事件处理情况统计
     * @author gaofazhan
     * @param model
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("incidentDealEngineerReport.html")
    public String incidentDealEngineerReport(Model model,HttpServletRequest request,HttpServletResponse response) {
        initModel(request,model);
        return "/business/pages/tj/incidentStatis/incidentDealEngineerReport";
    }
    @SuppressWarnings("rawtypes")
    @RequestMapping("incidentDealEngineerReportData.html")
    public String incidentDealEngineerReportData(Model model,HttpServletRequest request,HttpServletResponse response){
        Map param=ParamsMapUtil.getParameterMap(request);
        Map report = incidentStatisFacade.queryDealEngineerReportData(param);
        model.addAttribute("report", report);
        return "/business/pages/tj/incidentStatis/incidentDealEngineerReportData";
    }
}