admin 管理员组

文章数量: 887021


2024年1月9日发(作者:数据库资源)

ption from inventroy_history hi left join inventroy_operation op

on roy_operation_id = roy_operation_id

left join product pr

on t_id =t_id

left join operation_type ty

on ion_type_id = ion_type_id

left join employee em

on ee_id = ee_id

left join (select inventroy__storage_id as to_storage_id, as name from inventroy_operation , storage where inventroy__storage_id = e_id) st on _storage_id = _storage_id

left join (select inventroy__storage_id as from_storage_id, as name from inventroy_operation , storage where inventroy__storage_id = e_id) sm on _storage_id = _storage_id

left join (select inventroy__store_id as to_store_id, as name from inventroy_operation , store where inventroy__store_id = _id) st1 on _store_id = _store_id

left join (select inventroy__store_id as from_store_id, as name from inventroy_operation , store where inventroy__store_id = _id) sm1 on _store_id = _store_id

left join operation_reason re

on ion_reason_id = ion_reason_id

WHERE 1=1 and ion_type_id = #{operationTypeId}

and (_storage_id = #{storage_id} or _storage_id = #{storage_id})

and ry_id like concat(‘%‘,‘(‘,#{category_id},‘)‘,‘%‘) and t_code like concat(‘%‘,#{product_code},‘%‘) and like concat(‘%‘,#{product_name},‘%‘) and date(_time) between #{start_time} and #{end_time} group by roy_history_id

注:and (ion_type_id = ? or ion_type_id = ?)


本文标签: 资源 数据库 作者