feat(绩效第二阶段、签名管理): 开发绩效第二阶段、下签功能、用户签名管理。

This commit is contained in:
dk
2026-07-13 22:09:39 +08:00
parent f77007c4b7
commit 2830b55ffb
53 changed files with 1797 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
package com.njcn.rdms.module.system.api.file;
import com.njcn.rdms.framework.common.pojo.CommonResult;
import com.njcn.rdms.module.system.api.file.dto.FileContentCreateReqDTO;
import com.njcn.rdms.module.system.api.file.dto.FileRespDTO;
import com.njcn.rdms.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
@@ -8,6 +9,8 @@ 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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME)
@@ -31,4 +34,8 @@ public interface FileApi {
@Parameter(name = "id", description = "文件 ID", required = true)
CommonResult<byte[]> getFileContent(@RequestParam("id") Long id);
@PostMapping(PREFIX + "/create-by-content")
@Operation(summary = "通过文件字节创建文件")
CommonResult<Long> createFileByContent(@RequestBody FileContentCreateReqDTO reqDTO);
}

View File

@@ -0,0 +1,21 @@
package com.njcn.rdms.module.system.api.file.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "RPC 服务 - 文件字节创建 Request DTO")
@Data
public class FileContentCreateReqDTO {
@Schema(description = "文件内容", requiredMode = Schema.RequiredMode.REQUIRED)
private byte[] content;
@Schema(description = "文件名", example = "2026-06_张三.xlsx")
private String name;
@Schema(description = "目录", example = "rdms/performance")
private String directory;
@Schema(description = "MIME 类型", example = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
private String type;
}

View File

@@ -0,0 +1,23 @@
package com.njcn.rdms.module.system.api.user;
import com.njcn.rdms.framework.common.pojo.CommonResult;
import com.njcn.rdms.module.system.api.user.dto.UserSignatureRespDTO;
import com.njcn.rdms.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;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户电子签名")
public interface UserSignatureApi {
String PREFIX = ApiConstants.PREFIX + "/user-signature";
@GetMapping(PREFIX + "/get")
@Operation(summary = "根据用户 ID 查询电子签名")
@Parameter(name = "userId", description = "用户 ID", required = true)
CommonResult<UserSignatureRespDTO> getByUserId(@RequestParam("userId") Long userId);
}

View File

@@ -0,0 +1,27 @@
package com.njcn.rdms.module.system.api.user.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "RPC 服务 - 用户电子签名 Response DTO")
@Data
public class UserSignatureRespDTO {
@Schema(description = "主键", example = "1")
private Long id;
@Schema(description = "用户 ID", example = "1024")
private Long userId;
@Schema(description = "文件 ID", example = "2048")
private Long fileId;
@Schema(description = "文件名", example = "zhangsan-sign.png")
private String fileName;
@Schema(description = "状态", example = "0")
private Integer status;
@Schema(description = "备注")
private String remark;
}