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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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="IoDeliverListQuery">
        <![CDATA[
 
SELECT
i.iode_id,
i.iode_bbbp_id,
i.iode_sn,
i.iode_zhekou,
i.iode_totle,
i.iode_saler,
i.iode_order_sns,
i.iode_send_date,
i.iode_type,
i.iode_is_task,
i.iode_flag_print,
i.iode_remark,
i.creator,
i.create_time,
i.modifier,
i.modify_time,
c.bbbp_name,
p.bbpr_name,
p.bbpr_style
FROM
io_deliver AS i
Left Join io_deliver_detail AS d ON i.iode_id = d.iodd_iode_id
Left Join bb_business_partner AS c ON c.bbbp_id = i.iode_bbbp_id
Left Join bb_product AS p ON d.iodd_bbpr_id = p.bbpr_id
where 1=1
<<and i.iode_id =:iodeId>>
<<and i.iode_type like concat("%",:iodeType,"%")>>
<<and i.iode_send_date >=:startCreateTime>>
<<and i.iode_send_date <=:endCreateTime>>
<<and i.factory_id in (:factoryIds)>>
   and ##CONDITIONS##
 
GROUP BY
i.iode_id
 
        ]]>
    </sql-query>
</hibernate-mapping>