增加商品按条码 名称 规格查询的接口

This commit is contained in:
季圣华
2023-03-23 01:20:40 +08:00
parent 7a3042eebc
commit d0396d7ee4
5 changed files with 132 additions and 0 deletions

View File

@@ -297,6 +297,19 @@
and ifnull(m.delete_flag,'0') !='1'
</select>
<select id="getMaterialByParam" resultType="com.jsh.erp.datasource.vo.MaterialVoSearch">
select me.bar_code, m.name, m.standard, m.model, m.color, me.commodity_unit unit
from jsh_material m
left join jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
where 1=1
<if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
and ifnull(m.delete_flag,'0') !='1'
limit 0,20
</select>
<select id="findBySelectWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.name unit_name,mc.name categoryName,me.bar_code m_bar_code,me.id meId,me.commodity_unit,me.sku from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'