Skip to content

库区检索

InvLotAttSearch

批属性查询

sqlId: InvLotAttSearch

SQL

sql
select a.*,b.item_code,b.item_name
from inv_lot_att a
inner join bas_item b on a.item_id = b.item_id
where (1=1
--@ or a.lot_id = #{old_lot_id}::numeric
)
--@ and a.item_id = #{item_id}::numeric
--@ and a.lot_id = #{lot_id}::numeric
--% and (a.lot_no like #{lot_no} or a.production_date like #{lot_no} or a.valid_until like #{lot_no} or a.project_code like #{lot_no} or a.version like #{lot_no} or a.inventory_loc like #{lot_no})
--@ and exists(select 1 from inv_loc_primary where a.lot_id = lot_id and primary_code = #{primary_code})
--@ and exists(select 1 from inv_lot_loc where a.lot_id = lot_id and loc_id = #{loc_id}::numeric)

字段

总共 12

字段描述
lot_id批属性id
parent_lot_id上游批次ID
item_id产品ID
pack_id包装ID
item_code商品编号
item_name商品名称
lot_no批号
production_date生产日期
valid_until有效期至
project_code项目号
version版本号
inventory_loc库存地点