@ -1542,11 +1540,22 @@ where dm_ydjh.DC_CH=#{dcch} and dm_ydjh.dc_pl=#{dcpl}
CAST(SUM(CASE WHEN DM_BCLQMXP.DELX_z='X' and DM_BCLQMXP.WPMC not in ('球扁钢','角钢') THEN isnull( DM_BCLQMXP.ljzl,0) ELSE 0 END)/1000 as decimal(18,1)) as 方钢零件重量
FROM DM_BCLQJBP,DM_BCLQMXP left join DM_WPJBP on DM_BCLQMXP.WPH = DM_WPJBP.WPH
WHERE DM_BCLQMXP.LQBH = DM_BCLQJBP.LQBH and DM_BCLQJBP.DC_CH=#{ch}
WHERE
DM_BCLQMXP.LQBH = DM_BCLQJBP.LQBH and DM_BCLQJBP.DC_CH=#{ch}
<iftest=" dcpl!=null and dcpl!='' and (dcpl1==null or dcpl1=='')">
and DM_BCLQJBP.dc_pl=#{dcpl}
</if>
<iftest=" dcpl!=null and dcpl!='' and dcpl1!=null and dcpl1!=''">
and DM_BCLQJBP.dc_pl>=#{dcpl} and DM_BCLQJBP.dc_pl<=#{dcpl1}
</if>
<iftest=" (dcpl==null or dcpl=='') and dcpl1!=null and dcpl1!=''">
and DM_BCLQJBP.dc_pl<=#{dcpl1}
</if>
GROUP BY DM_BCLQJBP.DC_CH,DM_BCLQJBP.DC_PL,DM_BCLQJBP.DC_FD