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="InOutReturnSummaryReportQuery">
| <![CDATA[
|
| SELECT
| a.bbpr_sn,
| a.bbpr_name,
| a.bbpr_en_name,
| a.bbpr_unit,
| a.bbpr_style,
| a.bbpr_brand,
| a.bbpr_size,
| a.bbpr_sale_price,
| b.bbbr_name,
| d.cgen_entry_type,
| d.cgen_entry_date,
| c.cged_price,
| 0.0 entry_size,
| 0.0 out_exit,
| 0.0 return_size,
| 0.0 cost_price,
| 0.0 cost_total,
| '' warehouse,
| '' business_type
| FROM
| bb_product a
| LEFT JOIN bb_branch b ON a.bbpr_bbbr_id = b.bbbr_id
| LEFT JOIN cg_entry_detail c ON c.cged_bbpr_id = a.bbpr_id
| LEFT JOIN cg_entry d ON c.cged_cgen_id = d.cgen_id
| WHERE 1=1
| <<AND a.bbpr_locationid=:locationid>>
| <<AND b.bbbr_locationid=:locationid>>
| <<AND c.cged_locationid=:locationid>>
| <<AND d.cgen_locationid=:locationid>>
| <<AND d.cgen_entry_date>=:beginDate>>
| <<AND d.cgen_entry_date<=:endDate>>
| <<AND a.bbpr_id=:bbprId>>
| <<AND bbbr_id=:bbbrId>>
| GROUP BY a.bbpr_id
|
| ]]>
| </sql-query>
| </hibernate-mapping>
|
|