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
<?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="VerifyProductSizeVsWareHouseCountSizeQuery">
        <![CDATA[
 
select * from(
select sum(iocd_checked_size-iocd_profit_size-iocd_loss_size) warehouse_size,bbpr_id,iocd_bbpr_size ,bbpr_sn,bbpr_brand,bbpr_style,bbpr_name,bbpr_locationid,ioch_year_month
from io_check_detail
left join bb_product on bbpr_id=iocd_bbpr_id
left join io_check on iocd_ioch_id=ioch_id
where 1=1
and iocd_locationid=:locationid
and ioch_year_month=:iochYwarMonth
   and ##CONDITIONS##
group by bbpr_id
) a
where a.iocd_bbpr_size!=a.warehouse_size
and a.bbpr_locationid=:locationid
and a.ioch_year_month=:iochYwarMonth
 
        ]]>
    </sql-query>
</hibernate-mapping>