|
|
|
@ -30,20 +30,18 @@
|
|
|
|
|
|
|
|
|
|
<select id="bgList" resultMap="bgListResult">
|
|
|
|
|
SELECT
|
|
|
|
|
a.id,a.dc_ch ,a.dc_pl , c.zl ,c.kw,c.lx ,c.dwxx_id,
|
|
|
|
|
b.id lj_id,b.czbh lj_czbh,b.pl lj_pl,b.fd lj_fd,b.tlth lj_tlth,b.ljbh lj_ljbh,b.qq lj_qq,b.dw lj_dw,b.lx lj_lx
|
|
|
|
|
b.czbh dc_ch ,b.pl dc_pl,b.fd as dc_fd, b.zl ,b.kw,b.lx,
|
|
|
|
|
b.id lj_id,b.czbh lj_czbh,b.pl lj_pl,b.fd lj_fd,b.tlth lj_tlth,b.ljbh lj_ljbh,b.qq lj_qq,b.dw lj_dw,b.lx lj_lx,
|
|
|
|
|
b.ppzt lj_ppzt,
|
|
|
|
|
d.id bom_id,d.dcch bom_dcch,d.tzbh bom_tzbh,d.ljbh bom_ljbh
|
|
|
|
|
from
|
|
|
|
|
dm_ydjh a left join dm_ydjh_lj b on a.dc_ch =b.czbh and a.dc_pl =b.pl and a.tzbh =b.tlth
|
|
|
|
|
left join dm_yppyz c on b.lx=c.lx and b.zl =b.zl AND b.kw =c.kw
|
|
|
|
|
dm_bom d left join dm_ydjh_lj b on d.dcch =b.czbh and d.pl =b.pl and d.tzbh =b.tlth and b.ljbh=d.ljbh
|
|
|
|
|
WHERE
|
|
|
|
|
a.zt>=62 and b.ppzt <'04' and isnull(b.lx,'')!=''
|
|
|
|
|
<if test="dcCh!='' and dcCh!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zyq!='' and zyq!=''">
|
|
|
|
|
and a.zyq1=#{zyq}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch ,a.dc_pl
|
|
|
|
|
isnull(b.lx,'')!='' and b.ppzt<'03'
|
|
|
|
|
<if test="dcCh!='' and dcCh!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch ,a.dc_pl
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="wbfList" resultMap="bgListResult">
|
|
|
|
@ -55,13 +53,19 @@
|
|
|
|
|
dm_ydjh a left join dm_ydjh_lj b on a.dc_ch =b.czbh and a.dc_pl =b.pl and a.tzbh =b.tlth
|
|
|
|
|
left join dm_yppyz c on b.lx=c.lx and b.zl =b.zl AND b.kw =c.kw
|
|
|
|
|
WHERE
|
|
|
|
|
a.zt>=62 and b.ppzt <'04' and isnull(b.lx,'')!=''
|
|
|
|
|
<if test="dcCh!='' and dcCh!=''">
|
|
|
|
|
a.zt>=62 and isnull(b.lx,'')!=''
|
|
|
|
|
<if test="zt==null or zt==''">
|
|
|
|
|
and b.ppzt <'04'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zt=='04'">
|
|
|
|
|
and b.ppzt ='04'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dcCh!=null and dcCh!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zyq!='' and zyq!=''">
|
|
|
|
|
and a.zyq1=#{zyq}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zyq!=null and zyq!=''">
|
|
|
|
|
and a.zyq1=#{zyq}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch ,a.dc_pl
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|