From be8e3f7102d488428c96f0ed420222db5e3131da Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 10 四月 2026 19:09:25 +0800
Subject: [PATCH] 满意度保存BUG处理
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 21 ++++++++++++---------
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 22 +++++++++++-----------
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 3 ++-
3 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index 67406f3..13b1622 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -126,15 +126,18 @@
// 鐩存帴浠庡凡鏈夎仛鍚堢粨鏋滄帹绠梩otal锛岄伩鍏嶅幓鎺夊垎椤靛悗鍐嶅叏閲忔煡涓�閬嶅ぇ琛�
long total = 0L;
try {
- long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L;
- long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L;
- long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L;
- long yc = map.get("yc") != null ? ((Number) map.get("yc")).longValue() : 0L;
- long jg = map.get("jg") != null ? ((Number) map.get("jg")).longValue() : 0L;
- long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L;
- long yfs = map.get("yfs") != null ? ((Number) map.get("yfs")).longValue() : 0L;
- long blq = map.get("blq") != null ? ((Number) map.get("blq")).longValue() : 0L;
- total = wzx + ysf + dsf + yc + jg + fssb + yfs + blq;
+// * wzx: 鏈墽琛屾暟閲�
+// * ysf: 宸查殢璁挎暟閲�
+// * fssb: 鍙戦�佸け璐ユ暟閲�
+// * yfs: 宸插彂閫佹暟閲�
+// * dsf: 寰呴殢璁挎暟閲�
+
+// long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L;
+// long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L;
+// long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L;
+// long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L;
+ total = map.get("total") != null ? ((Number) map.get("total")).longValue() : 0L;
+
} catch (Exception e) {
// 鍏滃簳锛氬叏閲廲ount
serviceSubtaskEntity.setPageNum(null);
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index 8e623b3..1c9bc79 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -411,18 +411,18 @@
// 澶勭悊绌哄紓甯�
if (MapUtils.isEmpty(result)) {
result = new HashMap<>();
+ // 纭繚鎵�鏈� key 閮芥湁鍊硷紝閬垮厤绌烘寚閽堝紓甯�
+ // MyBatis 鐨� SUM 鍦ㄦ病鏈夊尮閰嶈鏃朵細杩斿洖 null
+ result.putIfAbsent("wzx", 0);
+ result.putIfAbsent("ysf", 0);
+ result.putIfAbsent("yc", 0);
+ result.putIfAbsent("jg", 0);
+ result.putIfAbsent("fssb", 0);
+ result.putIfAbsent("yfs", 0);
+ result.putIfAbsent("blq", 0);
+ result.putIfAbsent("dsf", 0);
+ result.putIfAbsent("total", 0);
}
- // 纭繚鎵�鏈� key 閮芥湁鍊硷紝閬垮厤绌烘寚閽堝紓甯�
- // MyBatis 鐨� SUM 鍦ㄦ病鏈夊尮閰嶈鏃朵細杩斿洖 null
- result.putIfAbsent("wzx", 0);
- result.putIfAbsent("ysf", 0);
- result.putIfAbsent("yc", 0);
- result.putIfAbsent("jg", 0);
- result.putIfAbsent("fssb", 0);
- result.putIfAbsent("yfs", 0);
- result.putIfAbsent("blq", 0);
- result.putIfAbsent("dsf", 0);
-
return result;
}
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 1d0753e..e4974d5 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -2127,7 +2127,8 @@
SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf,
SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq,
SUM(CASE WHEN excep IS NOT NULL AND excep = '1' THEN 1 ELSE 0 END) AS yc,
- SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg
+ SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg,
+ COUNT(1) as total
FROM service_subtask
where 1=1
and del_flag = 0
--
Gitblit v1.9.3