|
|
|
@ -106,7 +106,7 @@
|
|
|
|
|
select
|
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
|
from hrmsubcompany t
|
|
|
|
|
WHERE id IN
|
|
|
|
|
WHERE (t.canceled is null or t.canceled != '1') and id IN
|
|
|
|
|
<foreach collection="ids" index="index" open="(" item="id" separator="," close=")">
|
|
|
|
|
<if test="(index % 999) == 998"> NULL) OR id IN(</if>#{id}
|
|
|
|
|
</foreach>
|
|
|
|
@ -117,25 +117,25 @@
|
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
|
FROM
|
|
|
|
|
hrmsubcompany t
|
|
|
|
|
WHERE t.SUPSUBCOMID = 0
|
|
|
|
|
WHERE t.SUPSUBCOMID = 0 and (t.canceled is null or t.canceled != '1')
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="hasSubs" resultType="java.lang.String">
|
|
|
|
|
select supsubcomid
|
|
|
|
|
from hrmsubcompany
|
|
|
|
|
where 1=1
|
|
|
|
|
where (canceled is null or canceled != '1')
|
|
|
|
|
<include refid="subsWhere"/>
|
|
|
|
|
union
|
|
|
|
|
select subcompanyid1
|
|
|
|
|
from hrmdepartment
|
|
|
|
|
where 1=1
|
|
|
|
|
where (canceled is null or canceled != '1')
|
|
|
|
|
<include refid="subsWhere"/>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="hasDetachSubs" resultType="java.lang.String">
|
|
|
|
|
select supsubcomid
|
|
|
|
|
from hrmsubcompany
|
|
|
|
|
where 1=1
|
|
|
|
|
where (canceled is null or canceled != '1')
|
|
|
|
|
<include refid="subsWhere"/>
|
|
|
|
|
and id in
|
|
|
|
|
<foreach collection="companyIds" open="(" item="id" separator="," close=")">
|
|
|
|
@ -144,7 +144,7 @@
|
|
|
|
|
union
|
|
|
|
|
select subcompanyid1
|
|
|
|
|
from hrmdepartment
|
|
|
|
|
where 1=1
|
|
|
|
|
where (canceled is null or canceled != '1')
|
|
|
|
|
<include refid="subsWhere"/>
|
|
|
|
|
and subcompanyid1 in
|
|
|
|
|
<foreach collection="companyIds" open="(" item="id" separator="," close=")">
|
|
|
|
|