diff --git a/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml b/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml index 30e94239..9aefaa75 100644 --- a/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml +++ b/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml @@ -320,10 +320,10 @@ 0, 0, 0, NOW(), '2099-12-31' FROM hrmcompany - delete from jcl_org_map where ftype =3 and id not in (select FPARENTID from jcl_org_map where ftype=4 ) and fdateend > #{currentDate} + delete from jcl_org_map where ftype =3 and fdateend > #{currentDate} and id not in (select a.FPARENTID from (select FPARENTID from jcl_org_map where ftype=4 and fdateend > #{currentDate}) a)