Merge branch 'refs/heads/zt-test' into test
This commit is contained in:
@@ -4,16 +4,14 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt</artifactId>
|
||||
<artifactId>zt-dsc</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<modules>
|
||||
<module>zt-module-system-api</module>
|
||||
<module>zt-module-system-server</module>
|
||||
<module>zt-module-system-server-app</module>
|
||||
</modules>
|
||||
<artifactId>zt-module-system</artifactId>
|
||||
<artifactId>zt-module-system-dsc</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
system 模块 API,暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DataBus API -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-databus-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId> <!-- 接口文档:使用最新版本的 Swagger 模型 -->
|
||||
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 参数校验 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,36 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.system.api.dept.dto.DeptExternalCodeRespDTO;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 部门外部组织编码映射")
|
||||
public interface DeptExternalCodeApi {
|
||||
|
||||
@GetMapping("/get-by-system-and-external")
|
||||
@Operation(summary = "根据外部系统与外部组织编码查询映射")
|
||||
CommonResult<DeptExternalCodeRespDTO> getBySystemCodeAndExternalCode(
|
||||
@RequestParam("systemCode") @Parameter(description = "外部系统标识", required = true) String systemCode,
|
||||
@RequestParam("externalDeptCode") @Parameter(description = "外部组织编码", required = true) String externalDeptCode);
|
||||
|
||||
@GetMapping("/get-by-system-and-dept")
|
||||
@Operation(summary = "根据外部系统与部门编号查询映射")
|
||||
CommonResult<DeptExternalCodeRespDTO> getBySystemCodeAndDeptId(
|
||||
@RequestParam("systemCode") @Parameter(description = "外部系统标识", required = true) String systemCode,
|
||||
@RequestParam("deptId") @Parameter(description = "部门编号", required = true) Long deptId);
|
||||
|
||||
@GetMapping("/list-by-dept")
|
||||
@Operation(summary = "根据部门编号查询映射列表")
|
||||
CommonResult<List<DeptExternalCodeRespDTO>> getListByDeptId(
|
||||
@RequestParam("deptId") @Parameter(description = "部门编号", required = true) Long deptId);
|
||||
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostRespDTO;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostSaveReqDTO;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostSimpleRespDTO;
|
||||
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.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO ZT:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 岗位")
|
||||
public interface PostApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/post";
|
||||
|
||||
// === 以下为补全的接口方法 ===
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "新增岗位")
|
||||
CommonResult<Long> createPost(@RequestBody PostSaveReqDTO createReqVO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "修改岗位")
|
||||
CommonResult<Boolean> updatePost(@RequestBody PostSaveReqDTO updateReqVO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除岗位")
|
||||
CommonResult<Boolean> deletePost(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得岗位详情")
|
||||
CommonResult<PostRespDTO> getPost(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/simple-list")
|
||||
@Operation(summary = "获得岗位精简信息列表")
|
||||
CommonResult<List<PostSimpleRespDTO>> getSimplePostList();
|
||||
|
||||
@GetMapping(PREFIX + "/valid")
|
||||
@Operation(summary = "校验岗位是否合法")
|
||||
@Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true)
|
||||
CommonResult<Boolean> validPostList(@RequestParam("ids") Collection<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/list")
|
||||
@Operation(summary = "获得岗位列表")
|
||||
@Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true)
|
||||
CommonResult<List<PostRespDTO>> getPostList(@RequestParam("ids") Collection<Long> ids);
|
||||
|
||||
default Map<Long, PostRespDTO> getPostMap(Collection<Long> ids) {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return MapUtil.empty();
|
||||
}
|
||||
|
||||
List<PostRespDTO> list = getPostList(ids).getData();
|
||||
return CollectionUtils.convertMap(list, PostRespDTO::getId);
|
||||
}
|
||||
|
||||
// ========== 数据同步专用接口 ==========
|
||||
|
||||
@PostMapping(PREFIX + "/sync")
|
||||
@Operation(summary = "同步岗位")
|
||||
CommonResult<Boolean> syncPost(@RequestBody PostSaveReqDTO syncReqDTO);
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公司部门信息 Response DTO
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 公司部门信息 Response DTO")
|
||||
@Data
|
||||
public class CompanyDeptInfoRespDTO {
|
||||
|
||||
@Schema(description = "公司编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long companyId;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "公司编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "xxxx")
|
||||
private String companyCode;
|
||||
|
||||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "部门编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "xxxxx")
|
||||
private String deptCode;
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 部门信息 Response DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门信息 Response DTO")
|
||||
@Data
|
||||
public class DeptDetailRespDTO {
|
||||
|
||||
@Schema(description = "部门编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "显示顺序", example = "1024")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "负责人的用户编号", example = "2048")
|
||||
private Long leaderUserId;
|
||||
|
||||
@Schema(description = "联系电话", example = "15601691000")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "租户编号", example = "1024")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "RPC - 部门外部组织编码映射 Response DTO")
|
||||
@Data
|
||||
public class DeptExternalCodeRespDTO {
|
||||
|
||||
@Schema(description = "映射编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门编号", example = "2048")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称", example = "技术部")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "部门编码", example = "DEPT_001")
|
||||
private String deptCode;
|
||||
|
||||
@Schema(description = "外部系统标识", example = "ERP")
|
||||
private String systemCode;
|
||||
|
||||
@Schema(description = "外部组织编码", example = "100200")
|
||||
private String externalDeptCode;
|
||||
|
||||
@Schema(description = "外部组织名称", example = "总部-华东区")
|
||||
private String externalDeptName;
|
||||
|
||||
@Schema(description = "状态", example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "最后更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门列表 Request DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门列表 Request DTO")
|
||||
@Data
|
||||
public class DeptListReqDTO {
|
||||
|
||||
@Schema(description = "部门名称,模糊匹配", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
@Schema(description = "部门编号集合,支持多部门查询", example = "[\"1001\", \"1002\"]")
|
||||
private List<String> ids;
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.zt.plat.module.system.api.dept.dto;
|
||||
|
||||
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公司部门推送消息 Response DTO
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门推送消息 Response DTO")
|
||||
@Data
|
||||
public class DeptMsgRespDTO {
|
||||
|
||||
|
||||
/**
|
||||
* 主键编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 本系统部门 ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 外部系统标识
|
||||
*/
|
||||
private String systemCode;
|
||||
|
||||
/**
|
||||
* 外部系统组织编码
|
||||
*/
|
||||
private String externalDeptCode;
|
||||
|
||||
/**
|
||||
* 外部系统组织名称
|
||||
*/
|
||||
private String externalDeptName;
|
||||
|
||||
/**
|
||||
* 映射状态
|
||||
* 枚举 {@link CommonStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否发送消息
|
||||
*/
|
||||
private Integer isSendMsg;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user