优化条码重复的校验规则

This commit is contained in:
季圣华
2022-03-17 00:11:42 +08:00
parent d923c8f11a
commit 06f6c4a4fb
3 changed files with 50 additions and 23 deletions

View File

@@ -319,6 +319,23 @@
order by me.id desc
</select>
<select id="getMaterialByBarCodeAndWithOutMId" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.name unit_name, me.id meId,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal, 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'
left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where
me.bar_code in (
<foreach collection="barCodeArray" item="barCode" separator=",">
#{barCode}
</foreach>
)
and me.material_id!=#{mId}
and ifnull(m.delete_flag,'0') !='1'
order by me.id desc
</select>
<update id="setUnitIdToNull">
update jsh_material
set unit_id = null