|
|
@@ -7,6 +7,7 @@ import midware.entity.database.rep.Ivr;
|
|
7
|
7
|
import midware.entity.input.CodeInput;
|
|
8
|
8
|
import midware.model.AjaxResult;
|
|
9
|
9
|
import midware.service.eslclient.EslCommon;
|
|
|
10
|
+import midware.service.eslclient.entity.Agent;
|
|
10
|
11
|
import midware.service.eslclient.entity.Channel;
|
|
11
|
12
|
import midware.service.eslclient.entity.Session;
|
|
12
|
13
|
import midware.service.init.EslClientService;
|
|
|
@@ -81,6 +82,34 @@ public class HomeController extends BaseController {
|
|
81
|
82
|
map.put("groupWaitList",EslCommon.groupWaitList);
|
|
82
|
83
|
return Success("",map );
|
|
83
|
84
|
}
|
|
|
85
|
+ @GetMapping("/esl/del/{type}/{id}")
|
|
|
86
|
+ public AjaxResult delEsl(@PathVariable int type,@PathVariable String id) {
|
|
|
87
|
+ Object obj=null;
|
|
|
88
|
+ switch (type) {
|
|
|
89
|
+ case 1:
|
|
|
90
|
+ Agent a = EslCommon.getAgent(id);
|
|
|
91
|
+ if (a != null) EslCommon.agents.remove(a);
|
|
|
92
|
+ obj=EslCommon.agents;
|
|
|
93
|
+ break;
|
|
|
94
|
+ case 2:
|
|
|
95
|
+ Channel c=EslCommon.getChanByNumber(id);
|
|
|
96
|
+ if (c != null) EslCommon.channels.remove(c);
|
|
|
97
|
+ obj=EslCommon.channels;
|
|
|
98
|
+ break;
|
|
|
99
|
+ case 3:
|
|
|
100
|
+ Session s=EslCommon.getSessionById(id);
|
|
|
101
|
+ if (s != null) EslCommon.sessions.remove(s);
|
|
|
102
|
+ obj=EslCommon.sessions;
|
|
|
103
|
+ break;
|
|
|
104
|
+ case 4:
|
|
|
105
|
+ for (List<String> values : EslCommon.groupWaitList.values()) {
|
|
|
106
|
+ values.remove(id);
|
|
|
107
|
+ }
|
|
|
108
|
+ obj=EslCommon.groupWaitList;
|
|
|
109
|
+ break;
|
|
|
110
|
+ }
|
|
|
111
|
+ return Success("",obj);
|
|
|
112
|
+ }
|
|
84
|
113
|
|
|
85
|
114
|
@GetMapping("/midware/{type}")
|
|
86
|
115
|
public AjaxResult Midware(@PathVariable int type) {
|