修改统计语句

This commit is contained in:
lujiang 2024-08-30 00:30:34 +08:00
parent a6098c8b53
commit 713b6fd548
2 changed files with 4 additions and 4 deletions

View File

@ -255,7 +255,7 @@
<if test="evalService != null and evalService==1"> AND rep.eval_service &gt;= 4</if>
<if test="evalService != null and evalService==2"> AND rep.eval_service = 3</if>
<if test="evalService != null and evalService==3"> AND rep.eval_service &lt;= 2</if>
<if test="timeout != null and timeout==9"> and predate &lt; now() and status &lt; 9</if>
<if test="timeout != null and timeout==9"> and predate is not null and predate &lt; now() and status &lt; 9</if>
order by create_time desc
</select>

View File

@ -125,8 +125,8 @@
<select id="repairAdminStats" resultType="com.ics.admin.vo.RepairAdminStatsVo">
<![CDATA[
SELECT `wait`,`anew`,newnotice,oldnotice FROM
(SELECT count(id) as `wait` FROM ics_repair where delete_flag=0 and status=3) as A,
(SELECT count(DISTINCT repair_id) as `anew` FROM ics_repair_log where delete_flag=0 and node_form=3) as B,
(SELECT count(id) as `wait` FROM ics_repair where delete_flag=0 and status=1) as A,
(SELECT count(id) as `anew` FROM ics_repair where delete_flag=0 and status=3) as B,
(select count(id) as newnotice from ics_repair_remind where `read`=0 and user_id= #{userId}) C,
(select count(id) as oldnotice from ics_repair_remind where `read`=1 and user_id= #{userId}) D
]]>
@ -137,7 +137,7 @@
<![CDATA[
SELECT
count(id) zs,
sum(case when status < 9 then 1 else 0 end) `wait`,
sum(case when status <= 7 then 1 else 0 end) `wait`,
sum(case when predate is not null and predate < now() and status < 9 then 1 else 0 end) timeout,
sum(case when eval_service is not null then 1 else 0 end) as pj,
sum(case when eval_service is not null and eval_service >=4 then 1 else 0 end) as h,