当前位置:首页 > 用友NC-OA平台API参考手册
请参考人员实体定义 返回值:ServiceResponse 成功返回人员ID,否则返回-1。 示例: 远程调用:
… PersonService service = new PersontServiceImpl(); PersonInfoParam_All person = new PersonInfoParam_All(); // 与远程调用相同 … service.create(token,person); PersonServiceStub.Create req = new PersonServiceStub.Create(); PersonServiceStub.PersonInfoParam_All person = new PersonServiceStub.PersonInfoParam_All(); person.setTrueName(\真实姓名\); person.setLoginName(\登录名\); req.setPerson(person); // 发送请求 PersonServiceStub stub = new PersonServiceStub(); PersonServiceStub.CreateResponse resp = stub.create(req); import com.seeyon.v3x.services organization.PersonService; import com.seeyon.v3x.services organization.impl.PersontServiceImpl; import com.seeyon.oainterface.organizationmgr.infoParamImpl.PersonInfoParam_All; 本地调用: 1.3.2.4 修改人员信息(按人员ID)
按照person实体中的人员信息修改指定ID的人员信息。
当人员所属部门、职务级别、岗位名称为空、部门不存在或部门状态未停用时,人员设置为停用。 当人员所属副岗的岗位或部门不存在时,将忽略此副岗。 方法:update 参数:
参数 token person 数据类型 String PersonInfoParam_All 请参考人员实体定义 说明 登录验证后获取的身份令牌。 人员信息(人员ID必填) 返回值:ServiceResponse 成功返回人员ID,否则返回-1。 示例: 远程调用:
PersonServiceStub stub = new PersonServiceStub(); PersonServiceStub.Update req = new PersonServiceStub.Update(); PersonServiceStub.PersonInfoParam_All person = new PersonServiceStub.PersonInfoParam_All(); // 要修改的信息 person.setTrueName(\测试按ID修改\); person.setPer_sort(\); // [父部门名称,部门名称]
String[] deptNames = new String[2]; deptNames[0] = \部门1\; deptNames[1] = \部门3\;
person.setDepartmentName(deptNames); person.setOcupationName(\总经理\);
String[] secondOcupationNames = new String[2]; // 部门_岗位
secondOcupationNames[0] = \部门1_总经理\; secondOcupationNames[1] = \部门3_部门经理\;
person.setSecondOcupationName(secondOcupationNames); person.setOtypeName(\总经理\); person.setPassWord(\); person.setSex(\);
req.setToken(ServiceUtil.getToken()); req.setPersonId(id); req.setPerson(person);
PersonServiceStub.UpdateResponse resp = stub.update(req); ServiceResponse r = resp.get_return();
本地调用:
import com.seeyon.v3x.services organization.PersonService; import com.seeyon.v3x.services organization.impl.PersontServiceImpl; import com.seeyon.oainterface.organizationmgr.infoParamImpl.PersonInfoParam_All; … PersonService service = new PersontServiceImpl(); PersonInfoParam_All person = new PersonInfoParam_All(); // 与远程调用相同 … service.update (token,personId,person); 1.3.2.5 修改人员信息(按人员登录名)
按照person实体中的人员信息修改指定loginName的人员信息。
当人员所属部门、职务级别、岗位名称为空、部门不存在或部门状态未停用时,人员设置为停用。 当人员所属副岗的岗位或部门不存在时,将忽略此副岗。 方法:updateByLoginName 参数:
参数 token person 数据类型 String PersonInfoParam_All 请参考人员实体定义 说明 登录验证后获取的身份令牌。 人员信息(登录名必填) 返回值:ServiceResponse 成功返回人员ID,否则返回-1。 示例:
远程调用:
… PersonService service = new PersontServiceImpl(); PersonInfoParam_All person = new PersonInfoParam_All(); // 与远程调用相同 … service.updateByLoginName(token,person); PersonServiceStub stub = new PersonServiceStub();
PersonServiceStub.UpdateByLoginName req = new PersonServiceStub.UpdateByLoginName(); PersonServiceStub.PersonInfoParam_All person = new PersonServiceStub.PersonInfoParam_All(); // 必填
person.setLoginName(\); // 要修改的信息
person.setTrueName(\测试按登录名修改\); person.setPer_sort(\);
String[] deptNames = new String[2]; // [父部门名称,部门名称] deptNames[0] = \部门1\; deptNames[1] = \部门3\;
person.setDepartmentName(deptNames); // 部门 person.setOcupationName(\总经理\);
String[] secondOcupationNames = new String[2]; // 部门_岗位
secondOcupationNames[0] = \部门1_总经理\; secondOcupationNames[1] = \部门2_部门经理\;
person.setSecondOcupationName(secondOcupationNames); // 副岗 person.setOtypeName(\总经理\); // 职务级别 person.setPassWord(\); person.setSex(\);
req.setToken(ServiceUtil.getToken()); req.setPerson(person);
PersonServiceStub.UpdateByLoginNameResponse resp = stub
.updateByLoginName(req);
ServiceResponse r = resp.get_return();
import com.seeyon.v3x.services organization.PersonService; import com.seeyon.v3x.services organization.impl.PersontServiceImpl; import com.seeyon.oainterface.organizationmgr.infoParamImpl.PersonInfoParam_All; 本地调用: 1.3.2.6 删除人员(按人员ID) 根据人员ID删除人员信息。
如果人员存在待办事项则不能将人员删除。 方法:delete
参数:
参数 token personId 数据类型 String long 说明 登录验证后获取的身份令牌。 人员ID 返回值:ServiceResponse 成功返回人员ID,否则返回-1。 示例: 远程调用:
PersonServiceStub.DeleteResponse resp = stub .delete(req); ServiceResponse r = resp.get_return(); import com.seeyon.v3x.services organization.PersonService; import com.seeyon.v3x.services organization.impl.PersontServiceImpl; … PersonService service = new PersontServiceImpl(); service.delete(token,personId); … req.setToken(ServiceUtil.getToken()); req.setPersonId(id); PersonServiceStub stub = new PersonServiceStub(); PersonServiceStub.Delete req = new PersonServiceStub.Delete(); 本地调用:
1.3.2.7 删除人员(按登录名)
根据人员登录名删除人员信息。
如果人员存在待办事项则不能将人员删除。 方法:deleteByLoginName 参数:
参数 token loginName 数据类型 String String 说明 登录验证后获取的身份令牌。 人员登录名 返回值:ServiceResponse 成功返回人员ID,否则返回-1。 示例:
远程调用:
PersonServiceStub stub = new PersonServiceStub(); PersonServiceStub.DeleteByLoginName req = new PersonServiceStub.DeleteByLoginName(); req.setToken(ServiceUtil.getToken()); req.setLoginName(loginName); PersonServiceStub.DeleteByLoginNameResponse resp = stub .deleteByLoginName(req);
共分享92篇相关文档