,file.url as photo_url,cate.name as material_type_name
from erp_material erp
left join(
@ -75,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by att.rel_id
)file
on erp.id = file.rel_id
left join sys_supplier ss on ss.supplier_id = erp.supplier_id
<where>
<iftest="createBy != null and createBy != ''"> and erp.create_by = #{createBy}</if>
<iftest="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and erp.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
@ -102,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<iftest="applyUser != null and applyUser != ''"> and erp.apply_user = #{applyUser}</if>
<iftest="applyTime != null "> and erp.apply_time = #{applyTime}</if>
<iftest="keyword != null and keyword != ''"> and (erp.material_no like concat('%',#{keyword},'%') or erp.material_name like concat('%',#{keyword},'%'))</if>
<iftest="supplierId != null and supplierId != ''"> and erp.supplier_id = #{supplierId}</if>
</where>
order by erp.update_time desc
</select>
@ -161,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<iftest="applyTitle != null">apply_title,</if>
<iftest="applyUser != null">apply_user,</if>
<iftest="applyTime != null">apply_time,</if>
<iftest="supplierId != null">supplier_id,</if>
del_flag,
create_time,
update_time,
@ -191,6 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<iftest="applyTitle != null">#{applyTitle},</if>
<iftest="applyUser != null">#{applyUser},</if>
<iftest="applyTime != null">#{applyTime},</if>
<iftest="supplierId != null">#{supplierId},</if>
0,
now(),
now(),
@ -227,6 +238,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"