Merge remote-tracking branch 'base-version/main' into dev
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
<netty.version>4.1.116.Final</netty.version>
|
<netty.version>4.1.116.Final</netty.version>
|
||||||
<mqtt.version>1.2.5</mqtt.version>
|
<mqtt.version>1.2.5</mqtt.version>
|
||||||
<pf4j-spring.version>0.9.0</pf4j-spring.version>
|
<pf4j-spring.version>0.9.0</pf4j-spring.version>
|
||||||
|
<okhttp3.version>4.12.0</okhttp3.version>
|
||||||
<!-- 规则引擎 -->
|
<!-- 规则引擎 -->
|
||||||
<liteflow.version>2.15.1</liteflow.version>
|
<liteflow.version>2.15.1</liteflow.version>
|
||||||
<vertx.version>4.5.13</vertx.version>
|
<vertx.version>4.5.13</vertx.version>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
|||||||
|
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.module.system.enums.integration.IWorkSyncEntityTypeEnum;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.Max;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iWork 全量同步请求
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IWorkFullSyncReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "起始页码,从 1 开始", example = "1")
|
||||||
|
@Min(1)
|
||||||
|
private Integer startPage = 1;
|
||||||
|
|
||||||
|
@Schema(description = "最大处理页数,null 表示处理至 iWork 返回的末页", example = "10")
|
||||||
|
@Min(1)
|
||||||
|
private Integer maxPages;
|
||||||
|
|
||||||
|
@Schema(description = "每次分页从 iWork 拉取的记录数", example = "100")
|
||||||
|
@Min(1)
|
||||||
|
@Max(500)
|
||||||
|
private Integer pageSize = 100;
|
||||||
|
|
||||||
|
@Schema(description = "同步范围列表,默认同步全部。可选:subcompany、department、jobTitle、user")
|
||||||
|
private List<String> scopes;
|
||||||
|
|
||||||
|
@Schema(description = "是否包含已失效(canceled=1)的记录", example = "false")
|
||||||
|
private Boolean includeCanceled = Boolean.FALSE;
|
||||||
|
|
||||||
|
public Set<IWorkSyncEntityTypeEnum> resolveScopes() {
|
||||||
|
EnumSet<IWorkSyncEntityTypeEnum> defaults = EnumSet.allOf(IWorkSyncEntityTypeEnum.class);
|
||||||
|
if (scopes == null || scopes.isEmpty()) {
|
||||||
|
return defaults;
|
||||||
|
}
|
||||||
|
Set<IWorkSyncEntityTypeEnum> resolved = scopes.stream()
|
||||||
|
.map(IWorkSyncEntityTypeEnum::fromCode)
|
||||||
|
.filter(java.util.Objects::nonNull)
|
||||||
|
.collect(Collectors.toCollection(() -> EnumSet.noneOf(IWorkSyncEntityTypeEnum.class)));
|
||||||
|
if (resolved.isEmpty()) {
|
||||||
|
return defaults;
|
||||||
|
}
|
||||||
|
return resolved;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iWork 全量同步响应
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IWorkFullSyncRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "本次处理的总页数")
|
||||||
|
private Integer processedPages;
|
||||||
|
|
||||||
|
@Schema(description = "每次分页请求的条数")
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
@Schema(description = "分部统计信息")
|
||||||
|
private IWorkSyncEntityStatVO subcompanyStat = new IWorkSyncEntityStatVO();
|
||||||
|
|
||||||
|
@Schema(description = "部门统计信息")
|
||||||
|
private IWorkSyncEntityStatVO departmentStat = new IWorkSyncEntityStatVO();
|
||||||
|
|
||||||
|
@Schema(description = "岗位统计信息")
|
||||||
|
private IWorkSyncEntityStatVO jobTitleStat = new IWorkSyncEntityStatVO();
|
||||||
|
|
||||||
|
@Schema(description = "人员统计信息")
|
||||||
|
private IWorkSyncEntityStatVO userStat = new IWorkSyncEntityStatVO();
|
||||||
|
|
||||||
|
@Schema(description = "每个批次的详细统计")
|
||||||
|
private List<IWorkSyncBatchStatVO> batches;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,74 @@
|
|||||||
|
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iWork 人力同步响应。
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "iWork 人力同步响应")
|
||||||
|
public class IWorkHrSyncRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "响应码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "提示信息")
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@Schema(description = "是否成功")
|
||||||
|
private boolean success;
|
||||||
|
|
||||||
|
@Schema(description = "同步结果明细")
|
||||||
|
private List<SyncResult> result;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "同步结果项")
|
||||||
|
public static class SyncResult {
|
||||||
|
|
||||||
|
@Schema(description = "操作动作 add/update/delete")
|
||||||
|
@JsonProperty("@action")
|
||||||
|
private String action;
|
||||||
|
|
||||||
|
@Schema(description = "外部编码")
|
||||||
|
@JsonProperty("code")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "执行结果 success/fail")
|
||||||
|
@JsonProperty("result")
|
||||||
|
private String result;
|
||||||
|
|
||||||
|
@Schema(description = "是否成功")
|
||||||
|
@JsonProperty("success")
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
@Schema(description = "失败描述")
|
||||||
|
@JsonProperty("message")
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private Map<String, Object> attributes;
|
||||||
|
|
||||||
|
@JsonAnySetter
|
||||||
|
public void putAttribute(String key, Object value) {
|
||||||
|
if (attributes == null) {
|
||||||
|
attributes = new LinkedHashMap<>();
|
||||||
|
}
|
||||||
|
attributes.put(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonAnyGetter
|
||||||
|
public Map<String, Object> any() {
|
||||||
|
return attributes == null ? Collections.emptyMap() : attributes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +1,15 @@
|
|||||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对 iWork 人力组织 REST 请求的响应封装。
|
* @deprecated 请改用强类型的 IWorkHr*RespVO,避免再引用该占位类。
|
||||||
*/
|
*/
|
||||||
@Data
|
@Deprecated(forRemoval = true)
|
||||||
public class IWorkOrgRespVO {
|
@Schema(description = "已废弃,占位用")
|
||||||
|
public final class IWorkOrgRespVO {
|
||||||
|
|
||||||
@Schema(description = "响应中的业务数据(data 字段或整体映射)")
|
private IWorkOrgRespVO() {
|
||||||
private Map<String, Object> payload;
|
throw new UnsupportedOperationException("Use IWorkHr*RespVO instead");
|
||||||
|
}
|
||||||
@Schema(description = "原始响应字符串")
|
|
||||||
private String rawBody;
|
|
||||||
|
|
||||||
@Schema(description = "是否判断为成功")
|
|
||||||
private boolean success;
|
|
||||||
|
|
||||||
@Schema(description = "提示信息")
|
|
||||||
private String message;
|
|
||||||
|
|
||||||
@Schema(description = "响应码")
|
|
||||||
private String code;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user