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_order_date,
| ouql_recived_author,
| ouql_org,
| ouqd_bbpr_id,
| ouqd_size,
| ouqd_send_size,
| ouqd_jia_ji,
| bbpr_id,
| bbpr_sn,
| bbpr_name,
| bbpr_brand,
| ouqd_is_process,
| ouqd_id,
| sydi_name as bbpr_lei_xing,
| ouqp_size,
| ouqp_date,
| ouqp_id,
| if(CONCAT(ouql_remark,',',ouqd_remark)=',','',CONCAT(ouql_remark,',',ouqd_remark)) as ouqd_remark,
| (select count(*) from out_qingling_detail_item where ouqi_ouqp_id=ouqp_id) as yisaomiao
| from out_qingling_process
| left join out_qingling_detail on ouqd_id=ouqp_ouqd_id
| left join out_qingling on ouqd_ouql_id = ouql_id
| left join bb_product on ouqd_bbpr_id=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_is_process is not NULL
| and ouqp_state='0'
| and ouqp_locationid=:locationid
| <<and ouqp_author=:ouqpAuthor>>
| <<and ouqp_date=:ouqpDate>>
| and ##CONDITIONS##
| order by ouql_id desc , ouqd_jia_ji desc
|
| ]]>
| </sql-query>
| </hibernate-mapping>
|
|