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