<?xml version="1.0"?>
|
<!DOCTYPE hibernate-mapping PUBLIC
|
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
|
<hibernate-mapping>
|
<sql-query name="StuffPickQuery">
|
<![CDATA[
|
|
select
|
iosp_id,iosp_sn,iosp_size,iosp_volumes,iosp_pick_out_size,iosp_type,create_time,iosp_remark,
|
iosp_good,(iosp_size-iosp_pick_out_size) as iosp_pick_in_size,
|
creator,iosp_bbst_id,bbst_name,bbst_style,bbst_type,(bbst_amount-bbst_occuption) as bbstUse,
|
(select sum(iopd_allot_size) from io_stuff_pick_detail where iopd_iosp_id=iosp_id) as allot
|
from io_stuff_pick
|
left join bb_stuff bbst on iosp_bbst_id=bbst_id
|
where 1=1
|
<<and iosp_sn = :iospSn>>
|
<<and iosp_volumes like concat("%", :iospVolumes, "%") >>
|
<<and create_time >= :startDate>>
|
<<and create_time <= :endDate>>
|
<<and iosp_type = :iospType>>
|
<<and bbst_id = :bbstId>>
|
<<and bbst_style = :bbstStyle>>
|
<<and bbst_type = :bbstType >>
|
and ##CONDITIONS##
|
order by iosp_sn desc
|
|
]]>
|
</sql-query>
|
</hibernate-mapping>
|