GetPersonFromOrgService.java 1.5 KB

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