配置统计增加一列Effective 有效配置数
This commit is contained in:
@@ -4,11 +4,12 @@
|
||||
<!-- -->
|
||||
<select id="getConfigStateStatistics" resultType="map">
|
||||
select c.function_id functionId,
|
||||
sum(case when c.cfg_state =1 then 1 else 0 end) as approved,
|
||||
sum(case when c.cfg_state =1 then 1 else 0 end) as effective,
|
||||
sum(case when c.cfg_state =2 then 1 else 0 end) as unapproved,
|
||||
sum(case when c.cfg_state =3 then 1 else 0 end) as cancle_approved,
|
||||
sum(case when c.cfg_state =0 then 1 else 0 end) as created,
|
||||
sum(case when c.cfg_state =-1 then 1 else 0 end) as deleted
|
||||
sum(case when c.cfg_state =-1 then 1 else 0 end) as deleted,
|
||||
sum(case when c.cfg_state =4 or c.cfg_state=1 then 1 else 0 end) as approved
|
||||
from cfg_num_statistics c where c.statistic_time = #{statisticTime}
|
||||
group by c.function_id;
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user