GetPersonFromOrgService.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package com.kingdee.shr.custom.service;
  2. import com.kingdee.bos.BOSException;
  3. import com.kingdee.bos.Context;
  4. import com.kingdee.bos.bsf.service.app.IHRMsfService;
  5. import com.kingdee.eas.common.EASBizException;
  6. import com.kingdee.util.StringUtils;
  7. import java.util.Map;
  8. public class GetPersonFromOrgService implements IHRMsfService {
  9. /**
  10. * 获取人员id
  11. * 新需求
  12. * <subparameter name="orgId" type="java.lang.String" description="组织id" />
  13. * <subparameter name="perName" type="java.lang.String" description="" />
  14. * <subparameter name="checkType" type="java.lang.String" description="查询类型,1为直接下级的数量" />
  15. */
  16. public Object process(Context ctx, Map<String, Object> param ) throws EASBizException, BOSException {
  17. String orgId = StringUtils.cnulls(param.get("orgId"));
  18. String checkType = StringUtils.cnulls(param.get("checkType"));
  19. String perName = StringUtils.cnulls(param.get("perName"));
  20. //如果姓名为空则,根据组织查询
  21. if(StringUtils.isEmpty(perName)) {
  22. return GetOrgUtils.getPersonFromOrg(ctx, orgId,checkType);
  23. }else {
  24. //如果姓名不为空,则根据姓名查询
  25. return GetOrgUtils.getPersonFromName (ctx,orgId,perName);
  26. }
  27. }
  28. }