<?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="ProductOutExitOrKuCunItemListQuery">
|
<![CDATA[
|
|
SELECT cgpr_sn,
|
bbbp_name,
|
cgen_entry_date,
|
bbit_sheng_chan_date,
|
bbit_xiao_qi_date,
|
bbit_batch_number,
|
bbit_xu_hao,
|
cged_price,
|
bbit_price,
|
bbit_is_pay,
|
bbit_id,
|
bbbp_sn,
|
bbit_code,
|
bbpr_sn,
|
bbpr_id,
|
bbwt_name
|
|
from bb_product_item
|
|
LEFT JOIN out_exit_item on ouei_bbit_id = bbit_id
|
LEFT JOIN cg_entry_detail on cged_id = bbit_cged_id
|
LEFT JOIN cg_entry on cgen_id = cged_cgen_id
|
LEFT JOIN cg_procure_detail on bbit_cgpd_id = cgpd_id
|
LEFT JOIN cg_procure on cgpd_cgpr_id = cgpr_id
|
LEFT JOIN bb_business_partner on bbit_bbbp_id = bbbp_id
|
LEFT JOIN bb_product on bbpr_id = bbit_bbpr_id
|
left join bb_warehouse on bbwh_id=bbit_bbwh_id
|
|
WHERE 1=1
|
<<and bbit_is_entry=:bbitIsEntry>>
|
<<and ouei_oued_id = :oueiOuedId>>
|
<<and bbit_bbpr_id = :bbitBbprId>>
|
<<and bbit_is_exit <> :bbitIsExit>>
|
<<and bbit_locationid= :locationid>>
|
<<and ifnull(bbit_bbwh_id,'')= :bbitBbwhId>>
|
<<and (bbit_bbwh_id is null and 1=:bbwhIsNull)>>
|
<<and bbit_bbbp_id = :bbitBbbpId>>
|
and ##CONDITIONS##
|
group by bbit_id
|
|
]]>
|
</sql-query>
|
</hibernate-mapping>
|