1. 统一 iwork 查询规范,移除多余的无效的 iwork 查询参数字段
This commit is contained in:
BIN
docs/iwork 人力资源组织机构RESTFUL接口说明.pdf
Normal file
BIN
docs/iwork 人力资源组织机构RESTFUL接口说明.pdf
Normal file
Binary file not shown.
@@ -46,18 +46,18 @@ public interface IWorkIntegrationApi {
|
||||
|
||||
@PostMapping(PREFIX + "/hr/subcompany/page")
|
||||
@Operation(summary = "获取 iWork 分部列表")
|
||||
CommonResult<IWorkHrSubcompanyPageRespDTO> listSubcompanies(@RequestBody IWorkOrgPageReqDTO reqDTO);
|
||||
CommonResult<IWorkHrSubcompanyPageRespDTO> listSubcompanies(@RequestBody IWorkSubcompanyQueryReqDTO reqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/hr/department/page")
|
||||
@Operation(summary = "获取 iWork 部门列表")
|
||||
CommonResult<IWorkHrDepartmentPageRespDTO> listDepartments(@RequestBody IWorkOrgPageReqDTO reqDTO);
|
||||
CommonResult<IWorkHrDepartmentPageRespDTO> listDepartments(@RequestBody IWorkDepartmentQueryReqDTO reqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/hr/job-title/page")
|
||||
@Operation(summary = "获取 iWork 岗位列表")
|
||||
CommonResult<IWorkHrJobTitlePageRespDTO> listJobTitles(@RequestBody IWorkOrgPageReqDTO reqDTO);
|
||||
CommonResult<IWorkHrJobTitlePageRespDTO> listJobTitles(@RequestBody IWorkJobTitleQueryReqDTO reqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/hr/user/page")
|
||||
@Operation(summary = "获取 iWork 人员列表")
|
||||
CommonResult<IWorkHrUserPageRespDTO> listUsers(@RequestBody IWorkOrgPageReqDTO reqDTO);
|
||||
CommonResult<IWorkHrUserPageRespDTO> listUsers(@RequestBody IWorkUserQueryReqDTO reqDTO);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* iWork 部门查询参数。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkDepartmentQueryReqDTO extends IWorkOrgBaseQueryReqDTO {
|
||||
|
||||
@JsonProperty("departmentcode")
|
||||
@Schema(description = "部门编号")
|
||||
private String departmentCode;
|
||||
|
||||
@JsonProperty("departmentname")
|
||||
@Schema(description = "部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@JsonProperty("subcompanyid1")
|
||||
@Schema(description = "分部 ID")
|
||||
private String subcompanyId1;
|
||||
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("canceled")
|
||||
@Schema(description = "封存标志,默认查询非封存数据。1:封存")
|
||||
private String canceled;
|
||||
|
||||
@JsonProperty("custom_data")
|
||||
@Schema(description = "自定义字段列表(逗号分隔)")
|
||||
private String customData;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "OA 部门 ID")
|
||||
private String id;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* iWork 岗位查询参数。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkJobTitleQueryReqDTO extends IWorkOrgBaseQueryReqDTO {
|
||||
|
||||
@JsonProperty("jobtitlename")
|
||||
@Schema(description = "岗位名称")
|
||||
private String jobTitleName;
|
||||
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "岗位 ID")
|
||||
private String id;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* iWork 人力组织查询基础参数。
|
||||
*/
|
||||
@Data
|
||||
public class IWorkOrgBaseQueryReqDTO {
|
||||
|
||||
@Schema(description = "当前页码", example = "1")
|
||||
private Integer curpage;
|
||||
|
||||
@Schema(description = "每页条数", example = "20")
|
||||
private Integer pagesize;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* iWork 人力组织分页查询通用请求 DTO
|
||||
*/
|
||||
@Data
|
||||
public class IWorkOrgPageReqDTO {
|
||||
|
||||
@Schema(description = "页码", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer pageNo;
|
||||
|
||||
@Schema(description = "每页大小", example = "20", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer pageSize;
|
||||
|
||||
@Schema(description = "关键字过滤")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* iWork 分部查询参数。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkSubcompanyQueryReqDTO extends IWorkOrgBaseQueryReqDTO {
|
||||
|
||||
@JsonProperty("subcompanycode")
|
||||
@Schema(description = "分部编号")
|
||||
private String subcompanyCode;
|
||||
|
||||
@JsonProperty("subcompanyname")
|
||||
@Schema(description = "分部名称")
|
||||
private String subcompanyName;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("canceled")
|
||||
@Schema(description = "封存标志,默认查询非封存数据。1:封存")
|
||||
private String canceled;
|
||||
|
||||
@JsonProperty("custom_data")
|
||||
@Schema(description = "自定义字段列表(逗号分隔)")
|
||||
private String customData;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "OA 分部 ID")
|
||||
private String id;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.zt.plat.module.system.api.iwork.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* iWork 人员查询参数。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkUserQueryReqDTO extends IWorkOrgBaseQueryReqDTO {
|
||||
|
||||
@JsonProperty("workcode")
|
||||
@Schema(description = "人员编号")
|
||||
private String workCode;
|
||||
|
||||
@JsonProperty("subcompanyid1")
|
||||
@Schema(description = "分部 ID")
|
||||
private String subcompanyId1;
|
||||
|
||||
@JsonProperty("departmentid")
|
||||
@Schema(description = "部门 ID")
|
||||
private String departmentId;
|
||||
|
||||
@JsonProperty("jobtitleid")
|
||||
@Schema(description = "岗位 ID")
|
||||
private String jobTitleId;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "人员 ID")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("loginid")
|
||||
@Schema(description = "登录名")
|
||||
private String loginId;
|
||||
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("base_custom_data")
|
||||
@Schema(description = "基本信息自定义字段列表(逗号分隔)")
|
||||
private String baseCustomData;
|
||||
|
||||
@JsonProperty("person_custom_data")
|
||||
@Schema(description = "个人信息自定义字段列表(逗号分隔)")
|
||||
private String personCustomData;
|
||||
|
||||
@JsonProperty("work_custom_data")
|
||||
@Schema(description = "工作信息自定义字段列表(逗号分隔)")
|
||||
private String workCustomData;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class IWorkIntegrationApiImpl implements IWorkIntegrationApi {
|
||||
// ----------------- 人力组织分页接口 -----------------
|
||||
|
||||
@Override
|
||||
public CommonResult<IWorkHrSubcompanyPageRespDTO> listSubcompanies(IWorkOrgPageReqDTO reqDTO) {
|
||||
public CommonResult<IWorkHrSubcompanyPageRespDTO> listSubcompanies(IWorkSubcompanyQueryReqDTO reqDTO) {
|
||||
IWorkSubcompanyQueryReqVO reqVO = BeanUtils.toBean(reqDTO, IWorkSubcompanyQueryReqVO.class);
|
||||
IWorkHrSubcompanyPageRespVO respVO = orgRestService.listSubcompanies(reqVO);
|
||||
IWorkHrSubcompanyPageRespDTO respDTO = BeanUtils.toBean(respVO, IWorkHrSubcompanyPageRespDTO.class);
|
||||
@@ -85,7 +85,7 @@ public class IWorkIntegrationApiImpl implements IWorkIntegrationApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<IWorkHrDepartmentPageRespDTO> listDepartments(IWorkOrgPageReqDTO reqDTO) {
|
||||
public CommonResult<IWorkHrDepartmentPageRespDTO> listDepartments(IWorkDepartmentQueryReqDTO reqDTO) {
|
||||
IWorkDepartmentQueryReqVO reqVO = BeanUtils.toBean(reqDTO, IWorkDepartmentQueryReqVO.class);
|
||||
IWorkHrDepartmentPageRespVO respVO = orgRestService.listDepartments(reqVO);
|
||||
IWorkHrDepartmentPageRespDTO respDTO = BeanUtils.toBean(respVO, IWorkHrDepartmentPageRespDTO.class);
|
||||
@@ -93,7 +93,7 @@ public class IWorkIntegrationApiImpl implements IWorkIntegrationApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<IWorkHrJobTitlePageRespDTO> listJobTitles(IWorkOrgPageReqDTO reqDTO) {
|
||||
public CommonResult<IWorkHrJobTitlePageRespDTO> listJobTitles(IWorkJobTitleQueryReqDTO reqDTO) {
|
||||
IWorkJobTitleQueryReqVO reqVO = BeanUtils.toBean(reqDTO, IWorkJobTitleQueryReqVO.class);
|
||||
IWorkHrJobTitlePageRespVO respVO = orgRestService.listJobTitles(reqVO);
|
||||
IWorkHrJobTitlePageRespDTO respDTO = BeanUtils.toBean(respVO, IWorkHrJobTitlePageRespDTO.class);
|
||||
@@ -101,7 +101,7 @@ public class IWorkIntegrationApiImpl implements IWorkIntegrationApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<IWorkHrUserPageRespDTO> listUsers(IWorkOrgPageReqDTO reqDTO) {
|
||||
public CommonResult<IWorkHrUserPageRespDTO> listUsers(IWorkUserQueryReqDTO reqDTO) {
|
||||
IWorkUserQueryReqVO reqVO = BeanUtils.toBean(reqDTO, IWorkUserQueryReqVO.class);
|
||||
IWorkHrUserPageRespVO respVO = orgRestService.listUsers(reqVO);
|
||||
IWorkHrUserPageRespDTO respDTO = BeanUtils.toBean(respVO, IWorkHrUserPageRespDTO.class);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,12 +14,35 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkDepartmentQueryReqVO extends IWorkOrgBaseQueryReqVO {
|
||||
|
||||
@Schema(description = "部门编码")
|
||||
@JsonProperty("departmentcode")
|
||||
@Schema(description = "部门编号")
|
||||
private String departmentCode;
|
||||
|
||||
@JsonProperty("departmentname")
|
||||
@Schema(description = "部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@Schema(description = "所属分部ID")
|
||||
private String subcompanyId;
|
||||
@JsonProperty("subcompanyid1")
|
||||
@Schema(description = "分部 ID")
|
||||
private String subcompanyId1;
|
||||
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("canceled")
|
||||
@Schema(description = "封存标志,默认查询非封存数据。1:封存")
|
||||
private String canceled;
|
||||
|
||||
@JsonProperty("custom_data")
|
||||
@Schema(description = "自定义字段列表(逗号分隔)")
|
||||
private String customData;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "OA 部门 ID")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,9 +14,19 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkJobTitleQueryReqVO extends IWorkOrgBaseQueryReqVO {
|
||||
|
||||
@Schema(description = "岗位编码")
|
||||
private String jobTitleCode;
|
||||
|
||||
@JsonProperty("jobtitlename")
|
||||
@Schema(description = "岗位名称")
|
||||
private String jobTitleName;
|
||||
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "岗位 ID")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* iWork 组织查询基础参数。
|
||||
@@ -16,7 +15,4 @@ public class IWorkOrgBaseQueryReqVO {
|
||||
|
||||
@Schema(description = "每页条数", example = "10")
|
||||
private Integer pagesize;
|
||||
|
||||
@Schema(description = "查询参数(扩展用),将被序列化为 params 传给 iWork")
|
||||
private Map<String, Object> params;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,9 +14,27 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkSubcompanyQueryReqVO extends IWorkOrgBaseQueryReqVO {
|
||||
|
||||
@Schema(description = "分部编码")
|
||||
@JsonProperty("subcompanycode")
|
||||
@Schema(description = "分部编号")
|
||||
private String subcompanyCode;
|
||||
|
||||
@JsonProperty("subcompanyname")
|
||||
@Schema(description = "分部名称")
|
||||
private String subcompanyName;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("canceled")
|
||||
@Schema(description = "封存标志,默认查询非封存数据。1:封存")
|
||||
private String canceled;
|
||||
|
||||
@JsonProperty("custom_data")
|
||||
@Schema(description = "自定义字段列表(逗号分隔)")
|
||||
private String customData;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "OA 分部 ID")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,27 +14,47 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class IWorkUserQueryReqVO extends IWorkOrgBaseQueryReqVO {
|
||||
|
||||
@Schema(description = "人员工号")
|
||||
@JsonProperty("workcode")
|
||||
@Schema(description = "人员编号")
|
||||
private String workCode;
|
||||
|
||||
@Schema(description = "人员姓名")
|
||||
private String lastName;
|
||||
@JsonProperty("subcompanyid1")
|
||||
@Schema(description = "分部 ID")
|
||||
private String subcompanyId1;
|
||||
|
||||
@Schema(description = "所属部门ID")
|
||||
@JsonProperty("departmentid")
|
||||
@Schema(description = "部门 ID")
|
||||
private String departmentId;
|
||||
|
||||
@Schema(description = "所属分部ID")
|
||||
private String subcompanyId;
|
||||
|
||||
@Schema(description = "所属岗位ID")
|
||||
@JsonProperty("jobtitleid")
|
||||
@Schema(description = "岗位 ID")
|
||||
private String jobTitleId;
|
||||
|
||||
@Schema(description = "人员状态 (0:试用, 1:正式, 2:临时, 3:试用延期, 4:解聘, 5:离职, 6:退休, 7:无效)")
|
||||
private String status;
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "人员 ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
@JsonProperty("loginid")
|
||||
@Schema(description = "登录名")
|
||||
private String loginId;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
@JsonProperty("created")
|
||||
@Schema(description = "创建时间戳(>=)")
|
||||
private String created;
|
||||
|
||||
@JsonProperty("modified")
|
||||
@Schema(description = "修改时间戳(>=)")
|
||||
private String modified;
|
||||
|
||||
@JsonProperty("base_custom_data")
|
||||
@Schema(description = "基本信息自定义字段列表(逗号分隔)")
|
||||
private String baseCustomData;
|
||||
|
||||
@JsonProperty("person_custom_data")
|
||||
@Schema(description = "个人信息自定义字段列表(逗号分隔)")
|
||||
private String personCustomData;
|
||||
|
||||
@JsonProperty("work_custom_data")
|
||||
@Schema(description = "工作信息自定义字段列表(逗号分隔)")
|
||||
private String workCustomData;
|
||||
}
|
||||
|
||||
@@ -92,6 +92,18 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
if (StringUtils.hasText(reqVO.getSubcompanyName())) {
|
||||
params.put("subcompanyname", reqVO.getSubcompanyName());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getModified())) {
|
||||
params.put("modified", reqVO.getModified());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCanceled())) {
|
||||
params.put("canceled", reqVO.getCanceled());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCustomData())) {
|
||||
params.put("custom_data", reqVO.getCustomData());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getId())) {
|
||||
params.put("id", reqVO.getId());
|
||||
}
|
||||
JsonNode node = invokeParamsEndpoint(path, params);
|
||||
return buildSubcompanyPageResp(node);
|
||||
}
|
||||
@@ -106,8 +118,23 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
if (StringUtils.hasText(reqVO.getDepartmentName())) {
|
||||
params.put("departmentname", reqVO.getDepartmentName());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getSubcompanyId())) {
|
||||
params.put("subcompanyid", reqVO.getSubcompanyId());
|
||||
if (StringUtils.hasText(reqVO.getSubcompanyId1())) {
|
||||
params.put("subcompanyid1", reqVO.getSubcompanyId1());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCreated())) {
|
||||
params.put("created", reqVO.getCreated());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getModified())) {
|
||||
params.put("modified", reqVO.getModified());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCanceled())) {
|
||||
params.put("canceled", reqVO.getCanceled());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCustomData())) {
|
||||
params.put("custom_data", reqVO.getCustomData());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getId())) {
|
||||
params.put("id", reqVO.getId());
|
||||
}
|
||||
JsonNode node = invokeParamsEndpoint(path, params);
|
||||
return buildDepartmentPageResp(node);
|
||||
@@ -117,12 +144,18 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
public IWorkHrJobTitlePageRespVO listJobTitles(IWorkJobTitleQueryReqVO reqVO) {
|
||||
String path = orgPaths().getJobTitlePage();
|
||||
Map<String, Object> params = buildBaseParams(reqVO);
|
||||
if (StringUtils.hasText(reqVO.getJobTitleCode())) {
|
||||
params.put("jobtitlecode", reqVO.getJobTitleCode());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getJobTitleName())) {
|
||||
params.put("jobtitlename", reqVO.getJobTitleName());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getCreated())) {
|
||||
params.put("created", reqVO.getCreated());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getModified())) {
|
||||
params.put("modified", reqVO.getModified());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getId())) {
|
||||
params.put("id", reqVO.getId());
|
||||
}
|
||||
JsonNode node = invokeParamsEndpoint(path, params);
|
||||
return buildJobTitlePageResp(node);
|
||||
}
|
||||
@@ -134,11 +167,8 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
if (StringUtils.hasText(reqVO.getWorkCode())) {
|
||||
params.put("workcode", reqVO.getWorkCode());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getLastName())) {
|
||||
params.put("lastname", reqVO.getLastName());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getSubcompanyId())) {
|
||||
params.put("subcompanyid", reqVO.getSubcompanyId());
|
||||
if (StringUtils.hasText(reqVO.getSubcompanyId1())) {
|
||||
params.put("subcompanyid1", reqVO.getSubcompanyId1());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getDepartmentId())) {
|
||||
params.put("departmentid", reqVO.getDepartmentId());
|
||||
@@ -146,14 +176,26 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
if (StringUtils.hasText(reqVO.getJobTitleId())) {
|
||||
params.put("jobtitleid", reqVO.getJobTitleId());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getStatus())) {
|
||||
params.put("status", reqVO.getStatus());
|
||||
if (StringUtils.hasText(reqVO.getId())) {
|
||||
params.put("id", reqVO.getId());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getMobile())) {
|
||||
params.put("mobile", reqVO.getMobile());
|
||||
if (StringUtils.hasText(reqVO.getLoginId())) {
|
||||
params.put("loginid", reqVO.getLoginId());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getEmail())) {
|
||||
params.put("email", reqVO.getEmail());
|
||||
if (StringUtils.hasText(reqVO.getCreated())) {
|
||||
params.put("created", reqVO.getCreated());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getModified())) {
|
||||
params.put("modified", reqVO.getModified());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getBaseCustomData())) {
|
||||
params.put("base_custom_data", reqVO.getBaseCustomData());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getPersonCustomData())) {
|
||||
params.put("person_custom_data", reqVO.getPersonCustomData());
|
||||
}
|
||||
if (StringUtils.hasText(reqVO.getWorkCustomData())) {
|
||||
params.put("work_custom_data", reqVO.getWorkCustomData());
|
||||
}
|
||||
JsonNode node = invokeParamsEndpoint(path, params);
|
||||
return buildUserPageResp(node);
|
||||
@@ -161,9 +203,6 @@ public class IWorkOrgRestServiceImpl implements IWorkOrgRestService {
|
||||
|
||||
private Map<String, Object> buildBaseParams(IWorkOrgBaseQueryReqVO reqVO) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
if (reqVO.getParams() != null) {
|
||||
params.putAll(reqVO.getParams());
|
||||
}
|
||||
if (reqVO.getCurpage() != null) {
|
||||
params.put("curpage", reqVO.getCurpage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user