|
@@ -230,7 +230,7 @@
|
|
|
nvl(sum(QTLJ),0) + nvl(sum(XXSJ),0) + nvl(sum(XXQR),0) gtnl,
|
|
|
nvl(sum(DHJQ),0) + nvl(sum(LCGF),0) zxnl,
|
|
|
round(
|
|
|
- sum(PF_FZ) / nullif(count(*),0),2) avg
|
|
|
+ sum(PF_FZ) / ifnull(count(*),0),2) avg
|
|
|
from TF_YWPN_PFRECORD_W p
|
|
|
where PF_TYPE = 2
|
|
|
<choose>
|
|
@@ -852,7 +852,7 @@
|
|
|
as hf_num,
|
|
|
round((
|
|
|
<include refid="zz_count_rx"/>
|
|
|
- / nullif(<include refid="jd_count_rx"/>,0) * 100),2)
|
|
|
+ / ifnull(<include refid="jd_count_rx"/>,0) * 100),2)
|
|
|
as rate,
|
|
|
gdlx
|
|
|
from TF_YWPN_GDINFO_W i
|
|
@@ -1359,7 +1359,7 @@
|
|
|
as hf_num,
|
|
|
round((
|
|
|
<include refid="zz_count_rx"/>
|
|
|
- / (nullif(<include refid="jd_count"/>,0) * 100)),2)
|
|
|
+ / (ifnull(<include refid="jd_count"/>,0) * 100)),2)
|
|
|
as rate,
|
|
|
gdlx,
|
|
|
<include refid="idea_count">
|
|
@@ -1386,7 +1386,7 @@
|
|
|
<include refid="idea_count">
|
|
|
<property name="pass" value="3"/>
|
|
|
</include>
|
|
|
- ) / (nullif(<include refid="hf_count"/>,0)) * 100),2) hfmyl,
|
|
|
+ ) / (ifnull(<include refid="hf_count"/>,0)) * 100),2) hfmyl,
|
|
|
|
|
|
round((((
|
|
|
(
|
|
@@ -1410,7 +1410,7 @@
|
|
|
<property name="pass" value="0"/>
|
|
|
</include>
|
|
|
* 50)
|
|
|
- ) / (nullif(<include refid="hf_count"/>,0) * 100)),2) mydzs
|
|
|
+ ) / (ifnull(<include refid="hf_count"/>,0) * 100)),2) mydzs
|
|
|
from TF_YWPN_GDINFO_W i
|
|
|
where is_rxlx = 1
|
|
|
<choose>
|
|
@@ -1503,7 +1503,7 @@
|
|
|
<property name="pass" value="0"/>
|
|
|
</include>
|
|
|
* 50)
|
|
|
- ) / (nullif(<include refid="hf_count"/>,0) * 100)),2) mydzs
|
|
|
+ ) / (ifnull(<include refid="hf_count"/>,0) * 100)),2) mydzs
|
|
|
from TF_YWPN_GDINFO_W i
|
|
|
where is_rxlx = 1
|
|
|
<choose>
|
|
@@ -2006,7 +2006,7 @@
|
|
|
wzj_num,
|
|
|
sum_num,
|
|
|
DJBM,
|
|
|
- round((yzj_num / nullif(sum_num,0)) * 100,2) rate
|
|
|
+ round((yzj_num / ifnull(sum_num,0)) * 100,2) rate
|
|
|
from (select DJRY,DJBM,
|
|
|
(select USERNAME from TF_MSSS_UDB.TF_SMPN_USER_X where id = DJRY) account,
|
|
|
(select REAL_NAME from TF_MSSS_UDB.TF_SMPN_USER_X where id = DJRY) name,
|
|
@@ -2023,7 +2023,7 @@
|
|
|
<if test="dto.user != null and dto.user != ''">
|
|
|
and djry = #{dto.user}
|
|
|
</if>
|
|
|
- group by DJRY,DJBM)
|
|
|
+ group by DJRY,DJBM) x
|
|
|
</select>
|
|
|
<select id="qualityCount" resultType="map" databaseId="mysql">
|
|
|
select DJRY,
|
|
@@ -2033,7 +2033,7 @@
|
|
|
wzj_num,
|
|
|
sum_num,
|
|
|
DJBM,
|
|
|
- round((yzj_num / nullif(sum_num,0)) * 100,2) rate
|
|
|
+ round((yzj_num / ifnull(sum_num,0)) * 100,2) rate
|
|
|
from (select DJRY,DJBM,
|
|
|
(select USERNAME from TF_MSSS_UDB.TF_SMPN_USER_X where id = DJRY) account,
|
|
|
(select REAL_NAME from TF_MSSS_UDB.TF_SMPN_USER_X where id = DJRY) name,
|
|
@@ -2050,7 +2050,7 @@
|
|
|
<if test="dto.user != null and dto.user != ''">
|
|
|
and djry = #{dto.user}
|
|
|
</if>
|
|
|
- group by DJRY,DJBM)
|
|
|
+ group by DJRY,DJBM) x
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|