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
<?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="BbStuffStoreDetailQuery">
        <![CDATA[
 
SELECT 
cgse_sn,cgse_entry_date,bbbp_name,bbst_name,bbst_style,bbst_type,cgsd_volume,cgsd_now_amount_w,cgsd_now_reject_amount
FROM cg_stuff_entry_detail left join
bb_stuff b on cgsd_bbst_id=b.bbst_id left join
cg_stuff_entry c on c.cgse_id=cgsd_cgse_id left join
bb_business_partner d on c.cgse_bbbp_id=d.bbbp_id
WHERE 1=1
and c.cgse_flag_entry !=  '五金' and c.cgse_flag_entry !=  '五金退货'  
<<and bbst_name like concat("%", :bbstName,"%") >>
<<and bbst_style like concat("%", :bbstStyle, "%")>>
<<and cgsd_volume= :cgsdVolume>>
<<and bbst_type= :bbstType>>
<<and bbst_amount>= :bbstAmount>>
<<and bbst_reject_amount>= :bbstRejectAmount>>
<<and cgse_entry_date>=:beginDate>>
<<and cgse_entry_date<=:endDate>>
and ##CONDITIONS##
 
        ]]>
    </sql-query>
</hibernate-mapping>