liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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>