|
|
@ -325,4 +325,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<update id="updateMaterialBomNo" parameterType="ErpMaterial"> |
|
|
|
update erp_material set bomNo = #{bomNo} where material_no = #{materialNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="searchMaterialsByPrefix" parameterType="String" resultMap="ErpMaterialResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.remark,erp.bomNo, erp.material_no, |
|
|
|
erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem, |
|
|
|
erp.material_type, erp.process_method, erp.unit, erp.brand, erp.`describe`, |
|
|
|
erp.warehouse_dept,erp.business_members,cate.parent_id,cate.name as material_type_name |
|
|
|
from erp_material erp |
|
|
|
left join ( |
|
|
|
select code,name,parent_id from sys_category |
|
|
|
where parent_id in( |
|
|
|
select id from sys_category |
|
|
|
where parent_id = (select id from sys_category where code = 'materialType') ) |
|
|
|
)cate on erp.material_type = cate.code |
|
|
|
where cate.parent_id in (select id from sys_category where code in ('cp','bcp')) |
|
|
|
and erp.del_flag = '0' and erp.audit_status = '1' |
|
|
|
and material_no like concat(#{prefix}, '%') escape '\\' |
|
|
|
</select> |
|
|
|
</mapper> |