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
<?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="TaskCenterListQuery">
        <![CDATA[
 
select prod_id, pror_sn, bbbp_name,sydi_name,pror_send_date, pror_order_date,
bbpr_name,bbpr_style,bbst_name,bbst_style,prod_quantity,prod_order_size,prod_entry_size,
prod_task_size,prod_remark,bbst_ratio,bbst_id,bbst_amount,bbst_occuption,prod_urgent,prod_flagt,
 
  from pr_order_detail
left join pr_order on prod_pror_id=pror_id
left join bb_business_partner on pror_bbbp_id=bbbp_id
left join sys_dictionary on bbbp_sydi_id=sydi_id
left join bb_product on prod_bbpr_id=bbpr_id
left join bb_stuff on bbst_id=prod_bbst_id 
where 1=1 and prod_quantity>0 and prod_flagp != '完成' amd prod_flags!='完成' 
and prod_task_size-prod_quantity<0
and (prod_flagt ='已审核')
<<and (bbbp_name like concat("%",:bbbpName,"%") or bbbp_mnemonic_code like concat("%",:bbbpName,"%"))>>
<<and pror_sn = :prorSn>>
<<and prod_id in (:prodIds)>>
<<and prod_id not in(:notInIds)>>
<<and prod_bbst_id = :prodBbstId>>
<<and bbpr_name like concat("%", :bbprName, "%")>>
<<and bbpr_style=:bbprStyle>>
<<and bbst_name like concat("%", :bbstName, "%")>>
<<and bbst_style=:bbstStyle>>
   and ##CONDITIONS##
 
        ]]>
    </sql-query>
</hibernate-mapping>