diff --git a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml
index ede2e4b..391351c 100644
--- a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml
+++ b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml
@@ -28,8 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by a.name
order by rateNumber desc
+
- select t.name, t.resolved, t.sum, CASE WHEN t.sum = 0 THEN 0 ELSE (t.resolved / t.sum) * 100 END AS rateNumber, concat(rateNumber, '%') rate
+ select t.name, t.resolved, t.sum, CASE WHEN t.sum = 0 THEN 0 ELSE (ROUND(t.resolved / t.sum)) * 100 END AS rateNumber, concat(rateNumber, '%') rate
from
(select a.name, SUM(COALESCE(b.resolved, 0)) resolved,
SUM(CASE WHEN b.completed = '1' THEN 1 ELSE 0 END) sum
@@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局' and a.name != '经开区分局'
group by a.name) t order by rateNumber desc
+
select a.name,
ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0) rateNumber,
@@ -103,8 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
- CONCAT(ROUND(SUM(COALESCE(b.resolved, 0))*100 / NULLIF(COUNT(1), 0),0),'%') AS completedRate,
- SUM(COALESCE(b.resolved, 0)) AS completed,
+ CONCAT(ROUND(SUM(COALESCE(b.completed, 0))*100 / NULLIF(COUNT(1), 0),0),'%') AS completedRate,
+ SUM(COALESCE(b.completed, 0)) AS completed,
COUNT(1) AS completedSum
from mail_mark b left join dept a on a.id=b.second_dept_id where 1=1
@@ -182,24 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY month order by month
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
SELECT d.name, a.id,
(
@@ -341,4 +326,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by a.name
order by rateNumber desc
+