Merge branch 'refs/heads/zt-test' into test
This commit is contained in:
@@ -2,6 +2,7 @@ package com.zt.plat.module.system.api.dept;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.system.api.dept.dto.*;
|
||||
import com.zt.plat.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -15,6 +16,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO ZT:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 部门")
|
||||
public interface DeptApi {
|
||||
@@ -86,6 +89,11 @@ public interface DeptApi {
|
||||
@Parameter(name = "userId", description = "用户编号", example = "1", required = true)
|
||||
CommonResult<Set<CompanyDeptInfoRespDTO>> getCompanyDeptInfoListByUserId(@RequestParam("userId") Long userId);
|
||||
|
||||
@GetMapping(PREFIX+"/up-find-company-node")
|
||||
@Operation(summary = "获取公司节点信息", description = "通过部门编号,向上追溯部门信息,直到上级部门是公司,返回追溯到的部门信息列表")
|
||||
@Parameter(name = "deptId", description = "部门编号", required = true, example = "1024")
|
||||
CommonResult<List<DeptRespDTO>> upFindCompanyNode(@RequestParam("deptId") Long deptId);
|
||||
|
||||
// ========== 数据同步专用接口 ==========
|
||||
|
||||
@PostMapping(PREFIX + "/sync")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -36,9 +36,9 @@ public class IWorkWorkflowCreateReqDTO extends IWorkBaseReqDTO {
|
||||
|
||||
@Schema(description = "用印材料附件 URL(必填)")
|
||||
private String xyywjUrl;
|
||||
|
||||
@Schema(description = "用印材料附件文件名(必填)")
|
||||
private String xyywjFileName;
|
||||
|
||||
@Schema(description = "业务回调标识(回调分发使用,≤255 字符)")
|
||||
private String bizCallbackKey;
|
||||
|
||||
@Schema(description = "用印事项")
|
||||
private String yysx;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.zt.plat.module.system.api.push;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 外部系统推送配置 Feign API
|
||||
*
|
||||
* @author ZT Cloud
|
||||
*/
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 外部系统推送配置")
|
||||
public interface ExternalPushConfigApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/external-push-config";
|
||||
|
||||
/**
|
||||
* 判断是否允许推送到外部系统
|
||||
*
|
||||
* @param companyId 公司编号(可选,为 null 时表示不限制公司)
|
||||
* @param deptId 部门编号(可选,为 null 时只按公司配置判断)
|
||||
* @param businessType 业务类型(可选:PURCHASE/SALE/PRODUCTION,为 null 时表示所有业务类型)
|
||||
* @param externalSystem 外部系统标识(可选:ERP/IWORK/等,为 null 时表示所有外部系统)
|
||||
* @return 是否允许推送(true=允许,false=禁止,默认 true)
|
||||
*/
|
||||
@GetMapping(PREFIX + "/is-push-enabled")
|
||||
@Operation(summary = "判断是否允许推送到外部系统")
|
||||
CommonResult<Boolean> isPushEnabled(
|
||||
@RequestParam(value = "companyId", required = false) @Parameter(description = "公司编号") Long companyId,
|
||||
@RequestParam(value = "deptId", required = false) @Parameter(description = "部门编号") Long deptId,
|
||||
@RequestParam(value = "businessType", required = false) @Parameter(description = "业务类型") String businessType,
|
||||
@RequestParam(value = "externalSystem", required = false) @Parameter(description = "外部系统标识") String externalSystem);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user