Merge remote-tracking branch 'base-version/main' into dev
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -113,12 +113,6 @@ public class IWorkIntegrationController {
|
||||
|
||||
// ----------------- 同步到本地 -----------------
|
||||
|
||||
@PostMapping("/hr/full-sync")
|
||||
@Operation(summary = "手动触发 iWork 组织/人员同步")
|
||||
public CommonResult<IWorkFullSyncRespVO> fullSync(@Valid @RequestBody IWorkFullSyncReqVO reqVO) {
|
||||
return success(syncService.fullSync(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/hr/departments/full-sync")
|
||||
@Operation(summary = "手动触发 iWork 部门同步")
|
||||
public CommonResult<IWorkFullSyncRespVO> fullSyncDepartments(@Valid @RequestBody IWorkFullSyncReqVO reqVO) {
|
||||
@@ -142,10 +136,4 @@ public class IWorkIntegrationController {
|
||||
public CommonResult<IWorkFullSyncRespVO> fullSyncUsers(@Valid @RequestBody IWorkFullSyncReqVO reqVO) {
|
||||
return success(syncService.fullSyncUsers(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/hr/single-sync")
|
||||
@Operation(summary = "按 iWork ID 同步单条组织/人员")
|
||||
public CommonResult<IWorkSingleSyncRespVO> singleSync(@Valid @RequestBody IWorkSingleSyncReqVO reqVO) {
|
||||
return success(syncService.syncSingle(reqVO));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,10 @@ public class IWorkHrUserPageRespVO {
|
||||
@JsonProperty("accounttype")
|
||||
private String accounttype;
|
||||
|
||||
@Schema(description = "用户密码(MD5 密文)")
|
||||
@JsonProperty("password")
|
||||
private String password;
|
||||
|
||||
@JsonIgnore
|
||||
private Map<String, Object> attributes;
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@ public class IWorkOperationRespVO {
|
||||
@Schema(description = "iWork 返回的原始数据")
|
||||
private Map<String, Object> payload;
|
||||
|
||||
@Schema(description = "iWork 返回的原始字符串")
|
||||
private String rawBody;
|
||||
|
||||
@Schema(description = "是否判断为成功")
|
||||
private boolean success;
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* @deprecated 请改用强类型的 IWorkHr*RespVO,避免再引用该占位类。
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@Schema(description = "已废弃,占位用")
|
||||
public final class IWorkOrgRespVO {
|
||||
|
||||
private IWorkOrgRespVO() {
|
||||
throw new UnsupportedOperationException("Use IWorkHr*RespVO instead");
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
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.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* iWork 单条同步请求
|
||||
*/
|
||||
@Data
|
||||
public class IWorkSingleSyncReqVO {
|
||||
|
||||
@Schema(description = "同步的实体类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "user")
|
||||
@NotNull(message = "实体类型不能为空")
|
||||
private IWorkSyncEntityTypeEnum entityType;
|
||||
|
||||
@Schema(description = "iWork 提供的实体主键 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10001")
|
||||
@NotNull(message = "实体 ID 不能为空")
|
||||
@Min(1)
|
||||
private Long entityId;
|
||||
|
||||
@Schema(description = "缺失时是否自动创建", example = "true")
|
||||
private Boolean createIfMissing = Boolean.TRUE;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
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 lombok.Data;
|
||||
|
||||
/**
|
||||
* iWork 单条同步响应
|
||||
*/
|
||||
@Data
|
||||
public class IWorkSingleSyncRespVO {
|
||||
|
||||
@Schema(description = "同步的实体类型")
|
||||
private IWorkSyncEntityTypeEnum entityType;
|
||||
|
||||
@Schema(description = "实体 ID")
|
||||
private Long entityId;
|
||||
|
||||
@Schema(description = "是否创建了新的记录")
|
||||
private boolean created;
|
||||
|
||||
@Schema(description = "是否对已有记录进行了更新")
|
||||
private boolean updated;
|
||||
|
||||
@Schema(description = "提示信息")
|
||||
private String message;
|
||||
}
|
||||
@@ -14,9 +14,6 @@ public class IWorkUserInfoRespVO {
|
||||
@Schema(description = "iWork 返回的原始数据")
|
||||
private Map<String, Object> payload;
|
||||
|
||||
@Schema(description = "iWork 返回的原始字符串")
|
||||
private String rawBody;
|
||||
|
||||
@Schema(description = "是否判断为成功")
|
||||
private boolean success;
|
||||
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 发起 iWork 流程的请求体。
|
||||
*/
|
||||
@@ -17,25 +11,36 @@ import java.util.Map;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class IWorkWorkflowCreateReqVO extends IWorkBaseReqVO {
|
||||
|
||||
@Schema(description = "流程标题", example = "测试流程")
|
||||
@NotBlank(message = "流程标题不能为空")
|
||||
private String requestName;
|
||||
@Schema(description = "用印申请人(iWork 人员 ID)", example = "1001")
|
||||
private String jbr;
|
||||
|
||||
@Schema(description = "流程模板编号,可为空使用默认配置", example = "54")
|
||||
private Long workflowId;
|
||||
@Schema(description = "用印部门 ID", example = "2001")
|
||||
private String yybm;
|
||||
|
||||
@Schema(description = "主表字段")
|
||||
@NotEmpty(message = "主表字段不能为空")
|
||||
@Valid
|
||||
private List<IWorkFormFieldVO> mainFields;
|
||||
@Schema(description = "用印单位(分部 ID)", example = "3001")
|
||||
private String fb;
|
||||
|
||||
@Schema(description = "明细表数据")
|
||||
@Valid
|
||||
private List<IWorkDetailTableVO> detailTables;
|
||||
@Schema(description = "申请时间,格式 yyyy-MM-dd", example = "2025-01-01")
|
||||
private String sqsj;
|
||||
|
||||
@Schema(description = "额外参数")
|
||||
private Map<String, Object> otherParams;
|
||||
@Schema(description = "用印去向")
|
||||
private String yyqx;
|
||||
|
||||
@Schema(description = "额外 Form 数据")
|
||||
private Map<String, String> formExtras;
|
||||
@Schema(description = "用印依据附件 URL")
|
||||
private String yyfkUrl;
|
||||
|
||||
@Schema(description = "用印事由或内容摘要")
|
||||
private String yysy;
|
||||
|
||||
@Schema(description = "用印材料附件 URL(必填)")
|
||||
private String xyywjUrl;
|
||||
|
||||
@Schema(description = "用印材料附件文件名(必填)")
|
||||
private String xyywjFileName;
|
||||
|
||||
@Schema(description = "用印事项")
|
||||
private String yysx;
|
||||
|
||||
@Schema(description = "业务系统单据编号(用于派生流程标题)", example = "DJ-2025-0001")
|
||||
private String ywxtdjbh;
|
||||
}
|
||||
|
||||
@@ -34,11 +34,6 @@ public class IWorkProperties {
|
||||
*/
|
||||
private String clientPublicKey;
|
||||
|
||||
/**
|
||||
* 当调用方未指定流程编号时使用的默认流程模板编号。
|
||||
*/
|
||||
private Long workflowId;
|
||||
|
||||
/**
|
||||
* 当请求未指定操作人时使用的默认用户编号。
|
||||
*/
|
||||
@@ -53,6 +48,8 @@ public class IWorkProperties {
|
||||
private final Client client = new Client();
|
||||
@Valid
|
||||
private final OrgRest org = new OrgRest();
|
||||
@Valid
|
||||
private final Workflow workflow = new Workflow();
|
||||
|
||||
@Data
|
||||
public static class Paths {
|
||||
@@ -142,4 +139,13 @@ public class IWorkProperties {
|
||||
private String syncJobTitle;
|
||||
private String syncUser;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Workflow {
|
||||
/**
|
||||
* 用印流程对应的 iWork 模板编号。
|
||||
*/
|
||||
@NotBlank(message = "iWork 用印流程模板编号不能为空")
|
||||
private String sealWorkflowId;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user