WMS物料管理高级筛选查询
This commit is contained in:
@@ -113,11 +113,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="barCode != null and barCode != ''">
|
||||
and bar_code like concat('%',#{barCode},'%')
|
||||
</if>
|
||||
<if test="materialClassifyCode != null and materialClassifyCode != ''">
|
||||
and material_classify_code = #{materialClassifyCode}
|
||||
<if test="materialClassifyCode != null and materialClassifyCode.size() > 0">
|
||||
<foreach collection="materialClassifyCode" item="code" open="and (" separator="or" close=")">
|
||||
FIND_IN_SET(#{code}, material_classify_code) > 0
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialClassifyName != null and materialClassifyName != ''">
|
||||
and material_classify_name like concat('%', #{materialClassifyName}, '%')
|
||||
<if test="materialClassifyName != null and materialClassifyName.size() > 0">
|
||||
<foreach collection="materialClassifyName" item="name" open="and (" separator="or" close=")">
|
||||
material_classify_name like concat('%', #{name}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialType != null and materialType != ''">
|
||||
and material_type = #{materialType}
|
||||
@@ -186,6 +190,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
or
|
||||
instr(bar_code, #{compoundOrQuery}) > 0
|
||||
)
|
||||
</if>
|
||||
<if test="batchId != null">
|
||||
and exists (
|
||||
select 1 from material_goods_rule mgr
|
||||
where mgr.material_base_info_id = material_base_info.material_base_info_id
|
||||
and mgr.batch_id = #{batchId}
|
||||
and mgr.del_flag = 1
|
||||
)
|
||||
</if>
|
||||
<!-- 传 1:只查公共 , 2:只查自己的 ,3:公共的和自己的 -->
|
||||
<choose>
|
||||
@@ -223,11 +235,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="barCode != null and barCode != ''">
|
||||
and b.bar_code = #{barCode}
|
||||
</if>
|
||||
<if test="materialClassifyCode != null and materialClassifyCode != ''">
|
||||
and b.material_classify_code = #{materialClassifyCode}
|
||||
<if test="materialClassifyCode != null and materialClassifyCode.size() > 0">
|
||||
<foreach collection="materialClassifyCode" item="code" open="and (" separator="or" close=")">
|
||||
FIND_IN_SET(#{code}, b.material_classify_code) > 0
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialClassifyName != null and materialClassifyName != ''">
|
||||
and b.material_classify_name like concat('%', #{materialClassifyName}, '%')
|
||||
<if test="materialClassifyName != null and materialClassifyName.size() > 0">
|
||||
<foreach collection="materialClassifyName" item="name" open="and (" separator="or" close=")">
|
||||
b.material_classify_name like concat('%', #{name}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialType != null and materialType != ''">
|
||||
and b.material_type = #{materialType}
|
||||
|
||||
Reference in New Issue
Block a user