|
@@ -449,7 +449,13 @@ public class HandlerThread {
|
449
|
449
|
return "暂无";
|
450
|
450
|
}
|
451
|
451
|
//给来电科室赋值
|
452
|
|
- String deptName = departmentDAO.getDeptNameByPhone(phone);
|
|
452
|
+ String deptName = "";
|
|
453
|
+ if("HSMS".equals(projectMain)) {
|
|
454
|
+ deptName = hsmsCallLogDAO.getDeptNameByPhone(phone);
|
|
455
|
+ } else { //其它,以运维项目为主
|
|
456
|
+ deptName = departmentDAO.getDeptNameByPhone(phone);
|
|
457
|
+ }
|
|
458
|
+
|
453
|
459
|
if (deptName!=null&&!deptName.equals("")){
|
454
|
460
|
return deptName;
|
455
|
461
|
}else {
|
|
@@ -572,7 +578,8 @@ public class HandlerThread {
|
572
|
578
|
}
|
573
|
579
|
|
574
|
580
|
private void saveHsmsCallLog(CallLogEntity callLog,String uuid) {
|
575
|
|
- log.info("开始保存HSMS通话记录2");
|
|
581
|
+ log.info("开始保存HSMS通话记录");
|
|
582
|
+ log.info(callLog);
|
576
|
583
|
HsmsCallLogEntity hsmsCallLog = null;
|
577
|
584
|
|
578
|
585
|
try {
|
|
@@ -580,10 +587,11 @@ public class HandlerThread {
|
580
|
587
|
String hosId = hsmsCallLogDAO.selectSernelNo("sernelNo",serialNo);
|
581
|
588
|
|
582
|
589
|
if(StringUtils.isNotEmpty(uuid)) {
|
583
|
|
- Long id = callRecordDAO.selectIdByUuid(uuid);
|
|
590
|
+ Long id = hsmsCallLogDAO.selectIdByUuid(uuid);
|
584
|
591
|
if(id == null) {
|
585
|
592
|
hsmsCallLog = new HsmsCallLogEntity();
|
586
|
593
|
copyCallLog(callLog,hsmsCallLog);
|
|
594
|
+ hsmsCallLog.setVersion(0);
|
587
|
595
|
hsmsCallLog.setCallAccept(uuid);
|
588
|
596
|
hsmsCallLog.setHosId(StringUtils.isEmpty(hosId)? null : Integer.valueOf(hosId));
|
589
|
597
|
hsmsCallLogDAO.save(hsmsCallLog);
|
|
@@ -595,25 +603,28 @@ public class HandlerThread {
|
595
|
603
|
log.info("开始匹配HSMS临时通话记录");
|
596
|
604
|
hsmsCallLog = hsmsCallLogDAO.selectByParams(callLog.getdTMFA(), callLog.getdTMFB(), callLog.getResponseTime());
|
597
|
605
|
if(hsmsCallLog == null) { //新增
|
|
606
|
+ log.info("HSMS未匹配到,开始新增");
|
598
|
607
|
hsmsCallLog = new HsmsCallLogEntity();
|
599
|
|
- copyCallLog(callLog,hsmsCallLog);
|
600
|
|
- hsmsCallLog.setVersion(0);
|
|
608
|
+ callLog.setVersion(0);
|
601
|
609
|
hsmsCallLog.setCallAccept(UUID.randomUUID().toString());
|
602
|
|
- hsmsCallLog.setHosId(StringUtils.isEmpty(hosId)? null : Integer.valueOf(hosId));
|
603
|
610
|
}
|
|
611
|
+
|
|
612
|
+ copyCallLog(callLog,hsmsCallLog);
|
|
613
|
+ hsmsCallLog.setHosId(StringUtils.isEmpty(hosId)? null : Integer.valueOf(hosId));
|
|
614
|
+
|
604
|
615
|
if(callLog.getPath() != null && StringUtils.isNotEmpty(callLog.getPath())) {
|
605
|
|
- String newPath = callLog.getPath();
|
606
|
|
- String[] arr = callLog.getPath().split(recordRegex);
|
607
|
|
- if (arr.length > 1) {
|
608
|
|
- newPath = recordNginxPath + arr[1];
|
609
|
|
- }
|
610
|
|
- hsmsCallLog.setPath(newPath);
|
|
616
|
+// String newPath = callLog.getPath();
|
|
617
|
+// String[] arr = callLog.getPath().split(recordRegex);
|
|
618
|
+// if (arr.length > 1) {
|
|
619
|
+// newPath = recordNginxPath + arr[1];
|
|
620
|
+// }
|
|
621
|
+// hsmsCallLog.setPath(newPath);
|
611
|
622
|
}else {
|
612
|
623
|
log.info("HSMS callLog 保存没有路径path");
|
613
|
624
|
return;
|
614
|
625
|
}
|
615
|
626
|
hsmsCallLogDAO.save(hsmsCallLog);
|
616
|
|
- log.info("保存HSMS通话记录2完成!");
|
|
627
|
+ log.info("保存HSMS通话记录完成!");
|
617
|
628
|
}
|
618
|
629
|
|
619
|
630
|
log.info("保存HSMS通话记录完成:"+hsmsCallLog.getCallAccept());
|
|
@@ -625,10 +636,8 @@ public class HandlerThread {
|
625
|
636
|
}
|
626
|
637
|
|
627
|
638
|
private HsmsCallLogEntity copyCallLog(CallLogEntity callLog,HsmsCallLogEntity hsmsCallLog) {
|
628
|
|
- hsmsCallLog.setId(callLog.getId());
|
629
|
639
|
hsmsCallLog.setVersion(callLog.getVersion());
|
630
|
640
|
hsmsCallLog.setHosId(callLog.getHosId());
|
631
|
|
- hsmsCallLog.setCallAccept(callLog.getCallDept());
|
632
|
641
|
hsmsCallLog.setCallDept(callLog.getCallDept());
|
633
|
642
|
hsmsCallLog.setPhyIDA(callLog.getPhyIDA());
|
634
|
643
|
hsmsCallLog.setdTMFA(callLog.getdTMFA());
|