|
|
|
<?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="com.glxp.api.dao.inv.InvPreInProductDetailDao">
|
|
|
|
<select id="filterPreProductDetailList" resultType="com.glxp.api.entity.inv.InvPreInProductDetailEntity">
|
|
|
|
select *
|
|
|
|
from inv_prein_product_detail
|
|
|
|
<where>
|
|
|
|
<if test="code != null and code != ''">
|
|
|
|
AND code = #{code}
|
|
|
|
</if>
|
|
|
|
<if test="mainAction != null and mainAction != ''">
|
|
|
|
AND mainAction = #{mainAction}
|
|
|
|
</if>
|
|
|
|
<if test="action != null and action != ''">
|
|
|
|
AND action = #{action}
|
|
|
|
</if>
|
|
|
|
<if test="supId != null and supId != ''">
|
|
|
|
and supId = #{supId}
|
|
|
|
</if>
|
|
|
|
<if test="relId != null and relId != ''">
|
|
|
|
AND relId = #{relId}
|
|
|
|
</if>
|
|
|
|
<if test="nameCode != null and nameCode != ''">
|
|
|
|
AND nameCode like concat('%', #{nameCode}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="orderId != null and orderId != ''">
|
|
|
|
AND orderId = #{orderId}
|
|
|
|
</if>
|
|
|
|
<if test="deptCode != null and deptCode != ''">
|
|
|
|
AND deptCode = #{deptCode}
|
|
|
|
</if>
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
</if>
|
|
|
|
<if test="invSpaceCode != null and invSpaceCode != ''">
|
|
|
|
AND invSpaceCode = #{invSpaceCode}
|
|
|
|
</if>
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
</if>
|
|
|
|
<if test="batchNo == null and batchNo == ''">
|
|
|
|
AND batchNo is null
|
|
|
|
</if>
|
|
|
|
<if test="productIdList != null and productIdList.size() != 0">
|
|
|
|
AND relId in
|
|
|
|
<foreach collection="productIdList" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</if>
|
|
|
|
<if test="updateTime != null and updateTime != ''">
|
|
|
|
AND updateTime <![CDATA[ <= ]]> #{updateTime}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
<choose>
|
|
|
|
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')">
|
|
|
|
order by ${orderBy} ${sort}
|
|
|
|
</when>
|
|
|
|
<otherwise>
|
|
|
|
ORDER BY updateTime DESC
|
|
|
|
</otherwise>
|
|
|
|
</choose>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<delete id="deleteInvPreProductDetail">
|
|
|
|
delete
|
|
|
|
from inv_prein_product_detail
|
|
|
|
<where>
|
|
|
|
<if test="relId != null and relId != ''">
|
|
|
|
AND relId = #{relId}
|
|
|
|
</if>
|
|
|
|
<if test="batchNo != null and batchNo != '' and batchNo != 'empty'">
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
</if>
|
|
|
|
<if test="batchNo == 'empty'">
|
|
|
|
AND batchNo is null
|
|
|
|
</if>
|
|
|
|
<if test="supId != null and supId != ''">
|
|
|
|
AND supId = #{supId}
|
|
|
|
</if>
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</delete>
|
|
|
|
</mapper>
|