|
|
|
@ -1242,7 +1242,7 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
|
|
|
|
from
|
|
|
|
from
|
|
|
|
dm_ydjh a left join dm_tlt_print_wh b on a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.tzbh=b.dc_tlt
|
|
|
|
dm_ydjh a left join dm_tlt_print_wh b on a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.tzbh=b.dc_tlt
|
|
|
|
where
|
|
|
|
where
|
|
|
|
zt=#{zt}
|
|
|
|
zt=#{zt} and isnull(a.dc_ch,'')!='' and isnull(a.dc_pl,'')!='' and isnull(a.tzbh,'')!=''
|
|
|
|
<if test="sllsh!=null and sllsh!=''">
|
|
|
|
<if test="sllsh!=null and sllsh!=''">
|
|
|
|
and a.sllsh=#{sllsh}
|
|
|
|
and a.sllsh=#{sllsh}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
@ -1346,6 +1346,18 @@ where dm_ydjh.DC_CH=#{dcch} and dm_ydjh.dc_pl=#{dcpl}
|
|
|
|
<result column="bcshzl_gd" property="bcshzl_gd"/>
|
|
|
|
<result column="bcshzl_gd" property="bcshzl_gd"/>
|
|
|
|
<result column="bcshzl_xflj" property="bcshzl_xflj"/>
|
|
|
|
<result column="bcshzl_xflj" property="bcshzl_xflj"/>
|
|
|
|
<result column="bcshzl_dflj" property="bcshzl_dflj"/>
|
|
|
|
<result column="bcshzl_dflj" property="bcshzl_dflj"/>
|
|
|
|
|
|
|
|
<result column="xj2" property="xj2"/>
|
|
|
|
|
|
|
|
<result column="bclqzl_xj2" property="bclqzl_xj2"/>
|
|
|
|
|
|
|
|
<result column="bcshzl_xj2" property="bcshzl_xj2"/>
|
|
|
|
|
|
|
|
<result column="小激光2余料重量" property="小激光2余料重量"/>
|
|
|
|
|
|
|
|
<result column="小激光2前批余料代" property="小激光2前批余料代"/>
|
|
|
|
|
|
|
|
<result column="小激光2零件重量" property="小激光2零件重量"/>
|
|
|
|
|
|
|
|
<result column="dj2" property="dj2"/>
|
|
|
|
|
|
|
|
<result column="bclqzl_dj2" property="bclqzl_dj2"/>
|
|
|
|
|
|
|
|
<result column="bcshzl_dj2" property="bcshzl_dj2"/>
|
|
|
|
|
|
|
|
<result column="大激光2余料重量" property="大激光2余料重量"/>
|
|
|
|
|
|
|
|
<result column="大激光2前批余料代" property="大激光2前批余料代"/>
|
|
|
|
|
|
|
|
<result column="大激光2零件重量" property="大激光2零件重量"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getYdjhzz" resultMap="ZZResultMap">
|
|
|
|
<select id="getYdjhzz" resultMap="ZZResultMap">
|
|
|
|
@ -1952,6 +1964,20 @@ where dm_ydjh.DC_CH=#{dcch} and dm_ydjh.dc_pl=#{dcpl}
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='13' THEN DM_BCLQMXP.QPYLD ELSE 0 END)/1000 as decimal(18,1)) as 大曲3前批余料代,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='13' THEN DM_BCLQMXP.QPYLD ELSE 0 END)/1000 as decimal(18,1)) as 大曲3前批余料代,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='13' THEN isnull( DM_BCLQMXP.ljzl,0) ELSE 0 END)/1000 as decimal(18,1)) as 大曲3零件重量,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='13' THEN isnull( DM_BCLQMXP.ljzl,0) ELSE 0 END)/1000 as decimal(18,1)) as 大曲3零件重量,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.sl ELSE 0 END) as xj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN isnull(DM_BCLQMXP.LQZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bclqzl_xj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN isnull( DM_BCLQMXP.SHZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bcshzl_xj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.YLZL ELSE 0 END)/1000 as decimal(18,1)) as 小激光2余料重量,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.QPYLD ELSE 0 END)/1000 as decimal(18,1)) as 小激光2前批余料代,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1010' and DM_BCLQJBP.zzcj='12' THEN isnull( DM_BCLQMXP.ljzl,0) ELSE 0 END)/1000 as decimal(18,1)) as 小激光2零件重量,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.sl ELSE 0 END) as dj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN isnull(DM_BCLQMXP.LQZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bclqzl_dj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN isnull( DM_BCLQMXP.SHZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bcshzl_dj2,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.YLZL ELSE 0 END)/1000 as decimal(18,1)) as 大激光2余料重量,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN DM_BCLQMXP.QPYLD ELSE 0 END)/1000 as decimal(18,1)) as 大激光2前批余料代,
|
|
|
|
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.DC_ZL= '1110' and DM_BCLQJBP.zzcj='12' THEN isnull( DM_BCLQMXP.ljzl,0) ELSE 0 END)/1000 as decimal(18,1)) as 大激光2零件重量,
|
|
|
|
|
|
|
|
|
|
|
|
SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN DM_BCLQMXP.sl ELSE 0 END) as gd,
|
|
|
|
SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN DM_BCLQMXP.sl ELSE 0 END) as gd,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN isnull(DM_BCLQMXP.LQZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bclqzl_gd,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN isnull(DM_BCLQMXP.LQZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bclqzl_gd,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN isnull( DM_BCLQMXP.SHZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bcshzl_gd,
|
|
|
|
CAST(SUM(CASE WHEN DM_BCLQJBP.zzcj='17' THEN isnull( DM_BCLQMXP.SHZL,0) ELSE 0 END)/1000 as decimal(18,1)) as bcshzl_gd,
|
|
|
|
@ -2059,8 +2085,11 @@ where dm_ydjh.DC_CH=#{dcch} and dm_ydjh.dc_pl=#{dcpl}
|
|
|
|
<if test="dcpl!=null and dcpl!='' and dcpl1!=null and dcpl1!=''">
|
|
|
|
<if test="dcpl!=null and dcpl!='' and dcpl1!=null and dcpl1!=''">
|
|
|
|
and dc_pl between #{dcpl} and #{dcpl1}
|
|
|
|
and dc_pl between #{dcpl} and #{dcpl1}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="dcpl!=null and dcpl!='' and (dcpl1==null or dcpl1=='')">
|
|
|
|
|
|
|
|
and dc_pl=#{dcpl}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="(dcpl==null or dcpl=='') and dcpl1!=null and dcpl1!=''">
|
|
|
|
<if test="(dcpl==null or dcpl=='') and dcpl1!=null and dcpl1!=''">
|
|
|
|
and dc_pl <=#{dcpl1}
|
|
|
|
and dc_pl<=#{dcpl1}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|
|