Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||
|
||||
ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
|
||||
FROM ${BASE_IMAGE}
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
## 创建目录,并使用它作为工作目录
|
||||
RUN mkdir -p /zt-module-system-server
|
||||
@@ -11,15 +10,10 @@ COPY ./target/zt-module-system-server.jar app.jar
|
||||
|
||||
## 设置 TZ 时区
|
||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx512m"
|
||||
ENV SW_AGENT_HOME=/opt/skywalking/agent
|
||||
ENV SW_AGENT_NAME=zt-module-system-server
|
||||
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
|
||||
ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
## 暴露后端项目的 48080 端口
|
||||
EXPOSE 48081
|
||||
|
||||
## 启动后端项目
|
||||
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
|
||||
@@ -50,6 +50,9 @@ public class AuthPermissionInfoRespVO {
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "工号", example = "A00123")
|
||||
private String workcode;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.system.controller.admin.integration.iwork.vo.*;
|
||||
import com.zt.plat.module.system.service.integration.iwork.IWorkIntegrationService;
|
||||
import com.zt.plat.module.system.service.integration.iwork.IWorkOrgRestService;
|
||||
import com.zt.plat.module.system.service.integration.iwork.IWorkSyncService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -14,7 +16,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@@ -57,6 +58,7 @@ public class IWorkIntegrationController {
|
||||
}
|
||||
|
||||
@PermitAll
|
||||
@TenantIgnore
|
||||
@PostMapping("/callback/file")
|
||||
@Operation(summary = "iWork 文件回调:根据文件 URL 保存为附件并创建业务附件关联")
|
||||
public CommonResult<Long> callbackFile(@Valid @RequestBody IWorkFileCallbackReqVO reqVO) {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
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.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 传递给 iWork 的单条明细记录。
|
||||
*/
|
||||
@Data
|
||||
public class IWorkDetailRecordVO {
|
||||
|
||||
@Schema(description = "记录序号,从 0 开始", example = "0")
|
||||
private Integer recordOrder;
|
||||
|
||||
@Schema(description = "明细字段列表")
|
||||
@NotEmpty(message = "明细字段不能为空")
|
||||
@Valid
|
||||
private List<IWorkFormFieldVO> fields;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* iWork 流程请求中的明细表定义。
|
||||
*/
|
||||
@Data
|
||||
public class IWorkDetailTableVO {
|
||||
|
||||
@Schema(description = "表名", example = "formtable_main_26_dt1")
|
||||
@NotBlank(message = "明细表名不能为空")
|
||||
private String tableDBName;
|
||||
|
||||
@Schema(description = "明细记录集合")
|
||||
@NotEmpty(message = "明细记录不能为空")
|
||||
@Valid
|
||||
private List<IWorkDetailRecordVO> records;
|
||||
}
|
||||
@@ -12,9 +12,9 @@ public class IWorkFileCallbackReqVO {
|
||||
@NotBlank(message = "文件 URL 不能为空")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "业务 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
|
||||
@NotBlank(message = "业务 ID 不能为空")
|
||||
private String businessId;
|
||||
@Schema(description = "业务编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "DJ-2025-0001")
|
||||
@NotBlank(message = "业务编码不能为空")
|
||||
private String businessCode;
|
||||
|
||||
@Schema(description = "文件名称,可选", example = "合同附件.pdf")
|
||||
private String fileName;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 提交给 iWork 的单个表单字段。
|
||||
*/
|
||||
@Data
|
||||
public class IWorkFormFieldVO {
|
||||
|
||||
@Schema(description = "字段名", example = "sqr")
|
||||
@NotBlank(message = "字段名不能为空")
|
||||
private String fieldName;
|
||||
|
||||
@Schema(description = "字段值", example = "张三")
|
||||
@NotBlank(message = "字段值不能为空")
|
||||
private String fieldValue;
|
||||
}
|
||||
@@ -33,6 +33,9 @@ public class IWorkFullSyncReqVO {
|
||||
@Schema(description = "同步范围列表,默认同步全部。可选:subcompany、department、jobTitle、user")
|
||||
private List<String> scopes;
|
||||
|
||||
@Schema(description = "指定同步记录的 iWork ID。传入后仅同步对应记录", example = "12345")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "是否包含已失效(canceled=1)的记录", example = "false")
|
||||
private Boolean includeCanceled = Boolean.FALSE;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,12 +12,49 @@ import java.util.Map;
|
||||
@Data
|
||||
public class IWorkOperationRespVO {
|
||||
|
||||
@Schema(description = "iWork 返回的原始数据")
|
||||
private Map<String, Object> payload;
|
||||
@Schema(description = "iWork 返回的原始数据结构")
|
||||
private Payload payload;
|
||||
|
||||
@Schema(description = "是否判断为成功")
|
||||
private boolean success;
|
||||
|
||||
@Schema(description = "返回提示信息")
|
||||
private String message;
|
||||
|
||||
@Data
|
||||
public static class Payload {
|
||||
|
||||
@Schema(description = "iWork 返回的业务状态码,例如 SUCCESS")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "iWork 返回的数据体")
|
||||
private PayloadData data;
|
||||
|
||||
@Schema(description = "错误信息对象,通常为空对象")
|
||||
private Map<String, Object> errMsg;
|
||||
|
||||
@Schema(description = "返回失败时的详细信息")
|
||||
private ReqFailMsg reqFailMsg;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class PayloadData {
|
||||
|
||||
@Schema(description = "iWork 生成的请求编号 requestid")
|
||||
@JsonProperty("requestid")
|
||||
private Long requestId;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ReqFailMsg {
|
||||
|
||||
@Schema(description = "失败时的关键参数集合")
|
||||
private Map<String, Object> keyParameters;
|
||||
|
||||
@Schema(description = "失败消息对象")
|
||||
private Map<String, Object> msgInfo;
|
||||
|
||||
@Schema(description = "其他附加参数,例如 doAutoApprove")
|
||||
private Map<String, Object> otherParams;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.zt.plat.module.system.controller.admin.integration.iwork.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 查询 iWork 人力组织信息所需的参数。
|
||||
*/
|
||||
@Data
|
||||
public class IWorkOrgQueryReqVO {
|
||||
|
||||
@Schema(description = "当前页码", example = "1")
|
||||
private Integer curpage;
|
||||
|
||||
@Schema(description = "每页条数", example = "10")
|
||||
private Integer pagesize;
|
||||
|
||||
// ================= 分部查询 =================
|
||||
|
||||
@Schema(description = "分部编码")
|
||||
private String subcompanyCode;
|
||||
|
||||
@Schema(description = "分部名称")
|
||||
private String subcompanyName;
|
||||
|
||||
// ================= 部门查询 =================
|
||||
|
||||
@Schema(description = "部门编码")
|
||||
private String departmentCode;
|
||||
|
||||
@Schema(description = "部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@Schema(description = "所属分部ID")
|
||||
private String subcompanyId;
|
||||
|
||||
// ================= 岗位查询 =================
|
||||
|
||||
@Schema(description = "岗位编码")
|
||||
private String jobTitleCode;
|
||||
|
||||
@Schema(description = "岗位名称")
|
||||
private String jobTitleName;
|
||||
|
||||
// ================= 人员查询 =================
|
||||
|
||||
@Schema(description = "人员工号")
|
||||
private String workCode;
|
||||
|
||||
@Schema(description = "人员姓名")
|
||||
private String lastName;
|
||||
|
||||
@Schema(description = "所属部门ID")
|
||||
private String departmentId;
|
||||
|
||||
@Schema(description = "所属岗位ID")
|
||||
private String jobTitleId;
|
||||
|
||||
@Schema(description = "人员状态 (0:试用, 1:正式, 2:临时, 3:试用延期, 4:解聘, 5:离职, 6:退休, 7:无效)")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "查询参数(扩展用),将被序列化为 params 传给 iWork")
|
||||
private Map<String, Object> params;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user