|
@@ -1,23 +1,9 @@
|
|
package com.kingdee.shr.custom.service;
|
|
package com.kingdee.shr.custom.service;
|
|
|
|
|
|
-import java.sql.SQLException;
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-
|
|
|
|
-import org.slf4j.Logger;
|
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
|
-
|
|
|
|
import com.kingdee.bos.BOSException;
|
|
import com.kingdee.bos.BOSException;
|
|
import com.kingdee.bos.Context;
|
|
import com.kingdee.bos.Context;
|
|
import com.kingdee.bos.bsf.service.app.IHRMsfService;
|
|
import com.kingdee.bos.bsf.service.app.IHRMsfService;
|
|
-import com.kingdee.bos.metadata.entity.EntityViewInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.FilterInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.FilterItemInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.SelectorItemCollection;
|
|
|
|
-import com.kingdee.bos.metadata.entity.SorterItemCollection;
|
|
|
|
-import com.kingdee.bos.metadata.entity.SorterItemInfo;
|
|
|
|
|
|
+import com.kingdee.bos.metadata.entity.*;
|
|
import com.kingdee.bos.metadata.query.util.CompareType;
|
|
import com.kingdee.bos.metadata.query.util.CompareType;
|
|
import com.kingdee.eas.basedata.org.AdminOrgUnitCollection;
|
|
import com.kingdee.eas.basedata.org.AdminOrgUnitCollection;
|
|
import com.kingdee.eas.basedata.org.AdminOrgUnitFactory;
|
|
import com.kingdee.eas.basedata.org.AdminOrgUnitFactory;
|
|
@@ -27,6 +13,14 @@ import com.kingdee.eas.common.EASBizException;
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
import com.kingdee.jdbc.rowset.IRowSet;
|
|
import com.kingdee.jdbc.rowset.IRowSet;
|
|
import com.kingdee.util.StringUtils;
|
|
import com.kingdee.util.StringUtils;
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
+
|
|
|
|
+import java.sql.SQLException;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
public class GetAdminInfoService implements IHRMsfService {
|
|
public class GetAdminInfoService implements IHRMsfService {
|
|
private static final Logger logger = LoggerFactory.getLogger(GetAdminInfoService.class);
|
|
private static final Logger logger = LoggerFactory.getLogger(GetAdminInfoService.class);
|
|
@@ -34,7 +28,7 @@ public class GetAdminInfoService implements IHRMsfService {
|
|
/**
|
|
/**
|
|
* 组织下属组织
|
|
* 组织下属组织
|
|
* @param ctx
|
|
* @param ctx
|
|
- * @param adminOrgId
|
|
|
|
|
|
+ * @param param
|
|
* @return
|
|
* @return
|
|
* @throws BOSException
|
|
* @throws BOSException
|
|
* @throws SQLException
|
|
* @throws SQLException
|
|
@@ -96,8 +90,10 @@ public class GetAdminInfoService implements IHRMsfService {
|
|
map.put("count",0);
|
|
map.put("count",0);
|
|
}
|
|
}
|
|
int totalCount = GetOrgUtils.getPersonCount (ctx, adminInfo.getId().toString(),"0");
|
|
int totalCount = GetOrgUtils.getPersonCount (ctx, adminInfo.getId().toString(),"0");
|
|
- map.put("totalCount",totalCount);
|
|
|
|
- maplist.add(map);
|
|
|
|
|
|
+ if(totalCount > 0 ){
|
|
|
|
+ map.put("totalCount",totalCount);
|
|
|
|
+ maplist.add(map);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return maplist;
|
|
return maplist;
|
|
|
|
|
|
@@ -107,7 +103,9 @@ public class GetAdminInfoService implements IHRMsfService {
|
|
public HashMap<String, Integer> getDirectSubCol(Context ctx) throws BOSException {
|
|
public HashMap<String, Integer> getDirectSubCol(Context ctx) throws BOSException {
|
|
HashMap<String, Integer> admPersonMap = new HashMap ();
|
|
HashMap<String, Integer> admPersonMap = new HashMap ();
|
|
try {
|
|
try {
|
|
- String filterStr = " and admOrg.fisSealUp <> 1 ";
|
|
|
|
|
|
+ //权限
|
|
|
|
+ String perStr = GetOrgUtils.addPermissionFilterSql(ctx);
|
|
|
|
+ String filterStr = " and admOrg.fisSealUp <> 1 " +perStr;
|
|
String pinSql = GetOrgUtils.pinPersonSql( "adminPerson",filterStr);
|
|
String pinSql = GetOrgUtils.pinPersonSql( "adminPerson",filterStr);
|
|
IRowSet rs = DbUtil.executeQuery(ctx, pinSql);
|
|
IRowSet rs = DbUtil.executeQuery(ctx, pinSql);
|
|
while(rs.next()) {
|
|
while(rs.next()) {
|
|
@@ -117,7 +115,9 @@ public class GetAdminInfoService implements IHRMsfService {
|
|
}
|
|
}
|
|
} catch (SQLException e) {
|
|
} catch (SQLException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- }
|
|
|
|
|
|
+ } catch (EASBizException e) {
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
return admPersonMap;
|
|
return admPersonMap;
|
|
}
|
|
}
|
|
}
|
|
}
|