Commit adc69b18 by zhangtw

入库查询条件添加模糊查询

parent bc9ae42e
...@@ -384,16 +384,16 @@ ...@@ -384,16 +384,16 @@
AND DATE(io.inbound_date) <= #{inboundDateEnd} AND DATE(io.inbound_date) <= #{inboundDateEnd}
</if> </if>
<if test="sapNo != null and sapNo != ''"> <if test="sapNo != null and sapNo != ''">
AND ms.sap_no = #{sapNo} AND ms.sap_no like concat('%', #{sapNo}, '%')
</if> </if>
<if test="materialName != null and materialName != ''"> <if test="materialName != null and materialName != ''">
AND ms.material_name LIKE CONCAT('%', #{materialName}, '%') AND ms.material_name LIKE CONCAT('%', #{materialName}, '%')
</if> </if>
<if test="orderId != null and orderId != ''"> <if test="orderId != null and orderId != ''">
AND ioi.order_id = #{orderId} AND ioi.order_id like concat('%', #{orderId}, '%')
</if> </if>
<if test="batchId != null and batchId != ''"> <if test="batchId != null and batchId != ''">
AND ioi.batch_id = #{batchId} AND ioi.batch_id like concat('%', #{batchId}, '%')
</if> </if>
<if test="warehouseId != null and warehouseId != ''"> <if test="warehouseId != null and warehouseId != ''">
AND ioi.warehouse_id = #{warehouseId} AND ioi.warehouse_id = #{warehouseId}
......
...@@ -76,10 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,10 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectInboundOrdersVo"/> <include refid="selectInboundOrdersVo"/>
<where> <where>
<if test="id != null and Id != ''"> and id = #{Id}</if> <if test="id != null and Id != ''"> and id = #{Id}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if> <if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="systemNo != null and systemNo != ''"> and system_no = #{systemNo}</if> <if test="systemNo != null and systemNo != ''"> and system_no like concat('%', #{systemNo}, '%')</if>
<if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if> <if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if>
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if> <if test="batchId != null and batchId != ''"> and batch_id like concat('%', #{batchId}, '%') </if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if> <if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="ownerId != null and ownerId != ''"> and owner_id = #{ownerId}</if> <if test="ownerId != null and ownerId != ''"> and owner_id = #{ownerId}</if>
<if test="orderStatus != null "> and order_status = #{orderStatus}</if> <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论