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
49
50
51
52
53
54
| <?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="SaomiaofenjianListQuery">
| <![CDATA[
|
| SELECT ouql_id,
| ouql_sn,
| ouql_order_author,
| ouql_syus_id,
| ouql_order_date,
| ouql_flow_json,
| ouql_recived_author,
| ouql_flow_state,
| ouql_org,
| ouql_remark,
| ouql_state,
| ouqd_bbpr_id,
| ouqd_size,
| ouqd_send_size,
| ouqd_remark,
| ouqd_jia_ji,
| bbpr_id,
| bbpr_sn,
| bbpr_name,
| bbpr_brand,
| ouqd_is_process,
| ouqd_id,
| sydi_name as bbpr_lei_xing,
| if(((select count(*) from out_qingling_detail_item where ouqi_ouqd_id=ouqd_id) -ouqd_send_size)<0,0,((select count(*) from out_qingling_detail_item where ouqi_ouqd_id=ouqd_id) -ouqd_send_size)) as yisaomiao
|
| FROM out_qingling
| left join out_qingling_detail on ouql_id=ouqd_ouql_id
| left join bb_product on bbpr_id=ouqd_bbpr_id
| left join sys_dictionary on sydi_id=bbpr_sydi_id
|
| where 1=1
|
| and ouql_state='保存'
| and ouql_flow_state=100
| and ouqd_state <> '完成'
| and ouqd_send_size<ouqd_size
| and ouqd_process_date is not null
| << and ouqd_locationid=:locationid>>
| << and ouqd_pei_huo_author=:ouqdPeiHuoAuthor>>
| and ##CONDITIONS##
| order by ouql_id desc , ouqd_jia_ji desc
|
| ]]>
| </sql-query>
| </hibernate-mapping>
|
|