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
package cn.ksource.web.controller.business.pages.traffic;
 
import java.io.ByteArrayInputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
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.lhw.util.CRequest;
import com.lhw.util.CResponse;
import com.lhw.util.MyHttpPost;
 
import cn.ksource.beans.GG_USER;
import cn.ksource.beans.SC_WORKFLOW_INCIDENT;
import cn.ksource.config.SysConfigConstants;
import cn.ksource.core.page.PageInfo;
import cn.ksource.core.util.ConvertUtil;
import cn.ksource.core.util.DateUtil;
import cn.ksource.core.util.JsonUtil;
import cn.ksource.core.util.ParamsMapUtil;
import cn.ksource.core.util.StringUtil;
import cn.ksource.core.web.SysInfo;
import cn.ksource.core.web.SysInfoMsg;
import cn.ksource.core.web.WebUtil;
import cn.ksource.web.Constants;
import cn.ksource.web.facade.incident.IncidentFacade;
import cn.ksource.web.facade.timetask.TimeTaskFacade;
import cn.ksource.web.facade.traffic.TrafficFacade;
import cn.ksource.web.service.DataDictionaryService;
 
/**
 * 话务管理
 * @author 高发展
 *2018-04-09
 */
@Controller
@RequestMapping("/business/pages/traffic")
public class TrafficController {
    @Autowired
    private TrafficFacade trafficFacade;
    @Autowired
    private IncidentFacade incidentFacade;
    @Autowired
    private DataDictionaryService dataDictionaryService;
    @Autowired
    private TimeTaskFacade timeTaskFacade;
    /**
     * 通话记录
     * @param request
     * @return
     */
    @RequestMapping("trafficList.html")
    public ModelAndView trafficList(HttpServletRequest request){
        ModelAndView view=new ModelAndView("/business/pages/traffic/trafficList");
        return view;
    }
    /**
     * 通话记录数据
     * @param model
     * @param request
     * @return
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficData.html")
    public ModelAndView trafficData(Model model,HttpServletRequest request,PageInfo pageInfo){
        ModelAndView view=new ModelAndView("business/pages/traffic/trafficData");
        Map param=ParamsMapUtil.getParameterMap(request);
        PageInfo info=trafficFacade.getTrafficData(param, pageInfo);
        view.addObject("info", info);
        return view;
    }
    /**
     * 通话记录数据数量
     * @param model
     * @param request
     * @param response
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficCount.html")
    public void trafficCount(Model model,HttpServletRequest request,HttpServletResponse response){
        Map param=ParamsMapUtil.getParameterMap(request);
        Integer count = trafficFacade.getTrafficCount(param);
        WebUtil.write(response, count.toString());
    }
    /**
     * 跳转到工程师添加事件页面
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    @RequestMapping("trafficAddIncident.html")
    public ModelAndView engineerAddIncident(HttpServletRequest request) {
        ModelAndView view = new ModelAndView("/business/pages/traffic/addTrafficDesk");
        String orderId=request.getParameter("orderId");
        if(StringUtil.notEmpty(orderId)) {
            view.addObject("info", incidentFacade.getemplate(orderId));
        }else {
           Map map= new HashMap();
            map.put("happen_time",DateUtil.getCurrentDate14());
            view.addObject("info",map);
        }
        String repair = request.getParameter("repair");
 
        //查询事件类型数据字典
        List<Map> types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
        //取得事件类型的第一条数据
        if(null!=types && types.size()>0) {
            Map type = types.get(0);
            view.addObject("typeId", type.get("DATAKEY"));
            view.addObject("typeName", type.get("DATAVALUE"));
        }
        //查询申报方式数据字典
        List<Map> ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_APPLY_TYPE);
        //取得申报方式的第一条数据
        if(null!=ways && ways.size()>0) {
            Map way = ways.get(0);
            view.addObject("wayId", way.get("DATAKEY"));
            view.addObject("wayName", way.get("DATAVALUE"));
        }
        //查询事件来源数据字典
        List<Map> froms = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_SOURCE);
        //取得事件来源的第一条数据
        if(null!=froms && froms.size()>0) {
            Map from = froms.get(0);
            view.addObject("fromId", from.get("DATAKEY"));
            view.addObject("fromName", from.get("DATAVALUE"));
        }
        //事件来源为一键报修
        if(!StringUtil.isEmpty(repair)){
            view.addObject("fromId", Constants.INCIDENT_SOURCE_REPAIR_KEY);
            view.addObject("fromName", Constants.INCIDENT_SOURCE_REPAIR_VALUE);
        }
 
        //客户列表
        List<Map> cusList = incidentFacade.getCustomerList();
        view.addObject("customers", cusList);
        //查询事件优先级
        List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
        view.addObject("eventPri", eventPri);
        //查询事件影响度数据字典
        List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
        view.addObject("eventDg", eventDg);
 
        view.addObject("types", types);
        view.addObject("ways", ways);
        view.addObject("froms", froms);
 
        //定义参数Map
        Map<String,String> params = ParamsMapUtil.getParameterMap(request);
        params.put("userId", WebUtil.getLoginedUserId(request));
        params.put("type","2");
        Map map = incidentFacade.getOrderNum(params);
        view.addObject("data", map);
        view.addObject("data", map);
        view.addObject("tra_id", request.getParameter("tra_id"));
        view.addObject("mobile", request.getParameter("mobile"));
        return view;
    }
    /**
     * 工程师保存事件
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("saveTrafficIncident.html")
    public ModelAndView engineerSaveIncident(HttpServletRequest request,HttpServletResponse response,SC_WORKFLOW_INCIDENT sc_workflow_incident) {
        Map map = incidentFacade.saveIncident(request,sc_workflow_incident);
        String incidentId = ConvertUtil.obj2StrBlank(map.get("incidentId"));
        String result = ConvertUtil.obj2StrBlank(map.get("result"));
        String nouser = ConvertUtil.obj2StrBlank(map.get("nouser"));
        String type = request.getParameter("type");
        if(result.equals("1")) {
            SysInfoMsg msg = (SysInfoMsg)map.get("msg");
            if(type.equals("1")) {
                ModelAndView modelAndView = new ModelAndView("/business/pages/incident/success");
                modelAndView.addObject("type", type);
                modelAndView.addObject("incidentId", incidentId);
                modelAndView.addObject("sysInfo", "Success");
                modelAndView.addObject("message", "操作成功");
                modelAndView.addObject("info", msg);
                return modelAndView;
            } else if (type.equals("2")) {
                ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/endTask.html?incidentId="+incidentId);
                return modelAndView;
            } else if (type.equals("3")) {
                ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/closeReason.html?incidentId="+incidentId);
                return modelAndView;
            }
            
        } else {
            if(nouser.equals("1")){
                return WebUtil.sysInfoPage(request, "服务台角色下没有人员",
                        "",
                        SysInfo.Error,"");
            }else{
                return WebUtil.sysInfoPage(request, "操作失败!",
                        "",
                        SysInfo.Error,"");
            }
        }
        return null;
    }
    /**
     * 通话记录
     * @param request
     * @return
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficDetail.html")
    public ModelAndView trafficDetail(HttpServletRequest request){
        ModelAndView view=new ModelAndView("/business/pages/traffic/trafficDetail");
        Map param=ParamsMapUtil.getParameterMap(request);
        Map info=trafficFacade.getTraffic(param);
        view.addObject("info", info);
        return view;
    }
    /**
     * 通话记录数据
     * @param model
     * @param request
     * @return
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficAddData.html")
    public ModelAndView trafficAddData(Model model,HttpServletRequest request,PageInfo pageInfo){
        ModelAndView view=new ModelAndView("business/pages/traffic/trafficAddData");
        Map param=ParamsMapUtil.getParameterMap(request);
        PageInfo info=trafficFacade.getTrafficData(param, pageInfo);
        view.addObject("info", info);
        return view;
    }
    /**
     * 通话记录数据数量
     * @param model
     * @param request
     * @param response
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficAddCount.html")
    public void trafficAddCount(Model model,HttpServletRequest request,HttpServletResponse response){
        Map param=ParamsMapUtil.getParameterMap(request);
        Integer count = trafficFacade.getTrafficCount(param);
        WebUtil.write(response, count.toString());
    }
    /**
     * 工单记录数据
     * @param model
     * @param request
     * @return
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficOrderData.html")
    public ModelAndView trafficOrderData(Model model,HttpServletRequest request,PageInfo pageInfo){
        ModelAndView view=new ModelAndView("business/pages/traffic/trafficOrderData");
        Map param=ParamsMapUtil.getParameterMap(request);
        PageInfo info=trafficFacade.getTrafficOrderData(param, pageInfo);
        view.addObject("info", info);
        return view;
    }
    /**
     * 工单记录数据数量
     * @param model
     * @param request
     * @param response
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping("trafficOrderCount.html")
    public void trafficOrderCount(Model model,HttpServletRequest request,HttpServletResponse response){
        Map param=ParamsMapUtil.getParameterMap(request);
        Integer count = trafficFacade.getTrafficOrderCount(param);
        WebUtil.write(response, count.toString());
        
    }
    @SuppressWarnings({ "unused", "unchecked", "rawtypes" })
    @RequestMapping("saveTraffic.html")
    public void saveTraffic(HttpServletRequest request,HttpServletResponse response){
        String str=request.getParameter("req");
        System.out.println(str);
        String strs[]=str.split(",");
        Map param=new HashMap();
        param.put("H", strs[0].replace("H=",""));
        param.put("ch", strs[1].replace("ch=",""));
        param.put("ph", strs[2].replace("ph=",""));
        param.put("sp", strs[3].replace("sp=",""));
        param.put("ty", strs[4].replace("ty=",""));
        param.put("tm", ConvertUtil.obj2StrBlank(DateUtil.getCurrentDate6()).substring(0, 2)+strs[5].replace("tm=",""));
        param.put("op", strs[6].replace("op=",""));
        param.put("sn", strs[7].replace("sn=",""));
        param.put("so", strs[8].replace("so=",""));
        param.put("cu", strs[9].replace("cu=",""));
        param.put("dm", strs[10].replace("dm=",""));
        Map user = WebUtil.getLoginUser(request).getLoginUser();
        String userId = ConvertUtil.obj2StrBlank(user.get("ID"));
        String userName = ConvertUtil.obj2StrBlank(user.get("ZSXM"));
        param.put("userId", userId);
        param.put("userName", userName);
        Map result=trafficFacade.saveTraffic(param);
        WebUtil.write(response, JsonUtil.map2Json(result));
    }
    @SuppressWarnings({ "unchecked", "rawtypes" })
    @RequestMapping("updateTraffic.html")
    public void updateTraffic( HttpServletRequest request,HttpServletResponse response){
         Map param=ParamsMapUtil.getParameterMap(request);
         System.out.println("222222222222222");
            List<Map> list=new LinkedList<Map>();
            try {
                list=dom4jReadXMLFile();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            String code=request.getParameter("sn");
            System.out.println("code:"+code);
            String time="";
            if(list.size()>0){
                for(Map map:list){
                    String sn=ConvertUtil.obj2StrBlank(map.get("sn"));
                    if(sn.equals(code)){
                        time=ConvertUtil.obj2StrBlank(map.get("tme"));
                        param.put("time", time);
                    }
                }
            }
            if(StringUtil.notEmpty(time)){
                trafficFacade.updateTraffic(param);
                System.out.println("11111111111111111");
            }
            
    }
    public static String ls() throws Exception{
         MyHttpPost myHttpPostProxy=new MyHttpPost();        
               CRequest reqProxy=new CRequest();
            reqProxy.setParameter("vo_id","getCustCall");
            reqProxy.setParameter("_secs_","lcall");
            String time="";
            Long now=DateUtil.getCurrentDate8();
            time=ConvertUtil.obj2StrBlank(now).substring(0, 4)+"-"+ConvertUtil.obj2StrBlank(now).substring(4, 6)+ConvertUtil.obj2StrBlank(now).substring(6, 8);
            reqProxy.setParameter("call_date_start",time);
            
            String vproxyURL="http://"+SysConfigConstants.CALL_PATH+":"+SysConfigConstants.CALL_DK+"/v/vack";
            
            
            CResponse repProxy=myHttpPostProxy.sendRequest_XML_V4(reqProxy,vproxyURL);
            int rcode=repProxy.getRCode();
            
            if(rcode!=0){
                System.out.println("sendRequestWithTag error="+rcode+repProxy.getmsg());
                return null;
            }else{
                System.out.println(repProxy.getParameter("xml"));
                return ConvertUtil.obj2StrBlank(repProxy.getParameter("xml"));
            }
            
    }
     @SuppressWarnings({ "unchecked", "rawtypes" })
    private static List<Map> dom4jReadXMLFile() throws Exception {  
         String ls=ls();
         ls.replace("utf-8", "utf8");
         ByteArrayInputStream tInputStringStream = new ByteArrayInputStream(ls.getBytes("UTF-8"));
         List<Map> trafficList=new LinkedList<Map>();
            // Dom4j解析books.xml  
            // 创建的对象reader  
            SAXReader reader = new SAXReader();  
            reader.setEncoding("UTF-8");
            try {  
                // 通过reader对象的read方法加载books.xml文件,获取document对象  
                Document document = reader.read(tInputStringStream); 
                reader.setEncoding("UTF8");
                // 通过document对象获取根节点bookstore  
                Element bookstore = document.getRootElement();  
                // 通过element对象的elementIterator方法获取迭代器  
                Iterator it = bookstore.elementIterator();  
                // 全局变量记录第几本书籍  
                int num = 0;  
                // 遍历迭代器,获取根节点中的信息(书籍)  
                while (it.hasNext()) {  
                    Map map=new HashMap();
                    num++;  
                    Element book = (Element) it.next();  
                    // 获取book的属性名以及属性值  
                    List<Attribute> bookAttrs = book.attributes();  
                    for (Attribute attr : bookAttrs) {  
                        System.out.println("属性名:" + attr.getName() + "--属性值:"  
                                + attr.getStringValue());  
                        map.put("id", attr.getStringValue())  ;
                    }  
                    // 解析子节点的信息  
                    Iterator itt = book.elementIterator();  
                    while (itt.hasNext()) {  
                        Element bookChild = (Element) itt.next();  
                        if (bookChild.getName().equals("id")) {  
                            map.put("idTwo", bookChild.getStringValue());  
                        }  
                        if (bookChild.getName().equals("sn")) {  
                             map.put("sn",bookChild.getStringValue());  
                        }  
                        if (bookChild.getName().equals("tms")) {  
                            map.put("tms",bookChild.getStringValue());  
                        }  
                        if (bookChild.getName().equals("tme")) {  
                            map.put("tme",bookChild.getStringValue());  
                        }  
                    }  
                    trafficList.add(map);  
                }  
            } catch (DocumentException e) {  
                e.printStackTrace();  
            }  
            return trafficList;
        }  
    
     /**
         * 跳转到工程师添加事件页面
         */
        @SuppressWarnings({ "unchecked", "rawtypes" })
        @RequestMapping("trafficYyAddIncident.html")
        public ModelAndView engineerAddIncidentYy(HttpServletRequest request) {
            ModelAndView view = new ModelAndView("/business/pages/traffic/addTrafficYyDesk");
            String orderId=request.getParameter("orderId");
            if(StringUtil.notEmpty(orderId)) {
                view.addObject("info", incidentFacade.getemplate(orderId));
            }else {
               Map map= new HashMap();
                map.put("happen_time",DateUtil.getCurrentDate14());
                view.addObject("info",map);
            }
            String repair = request.getParameter("repair");
 
            //查询事件类型数据字典
            List<Map> types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
            //取得事件类型的第一条数据
            if(null!=types && types.size()>0) {
                Map type = types.get(0);
                view.addObject("typeId", type.get("DATAKEY"));
                view.addObject("typeName", type.get("DATAVALUE"));
            }
            //查询申报方式数据字典
            List<Map> ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_APPLY_TYPE);
            //取得申报方式的第一条数据
            if(null!=ways && ways.size()>0) {
                Map way = ways.get(0);
                view.addObject("wayId", way.get("DATAKEY"));
                view.addObject("wayName", way.get("DATAVALUE"));
            }
            //查询事件来源数据字典
            List<Map> froms = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_SOURCE);
            //取得事件来源的第一条数据
            if(null!=froms && froms.size()>0) {
                Map from = froms.get(0);
                view.addObject("fromId", from.get("DATAKEY"));
                view.addObject("fromName", from.get("DATAVALUE"));
            }
            //事件来源为一键报修
            if(!StringUtil.isEmpty(repair)){
                view.addObject("fromId", Constants.INCIDENT_SOURCE_REPAIR_KEY);
                view.addObject("fromName", Constants.INCIDENT_SOURCE_REPAIR_VALUE);
            }
 
            //客户列表
            List<Map> cusList = incidentFacade.getCustomerList();
            view.addObject("customers", cusList);
            //查询事件优先级
            List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
            view.addObject("eventPri", eventPri);
            //查询事件影响度数据字典
            List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
            view.addObject("eventDg", eventDg);
 
            view.addObject("types", types);
            view.addObject("ways", ways);
            view.addObject("froms", froms);
 
            //定义参数Map
            Map<String,String> params = ParamsMapUtil.getParameterMap(request);
            params.put("userId", WebUtil.getLoginedUserId(request));
            params.put("type","2");
            Map map = incidentFacade.getOrderNum(params);
            view.addObject("data", map);
            view.addObject("data", map);
            view.addObject("mobile", request.getParameter("mobile"));
            return view;
        }
        @RequestMapping("saveTrafficYy.html")
        public void saveTrafficYy(HttpServletRequest request,HttpServletResponse response){
            String userId=WebUtil.getLoginedUserId(request);
            GG_USER user=new GG_USER(userId).getInstanceById();
            Map result=new HashMap();
            result.put("msg", "1");
            String gh=user.getGh();
            if(gh!=null){
                if(gh.equals("801")){
                    result=timeTaskFacade.saveTrafficYy();
                    WebUtil.write(response, JsonUtil.map2Json(result));
                }else{
                    WebUtil.write(response, JsonUtil.map2Json(result));
                }
            }else{
                WebUtil.write(response, JsonUtil.map2Json(result));
            }
        }
        /**
         * 北京优音工单记录数据
         * @param model
         * @param request
         * @return
         */
        @SuppressWarnings("rawtypes")
        @RequestMapping("trafficOrderDataTwo.html")
        public ModelAndView trafficOrderDataTwo(Model model,HttpServletRequest request,PageInfo pageInfo){
            ModelAndView view=new ModelAndView("business/pages/traffic/trafficOrderData");
            Map param=ParamsMapUtil.getParameterMap(request);
            PageInfo info=trafficFacade.getTrafficOrderDataTwo(param, pageInfo);
            view.addObject("info", info);
            return view;
        }
        /**
         * 工单记录数据数量
         * @param model
         * @param request
         * @param response
         */
        @SuppressWarnings("rawtypes")
        @RequestMapping("trafficOrderCountTwo.html")
        public void trafficOrderCountTwo(Model model,HttpServletRequest request,HttpServletResponse response){
            Map param=ParamsMapUtil.getParameterMap(request);
            Integer count = trafficFacade.getTrafficOrderCountTwo(param);
            WebUtil.write(response, count.toString());
            
        }
        /**
         * 工程师保存事件
         */
        @SuppressWarnings("rawtypes")
        @RequestMapping("saveTrafficYyIncident.html")
        public ModelAndView engineerSaveIncidentTwo(HttpServletRequest request,HttpServletResponse response,SC_WORKFLOW_INCIDENT sc_workflow_incident) {
            Map map = incidentFacade.saveIncident(request,sc_workflow_incident);
            String incidentId = ConvertUtil.obj2StrBlank(map.get("incidentId"));
            String result = ConvertUtil.obj2StrBlank(map.get("result"));
            String nouser = ConvertUtil.obj2StrBlank(map.get("nouser"));
            String type = request.getParameter("type");
            if(result.equals("1")) {
                SysInfoMsg msg = (SysInfoMsg)map.get("msg");
                if(type.equals("1")) {
                    ModelAndView modelAndView = new ModelAndView("/business/pages/incident/success");
                    modelAndView.addObject("type", type);
                    modelAndView.addObject("incidentId", incidentId);
                    modelAndView.addObject("sysInfo", "Success");
                    modelAndView.addObject("message", "操作成功");
                    modelAndView.addObject("info", msg);
                    return modelAndView;
                } else if (type.equals("2")) {
                    ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/endTask.html?incidentId="+incidentId);
                    return modelAndView;
                } else if (type.equals("3")) {
                    ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/closeReason.html?incidentId="+incidentId);
                    return modelAndView;
                }
                
            } else {
                if(nouser.equals("1")){
                    return WebUtil.sysInfoPage(request, "服务台角色下没有人员",
                            "",
                            SysInfo.Error,"");
                }else{
                    return WebUtil.sysInfoPage(request, "操作失败!",
                            "",
                            SysInfo.Error,"");
                }
            }
            return null;
        }
 
        
}