song 3 months ago
parent
commit
a9658bbf9c

+ 9 - 2
src/main/java/com/dashitech/callcenter/socket/HandlerThread.java

@@ -327,7 +327,11 @@ public class HandlerThread  {
327
             if (callLog!=null){
327
             if (callLog!=null){
328
                 if (jsonObject.containsKey("dtmfa")&& StringUtils.isNotEmpty(jsonObject.get("dtmfa").toString())&&!jsonObject.get("dtmfa").toString().equals("")&&!jsonObject.get("dtmfa").toString().equals(" ")){
328
                 if (jsonObject.containsKey("dtmfa")&& StringUtils.isNotEmpty(jsonObject.get("dtmfa").toString())&&!jsonObject.get("dtmfa").toString().equals("")&&!jsonObject.get("dtmfa").toString().equals(" ")){
329
                     // 查询科室信息 并赋值
329
                     // 查询科室信息 并赋值
330
-                    getDeptByDTMFA(jsonObject.get("dtmfa").toString(), callLog);
330
+                    String dtmfa = jsonObject.get("dtmfa").toString();
331
+                    if (0 == callLog.getCallType() && callLog.getdTMFB() != null) {
332
+                        dtmfa = callLog.getdTMFB();
333
+                    }
334
+                    getDeptByDTMFA(dtmfa, callLog);
331
                 }else {
335
                 }else {
332
                     callLog.setCallDept("暂无");
336
                     callLog.setCallDept("暂无");
333
                 }
337
                 }
@@ -403,8 +407,8 @@ public class HandlerThread  {
403
                     callLog.setPhyIDA(jsonObject.get("phyIDA").toString());
407
                     callLog.setPhyIDA(jsonObject.get("phyIDA").toString());
404
                 }
408
                 }
405
                 if (jsonObject.containsKey("DTMFA")){
409
                 if (jsonObject.containsKey("DTMFA")){
406
-                    callLog.setdTMFA(jsonObject.get("DTMFA").toString());
407
                     getDeptByDTMFA(jsonObject.get("DTMFA").toString(), callLog);
410
                     getDeptByDTMFA(jsonObject.get("DTMFA").toString(), callLog);
411
+                    callLog.setdTMFA(jsonObject.get("DTMFA").toString());
408
                 }
412
                 }
409
                 if (jsonObject.containsKey("DTMFB")){
413
                 if (jsonObject.containsKey("DTMFB")){
410
                     callLog.setdTMFB(jsonObject.get("DTMFB").toString());
414
                     callLog.setdTMFB(jsonObject.get("DTMFB").toString());
@@ -438,6 +442,9 @@ public class HandlerThread  {
438
                     }
442
                     }
439
 //                    callLog.setCallState(1);
443
 //                    callLog.setCallState(1);
440
                 }
444
                 }
445
+                if (0 == callLog.getCallType() && callLog.getdTMFB() != null) {
446
+                    getDeptByDTMFA(callLog.getdTMFB(), callLog);
447
+                }
441
                 //是否接电话,1接了,0未接
448
                 //是否接电话,1接了,0未接
442
                 if (jsonObject.get("rstime") != null && StringUtils.isNotEmpty(jsonObject.get("rstime").toString())){
449
                 if (jsonObject.get("rstime") != null && StringUtils.isNotEmpty(jsonObject.get("rstime").toString())){
443
                     callLog.setCallState(1);
450
                     callLog.setCallState(1);