|
|
|
@ -2,12 +2,14 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.dsic.gj_erp.mapper.zyjh.DmYppyzMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap id="bgListResult" type="dmYppyz">
|
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
|
<resultMap id="bgListResult" type="com.dsic.gj_erp.controller.zyjh.dto.YppDto">
|
|
|
|
|
<result column="dwxx_id" property="dwxxId" />
|
|
|
|
|
<result column="dc_ch" property="dcCh" />
|
|
|
|
|
<result column="dc_pl" property="dcPl" />
|
|
|
|
|
<result column="dc_fd" property="dcFd" />
|
|
|
|
|
<result column="zl" property="zl" />
|
|
|
|
|
<result column="kw" property="kw" />
|
|
|
|
|
<result column="lx" property="lx" />
|
|
|
|
|
<collection property="ljList" ofType="dmYdjhLj" columnPrefix="lj_">
|
|
|
|
|
<id column="id" property="id" />
|
|
|
|
|
<result column="czbh" property="czbh" />
|
|
|
|
@ -17,42 +19,49 @@
|
|
|
|
|
<result column="ljbh" property="ljbh" />
|
|
|
|
|
<result column="qq" property="qq" />
|
|
|
|
|
<result column="dw" property="dw" />
|
|
|
|
|
<result column="ppzt" property="ppzt" />
|
|
|
|
|
</collection>
|
|
|
|
|
<collection property="bomList" ofType="dmBom" columnPrefix="bom_">
|
|
|
|
|
<id column="id" property="id" />
|
|
|
|
|
<result column="ljbh" property="ljbh" />
|
|
|
|
|
<result column="ljsl" property="ljsl" />
|
|
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="bgList" resultMap="bgListResult">
|
|
|
|
|
select
|
|
|
|
|
a.id,a.dwxx_id,a.dc_ch,a.dc_pl,a.dc_fd,
|
|
|
|
|
c.id lj_id,c.czbh lj_czbh,c.pl lj_pl,c.fd lj_fd,c.tlth lj_tlth,c.ljbh lj_ljbh,c.qq lj_qq,c.dw lj_dw
|
|
|
|
|
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
|
|
|
|
|
from
|
|
|
|
|
dm_yppyz a,
|
|
|
|
|
dm_ydjh b left join dm_ydjh_lj c on b.dc_ch=c.czbh and b.dc_pl=c.pl and b.tzbh=c.tlth
|
|
|
|
|
where
|
|
|
|
|
a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.dc_fd =c.fd and a.status='已摆放' and a.lx=b.lx and b.lx='b' and b.zt>=62
|
|
|
|
|
<if test="dcCh!=null and dcCh!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dcPl!=null and dcPl!=''">
|
|
|
|
|
and a.dc_pl=#{dcPl}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dcFd!=null and dcFd!=''">
|
|
|
|
|
and a.dc_fd=#{dcFd}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch,a.dc_pl
|
|
|
|
|
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!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zyq!='' and zyq!=''">
|
|
|
|
|
and a.zyq1=#{zyq}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch ,a.dc_pl
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="wbfList" resultMap="bgListResult">
|
|
|
|
|
select
|
|
|
|
|
a.id,a.dwxx_id,a.dc_ch,a.dc_pl,a.dc_fd,
|
|
|
|
|
c.id lj_id,c.czbh lj_czbh,c.pl lj_pl,c.fd lj_fd,c.tlth lj_tlth,c.ljbh lj_ljbh,c.qq lj_qq,c.dw lj_dw
|
|
|
|
|
SELECT
|
|
|
|
|
a.dc_ch ,a.dc_pl ,b.fd as dc_fd, b.zl ,b.kw,b.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.ppzt lj_ppzt
|
|
|
|
|
from
|
|
|
|
|
dm_yppyz a,
|
|
|
|
|
dm_ydjh b left join dm_ydjh_lj c on b.dc_ch=c.czbh and b.dc_pl=c.pl and b.tzbh=c.tlth
|
|
|
|
|
where
|
|
|
|
|
a.dc_ch=b.dc_ch and a.dc_pl=b.dc_pl and a.dc_fd =c.fd and b.lx='b' and a.lx=c.lx
|
|
|
|
|
and a.status='设置垛位' and b.zt>=62
|
|
|
|
|
and b.zyq1=#{zyq} and a.dc_ch=#{dcCh}
|
|
|
|
|
and isnull(c.qq,'')='' and isnull(c.dw,'')=''
|
|
|
|
|
order by a.dc_ch,a.dc_pl
|
|
|
|
|
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!=''">
|
|
|
|
|
and a.dc_ch=#{dcCh}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="zyq!='' and zyq!=''">
|
|
|
|
|
and a.zyq1=#{zyq}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.dc_ch ,a.dc_pl
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|