|
|
|
@ -897,7 +897,7 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
|
|
|
|
|
from
|
|
|
|
|
dm_ydjh
|
|
|
|
|
where
|
|
|
|
|
zt>='2' and zt<'62' ) a
|
|
|
|
|
zt>=2 and zt<62 ) a
|
|
|
|
|
where a.rn=1
|
|
|
|
|
order by dcCh asc ,dcPl desc ,zt
|
|
|
|
|
</select>
|
|
|
|
@ -906,32 +906,41 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
|
|
|
|
|
select
|
|
|
|
|
dc_ch dcCh,dc_pl dcPl,count(1) total,plxh,
|
|
|
|
|
<if test="wgzt=='62'">
|
|
|
|
|
sum(case when isnull(qgfkry,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(qgfkry,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
sum(case when isnull(qgfkrq,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(qgfkrq,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='52'">
|
|
|
|
|
sum(case when isnull(hxfkry,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(hxfkry,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
sum(case when isnull(hxfkrq,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(hxfkrq,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='32'">
|
|
|
|
|
sum(case when isnull(pwfkry,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(pwfkry,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
sum(case when isnull(pwfkrq,'')='' then 1 else 0 end) wwg,
|
|
|
|
|
sum(case when isnull(pwfkrq,'')!='' then 1 else 0 end) comp,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zt!=null and zt!=''">
|
|
|
|
|
sum(case when zt=#{zt} then 1 else 0 end) compOnLastGx,
|
|
|
|
|
sum(case when zt>=#{zt} then 1 else 0 end) compOnLastGx,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='62'">
|
|
|
|
|
sum(case when isnull(qgpgry,'')='' then 1 else 0 end) wpg
|
|
|
|
|
sum(case when isnull(qgpgrq,'')='' then 1 else 0 end) wpg
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='52'">
|
|
|
|
|
sum(case when isnull(hxpgry,'')='' then 1 else 0 end) wpg
|
|
|
|
|
sum(case when isnull(hxpgrq,'')='' then 1 else 0 end) wpg
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='32'">
|
|
|
|
|
sum(case when isnull(pwpgry,'')='' then 1 else 0 end) wpg
|
|
|
|
|
sum(case when isnull(pwpgrq,'')='' then 1 else 0 end) wpg
|
|
|
|
|
</if>
|
|
|
|
|
from
|
|
|
|
|
dm_ydjh
|
|
|
|
|
where zt>=11 and zt<=62
|
|
|
|
|
where zt>=11
|
|
|
|
|
<if test="wgzt=='62'">
|
|
|
|
|
and isnull(qgfkrq,'')=''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='52'">
|
|
|
|
|
and isnull(hxfkrq,'')=''
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wgzt=='32'">
|
|
|
|
|
and isnull(pwfkrq,'')=''
|
|
|
|
|
</if>
|
|
|
|
|
group by dc_ch, dc_pl,plxh
|
|
|
|
|
order by dc_ch,dc_pl
|
|
|
|
|
</select>
|
|
|
|
|