|
@@ -849,8 +849,8 @@
|
|
|
ORDER BY m.id DESC, me.default_flag DESC, me.production_date,me.batch_number ASC
|
|
|
</select>
|
|
|
|
|
|
- <select id="inventoryInquiry" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
|
|
|
- select m.*,u.name unit_name,mc.name categoryName,me.bar_code,me.id meId,me.commodity_unit,me.sku,
|
|
|
+ <select id="inventoryInquiry" parameterType="com.jsh.erp.datasource.pda.dto.PDAInventoryDTO" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
|
|
|
+ select m.id materialId,m.name materialName,m.standard materialStandard,u.name unit_name,mc.name categoryName,me.bar_code,me.id meId,me.commodity_unit,me.sku,
|
|
|
me.production_date,me.expiry_num,me.supplier_id,me.batch_number,me.depot_id,me.position,d.`name` depotName,s.supplier supplierName
|
|
|
from jsh_material m
|
|
|
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
|
@@ -861,15 +861,19 @@
|
|
|
where m.enabled = 1
|
|
|
and me.id is not null
|
|
|
<if test="keyword != null and keyword !=''">
|
|
|
- <bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
|
- and me.batch_number like #{bindKey} or m.name like #{bindKey}
|
|
|
+ <bind name="bindKey" value="'%'+keyword+'%'"/>
|
|
|
+ and (me.batch_number like #{bindKey} or m.name like #{bindKey})
|
|
|
</if>
|
|
|
<if test="position != null and position !=''">
|
|
|
<bind name="bindPosition" value="'%'+position+'%'"/>
|
|
|
and me.position like #{bindPosition}
|
|
|
</if>
|
|
|
<if test="categoryId != null">
|
|
|
- and m.category_id = #{category_id}
|
|
|
+ and m.category_id IN (
|
|
|
+ <foreach collection="categoryIds" item="item" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="type == 'have'">
|
|
|
and me.inventory > 0
|