duhongyu %!s(int64=9) %!d(string=před) měsíci
rodič
revize
78079664e6

+ 14 - 0
hjzx-api/src/main/java/api/controller/call/CallLogController.java

@@ -66,6 +66,20 @@ public class CallLogController extends BaseController {
66 66
         qw.eq(input.getOpType() != null , CallLog::getOpType, input.getOpType());
67 67
         qw.eq(input.getMyd() != null , CallLog::getMyd, input.getMyd());
68 68
         qw.eq(!StringHelper.isEmpty(input.getWorkordercode()), CallLog::getWorkordercode, input.getWorkordercode());
69
+        if (input.getWaitContrast()!=null&&input.getWaitContrast()>0&&input.getWaitTimes()!=null
70
+        &&input.getWaitTimes()>0)
71
+        {
72
+            String Contrast=">=";
73
+            if (input.getWaitContrast()==2)
74
+            {
75
+                Contrast="=";
76
+            } else if (input.getWaitContrast()==3) {
77
+                Contrast="<=";
78
+            }
79
+            qw.apply("TIMESTAMPDIFF(SECOND, create_time, IFNULL(ring_time,hangup_time)){0}{1}",Contrast
80
+                    ,input.getWaitTimes());
81
+        }
82
+
69 83
         if (!StringHelper.isEmpty(input.getPhone()))
70 84
         {
71 85
 //            qw.and(wq->{

+ 23 - 6
hjzx-api/src/main/java/api/controller/order/WorkOrderBaseController.java

@@ -462,11 +462,21 @@ List<WorkOrderType> typelist=workrodertypeService.getList();
462 462
             }
463 463
             if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
464 464
                 //    if(orderBase.getHandlingMeasures()!=null && orderBase.getHandlingMeasures()>0){
465
+//                orderBase.setHandlingMeasuresName(dictDatas.stream()
466
+//                        .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
467
+//                        .findFirst()
468
+//                        .map(DictData::getDictLabel)
469
+//                        .orElse(null) );
470
+
471
+
472
+                // 通过Stream过滤并生成新List
473
+                String[] targetNames = orderBase.getHandlingMeasures().split(",");
474
+                // 转换为Set以提高查询效率
475
+                Set<String> targetSet = new HashSet<>(Arrays.asList(targetNames));
465 476
                 orderBase.setHandlingMeasuresName(dictDatas.stream()
466
-                        .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
467
-                        .findFirst()
477
+                        .filter(obj -> targetSet.contains(obj.getDictValue()))
468 478
                         .map(DictData::getDictLabel)
469
-                        .orElse(null) );
479
+                        .collect(Collectors.joining(",")));
470 480
             }
471 481
         }
472 482
 
@@ -914,11 +924,18 @@ if(!StringHelper.isEmpty(orderBase.getGrade())){
914 924
         }
915 925
         if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
916 926
     //    if(orderBase.getHandlingMeasures()!=null && orderBase.getHandlingMeasures()>0){
927
+//            ov.setHandlingMeasuresName(dictDatas.stream()
928
+//                    .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
929
+//                    .findFirst()
930
+//                    .map(DictData::getDictLabel)
931
+//                    .orElse(null) );
932
+            String[] targetNames = orderBase.getHandlingMeasures().split(",");
933
+            // 转换为Set以提高查询效率
934
+            Set<String> targetSet = new HashSet<>(Arrays.asList(targetNames));
917 935
             ov.setHandlingMeasuresName(dictDatas.stream()
918
-                    .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
919
-                    .findFirst()
936
+                    .filter(obj -> targetSet.contains(obj.getDictValue()))
920 937
                     .map(DictData::getDictLabel)
921
-                    .orElse(null) );
938
+                    .collect(Collectors.joining(",")));
922 939
         }
923 940
         if(orderBase.getComplaintdept()!=null && orderBase.getComplaintdept()>0){
924 941
             DeptView ordertype = deptService.selectDeptNameById(orderBase.getComplaintdept() );

+ 4 - 0
hjzx-entity/src/main/java/api/entity/input/call/CallInput.java

@@ -11,4 +11,8 @@ public class CallInput   extends CallLog {
11 11
     private String phone;
12 12
     @ApiModelProperty("坐席工号")
13 13
     private String agent;
14
+    @ApiModelProperty("等待对比1大于2等于3小于")
15
+    private Long waitContrast;
16
+    @ApiModelProperty("等待时长")
17
+    private Long waitTimes;
14 18
 }