package com.kingdee.shr.custom.service;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.bsf.service.app.IHRMsfService;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.util.StringUtils;
import java.util.Map;
public class GetPersonFromOrgService implements IHRMsfService {
/**
* 获取人员id
* 新需求
*
*
*
*/
public Object process(Context ctx, Map param ) throws EASBizException, BOSException {
String orgId = StringUtils.cnulls(param.get("orgId"));
String checkType = StringUtils.cnulls(param.get("checkType"));
String perName = StringUtils.cnulls(param.get("perName"));
//如果姓名为空则,根据组织查询
if(StringUtils.isEmpty(perName)) {
return GetOrgUtils.getPersonFromOrg(ctx, orgId,checkType);
}else {
//如果姓名不为空,则根据姓名查询
return GetOrgUtils.getPersonFromName (ctx,orgId,perName);
}
}
}