Ver código fonte

fix(govern): 修复未知运营商叶子与通信明细查不到数据

- 治理树「未知运营商」叶子:前端传 operName,后端却只判断 bankOrYysType,
  SQL 变成 operatorId = '未知运营商'(库里实际是 NULL),永远 0 条;
  改为按 operName 判断并转 null,命中 operatorId is null 分支
- 通信记录明细:运营商过滤改为 COALESCE(operatorId,'未知运营商') LIKE,
  与 countOperIdByName 的分组口径一致,修复从「未知运营商」下钻明细为空
- 清洗进度页移除执行中的「导入成功/导入失败」计数(仅终态推送真实值,
  执行期间恒为 0),进度环改为居中
cc 3 semanas atrás
pai
commit
b1d14ebc92

+ 1 - 53
ai-electron/frontend/src/case/views/data/cleanProgress.vue

@@ -60,17 +60,6 @@
                       </div>
                     </div>
                   </div>
-
-                  <div class="run-summary__stats">
-                    <div class="run-stat-line">
-                      <span class="run-stat-line__label">导入成功</span>
-                      <strong class="run-stat-line__value is-success">{{ displaySuccessCount }}</strong>
-                    </div>
-                    <div class="run-stat-line">
-                      <span class="run-stat-line__label">导入失败</span>
-                      <strong class="run-stat-line__value is-fail">{{ displayFailCount }}</strong>
-                    </div>
-                  </div>
                 </div>
 
                 <div class="run-steps">
@@ -1620,6 +1609,7 @@
     .run-summary {
       display: flex;
       align-items: center;
+      justify-content: center;
       gap: 18px;
     }
 
@@ -1650,48 +1640,6 @@
       }
     }
 
-    .run-summary__stats {
-      flex: 1 1 auto;
-      min-width: 0;
-      display: flex;
-      flex-direction: column;
-    }
-
-    .run-stat-line {
-      display: flex;
-      align-items: baseline;
-      justify-content: space-between;
-      gap: 10px;
-      padding: 9px 0;
-      border-bottom: 1px solid #eef2f7;
-
-      &:last-child {
-        border-bottom: 0;
-      }
-    }
-
-    .run-stat-line__label {
-      font-size: 11.5px;
-      color: #94a3b8;
-      white-space: nowrap;
-    }
-
-    .run-stat-line__value {
-      font-size: 22px;
-      line-height: 1.1;
-      font-weight: 700;
-      color: #0f172a;
-      font-variant-numeric: tabular-nums;
-
-      &.is-success {
-        color: #16a34a;
-      }
-
-      &.is-fail {
-        color: #dc2626;
-      }
-    }
-
     .run-steps {
       flex: 1 1 auto;
       min-height: 0;

+ 4 - 1
ai-server/src/main/java/com/zsjz/ai/module/govern/serivce/GovernTreeService.java

@@ -449,7 +449,10 @@ public class GovernTreeService extends ServiceImpl<GovernTreeMapper, GovernTree>
             phones = CaseDataCache.getPerPhones(dto.getPersonName());
         }
         String operName = dto.getOperName();
-        if ("未知运营商".equals(dto.getBankOrYysType())) {
+        // 树上的「未知运营商」是 COALESCE(operatorId,'未知运营商') 聚合出来的,库里真实值是 NULL;
+        // 必须转成 null 才能命中 SQL 的 operatorId is null 分支(与 getTreeCallOperUseOpenInfoPage 口径一致)。
+        // 前端只传 operName,bankOrYysType 仅兼容旧调用方。
+        if ("未知运营商".equals(operName) || "未知运营商".equals(dto.getBankOrYysType())) {
             operName = null;
         }
         String personName = dto.getPersonName();

+ 3 - 1
ai-server/src/main/resources/mappers/call/CallRecordMapper.xml

@@ -157,7 +157,9 @@
             </if>
 
             <if test="query.operatorId != null and query.operatorId != ''">
-                AND operatorId LIKE CONCAT('%', #{query.operatorId}, '%')
+                <!-- 与治理树 countOperIdByName 的分组口径保持一致:未知运营商在库里是 NULL,
+                     用 COALESCE 兜底,否则从树上下钻「未知运营商」的明细永远是 0 条 -->
+                AND COALESCE(operatorId, '未知运营商') LIKE CONCAT('%', #{query.operatorId}, '%')
             </if>
         </where>
         <if test="query.orderKey != null and query.orderKey != ''">