|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
|
<mapper namespace="org.springblade.erpdata.mapper.ErpDataLogisticsMapper"> |
|
|
|
|
<!-- 查询调拨单列表 --> |
|
|
|
|
<!-- 查询配套明细列表 --> |
|
|
|
|
<select id="queryAllocationMess" resultType="org.springblade.desk.logistics.pojo.vo.AllocationMessVO"> |
|
|
|
|
SELECT * FROM ( |
|
|
|
|
SELECT t1.*, ROWNUM no FROM ( |
|
|
|
|
@ -20,6 +20,24 @@ |
|
|
|
|
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
|
|
|
|
AND a.prtlotno = #{dto.prtlotno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.pkreqdat != null and dto.pkreqdat != ''"> |
|
|
|
|
AND a.pkreqdat = #{dto.pkreqdat} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjSplcode != null and dto.fjSplcode != ''"> |
|
|
|
|
AND a.fj_splcode = #{dto.fjSplcode} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''"> |
|
|
|
|
AND a.fj_pkavqty = #{dto.fjPkavqty} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.serialno != null and dto.serialno != ''"> |
|
|
|
|
AND a.serialno = #{dto.serialno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtmdept != null and dto.prtmdept != ''"> |
|
|
|
|
AND a.prtmdept = #{dto.prtmdept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plnsign != null and dto.plnsign != ''"> |
|
|
|
|
AND a.plnsign = #{dto.plnsign} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mono != null and dto.mono != ''"> |
|
|
|
|
AND a.mono = #{dto.mono} |
|
|
|
|
</if> |
|
|
|
|
@ -29,12 +47,21 @@ |
|
|
|
|
<if test="dto.planner1 != null and dto.planner1 != ''"> |
|
|
|
|
AND a.planner1 = #{dto.planner1} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.subpkdate != null and dto.subpkdate != ''"> |
|
|
|
|
AND a.subpkdate = #{dto.subpkdate} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.warctlr != null and dto.warctlr != ''"> |
|
|
|
|
AND a.warctlr = #{dto.warctlr} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.barcodeno != null and dto.barcodeno != ''"> |
|
|
|
|
AND a.barcodeno = #{dto.barcodeno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plandept != null and dto.plandept != ''"> |
|
|
|
|
AND a.plandept = #{dto.plandept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.remark != null and dto.remark != ''"> |
|
|
|
|
AND a.remark LIKE '%' || #{dto.remark} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtclass != null and dto.prtclass != ''"> |
|
|
|
|
AND a.prtclass = #{dto.prtclass} |
|
|
|
|
</if> |
|
|
|
|
@ -47,41 +74,211 @@ |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 查询调拨单数量 --> |
|
|
|
|
<!-- 查询配套明细数量 --> |
|
|
|
|
<select id="queryAllocationMessNum" resultType="java.lang.Integer"> |
|
|
|
|
SELECT COUNT(1) FROM dba_mgr.v_mes_rb_pkpqry |
|
|
|
|
<where> |
|
|
|
|
<if test="dto.pkno != null and dto.pkno != ''"> |
|
|
|
|
AND pkno LIKE CONCAT('%', #{dto.pkno}, '%') |
|
|
|
|
AND a.pkno LIKE '%' || #{dto.pkno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prntno != null and dto.prntno != ''"> |
|
|
|
|
AND a.prntno LIKE '%' || #{dto.prntno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mtltmrk != null and dto.mtltmrk != ''"> |
|
|
|
|
AND a.mtltmrk = #{dto.mtltmrk} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
|
|
|
|
AND a.prtlotno = #{dto.prtlotno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.pkreqdat != null and dto.pkreqdat != ''"> |
|
|
|
|
AND a.pkreqdat = #{dto.pkreqdat} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjSplcode != null and dto.fjSplcode != ''"> |
|
|
|
|
AND a.fj_splcode = #{dto.fjSplcode} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''"> |
|
|
|
|
AND a.fj_pkavqty = #{dto.fjPkavqty} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.serialno != null and dto.serialno != ''"> |
|
|
|
|
AND a.serialno = #{dto.serialno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtmdept != null and dto.prtmdept != ''"> |
|
|
|
|
AND a.prtmdept = #{dto.prtmdept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plnsign != null and dto.plnsign != ''"> |
|
|
|
|
AND a.plnsign = #{dto.plnsign} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mono != null and dto.mono != ''"> |
|
|
|
|
AND a.mono = #{dto.mono} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.schemer != null and dto.schemer != ''"> |
|
|
|
|
AND a.schemer = #{dto.schemer} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.planner1 != null and dto.planner1 != ''"> |
|
|
|
|
AND a.planner1 = #{dto.planner1} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.subpkdate != null and dto.subpkdate != ''"> |
|
|
|
|
AND a.subpkdate = #{dto.subpkdate} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.warctlr != null and dto.warctlr != ''"> |
|
|
|
|
AND a.warctlr = #{dto.warctlr} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.barcodeno != null and dto.barcodeno != ''"> |
|
|
|
|
AND a.barcodeno = #{dto.barcodeno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plandept != null and dto.plandept != ''"> |
|
|
|
|
AND a.plandept = #{dto.plandept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.remark != null and dto.remark != ''"> |
|
|
|
|
AND a.remark LIKE '%' || #{dto.remark} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtclass != null and dto.prtclass != ''"> |
|
|
|
|
AND a.prtclass = #{dto.prtclass} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="queryAllocationStatistics" resultType="org.springblade.desk.logistics.pojo.vo.AllocationMessVO"> |
|
|
|
|
SELECT * FROM ( |
|
|
|
|
SELECT t.*, ROWNUM no FROM ( |
|
|
|
|
SELECT |
|
|
|
|
a.prtmdept, |
|
|
|
|
a.subpkdate, |
|
|
|
|
SUM(NVL(a.fj_pkavqty, 0)) AS fjpkavqty |
|
|
|
|
FROM dba_mgr.v_mes_rb_pkpqry a |
|
|
|
|
<where> |
|
|
|
|
<if test="dto.pkno != null and dto.pkno != ''"> |
|
|
|
|
AND a.pkno LIKE '%' || #{dto.pkno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prntno != null and dto.prntno != ''"> |
|
|
|
|
AND a.prntno LIKE '%' || #{dto.prntno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mtltmrk != null and dto.mtltmrk != ''"> |
|
|
|
|
AND a.mtltmrk = #{dto.mtltmrk} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
|
|
|
|
AND a.prtlotno = #{dto.prtlotno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.pkreqdat != null and dto.pkreqdat != ''"> |
|
|
|
|
AND a.pkreqdat = #{dto.pkreqdat} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjSplcode != null and dto.fjSplcode != ''"> |
|
|
|
|
AND a.fj_splcode = #{dto.fjSplcode} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''"> |
|
|
|
|
AND a.fj_pkavqty = #{dto.fjPkavqty} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.serialno != null and dto.serialno != ''"> |
|
|
|
|
AND a.serialno = #{dto.serialno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtmdept != null and dto.prtmdept != ''"> |
|
|
|
|
AND a.prtmdept = #{dto.prtmdept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plnsign != null and dto.plnsign != ''"> |
|
|
|
|
AND a.plnsign = #{dto.plnsign} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mono != null and dto.mono != ''"> |
|
|
|
|
AND a.mono = #{dto.mono} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.schemer != null and dto.schemer != ''"> |
|
|
|
|
AND a.schemer = #{dto.schemer} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.planner1 != null and dto.planner1 != ''"> |
|
|
|
|
AND a.planner1 = #{dto.planner1} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.subpkdate != null and dto.subpkdate != ''"> |
|
|
|
|
AND a.subpkdate = #{dto.subpkdate} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.warctlr != null and dto.warctlr != ''"> |
|
|
|
|
AND a.warctlr = #{dto.warctlr} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.barcodeno != null and dto.barcodeno != ''"> |
|
|
|
|
AND a.barcodeno = #{dto.barcodeno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plandept != null and dto.plandept != ''"> |
|
|
|
|
AND a.plandept = #{dto.plandept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.remark != null and dto.remark != ''"> |
|
|
|
|
AND a.remark LIKE '%' || #{dto.remark} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtclass != null and dto.prtclass != ''"> |
|
|
|
|
AND a.prtclass = #{dto.prtclass} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
GROUP BY a.prtmdept, a.subpkdate |
|
|
|
|
ORDER BY a.subpkdate DESC, a.prtmdept DESC |
|
|
|
|
) t |
|
|
|
|
WHERE ROWNUM <= #{dto.current} * #{dto.size} |
|
|
|
|
) |
|
|
|
|
WHERE no >= (#{dto.current} - 1) * #{dto.size} + 1 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="queryAllocationStatisticsNum" resultType="java.lang.Integer"> |
|
|
|
|
SELECT COUNT(1) |
|
|
|
|
FROM ( |
|
|
|
|
SELECT 1 |
|
|
|
|
FROM dba_mgr.v_mes_rb_pkpqry a |
|
|
|
|
<where> |
|
|
|
|
<if test="dto.pkno != null and dto.pkno != ''"> |
|
|
|
|
AND a.pkno LIKE '%' || #{dto.pkno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prntno != null and dto.prntno != ''"> |
|
|
|
|
AND prntno LIKE CONCAT('%', #{dto.prntno}, '%') |
|
|
|
|
AND a.prntno LIKE '%' || #{dto.prntno} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mtltmrk != null and dto.mtltmrk != ''"> |
|
|
|
|
AND mtltmrk = #{dto.mtltmrk} |
|
|
|
|
AND a.mtltmrk = #{dto.mtltmrk} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
|
|
|
|
AND prtlotno = #{dto.prtlotno} |
|
|
|
|
AND a.prtlotno = #{dto.prtlotno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.pkreqdat != null and dto.pkreqdat != ''"> |
|
|
|
|
AND a.pkreqdat = #{dto.pkreqdat} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjSplcode != null and dto.fjSplcode != ''"> |
|
|
|
|
AND a.fj_splcode = #{dto.fjSplcode} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''"> |
|
|
|
|
AND a.fj_pkavqty = #{dto.fjPkavqty} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.serialno != null and dto.serialno != ''"> |
|
|
|
|
AND a.serialno = #{dto.serialno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtmdept != null and dto.prtmdept != ''"> |
|
|
|
|
AND a.prtmdept = #{dto.prtmdept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plnsign != null and dto.plnsign != ''"> |
|
|
|
|
AND a.plnsign = #{dto.plnsign} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.mono != null and dto.mono != ''"> |
|
|
|
|
AND mono = #{dto.mono} |
|
|
|
|
AND a.mono = #{dto.mono} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.schemer != null and dto.schemer != ''"> |
|
|
|
|
AND schemer = #{dto.schemer} |
|
|
|
|
AND a.schemer = #{dto.schemer} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.planner1 != null and dto.planner1 != ''"> |
|
|
|
|
AND planner1 = #{dto.planner1} |
|
|
|
|
AND a.planner1 = #{dto.planner1} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.subpkdate != null and dto.subpkdate != ''"> |
|
|
|
|
AND a.subpkdate = #{dto.subpkdate} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.warctlr != null and dto.warctlr != ''"> |
|
|
|
|
AND warctlr = #{dto.warctlr} |
|
|
|
|
AND a.warctlr = #{dto.warctlr} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.barcodeno != null and dto.barcodeno != ''"> |
|
|
|
|
AND a.barcodeno = #{dto.barcodeno} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.plandept != null and dto.plandept != ''"> |
|
|
|
|
AND plandept = #{dto.plandept} |
|
|
|
|
AND a.plandept = #{dto.plandept} |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.remark != null and dto.remark != ''"> |
|
|
|
|
AND a.remark LIKE '%' || #{dto.remark} || '%' |
|
|
|
|
</if> |
|
|
|
|
<if test="dto.prtclass != null and dto.prtclass != ''"> |
|
|
|
|
AND prtclass = #{dto.prtclass} |
|
|
|
|
AND a.prtclass = #{dto.prtclass} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
GROUP BY a.prtmdept, a.subpkdate |
|
|
|
|
) c |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |