<?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="C_R_getSchoolDetailListQuery">
|
<![CDATA[
|
select aa.* from
|
(
|
select
|
scco_id,
|
(
|
select count(*) from sc_check_org_subject
|
left join sc_check_org on scco_id=scos_scco_id
|
where 1=1
|
and scos_is_ok = 'N'
|
and scos_scco_id=scco_id
|
|
|
) as problemSize
|
|
|
from sc_check_org
|
left join sc_check on scch_id = scco_scch_id
|
left join sc_category on scch_scca_id = scca_id
|
where 1=1
|
<<and scco_org_id = :orgId>>
|
<<and (1 = :isNotNull and scco_submit_data is not null)>>
|
<<and (1 = :isNull and scco_submit_data is null)>>
|
<<and scca_id = :sccaId>>
|
<<and scco_begin_date >= :beginDate>>
|
<<and scco_begin_date <= :endDate>>
|
) as aa
|
where 1=1
|
<<and aa.problemSize > :problemSize>>
|
and ##CONDITIONS##
|
order by aa.scco_begin_date desc
|
]]>
|
</sql-query>
|
</hibernate-mapping>
|