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
<?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="ProductExitJieShouLeftQuery">
        <![CDATA[
 
SELECT 
bbpr_id,
bbpr_name,
bbpr_sn,
bbpr_brand,
bbpr_style,
bbpr_size,
sydi_name as bbpr_lei_xing,
ouqd_id,
ouqd_bbbp_id,
ouqd_jia_ji,
ouqd_size,
ouqd_remark,
ouqd_ouql_id,
ouqd_send_size,
ouql_sn,
(select count(*) from out_qingling_detail_item,out_qingling_process 
    where ouqi_ouqd_id=ouqd_id and ouqi_ouqp_id=ouqd_is_process and ouqi_ouqp_id=ouqp_id and ouqp_author=:ouqpAuthor and ouqp_date=:ouqpDate
) as reviceSize
 
from out_qingling_detail
left join bb_product on bbpr_id = ouqd_bbpr_id
LEFT join out_qingling on ouql_id = ouqd_ouql_id
left join sys_dictionary on sydi_id = bbpr_sydi_id
where 1=1
 
<< and ouqd_locationid =:locationid>>
 and ouqd_ouql_id = :ouqdOuqlId
   and ##CONDITIONS##
 
        ]]>
    </sql-query>
</hibernate-mapping>