diff --git a/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java b/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java index 46e461c25a113df6da92a73f1891a3e46f569e6b..158517a6417d56150b7033f29022f51cc6777ac3 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java @@ -105,11 +105,11 @@ public class ACDAgentService { ctx.getAgentService().getStatus())) { // 通知消息到坐席 MainContext.getPeerSyncIM().send(MainContext.ReceiverType.AGENT, - MainContext.ChannelType.WEBIM, - ctx.getAppid(), - MainContext.MessageType.NEW, - ctx.getAgentService().getAgentno(), - ctx, true); + MainContext.ChannelType.WEBIM, + ctx.getAppid(), + MainContext.MessageType.NEW, + ctx.getAgentService().getAgentno(), + ctx, true); } /** @@ -126,8 +126,8 @@ public class ACDAgentService { } MainContext.getPeerSyncIM().send(MainContext.ReceiverType.VISITOR, - MainContext.ChannelType.WEBIM, ctx.getAppid(), - MainContext.MessageType.NEW, ctx.getOnlineUserId(), outMessage, true); + MainContext.ChannelType.WEBIM, ctx.getAppid(), + MainContext.MessageType.NEW, ctx.getOnlineUserId(), outMessage, true); } else { @@ -149,7 +149,7 @@ public class ACDAgentService { final String agentno, final AgentUser agentUser, final String orgi - ) throws Exception { + ) throws Exception { final AgentStatus agentStatus = cache.findOneAgentStatusByAgentnoAndOrig(agentno, orgi); return pickupAgentUserInQueue(agentUser, agentStatus); } @@ -171,8 +171,8 @@ public class ACDAgentService { return; } logger.info("[assignVisitors] agentStatus id {}, status {}, service {}/{}, skills {}, busy {}", - agentStatus.getId(), agentStatus.getStatus(), agentStatus.getUsers(), agentStatus.getMaxusers(), - HashMapUtils.concatKeys(agentStatus.getSkills(), "|"), agentStatus.isBusy()); + agentStatus.getId(), agentStatus.getStatus(), agentStatus.getUsers(), agentStatus.getMaxusers(), + HashMapUtils.concatKeys(agentStatus.getSkills(), "|"), agentStatus.isBusy()); if ((!StringUtils.equals( MainContext.AgentStatusEnum.READY.toString(), agentStatus.getStatus())) || agentStatus.isBusy()) { @@ -276,12 +276,12 @@ public class ACDAgentService { MainContext.ReceiverType.VISITOR, MainContext.ChannelType.toValue(agentUser.getChannel()), agentUser.getAppid(), MainContext.MessageType.STATUS, agentUser.getUserid(), outMessage, true - ); + ); // 向坐席推送消息 peerSyncIM.send(MainContext.ReceiverType.AGENT, MainContext.ChannelType.WEBIM, - agentUser.getAppid(), - MainContext.MessageType.NEW, agentUser.getAgentno(), outMessage, true); + agentUser.getAppid(), + MainContext.MessageType.NEW, agentUser.getAgentno(), outMessage, true); } } catch (Exception ex) { logger.warn("[assignVisitors] fail to process service", ex); @@ -395,15 +395,15 @@ public class ACDAgentService { MainContext.ReceiverType.VISITOR, MainContext.ChannelType.toValue(agentUser.getChannel()), agentUser.getAppid(), MainContext.MessageType.STATUS, agentUser.getUserid(), outMessage, true - ); + ); if (agentStatus != null) { // 坐席在线,通知结束会话 outMessage.setChannelMessage(agentUser); outMessage.setAgentUser(agentUser); peerSyncIM.send(MainContext.ReceiverType.AGENT, MainContext.ChannelType.WEBIM, - agentUser.getAppid(), - MainContext.MessageType.END, agentUser.getAgentno(), outMessage, true); + agentUser.getAppid(), + MainContext.MessageType.END, agentUser.getAgentno(), outMessage, true); } break; case PHONE: @@ -488,9 +488,15 @@ public class ACDAgentService { final AgentUser agentUser, final String orgi, final boolean finished) { + AgentService agentService = new AgentService(); if (StringUtils.isNotBlank(agentUser.getAgentserviceid())) { - agentService.setId(agentUser.getAgentserviceid()); + AgentService existAgentService = agentServiceRes.findByIdAndOrgi(agentUser.getAgentserviceid(), orgi); + if (existAgentService != null) { + agentService = existAgentService; + } else { + agentService.setId(agentUser.getAgentserviceid()); + } } agentService.setOrgi(orgi); diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java index cd51d2b6ae1d20e0137eb237ffd574bdb4766a49..55ac78678b8cd1fd1f6b1f3078a77516f35d9e04 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java @@ -665,12 +665,13 @@ public class IMController extends Handler { } else { report = acdWorkMonitor.getAgentReport(invite.getOrgi()); } - + boolean isLeavemsg = false; if (report.getAgents() == 0 || (sessionConfig.isHourcheck() && !MainUtils.isInWorkingHours(sessionConfig.getWorkinghours()) && invite.isLeavemessage())) { // 没有坐席在线,进入留言 + isLeavemsg = true; boolean isInWorkingHours = MainUtils.isInWorkingHours(sessionConfig.getWorkinghours()); map.addAttribute("isInWorkingHours", isInWorkingHours); view = request(super.createRequestPageTempletResponse("/apps/im/leavemsg")); @@ -846,7 +847,7 @@ public class IMController extends Handler { "/apps/im/chatbot/mobile")); // 智能机器人 移动端 } } else { - if (MobileDevice.isMobile(request.getHeader("User-Agent")) || StringUtils.isNotBlank(mobile)) { + if (!isLeavemsg && (MobileDevice.isMobile(request.getHeader("User-Agent")) || StringUtils.isNotBlank(mobile))) { view = request( super.createRequestPageTempletResponse("/apps/im/mobile")); // WebIM移动端。再次点选技能组? } diff --git a/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml b/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml index f0d1305d30b2964d176e50f38577d909fe53e92b..28a311cd9ba5f00f9e7a9076efb9780a08ee9dd2 100644 --- a/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml +++ b/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml @@ -4,23 +4,23 @@ AND agentskill = '${skill!''}' <#if agent?? && agent!=""> AND agentno = '${agent!''}' <#if orgi?? && orgi!=""> AND orgi = '${orgi!''}' <#if begin?? && begin!=""> AND satistime >= str_to_date('${begin!''}', '%Y-%m-%d %H:%i:%s') <#if end?? && end!=""> AND satistime <= str_to_date('${end!''} 23:59:59', '%Y-%m-%d %H:%i:%s') + select * from uk_agentservice where satisfaction = 1 <#if skill?? && skill!=""> AND agentskill = '${skill!''}' <#if agent?? && agent!=""> AND agentno = '${agent!''}' <#if orgi?? && orgi!=""> AND orgi = '${orgi!''}' <#if begin?? && begin!=""> AND satistime >= str_to_date('${begin!''}', '%Y-%m-%d %H:%i:%s') <#if end?? && end!=""> AND satistime <= str_to_date('${end!''} 23:59:59', '%Y-%m-%d %H:%i:%s') ]]> - +
-
+
-
+ diff --git a/contact-center/app/src/main/resources/static/css/entim.css b/contact-center/app/src/main/resources/static/css/entim.css index 59ab4c3cea4cbbcd476146771c3a97d42ae49c4b..3ba0b04c0590a9f720bf0defefa5fb7ebfbe9de1 100644 --- a/contact-center/app/src/main/resources/static/css/entim.css +++ b/contact-center/app/src/main/resources/static/css/entim.css @@ -536,6 +536,8 @@ input,textarea{ border: 1px solid #b2e5f9; float: right; min-width: 25px; + max-width: 400px; + word-break: break-all; } .chatting-right div.chat-content a{ color:#4665d4; diff --git a/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/image/image.js b/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/image/image.js index 41381a7d450ab9db18b28436a28c8833f285301d..2867de39d9d3b18a5533c54224a69168364afa29 100644 --- a/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/image/image.js +++ b/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/image/image.js @@ -79,9 +79,11 @@ KindEditor.plugin('image', function(K) { //file '
', hiddenElements.join(''), - '', + '', '  ', '', + '
图片支持:png、jpeg、jpg
', + '
图片上限:20MB
', '
', '', '', diff --git a/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/insertfile/insertfile.js b/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/insertfile/insertfile.js index 4ae06ec3c975d6757cb1d0bbf2d22b782f3d419e..5925a8883b0e1e2e9d20bfb619e7bae5b8b7338d 100644 --- a/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/insertfile/insertfile.js +++ b/contact-center/app/src/main/resources/static/im/js/kindeditor/plugins/insertfile/insertfile.js @@ -21,14 +21,16 @@ KindEditor.plugin('insertfile', function(K) { fileTitle = K.undef(options.fileTitle, ''), clickFn = options.clickFn; var html = [ - '
', + '
', '
', - '', + '', '  ', '  ', '', '', '', + '
文档支持:doc/docx、xls/xlsx、pdf
', + '
文档上限:20MB
', '
', //title diff --git a/contact-center/app/src/main/resources/static/js/kindeditor/plugins/image/image.js b/contact-center/app/src/main/resources/static/js/kindeditor/plugins/image/image.js index 41381a7d450ab9db18b28436a28c8833f285301d..2867de39d9d3b18a5533c54224a69168364afa29 100644 --- a/contact-center/app/src/main/resources/static/js/kindeditor/plugins/image/image.js +++ b/contact-center/app/src/main/resources/static/js/kindeditor/plugins/image/image.js @@ -79,9 +79,11 @@ KindEditor.plugin('image', function(K) { //file '
', hiddenElements.join(''), - '', + '', '  ', '', + '
图片支持:png、jpeg、jpg
', + '
图片上限:20MB
', '
', '', '
', diff --git a/contact-center/app/src/main/resources/static/js/kindeditor/plugins/insertfile/insertfile.js b/contact-center/app/src/main/resources/static/js/kindeditor/plugins/insertfile/insertfile.js index 4ae06ec3c975d6757cb1d0bbf2d22b782f3d419e..5925a8883b0e1e2e9d20bfb619e7bae5b8b7338d 100644 --- a/contact-center/app/src/main/resources/static/js/kindeditor/plugins/insertfile/insertfile.js +++ b/contact-center/app/src/main/resources/static/js/kindeditor/plugins/insertfile/insertfile.js @@ -21,14 +21,16 @@ KindEditor.plugin('insertfile', function(K) { fileTitle = K.undef(options.fileTitle, ''), clickFn = options.clickFn; var html = [ - '
', + '
', '
', - '', + '', '  ', '  ', '', '', '', + '
文档支持:doc/docx、xls/xlsx、pdf
', + '
文档上限:20MB
', '
', //title diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html index f5f1f99c67939fcacd85a2f4e6c6ee18ea4c2011..472f67308d97bd8d659d33c9d8b16c345698d4ed 100644 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html +++ b/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html @@ -2,6 +2,12 @@
+ + + + + +

基本信息

diff --git a/contact-center/app/src/main/resources/templates/apps/entim/chat.html b/contact-center/app/src/main/resources/templates/apps/entim/chat.html index 8e1b61db001449f32ccaa06a97d92f25e5d85e00..799f22f33cf45c4c0068f761d1c51f442cde36cd 100644 --- a/contact-center/app/src/main/resources/templates/apps/entim/chat.html +++ b/contact-center/app/src/main/resources/templates/apps/entim/chat.html @@ -240,7 +240,7 @@ ,element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 }); var hostname = location.hostname ; - var socket = io.connect(top.schema+"://"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}&contextid=${contextid!''}",{transports: ['websocket'], upgrade: false}); + var socket = io.connect(location.protocol+"//"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}&contextid=${contextid!''}",{transports: ['websocket'], upgrade: false}); socket.on('message', function(data) { console.log('message', data); data.createtime = formatDate(data.createtime); diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/index.html b/contact-center/app/src/main/resources/templates/apps/entim/group/index.html index ecc227d80131b14fce8d953c48f6a394344dfa5f..427b01058a68583f106e0fcf3801a4f8ae5fad7b 100644 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/index.html +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/index.html @@ -237,7 +237,7 @@ ,element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 }); var hostname = location.hostname ; - var socket = io.connect(top.schema+"://"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}&contextid=${contextid!''}&group=${contextid!''}",{transports: ['websocket'], upgrade: false}); + var socket = io.connect(location.protocol+"//"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}&contextid=${contextid!''}&group=${contextid!''}",{transports: ['websocket'], upgrade: false}); socket.on('message', function(data) { data.createtime = formatDate(data.createtime); diff --git a/contact-center/app/src/main/resources/templates/apps/entim/index.html b/contact-center/app/src/main/resources/templates/apps/entim/index.html index c30264190fe05c03dc40d63854ee89446080fa05..8addd8774b4ced8eea028f69f18936c7761721f4 100644 --- a/contact-center/app/src/main/resources/templates/apps/entim/index.html +++ b/contact-center/app/src/main/resources/templates/apps/entim/index.html @@ -201,7 +201,7 @@ $(this).children().first().html(''); } }) ; - var socket = io.connect(top.schema+"://"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}"); + var socket = io.connect(location.protocol+"//"+top.hostname+":"+top.port+"/im/ent?userid=${user.id!''!''}&orgi=${user.orgi!''}"); socket.on('connect',function(){ //service.sendRequestMessage(); //output(''+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'' , 'message callOutConnect-message'); diff --git a/contact-center/app/src/main/resources/templates/apps/entim/point.html b/contact-center/app/src/main/resources/templates/apps/entim/point.html index a68639716448d919d1a7f7bf39f078c4d53c89b4..d17009b4cf943bea40e30ec06a334cb00252dc30 100644 --- a/contact-center/app/src/main/resources/templates/apps/entim/point.html +++ b/contact-center/app/src/main/resources/templates/apps/entim/point.html @@ -11,7 +11,7 @@