<?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>
|