PC入库单商品名称编码查询修改
This commit is contained in:
@@ -392,6 +392,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||
and date_format(a.create_time,'%Y-%m-%d') <= #{createTimeEnd}
|
||||
</if>
|
||||
<!-- 入库明细:物料名称、物料编码(同一明细行同时满足;与计划数量汇总口径一致)。关联 material_base_info 避免明细冗余名称与主档不一致时筛不到 -->
|
||||
<if test="(materialName != null and materialName != '') or (materialCode != null and materialCode != '')">
|
||||
and exists (
|
||||
select 1 from in_material_detail imd
|
||||
left join material_base_info mb on imd.material_base_info_id = mb.material_base_info_id and mb.del_flag = 1
|
||||
where imd.in_order_number = a.in_order_number
|
||||
and imd.del_flag = 1
|
||||
and (imd.level is null or imd.level = 1)
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and (
|
||||
imd.material_name like concat('%', #{materialName}, '%')
|
||||
or mb.material_name like concat('%', #{materialName}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
and (
|
||||
imd.material_code like concat('%', #{materialCode}, '%')
|
||||
or mb.material_code like concat('%', #{materialCode}, '%')
|
||||
)
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
|
||||
Reference in New Issue
Block a user