1、完善项目
2、完善合同 3、完善费用项 4、司机管理对接OCR 5、完善运输计划 6、完善临时额度
This commit is contained in:
@@ -29,6 +29,7 @@ package org.springblade.auth;
|
||||
import org.springblade.core.cloud.client.BladeCloudApplication;
|
||||
import org.springblade.core.launch.BladeApplication;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,7 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
|
||||
*/
|
||||
@EnableRedisHttpSession
|
||||
@BladeCloudApplication
|
||||
@ComponentScan({"org.springblade.auth", "org.springblade.**.feign"})
|
||||
public class AuthApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
package org.springblade.auth.config;
|
||||
|
||||
import org.springblade.auth.granter.IamAwareTokenGranterFactory;
|
||||
import org.springblade.auth.handler.BladeAuthorizationHandler;
|
||||
import org.springblade.auth.handler.BladeLockHandler;
|
||||
import org.springblade.auth.handler.BladeLogHandler;
|
||||
@@ -38,9 +37,6 @@ import org.springblade.core.jwt.props.JwtProperties;
|
||||
import org.springblade.core.launch.props.BladeProperties;
|
||||
import org.springblade.core.launch.server.ServerInfo;
|
||||
import org.springblade.core.oauth2.config.OAuth2AutoConfiguration;
|
||||
import org.springblade.core.oauth2.granter.TokenGranter;
|
||||
import org.springblade.core.oauth2.granter.TokenGranterEnhancer;
|
||||
import org.springblade.core.oauth2.granter.TokenGranterFactory;
|
||||
import org.springblade.core.oauth2.handler.AuthorizationHandler;
|
||||
import org.springblade.core.oauth2.handler.PasswordHandler;
|
||||
import org.springblade.core.oauth2.handler.TokenHandler;
|
||||
@@ -55,11 +51,8 @@ import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* BladeAuthConfiguration
|
||||
*
|
||||
@@ -108,12 +101,4 @@ public class BladeAuthConfiguration {
|
||||
return new BladeUserDetailService(userClient);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean("iamAwareTokenGranterFactory")
|
||||
public TokenGranterFactory tokenGranterFactory(List<TokenGranter> tokenGranters,
|
||||
List<TokenGranterEnhancer> tokenGranterEnhancers,
|
||||
OAuth2Properties properties) {
|
||||
return new IamAwareTokenGranterFactory(tokenGranters, tokenGranterEnhancers, properties);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,16 +63,3 @@ social:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/dingtalk
|
||||
|
||||
# IAM统一身份认证
|
||||
iam:
|
||||
sso:
|
||||
token-url: http://172.16.204.83:38000/gwzh/IAM/IAM_SSO_TOKEN
|
||||
profile-url: http://172.16.204.83:38000/gwzh/IAM/IAM_SSO_PROFILE
|
||||
client-id: f0b52f23f71b1649c468
|
||||
client-secret: 5b3d8575f0899946623ab86523ac3dd8ee98
|
||||
system-client-id: saber3
|
||||
system-client-secret: saber3_secret
|
||||
redirect-uri: http://172.16.203.228:8000/callback
|
||||
authorization: Z3d6aF90bXMtOVJJU0RVN1U6YW0yYkcwWnBJZ0RQZmtrSjNaZkZjUDBSaGFuSEtxQng=
|
||||
profile-authorization: Z3d6aF90bXMtOVJJU0RVN1U6YW0yYkcwWnBJZ0RQZmtrSjNaZkZjUDBSaGFuSEtxQng=
|
||||
|
||||
@@ -22,14 +22,24 @@
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-core-auto</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.idev.excel</groupId>
|
||||
<artifactId>fastexcel</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-core-auto</artifactId>
|
||||
<scope>provided</scope>
|
||||
<groupId>com.huaweicloud</groupId>
|
||||
<artifactId>esdk-obs-java-bundle</artifactId>
|
||||
<version>3.24.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.16.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -72,4 +72,35 @@ public interface CommonConstant {
|
||||
*/
|
||||
Integer API_SCOPE_CATEGORY = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 是 2
|
||||
*/
|
||||
Integer YES = 2;
|
||||
/**
|
||||
* 不是 1
|
||||
*/
|
||||
Integer NO = 1;
|
||||
/**
|
||||
* 系统名称
|
||||
*/
|
||||
String SYSTEM_CODE = "CK-ERP";
|
||||
/**
|
||||
* 默认密码参数值
|
||||
*/
|
||||
String DEFAULT_PARAM_PASSWORD = "account.initPassword";
|
||||
/**
|
||||
* 默认角色参数值
|
||||
*/
|
||||
String DEFAULT_PARAM_ROLE = "account.initRole";
|
||||
/**
|
||||
* 默认角色
|
||||
*/
|
||||
String DEFAULT_ROLE = "default";
|
||||
/**
|
||||
* 同步的子公司名称根公司的值
|
||||
*/
|
||||
String DICT_KEY_SYNC_ROOT_COMPANY_NAME = "root_company";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.springblade.common.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据状态枚举
|
||||
*
|
||||
* @author vic
|
||||
* @date 2024/8/26 6:45 PM
|
||||
* @description DataStatusEnum
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DataStatusEnum {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
ENABLE(1, "启用"),
|
||||
|
||||
DISABLE(2, "禁用"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
|
||||
private final String name;
|
||||
|
||||
|
||||
/**
|
||||
* 匹配枚举值
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static boolean match(Integer code) {
|
||||
for (DataStatusEnum state : values()) {
|
||||
if (state.code.equals(code)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getNameStr(Integer code) {
|
||||
for (DataStatusEnum state : values()) {
|
||||
if (state.code.equals(code)) {
|
||||
return state.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否可以编辑修改表单 .没有审批业务的使用此方法, 系统设计的是反的
|
||||
* true:可编辑 false:不可编辑
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static boolean canEdit(Integer value) {
|
||||
return DISABLE.getCode().equals(value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package org.springblade.common.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 系统字典类型枚举
|
||||
* 响功能和流程的字典
|
||||
* @author vic
|
||||
* @date 2024/9/9 8:56 PM
|
||||
* @description DictTypeEnum
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DictTypeEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
DATA_STATUS("data_status", "数据状态"),
|
||||
APPROVE_STATUS("approve_state", "通用审批状态"),
|
||||
COOPERATE_STATUS("cooperate_status", "合作状态"),
|
||||
CUSTOMER_TYPE("customer_type", "客户类型"),
|
||||
DELIVERER_TYPE("deliverer_type", "投送人类型"),
|
||||
ENTERPRISE_TYPE("enterprise_type", "企业类型"),
|
||||
SETTLEMENT_TYPE("settlement_type", "结算中心类型"),
|
||||
CUSTOMER_COMPANY_TYPE("company_type","客户管理的企业类型"),
|
||||
PARTNER_TYPE("partner_type","合作伙伴类型"),
|
||||
SYSTEM_YES_NO("yes_no","系统是否"),
|
||||
PLATFORM_TYPE("settlement_type","平台类型/结算中心类型"),
|
||||
TAXPAYER_TYPE("taxpayer_type","纳税人分类"),
|
||||
//部门简称
|
||||
DEPARTMENT_SHORT_NAME("department_short_name","部门简称"),
|
||||
PROCESS_TYPE("process_type","流程类型"),
|
||||
|
||||
//评级维度
|
||||
RATING_DIMENSION("rating_dimension","评级维度"),
|
||||
// oa公司部门同步
|
||||
SYNC_COMPANY_NAME("sync_company_name","同步公司名称"),
|
||||
SYNC_ROOT_COMPANY_DEPT_NAME("sync_root_company_dept_name","同步根公司下部门名称"),
|
||||
DEPARTMENT_CODE("department_code","部门编号"),
|
||||
|
||||
//公式管理
|
||||
FORMULA_TYPE("formula_type","公式类型"),
|
||||
|
||||
//财务管理
|
||||
FINANCIAL_TYPE("financial_type","财务类型"),
|
||||
SAP_TYPE("sap_type","财务结算类型"),
|
||||
SETTLEMENT_CLASSIFICATION("settlement_classification","财务结算分类"),//内部结算、外部结算
|
||||
SAP_DATA_STATUS("sap_data_status","财务结算单状态"),
|
||||
SETTLEMENT_VOUCHER_TYPE("settlement_voucher_type","结算凭证类型"),
|
||||
SETTLEMENT_NEXT_STATUS("settlement_next_status","下一步结算状态"),
|
||||
|
||||
PAYMENT_TYPE("payment_type","财务付款分类"),
|
||||
PAYMENT_DATA_STATUS("payment_data_status","财务付款单状态"),
|
||||
PAYEMENT_CLASSIFICATION("payment_classification","财务付款分类"), //内部付款、外部付款
|
||||
PAYMENT_METHOD_TYPE("payment_method_type","财务付款支付方式"),
|
||||
|
||||
SAP_VERIFICATION_METHOD("verification_method","验证方式"),
|
||||
|
||||
/** 结算管理列表页的开票状态、付款状态 **/
|
||||
SETT_PAYMENT_STATUS("payment_status","付款状态"),
|
||||
SETT_INVOICE_STATUS("invoice_status","开票状态"),
|
||||
|
||||
|
||||
// 车辆运输凭证
|
||||
CERTIFICATE_BATCH_STATUS("certificate_batch_status","车辆运输凭证批次状态"),
|
||||
CERTIFICATE_IDENTIFICATION_STATUS("certificate_identification_status","车辆运输凭证识别状态"),
|
||||
CERTIFICATE_IDENTIFICATION_RESULT("certificate_identification_result","车辆运输凭证识别结果"),
|
||||
|
||||
// 文件任务状态
|
||||
FILE_TASK_STATUS("file_task_status", "文件任务状态"),
|
||||
// 运单管理-差异项 总净重
|
||||
WEIGHT_STATUS("weight_status", "总净重"),
|
||||
// 运单管理-比对结果 差异类型
|
||||
DIFFERENCE_TYPE("difference_type", "差异类型"),
|
||||
// 收款
|
||||
CLAIM_STATUS("claim_status", "认领状态"),
|
||||
RECEIPT_SOURCE("receipt_source", "收款来源"),
|
||||
CURRENCY("currency", "币种"),
|
||||
|
||||
TRAJECTORY_STATUS("trajectory_status", "轨迹状态"),
|
||||
|
||||
HOME_BASE_TYPE("base_type","基地类型"),
|
||||
|
||||
FEE_NAME_TYPE("fee_name_type","费用类型"),
|
||||
|
||||
TAX_CODE("taxCode","税收编码"),
|
||||
INPUT_INVOICE_STATUS("input_invoice_status","录入开票状态"),
|
||||
|
||||
/**
|
||||
* 城矿结算公司财务负责人
|
||||
*/
|
||||
SETTLEMENT_FINANCE_CONTROLLER("settlement_finance_controller", "城矿结算公司财务负责人"),
|
||||
|
||||
/**
|
||||
* 付款单据类型
|
||||
*/
|
||||
PAYMENT_DOCUMENT_TYPE("payment_document_type", "付款单据类型"),
|
||||
|
||||
/**
|
||||
* 归档状态
|
||||
*/
|
||||
ARCHIVE_STATUS("archive_status", "归档状态"),
|
||||
|
||||
/**
|
||||
* 预警类型
|
||||
*/
|
||||
WARNING_TYPE("warning_type", "预警类型"),
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
MESSAGE_STATUS("message_status", "消息状态"),
|
||||
|
||||
/**
|
||||
* 通知类型
|
||||
*/
|
||||
NOTICE_TYPE("notice_type", "通知类型"),
|
||||
|
||||
/**
|
||||
* 通知对象类型
|
||||
*/
|
||||
NOTICE_OBJECT_TYPE("notice_object_type", "通知对象类型"),
|
||||
|
||||
/**
|
||||
* 项目磅单校验类型
|
||||
*/
|
||||
PROJECT_POUND_VALID_TYPE("project_pound_valid_type", "项目磅单校验类型"),
|
||||
|
||||
/**
|
||||
* 推送单据类型
|
||||
*/
|
||||
PUSH_DOC_TYPE("push_doc_type", "推送单据类型"),
|
||||
|
||||
/**
|
||||
* mk流程状态
|
||||
*/
|
||||
MK_STATUS("mk_status", "mk流程状态"),
|
||||
|
||||
;
|
||||
|
||||
final String type;
|
||||
|
||||
final String text;
|
||||
|
||||
|
||||
/**
|
||||
* 匹配枚举值
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public static boolean match(String type) {
|
||||
for (DictTypeEnum state : values()) {
|
||||
if (state.type.equals(type)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getNameStr(String type) {
|
||||
for (DictTypeEnum state : values()) {
|
||||
if (state.type.equals(type)) {
|
||||
return state.text;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
package org.springblade.common.utils;
|
||||
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.obs.services.ObsClient;
|
||||
import com.obs.services.exception.ObsException;
|
||||
import com.obs.services.model.*;
|
||||
import jakarta.activation.MimetypesFileTypeMap;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: OBSUtil
|
||||
* @Description:
|
||||
* @Author: zhaowei
|
||||
* @Date: 2024/8/22
|
||||
*/
|
||||
public class ObsUtil {
|
||||
private final static Logger logger = LoggerFactory.getLogger(ObsUtil.class);
|
||||
|
||||
private static MimetypesFileTypeMap fileTypeMap = new MimetypesFileTypeMap();
|
||||
/**
|
||||
* 华为云OBS
|
||||
*/
|
||||
public static String obsEndpoint;
|
||||
public static String obsAccessKeyId;
|
||||
public static String obsAccessKeySecret;
|
||||
public static String obsBucketName;
|
||||
public static String obsRootDirectory;
|
||||
|
||||
@Value("${obs.endpoint}")
|
||||
public void setObsEndpoint(String endpoint) {
|
||||
ObsUtil.obsEndpoint = endpoint;
|
||||
}
|
||||
|
||||
@Value("${obs.access-key-id}")
|
||||
public void setObsAccessKeyId(String accessKeyId) {
|
||||
ObsUtil.obsAccessKeyId = accessKeyId;
|
||||
}
|
||||
|
||||
@Value("${obs.access-key-secret}")
|
||||
public void setObsAccessKeySecret(String accessKeySecret) {
|
||||
ObsUtil.obsAccessKeySecret = accessKeySecret;
|
||||
}
|
||||
|
||||
@Value("${obs.bucket-name}")
|
||||
public void setObsBucketName(String bucketName) {
|
||||
ObsUtil.obsBucketName = bucketName;
|
||||
}
|
||||
|
||||
@Value("${obs.root-directory}")
|
||||
public void setObsRootDirectory(String rootDirectory) {
|
||||
ObsUtil.obsRootDirectory = rootDirectory;
|
||||
}
|
||||
|
||||
|
||||
// 如果Bucket不存在,则创建它。
|
||||
private static void ensureBucket(ObsClient client, String bucketName) throws ObsException {
|
||||
|
||||
if (client.headBucket(bucketName)) {
|
||||
return;
|
||||
}
|
||||
// 创建bucket
|
||||
client.createBucket(bucketName);
|
||||
}
|
||||
|
||||
// 把Bucket设置为所有人可读
|
||||
private static void setBucketPublicReadable(String bucketName) throws ObsException {
|
||||
//华为云OBS
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
if (obsClient.doesObjectExist(obsBucketName, obsRootDirectory)) {
|
||||
|
||||
} else {
|
||||
obsClient.createBucket(obsBucketName);
|
||||
}
|
||||
obsClient.setBucketAcl(obsBucketName, com.obs.services.model.AccessControlList.REST_CANNED_PUBLIC_READ_WRITE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传一个Object
|
||||
*
|
||||
* @param key
|
||||
* @param content
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public static String putObject(String key, InputStream content) throws IOException {
|
||||
//华为云OBS
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
try {
|
||||
obsClient.putObject(obsBucketName, key, content);
|
||||
} catch (Exception e) {
|
||||
logger.error("obs put object error", e);
|
||||
throw new RuntimeException("obs eror" + e.getMessage());
|
||||
} finally {
|
||||
obsClient.close();
|
||||
}
|
||||
return getExpireUrl(key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
* @param objectKey 上传到OBS起的名
|
||||
* @param filename 文件下载到本地保存的路径
|
||||
* @throws ObsException
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void downloadFile(String objectKey, String filename) throws ObsException, IOException {
|
||||
//华为云OBS
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
try {
|
||||
obsClient.getObject(obsBucketName, objectKey);
|
||||
} finally {
|
||||
obsClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一个Bucket和其中的Objects
|
||||
*
|
||||
* @param bucketName Bucket名
|
||||
* @throws ObsException
|
||||
*/
|
||||
private static void deleteBucket(String bucketName) throws ObsException {
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
com.obs.services.model.ObjectListing objectListing = obsClient.listObjects(bucketName);
|
||||
List<ObsObject> listObject = objectListing.getObjects();
|
||||
for (ObsObject o : listObject) {
|
||||
obsClient.deleteObject(bucketName, o.getObjectKey());
|
||||
}
|
||||
obsClient.deleteBucket(bucketName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除Object
|
||||
* @param objList Object的key(目录路径/文件名)
|
||||
*/
|
||||
public static void delelteObjectList(List<String> objList) {
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
for (String key : objList) {
|
||||
obsClient.deleteObject(obsBucketName, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除Object
|
||||
* @param key 目录路径/文件名
|
||||
*/
|
||||
public static void delelteObject(String key) {
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
obsClient.deleteObject(obsBucketName, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过key获取带签名的url
|
||||
*/
|
||||
public static String getExpireUrl(String key) {
|
||||
String fileUrl = "";
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
// URL有效期,3600秒.5分钟
|
||||
// long expireSeconds = 3600L;
|
||||
// 约等于1年
|
||||
long expireSeconds = 31536000L;
|
||||
TemporarySignatureRequest request = new TemporarySignatureRequest(HttpMethodEnum.GET, expireSeconds);
|
||||
request.setBucketName(obsBucketName);
|
||||
request.setObjectKey(key);
|
||||
TemporarySignatureResponse response = obsClient.createTemporarySignature(request);
|
||||
fileUrl = response.getSignedUrl();
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件至OSS并且返回链接地址
|
||||
* @param url 远程路径
|
||||
* @param ossDir OSS目录
|
||||
* @param fileName 文件名
|
||||
* @return 文件OSS链接
|
||||
* @modify
|
||||
*/
|
||||
public static String uploadFile2Oss(URL url, String ossDir, String fileName) {
|
||||
InputStream is;
|
||||
String key = ossDir + fileName;
|
||||
try {
|
||||
is = url.openStream();
|
||||
return uploadFile2OSS(is, key);
|
||||
} catch (Exception ex) {
|
||||
logger.error("上传失败!", ex);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传到OSS服务器 如果同名文件会覆盖服务器上的
|
||||
*
|
||||
* @param inputStream 文件流
|
||||
* @return 返回文件访问路径
|
||||
*/
|
||||
@SneakyThrows
|
||||
public static String uploadFile2OSS(InputStream inputStream, String key) {
|
||||
ObjectMetadata objectMetadata = new ObjectMetadata();
|
||||
objectMetadata.setCacheControl("no-cache");
|
||||
String fileName = FilenameUtils.getName(key);
|
||||
objectMetadata.setContentType(fileTypeMap.getContentType(fileName));
|
||||
objectMetadata.addUserMetadata("filename", fileName);
|
||||
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId,
|
||||
obsAccessKeySecret, obsEndpoint);
|
||||
try {
|
||||
obsClient.putObject(obsBucketName, obsRootDirectory + key, inputStream, objectMetadata);
|
||||
return obsRootDirectory + "/" + key;
|
||||
} finally {
|
||||
obsClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public Boolean checkObjectExist(String key) {
|
||||
Boolean existsFlag = false;
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
try {
|
||||
existsFlag = obsClient.doesObjectExist(obsBucketName, key);
|
||||
} finally {
|
||||
obsClient.close();
|
||||
}
|
||||
return existsFlag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
* @param objectKey 上传到OBS起的名
|
||||
* @param filename 文件下载到本地保存的路径
|
||||
* @throws ObsException
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void downloadFileNew(String objectKey, String filename){
|
||||
//华为云OBS
|
||||
ObsClient obsClient = new ObsClient(obsAccessKeyId, obsAccessKeySecret, obsEndpoint);
|
||||
try {
|
||||
ObsObject ossObject = obsClient.getObject(obsBucketName, objectKey);
|
||||
|
||||
OutputStream outputStream = null;
|
||||
try {
|
||||
outputStream = new BufferedOutputStream(new FileOutputStream(filename));
|
||||
byte[] buffer = new byte[8192];
|
||||
int bytesRead;
|
||||
while ((bytesRead = ossObject.getObjectContent().read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
} finally {
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (obsClient != null) {
|
||||
try {
|
||||
obsClient.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,9 +52,6 @@ public class AuthProvider {
|
||||
DEFAULT_SKIP_URL.add("/oauth/callback/**");
|
||||
DEFAULT_SKIP_URL.add("/oauth/revoke/**");
|
||||
DEFAULT_SKIP_URL.add("/oauth/refresh/**");
|
||||
DEFAULT_SKIP_URL.add("/iam/sso/token/**");
|
||||
DEFAULT_SKIP_URL.add("/blade-auth/iam/sso/token/**");
|
||||
DEFAULT_SKIP_URL.add("/api/blade-auth/iam/sso/token/**");
|
||||
DEFAULT_SKIP_URL.add("/token/**");
|
||||
DEFAULT_SKIP_URL.add("/actuator/**");
|
||||
DEFAULT_SKIP_URL.add("/v3/api-docs/**");
|
||||
|
||||
22
blade-service-api/blade-file-api/pom.xml
Normal file
22
blade-service-api/blade-file-api/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>org.springblade</groupId>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-file-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-ocr-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.file.callback;
|
||||
|
||||
/**
|
||||
* 解压回调接口
|
||||
* @author bfhuange
|
||||
* @date 2024/11/8
|
||||
*/
|
||||
public interface UnzipCallback {
|
||||
/**
|
||||
* 解压任务的业务编码
|
||||
* @return
|
||||
*/
|
||||
String getBizCode();
|
||||
|
||||
/**
|
||||
* 回调接口
|
||||
* @param bizId 业务id
|
||||
* @param event 事件 org.springblade.file.callback.UnzipEventType name
|
||||
* @return
|
||||
*/
|
||||
boolean callback(Long bizId, String event);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.file.callback;
|
||||
|
||||
/**
|
||||
* 解压事件类型
|
||||
* @author bfhuange
|
||||
* @date 2024/11/15
|
||||
*/
|
||||
public enum UnzipEventType {
|
||||
/**
|
||||
* 开始解压
|
||||
*/
|
||||
START,
|
||||
/**
|
||||
* 解压成功
|
||||
*/
|
||||
SUCCESS,
|
||||
/**
|
||||
* 解压失败
|
||||
*/
|
||||
FAIL,
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.springblade.file.config;
|
||||
|
||||
import feign.codec.Encoder;
|
||||
import feign.form.spring.SpringFormEncoder;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/9
|
||||
*/
|
||||
public class FeignFileUploadClientConfig {
|
||||
|
||||
@Bean
|
||||
public Encoder feignFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.file.pojo.dto.*;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.*;
|
||||
import org.springblade.thirdparty.ocr.pojo.vo.TransportCertificateVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@FeignClient(
|
||||
value = "blade-file",
|
||||
fallback = IFileClientFallback.class
|
||||
)
|
||||
public interface IFileClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/file";
|
||||
String ATTACHMENT = API_PREFIX + "/attachment";
|
||||
String ATTACHMENT_DETAIL = API_PREFIX + "/attachment-detail";
|
||||
String BUSINESS_ATTACHMENT_SAVE_REMOVE = API_PREFIX + "/businessAttachment-save-remove";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE = API_PREFIX + "/businessAttachment-batch-save-remove";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_BY_PARAM = API_PREFIX + "/businessAttachment-batch-save-remove-by-param";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_NO_BIZ_ID = API_PREFIX + "/businessAttachment-batch-save-remove-no-bizId";
|
||||
String BUSINESS_ATTACHMENT_REMOVE = API_PREFIX + "/businessAttachment-remove";
|
||||
String BUSINESS_ATTACHMENT_LIST = API_PREFIX + "/businessAttachment-list";
|
||||
String BUSINESS_UNZIP_TASK_SAVE = API_PREFIX + "/businessUnzipTask-save";
|
||||
String BUSINESS_UNZIP_TASK_UPDATE = API_PREFIX + "/businessUnzipTask-update";
|
||||
String BUSINESS_UNZIP_TASK_CANCEL = API_PREFIX + "/businessUnzipTask-cancel";
|
||||
String BUSINESS_UNZIP_TASK_REMOVE = API_PREFIX + "/businessUnzipTask-remove";
|
||||
String BUSINESS_UNZIP_TASK_LIST = API_PREFIX + "/businessUnzipTask-list";
|
||||
String BUSINESS_UNZIP_DETAIL_LIST = API_PREFIX + "/businessUnzipDetail-list";
|
||||
String RECOGNITION_TRANSPORT_CERTIFICATE = API_PREFIX + "/recognitionTransportCertificate";
|
||||
String FILE_URLS = API_PREFIX + "/getFileUrls";
|
||||
|
||||
/**
|
||||
* 获取附件,多个附件id用逗号分割
|
||||
*
|
||||
* @param id
|
||||
* @return List<Attachment>
|
||||
*/
|
||||
@GetMapping(ATTACHMENT)
|
||||
R<List<Attachment>> getAttachment(@RequestParam("id") String id);
|
||||
|
||||
/**
|
||||
* 获取附件详情
|
||||
*
|
||||
* @param id
|
||||
* @return List<Attachment>
|
||||
*/
|
||||
@GetMapping(ATTACHMENT_DETAIL)
|
||||
R<AttachmentDetailVO> getAttachmentDetail(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 保存并删除业务附件,remove为true,先用bizId删除,再新增
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_SAVE_REMOVE)
|
||||
R saveAndRemoveBusinessAttachment(@RequestBody @Validated BusinessAttachmentBatchAddDTO param);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,先删除附件,再新增,业务id为空,从params中获取bizId,先删除
|
||||
*
|
||||
* @param params 参数为空不新增
|
||||
* @param bizId 业务id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE)
|
||||
R batchSaveAndRemoveBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params, @RequestParam(value = "bizId", required = false) Long bizId);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,deleteParam为空,从params获取bizId删除,不为空,使用bizIds和bizCodes删除附件,bizCodes为空删除所有bizIds的附件
|
||||
* deleteParam 中 delete 为false,不删除
|
||||
*
|
||||
* @param params 参数为空不新增
|
||||
* @param deleteParam 删除参数,支持只删除业务编码参数的附件
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_BY_PARAM)
|
||||
R batchSaveAndRemoveByParamBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params, @Valid @SpringQueryMap BusinessAttachmentDeleteDTO deleteParam);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,从参数中提取所有bizId
|
||||
*
|
||||
* @param params 参数
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_NO_BIZ_ID)
|
||||
R batchSaveAndRemoveBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params);
|
||||
|
||||
/**
|
||||
* 根据业务id删除业务附件
|
||||
*
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_REMOVE)
|
||||
R removeBusinessAttachment(@NotNull(message = "业务id不能为空") @RequestParam(value = "bizId", required = false) Long bizId);
|
||||
|
||||
/**
|
||||
* 查询业务附件列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_LIST)
|
||||
R<List<BusinessAttachmentVO>> getBusinessAttachments(@Validated @RequestBody BusinessAttachmentQueryDTO param);
|
||||
|
||||
/**
|
||||
* 保存业务解压任务
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_SAVE)
|
||||
R saveBusinessUnzipTask(@Validated @RequestBody BusinessUnzipTaskAddDTO param);
|
||||
|
||||
/**
|
||||
* 更新业务解压任务(重新上传)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_UPDATE)
|
||||
R updateBusinessUnzipTask(@Validated @RequestBody BusinessUnzipTaskUpdateDTO param);
|
||||
|
||||
/**
|
||||
* 取消业务解压任务
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_CANCEL)
|
||||
R cancelBusinessUnzipTask(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 删除业务解压任务
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_REMOVE)
|
||||
R removeBusinessUnzipTask(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 根据业务id列表查询业务解压任务列表
|
||||
* @param bizIds
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_LIST)
|
||||
R<List<BusinessUnzipTaskListVO>> getBusinessUnzipTasksByBizIds(@Validated @NotEmpty(message = "业务id列表不能为空") @RequestBody List<Long> bizIds);
|
||||
|
||||
/**
|
||||
* 查询解压明细列表
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(BUSINESS_UNZIP_DETAIL_LIST)
|
||||
R<List<BusinessUnzipDetailListVO>> queryBusinessUnzipDetail(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 识别车辆运输凭证
|
||||
*
|
||||
* @param param 同一车牌文件夹下的附件objectKey列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(RECOGNITION_TRANSPORT_CERTIFICATE)
|
||||
R<TransportCertificateVO> recognitionTransportCertificates(@Validated @RequestBody FileCertificateBatchRecognitionDTO param);
|
||||
|
||||
/**
|
||||
* 批量获取附件下载地址
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(FILE_URLS)
|
||||
R<List<FileUrlVO>> getFileUrls(@Validated @RequestBody IdsDTO param);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.file.pojo.dto.*;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.*;
|
||||
import org.springblade.thirdparty.ocr.pojo.vo.TransportCertificateVO;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@Component
|
||||
public class IFileClientFallback implements IFileClient, IFileUploadClient {
|
||||
|
||||
@Override
|
||||
public R<List<Attachment>> getAttachment(String id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<AttachmentDetailVO> getAttachmentDetail(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R saveAndRemoveBusinessAttachment(BusinessAttachmentBatchAddDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R batchSaveAndRemoveBusinessAttachment(List<BusinessAttachmentAddDTO> params, Long bizId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R batchSaveAndRemoveByParamBusinessAttachment(List<@Valid BusinessAttachmentAddDTO> params, @Valid @SpringQueryMap BusinessAttachmentDeleteDTO deleteParam) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R batchSaveAndRemoveBusinessAttachment(List<@Valid BusinessAttachmentAddDTO> params) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R removeBusinessAttachment(Long bizId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<BusinessAttachmentVO>> getBusinessAttachments(BusinessAttachmentQueryDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R saveBusinessUnzipTask(BusinessUnzipTaskAddDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R updateBusinessUnzipTask(BusinessUnzipTaskUpdateDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R cancelBusinessUnzipTask(Long bizId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R removeBusinessUnzipTask(Long bizId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<BusinessUnzipTaskListVO>> getBusinessUnzipTasksByBizIds(List<Long> bizIds) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<BusinessUnzipDetailListVO>> queryBusinessUnzipDetail(Long bizId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<TransportCertificateVO> recognitionTransportCertificates(@Validated @RequestBody FileCertificateBatchRecognitionDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<FileUrlVO>> getFileUrls(IdsDTO param) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<Attachment>> ossUpload(MultipartFile[] files) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<TempFileUrlVO> ossUploadTemp(MultipartFile file, Integer expires) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.file.config.FeignFileUploadClientConfig;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.TempFileUrlVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@FeignClient(
|
||||
value = "blade-file",
|
||||
fallback = IFileClientFallback.class,
|
||||
configuration = FeignFileUploadClientConfig.class
|
||||
)
|
||||
public interface IFileUploadClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/file";
|
||||
String UPLOAD = API_PREFIX + "/ossUpload";
|
||||
String UPLOAD_TEMP = API_PREFIX + "/ossUploadTemp";
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = UPLOAD, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
R<List<Attachment>> ossUpload(@RequestPart("files") MultipartFile[] files);
|
||||
|
||||
/**
|
||||
* 上传临时文件,不保存到附件表,过期后自动删除
|
||||
* @param file
|
||||
* @param expires 过期时间,单位天,过期后自动删除
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = UPLOAD_TEMP, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
R<TempFileUrlVO> ossUploadTemp(@RequestPart("file") MultipartFile file, @NotNull(message = "过期时间不能为空") @RequestParam(name = "expires", required = false) Integer expires);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务附件新增参数")
|
||||
@Builder
|
||||
public class BusinessAttachmentAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务code不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@NotNull(message = "附件id不能为空")
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件批量新增参数")
|
||||
public class BusinessAttachmentBatchAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
|
||||
/**
|
||||
* 明细列表
|
||||
*/
|
||||
@Schema(description = "明细列表")
|
||||
private List<@Valid BusinessAttachmentBatchAddDetailDTO> details;
|
||||
|
||||
/**
|
||||
* 是否先删除,默认 是
|
||||
*/
|
||||
@Schema(description = "是否先删除,默认 是")
|
||||
private boolean remove = true;
|
||||
|
||||
public BusinessAttachmentBatchAddDTO(Long bizId) {
|
||||
this.bizId = bizId;
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO(Long bizId, String bizCode, Long attachmentId) {
|
||||
this.bizId = bizId;
|
||||
this.details = Lists.newArrayList(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentId));
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(BusinessAttachmentBatchAddDetailDTO detail) {
|
||||
if (this.details == null) {
|
||||
this.details = new ArrayList<>();
|
||||
}
|
||||
this.details.add(detail);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(String bizCode, Long attachmentId) {
|
||||
return this.addDetail(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentId));
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(String bizCode, List<Long> attachmentIds) {
|
||||
return this.addDetail(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件批量新增明细参数")
|
||||
@Builder
|
||||
public class BusinessAttachmentBatchAddDetailDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务编码不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id列表
|
||||
*/
|
||||
@NotEmpty(message = "附件id列表不能为空")
|
||||
@Schema(description = "附件id列表")
|
||||
private List<@NotNull(message = "附件id不能为空") Long> attachmentIds;
|
||||
|
||||
public BusinessAttachmentBatchAddDetailDTO(String bizCode, Long attachmentId) {
|
||||
this.bizCode = bizCode;
|
||||
this.attachmentIds = Lists.newArrayList(attachmentId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件删除参数
|
||||
* @author bfhuange
|
||||
* @since 2024/12/3
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件删除参数")
|
||||
public class BusinessAttachmentDeleteDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@Schema(description = "业务id列表")
|
||||
private List<Long> bizIds;
|
||||
/**
|
||||
* 业务code列表
|
||||
*/
|
||||
@Schema(description = "业务code列表")
|
||||
private List<String> bizCodes;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@Schema(description = "是否删除")
|
||||
private boolean delete = true;
|
||||
|
||||
public BusinessAttachmentDeleteDTO(Long bizId) {
|
||||
this.bizIds = Lists.newArrayList(bizId);
|
||||
}
|
||||
|
||||
public BusinessAttachmentDeleteDTO(Long bizId, String bizCode) {
|
||||
this.bizIds = Lists.newArrayList(bizId);
|
||||
if (StringUtil.isNotBlank(bizCode)) {
|
||||
this.bizCodes = Lists.newArrayList(bizCode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件查询参数")
|
||||
public class BusinessAttachmentQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@NotNull(message = "业务id列表不能为空")
|
||||
@Schema(description = "业务id列表")
|
||||
private List<@NotNull(message = "业务id不能为空") Long> bizIds;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 业务code列表
|
||||
*/
|
||||
@Schema(description = "业务code列表")
|
||||
private List<String> bizCodes;
|
||||
|
||||
public BusinessAttachmentQueryDTO(Long bizId) {
|
||||
this.bizIds = List.of(bizId);
|
||||
}
|
||||
|
||||
public BusinessAttachmentQueryDTO(List<Long> bizIds) {
|
||||
this.bizIds = bizIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 兼容历史参数
|
||||
* @param bizId
|
||||
*/
|
||||
public void setBizId(Long bizId) {
|
||||
if (this.bizIds == null) {
|
||||
this.bizIds = new ArrayList<>();
|
||||
}
|
||||
this.bizIds.add(bizId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.enums.UnzipTask;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务解压任务新增参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务新增参数")
|
||||
public class BusinessUnzipTaskAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 部门名称ID
|
||||
*/
|
||||
@Schema(description = "部门名称ID")
|
||||
private Long departmentId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务code不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode = UnzipTask.BizCode.WAYBILL.getCode();
|
||||
/**
|
||||
* 文档编号
|
||||
*/
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType = UnzipTask.RelateType.FILE_TASK.getCode();
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务解压任务查询参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务查询参数")
|
||||
public class BusinessUnzipTaskQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文档编号(凭证批次号)
|
||||
*/
|
||||
@Schema(description = "文档编号(凭证批次号)")
|
||||
private String docCode;
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
@Schema(description = "附件名称")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件", hidden = true)
|
||||
private String relateType;
|
||||
/**
|
||||
* 是否只查询当前用户
|
||||
*/
|
||||
@Schema(description = "是否只查询当前用户")
|
||||
private boolean currentUser;
|
||||
/**
|
||||
* 当前登录人id
|
||||
*/
|
||||
@Schema(hidden = true)
|
||||
private Long currentUserId;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@Schema(description = "业务id列表", hidden = true)
|
||||
private List<Long> bizIds;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.enums.UnzipTask;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务解压任务更新参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务更新参数")
|
||||
public class BusinessUnzipTaskUpdateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件", hidden = true)
|
||||
private String relateType = UnzipTask.RelateType.FILE_TASK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 凭证识别参数,依次调用单张识别
|
||||
* @author bfhuange
|
||||
* @since 2024/12/13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "凭证附件参数")
|
||||
public class CertificateAttachmentDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 磅单ObjectKey
|
||||
*/
|
||||
@Schema(description = "磅单ObjectKey")
|
||||
private String poundObjectKey;
|
||||
/**
|
||||
* 车头ObjectKey
|
||||
*/
|
||||
@Schema(description = "车头ObjectKey")
|
||||
private String carFrontObjectKey;
|
||||
/**
|
||||
* 驾驶证ObjectKey
|
||||
*/
|
||||
@Schema(description = "驾驶证ObjectKey")
|
||||
private String driverLicenseObjectKey;
|
||||
/**
|
||||
* 行驶证ObjectKey
|
||||
*/
|
||||
@Schema(description = "行驶证ObjectKey")
|
||||
private String vehicleLicenseObjectKey;
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
@Schema(description = "项目简称")
|
||||
private String projectAbbreviation;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 凭证批量识别参数,所有图像链接统一识别,不分类
|
||||
* @author bfhuange
|
||||
* @since 2025/3/13
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class FileCertificateBatchRecognitionDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 所有图像 obs key列表
|
||||
*/
|
||||
@NotEmpty(message = "图像 obs key列表不能为空")
|
||||
private List<String> objectKeys;
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
private String projectAbbreviation;
|
||||
/**
|
||||
* 凭证编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 目录名称
|
||||
*/
|
||||
private String dirName;
|
||||
|
||||
public FileCertificateBatchRecognitionDTO(List<String> objectKeys) {
|
||||
this.objectKeys = objectKeys;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件任务创建对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务创建对象")
|
||||
public class FileTaskCreateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@NotBlank(message = "Md5不能为空")
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@NotBlank(message = "附件名不能为空")
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@NotNull(message = "附件大小不能为空")
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@NotNull(message = "分段大小不能为空")
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@NotNull(message = "分段数量不能为空")
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 是否强制创建新任务,默认 false,如果存在相同md5的任务,会创建失败,true则新创建一个任务
|
||||
*/
|
||||
@Schema(description = "是否强制创建新任务,默认 false,如果存在相同md5的任务,会创建失败,true则新创建一个任务")
|
||||
private boolean force;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.vo.PartEtagVO;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件任务更新对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务更新对象")
|
||||
public class FileTaskUpdateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 文件任务id
|
||||
*/
|
||||
@NotNull(message = "文件任务id不能为空")
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
@NotBlank(message = "etag不能为空")
|
||||
@Schema(description = "etag")
|
||||
private String etag;
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
@NotNull(message = "段号不能为空")
|
||||
@Schema(description = "段号")
|
||||
private Integer partNumber;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分段上传文件对象")
|
||||
public class FileUploadDTO {
|
||||
private MultipartFile multipartFile; // 文件对象
|
||||
private String md5; // 文件md5值
|
||||
private Long chunkTotal; // 分段总数
|
||||
private Long chunkSize; // 分段大小
|
||||
private Integer index; // 当前分段的位置
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* id批量参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/29
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "id批量参数")
|
||||
public class IdsDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id列表
|
||||
*/
|
||||
@NotEmpty(message = "id列表不能为空")
|
||||
@Schema(description = "id列表")
|
||||
private @Valid List<@NotNull(message = "id不能为空") Long> ids;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_attachment")
|
||||
@Schema(description = "附件对象")
|
||||
public class Attachment implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 压缩文件所在压缩包相对路径
|
||||
*/
|
||||
@Schema(description = "压缩文件所在压缩包相对路径")
|
||||
private String dir;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_attachment")
|
||||
@Schema(description = "BusinessAttachment对象")
|
||||
public class BusinessAttachment implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@TableField(value = "`desc`")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务解压明细表
|
||||
* </p>
|
||||
*
|
||||
* @author bfhuange
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_unzip_detail")
|
||||
@Schema(description = "BusinessUnzipDetail对象")
|
||||
public class BusinessUnzipDetail implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 业务解压任务id
|
||||
*/
|
||||
@Schema(description = "业务解压任务id")
|
||||
private Long businessUnzipTaskId;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务解压任务表
|
||||
* </p>
|
||||
*
|
||||
* @author bfhuange
|
||||
* @since 2024-10-28
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_unzip_task")
|
||||
@Schema(description = "业务解压任务表")
|
||||
public class BusinessUnzipTask implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 部门名称ID
|
||||
*/
|
||||
@Schema(description = "部门名称ID")
|
||||
private Long departmentId;
|
||||
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType;
|
||||
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
|
||||
@Schema(description = "状态 uploading:正在上传 unzipping:解压中 finished:已完成")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "租户ID")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "是否已删除", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_file_task")
|
||||
@Schema(description = "文件上传任务对象")
|
||||
public class FileTask implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_file_task_part")
|
||||
@Schema(description = "文件任务分段表")
|
||||
public class FileTaskPart implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 文件任务Id
|
||||
*/
|
||||
@Schema(description = "文件任务Id")
|
||||
private Long fileTaskId;
|
||||
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
@Schema(description = "段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数")
|
||||
private Integer partNumber;
|
||||
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
@Schema(description = "段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串")
|
||||
private String etag;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springblade.file.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 文件任务状态
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum FileTaskStatus {
|
||||
/**
|
||||
* 正在上传
|
||||
*/
|
||||
UPLOADING("uploading", "正在上传"),
|
||||
/**
|
||||
* 上传完成
|
||||
*/
|
||||
COMPLETED("completed", "上传完成"),
|
||||
/**
|
||||
* 上传失败
|
||||
*/
|
||||
FAILED("failed", "上传失败"),
|
||||
/**
|
||||
* 已暂停
|
||||
*/
|
||||
PAUSED("paused", "已暂停"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.springblade.file.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 解压任务枚举类
|
||||
* @author bfhuange
|
||||
* @date 2024/10/27
|
||||
*/
|
||||
public class UnzipTask {
|
||||
|
||||
/**
|
||||
* 业务编码枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum BizCode {
|
||||
/**
|
||||
* 运单
|
||||
*/
|
||||
WAYBILL("waybill", "运单"),
|
||||
/**
|
||||
* 基地
|
||||
*/
|
||||
WAREHOUSE("warehouse", "基地"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联类型枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum RelateType {
|
||||
/**
|
||||
* 文件任务
|
||||
*/
|
||||
FILE_TASK("file_task", "文件任务"),
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
ATTACHMENT("attachment", "附件"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum Status {
|
||||
/**
|
||||
* 正在上传
|
||||
*/
|
||||
UPLOADING("uploading", "正在上传"),
|
||||
/**
|
||||
* 上传完成
|
||||
*/
|
||||
UPLOADED("uploaded", "上传完成"),
|
||||
/**
|
||||
* 正在解压
|
||||
*/
|
||||
UNZIPPING("unzipping", "正在解压"),
|
||||
/**
|
||||
* 解压失败
|
||||
*/
|
||||
UNZIP_FAIL("unzip_fail", "解压失败"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
FINISHED("finished", "已完成"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 附件详情对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "附件详情对象")
|
||||
public class AttachmentDetailVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 下载链接
|
||||
*/
|
||||
@Schema(description = "下载链接")
|
||||
private String url;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务附件响应参数")
|
||||
public class BusinessAttachmentVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 业务code名称
|
||||
*/
|
||||
@Schema(description = "业务code名称")
|
||||
private String bizCodeStr;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@Size(max = 100, message = "附件描述长度不能超过100")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 上传人id
|
||||
*/
|
||||
@Schema(description = "上传人id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uploadUserId;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String uploadUserName;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String createUserName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务解压任务明细对象
|
||||
* @author bfhuange
|
||||
* @date 2024/11/08
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务明细对象")
|
||||
public class BusinessUnzipDetailListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long attachmentId;
|
||||
|
||||
//==========================附件属性=============================
|
||||
/**
|
||||
* 压缩文件所在压缩包相对路径
|
||||
*/
|
||||
@Schema(description = "压缩文件所在压缩包相对路径")
|
||||
private String dir;
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@Size(max = 100, message = "附件描述长度不能超过100")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 上传人id
|
||||
*/
|
||||
@Schema(description = "上传人id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uploadUserId;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String uploadUserName;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String createUserName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务解压任务分页对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务分页对象")
|
||||
public class BusinessUnzipTaskListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 文档编号
|
||||
*/
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType;
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
|
||||
//==========================文件任务属性=============================
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
@Schema(description = "状态名称")
|
||||
private String statusStr;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件处理结果对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件处理结果对象")
|
||||
public class FileHandleVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 下载的压缩文件
|
||||
*/
|
||||
@Schema(description = "下载的压缩文件")
|
||||
private File downloadFile;
|
||||
/**
|
||||
* 解压目录
|
||||
*/
|
||||
@Schema(description = "解压目录")
|
||||
private File unzippedDir;
|
||||
/**
|
||||
* 解压后的文件列表
|
||||
*/
|
||||
@Schema(description = "解压后的文件列表")
|
||||
private List<File> unzippedFiles;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文件任务更新结果
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(description = "文件任务更新结果")
|
||||
public class FileTaskUpdateVO extends FileTaskVO {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文档编号(凭证批次号),如果有则返回,没有为空
|
||||
*/
|
||||
@Schema(description = "文档编号(凭证批次号),如果有则返回,没有为空")
|
||||
private String docCode;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文件任务对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务对象")
|
||||
public class FileTaskVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件下载地址对象
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "文件下载地址对象")
|
||||
public class FileUrlVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 文件下载地址
|
||||
*/
|
||||
@Schema(description ="文件下载地址")
|
||||
private String url;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件对象
|
||||
* @author bfhuange
|
||||
* @date 2024/11/19
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "文件对象")
|
||||
public class FileVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 待合并的段
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class PartEtagVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
private String etag;
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
private Integer partNumber;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件下载地址对象
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "临时文件下载地址对象")
|
||||
public class TempFileUrlVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* obs key
|
||||
*/
|
||||
@Schema(description = "obs key")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 文件下载地址
|
||||
*/
|
||||
@Schema(description ="文件下载地址")
|
||||
private String url;
|
||||
}
|
||||
15
blade-service-api/blade-open-api/pom.xml
Normal file
15
blade-service-api/blade-open-api/pom.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>blade-open-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
</project>
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.openapi.common.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分页参数
|
||||
* @author bfhuange
|
||||
* @since 2025/4/23
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "分页结果")
|
||||
public class PageVO<T> implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 查询数据列表
|
||||
*/
|
||||
@Schema(description = "查询数据列表")
|
||||
protected List<T> records = Collections.emptyList();
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
@Schema(description = "总数")
|
||||
protected long total = 0;
|
||||
/**
|
||||
* 总页数
|
||||
*/
|
||||
@Schema(description = "总页数")
|
||||
protected long pages = 0;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.springblade.openapi.mk.api;
|
||||
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.openapi.mk.pojo.dto.Api4MKProcessApprovalDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 给mk回调的api
|
||||
* @author bfhuange
|
||||
* @date 2024/9/5
|
||||
*/
|
||||
public interface IApi4MK {
|
||||
String API_PREFIX = "/openApi/mk";
|
||||
String PROCESS_API_PREFIX = API_PREFIX + "/process";
|
||||
String PROCESS_FINISH_CALLBACK = PROCESS_API_PREFIX + "/finishCallback";
|
||||
String PROCESS_APPROVAL_CALLBACK = PROCESS_API_PREFIX + "/approvalCallback";
|
||||
String PROCESS_REJECT_CALLBACK = PROCESS_API_PREFIX + "/rejectCallback";
|
||||
String PROCESS_REVOKE_CALLBACK = PROCESS_API_PREFIX + "/revokeCallback";
|
||||
String PROCESS_COMMON_CALLBACK = PROCESS_API_PREFIX + "/commonCallback";
|
||||
|
||||
/**
|
||||
* 流程通用回调接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROCESS_COMMON_CALLBACK)
|
||||
R<Boolean> processCommonCallback(@RequestBody Api4MKProcessApprovalDTO param);
|
||||
|
||||
/**
|
||||
* 流程结束回调接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROCESS_FINISH_CALLBACK)
|
||||
R<Boolean> processFinishCallback(@RequestBody Api4MKProcessApprovalDTO param);
|
||||
|
||||
/**
|
||||
* 流程审批同意回调接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROCESS_APPROVAL_CALLBACK)
|
||||
R<Boolean> processApprovalCallback(@RequestBody Api4MKProcessApprovalDTO param);
|
||||
|
||||
/**
|
||||
* 流程审批拒绝回调接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROCESS_REJECT_CALLBACK)
|
||||
R<Boolean> processRejectCallback(@RequestBody Api4MKProcessApprovalDTO param);
|
||||
|
||||
/**
|
||||
* 流程撤销回调接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROCESS_REVOKE_CALLBACK)
|
||||
R<Boolean> processRevokeCallback(@RequestBody Api4MKProcessApprovalDTO param);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springblade.openapi.mk.constant;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/9/12
|
||||
*/
|
||||
public class MKConstant {
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.springblade.openapi.mk.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* mk审批回调参数
|
||||
* @author bfhuange
|
||||
* @date 2024/9/5
|
||||
*/
|
||||
@Data
|
||||
public class Api4MKProcessApprovalDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 表单实例id
|
||||
*/
|
||||
private String formInstanceId;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 模板编码,template_拼接 ProcessTypeEnum 的值
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
/**
|
||||
* 申请人登录名
|
||||
*/
|
||||
private String applicantLoginName;
|
||||
|
||||
//===========================下面5个参数流程结束没有=========================
|
||||
/**
|
||||
* 驳回节点id N2 是起草节点
|
||||
*/
|
||||
private String rejectNodeId;
|
||||
/**
|
||||
* 当前节点id
|
||||
*/
|
||||
private String currentNodeId;
|
||||
/**
|
||||
* 当前节点编号
|
||||
*/
|
||||
private String currentNodeNumber;
|
||||
/**
|
||||
* 执行的操作
|
||||
*/
|
||||
private String operation;
|
||||
/**
|
||||
* 操作名称
|
||||
*/
|
||||
private String operationName;
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String approvalOpinion;
|
||||
/**
|
||||
* 操作人登录名
|
||||
*/
|
||||
private String operatorLoginName;
|
||||
|
||||
//====================非mk回调参数,回调接口设置参数===================
|
||||
/**
|
||||
* 是否流程已完成,非mk回调参数,回调接口设置参数
|
||||
*/
|
||||
private boolean complete;
|
||||
/**
|
||||
* 审批状态,非mk回调参数,回调接口设置参数
|
||||
*/
|
||||
private String approveStatus;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.springblade.openapi.mk.pojo.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* mk审批结束回调参数
|
||||
* @author bfhuange
|
||||
* @date 2024/9/5
|
||||
*/
|
||||
@Data
|
||||
public class ApiMKProcessFinishDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 表单实例id
|
||||
*/
|
||||
private String formInstanceId;
|
||||
/**
|
||||
* 模板编码,template_拼接 ProcessTypeEnum 的值
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.openapi.mk.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProcessApprovalDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
@Schema(description = "流程实例id")
|
||||
protected String flowInstId;
|
||||
|
||||
|
||||
/**
|
||||
* 表单实例id
|
||||
*/
|
||||
protected String formInstanceId;
|
||||
|
||||
/**
|
||||
* 审批状态
|
||||
*/
|
||||
protected String approveStatus;
|
||||
|
||||
/**
|
||||
* 下级审批人
|
||||
*/
|
||||
protected String nextApproveUser;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package org.springblade.openapi.mk.pojo.enums;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 流程回调类型
|
||||
* @author bfhuange
|
||||
* @since 2024/11/23
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ProcessCallbackType {
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
SUBMIT(ProcessOperationType.DRAFTER_SUBMIT),
|
||||
/**
|
||||
* 起草人撤回
|
||||
*/
|
||||
RETRACT(ProcessOperationType.DRAFTER_RETRACT),
|
||||
/**
|
||||
* 审批通过
|
||||
*/
|
||||
PASS(ProcessOperationType.HANDLER_PASS),
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
REJECT(ProcessOperationType.HANDLER_REJECT),
|
||||
/**
|
||||
* 废弃(起草人废弃、审批人废弃、超管废弃)
|
||||
*/
|
||||
ABANDON(ProcessOperationType.DRAFTER_ABANDON, ProcessOperationType.HANDLER_ABANDON, ProcessOperationType.ADMIN_ABANDON),
|
||||
/**
|
||||
* 修改当前处理人(超管修改当前处理人、审批人转办、审批人撤回、特权人前后跳转)
|
||||
*/
|
||||
CHANGE_CUR_HANDLER(ProcessOperationType.ADMIN_CHANGE_CUR_HANDLER, ProcessOperationType.HANDLER_TRANSFER, ProcessOperationType.HISTORY_HANDLER_RETRACT, ProcessOperationType.ADMIN_JUMP),
|
||||
/**
|
||||
* 流程结束
|
||||
*/
|
||||
FINISH(ProcessOperationType.PROCESS_FINISH),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final List<String> operationTypes;
|
||||
|
||||
ProcessCallbackType(ProcessOperationType... operationTypes) {
|
||||
if (operationTypes.length == 0) {
|
||||
throw new RuntimeException("流程操作类型不能为空");
|
||||
}
|
||||
this.operationTypes = Stream.of(operationTypes)
|
||||
.map(ProcessOperationType::getCode)
|
||||
.toList();
|
||||
}
|
||||
|
||||
ProcessCallbackType(String... operationTypes) {
|
||||
if (operationTypes.length == 0) {
|
||||
throw new RuntimeException("流程操作类型不能为空");
|
||||
}
|
||||
this.operationTypes = Lists.newArrayList(operationTypes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流程操作类型对应的事件
|
||||
*/
|
||||
private static final Map<String, ProcessCallbackType> CALLBACK_MAP = initCallbackMap();
|
||||
|
||||
/**
|
||||
* 初始化流程操作类型对应的事件
|
||||
* @return
|
||||
*/
|
||||
private static Map<String, ProcessCallbackType> initCallbackMap() {
|
||||
return Stream.of(values())
|
||||
.flatMap(callbackType -> callbackType.getOperationTypes().stream()
|
||||
.collect(Collectors.toMap(Function.identity(), type -> callbackType))
|
||||
.entrySet()
|
||||
.stream()
|
||||
)
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
|
||||
throw new RuntimeException("流程操作类型不能重复");
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程操作类型,获取对应的回调
|
||||
* @param operationType
|
||||
* @return
|
||||
*/
|
||||
public static ProcessCallbackType getCallbackType(String operationType) {
|
||||
return CALLBACK_MAP.get(operationType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package org.springblade.openapi.mk.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 流程操作类型枚举
|
||||
* @author bfhuange
|
||||
* @since 2024/11/23
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ProcessOperationType {
|
||||
/**
|
||||
* 起草人协同
|
||||
*/
|
||||
DRAFTER_COOPERATE("drafter_cooperate", "起草人协同"),
|
||||
/**
|
||||
* 起草人取消协同
|
||||
*/
|
||||
DRAFTER_CANCEL_DRAFT_COOPERATE("drafter_cancelDraftCooperate", "起草人取消协同"),
|
||||
/**
|
||||
* 协同接收人-回复协同
|
||||
*/
|
||||
HANDLER_REPLY_DRAFT_COOPERATE("handler_replyDraftCooperate", "协同接收人-回复协同"),
|
||||
/**
|
||||
* 起草人-提交
|
||||
*/
|
||||
DRAFTER_SUBMIT("drafter_submit", "起草人-提交"),
|
||||
/**
|
||||
* 起草人-废弃
|
||||
*/
|
||||
DRAFTER_ABANDON("drafter_abandon", "起草人-废弃"),
|
||||
/**
|
||||
* 起草人-撤回
|
||||
*/
|
||||
DRAFTER_RETRACT("drafter_retract", "起草人-撤回"),
|
||||
/**
|
||||
* 审批人-通过
|
||||
*/
|
||||
HANDLER_PASS("handler_pass", "审批人-通过"),
|
||||
/**
|
||||
* 审批人-驳回
|
||||
*/
|
||||
HANDLER_REJECT("handler_reject", "审批人-驳回"),
|
||||
/**
|
||||
* 审批人-废弃
|
||||
*/
|
||||
HANDLER_ABANDON("handler_abandon", "审批人-废弃"),
|
||||
/**
|
||||
* 审批人-撤回
|
||||
*/
|
||||
HISTORY_HANDLER_RETRACT("historyHandler_retract", "审批人-撤回"),
|
||||
/**
|
||||
* 审批人-签字
|
||||
*/
|
||||
HANDLER_SIGN("handler_sign", "审批人-签字"),
|
||||
/**
|
||||
* 审批人-转办
|
||||
*/
|
||||
HANDLER_TRANSFER("handler_transfer", "审批人-转办"),
|
||||
/**
|
||||
* 审批人-分发
|
||||
*/
|
||||
HANDLER_ASSIGN("handler_assign", "审批人-分发"),
|
||||
/**
|
||||
* 审批人-催办
|
||||
*/
|
||||
HISTORY_HANDLER_URGE("historyHandler_urge", "审批人-催办"),
|
||||
/**
|
||||
* 审批人-沟通
|
||||
*/
|
||||
HANDLER_COMMUNICATE("handler_communicate", "审批人-沟通"),
|
||||
/**
|
||||
* 审批人-回复沟通
|
||||
*/
|
||||
HANDLER_REPLY_COMMUNICATE("handler_replyCommunicate", "审批人-回复沟通"),
|
||||
/**
|
||||
* 审批人-取消沟通
|
||||
*/
|
||||
HANDLER_CANCEL_COMMUNICATE("handler_cancelCommunicate", "审批人-取消沟通"),
|
||||
/**
|
||||
* 审批人-补签
|
||||
*/
|
||||
HANDLER_APPEND_SIGN("handler_appendSign", "审批人-补签"),
|
||||
/**
|
||||
* 审批人-加签
|
||||
*/
|
||||
HANDLER_PREPEND_SIGN("handler_prependSign", "审批人-加签"),
|
||||
/**
|
||||
* 审批人(加签人)-取消加签
|
||||
*/
|
||||
HANDLER_PREPEND_SIGN_CANCEL("handler_prependSignCancel", "审批人(加签人)-取消加签"),
|
||||
/**
|
||||
* 审批人(被加签人)-退回加签
|
||||
*/
|
||||
HANDLER_PREPEND_SIGN_REFUSE("handler_prependSignRefuse", "审批人(被加签人)-退回加签"),
|
||||
/**
|
||||
* 审批人(被加签人)-通过加签
|
||||
*/
|
||||
HANDLER_PREPEND_SIGN_PASS("handler_prependSignPass", "审批人(被加签人)-通过加签"),
|
||||
/**
|
||||
* 审批人(被加签人)-审批人-传阅
|
||||
*/
|
||||
HANDLER_CIRCULATION("handler_circulation", "审批人(被加签人)-审批人-传阅"),
|
||||
/**
|
||||
* 特权人-前后跳转
|
||||
*/
|
||||
ADMIN_JUMP("admin_jump", "特权人-前后跳转"),
|
||||
/**
|
||||
* 特权人-流程暂停
|
||||
*/
|
||||
ADMIN_PROCESS_SUSPEND("admin_processSuspend", "特权人-流程暂停"),
|
||||
/**
|
||||
* 特权人-节点暂停
|
||||
*/
|
||||
ADMIN_NODE_SUSPEND("admin_nodeSuspend", "特权人-节点暂停"),
|
||||
/**
|
||||
* 审批人-节点唤醒
|
||||
*/
|
||||
HANDLER_NODE_RESUME("handler_nodeResume", "审批人-节点唤醒"),
|
||||
/**
|
||||
* 特权人-节点唤醒
|
||||
*/
|
||||
ADMIN_NODE_RESUME("admin_nodeResume", "特权人-节点唤醒"),
|
||||
/**
|
||||
* 特权人-流程唤醒
|
||||
*/
|
||||
ADMIN_PROCESS_RESUME("admin_processResume", "特权人-流程唤醒"),
|
||||
/**
|
||||
* 特权人-修改流程
|
||||
*/
|
||||
ADMIN_MODIFY_PROCESS("admin_modifyProcess", "特权人-修改流程"),
|
||||
/**
|
||||
* 特权人-修改当前处理人
|
||||
*/
|
||||
ADMIN_CHANGE_CUR_HANDLER("admin_changeCurHandler", "特权人-修改当前处理人"),
|
||||
/**
|
||||
* 特权人-终审通过
|
||||
*/
|
||||
ADMIN_END("admin_end", "特权人-终审通过"),
|
||||
/**
|
||||
* 特权人-直接废弃
|
||||
*/
|
||||
ADMIN_ABANDON("admin_abandon", "特权人-直接废弃"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* 流程结束,mk没有这个操作,但是有这个事件,自定义一个操作类型,统一管理
|
||||
*/
|
||||
public static final String PROCESS_FINISH = "erp_process_finish";
|
||||
|
||||
/**
|
||||
* 根据操作编码获取名称
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static String getOperationName(String code) {
|
||||
return Stream.of(values())
|
||||
.filter(type -> type.getCode().equals(code))
|
||||
.findFirst()
|
||||
.map(ProcessOperationType::getName)
|
||||
.orElse(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.springblade.openapi.ocr.api;
|
||||
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.openapi.common.vo.PageVO;
|
||||
import org.springblade.openapi.ocr.pojo.dto.Api4OCRProjectDTO;
|
||||
import org.springblade.openapi.ocr.pojo.dto.Api4OCRResultDTO;
|
||||
import org.springblade.openapi.ocr.pojo.vo.Api4OCRProjectVO;
|
||||
import org.springblade.openapi.ocr.pojo.vo.Api4OCRResultVO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/04/22
|
||||
*/
|
||||
public interface IApi4OCR {
|
||||
String API_PREFIX = "/openApi/ocr";
|
||||
String PROJECT_LIST = API_PREFIX + "/queryProjectList";
|
||||
String OCR_RESULT_LIST = API_PREFIX + "/queryOCRResultList";
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(PROJECT_LIST)
|
||||
R<PageVO<Api4OCRProjectVO>> queryProjectList(@RequestBody(required = false) Api4OCRProjectDTO param);
|
||||
|
||||
/**
|
||||
* 查询凭证ocr识别结果列表
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(OCR_RESULT_LIST)
|
||||
R<PageVO<Api4OCRResultVO>> queryOCRResultList(@RequestBody(required = false) Api4OCRResultDTO param);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springblade.openapi.ocr.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(description = "提供给ocr的项目信息")
|
||||
public class Api4OCRProjectDTO extends PageQuery {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 关键字,项目名称或简称模糊查询
|
||||
*/
|
||||
@Schema(description = "关键字,项目名称或简称模糊查询")
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.openapi.ocr.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(description = "凭证ocr结果查询参数")
|
||||
public class Api4OCRResultDTO extends PageQuery {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@Schema(description = "项目id,项目id、凭证批次号、凭证号至少一个不为空")
|
||||
private Long projectId;
|
||||
/**
|
||||
* 凭证批次号
|
||||
*/
|
||||
@Schema(description = "凭证批次号,项目id、凭证批次号、凭证号至少一个不为空")
|
||||
private String batchCode;
|
||||
/**
|
||||
* 凭证号
|
||||
*/
|
||||
@Schema(description = "凭证号,项目id、凭证批次号、凭证号至少一个不为空")
|
||||
private String detailCode;
|
||||
/**
|
||||
* 是否类型错误(1 否 2 是)
|
||||
*/
|
||||
@Schema(description = "是否类型错误(1 否 2 是)")
|
||||
private Integer isTypeError;
|
||||
/**
|
||||
* 是否数据错误(1 否 2 是)
|
||||
*/
|
||||
@Schema(description = "是否数据错误(1 否 2 是)")
|
||||
private Integer isDataError;
|
||||
/**
|
||||
* 创建时间始
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "GMT+8")
|
||||
@Schema(description = "创建时间始,格式yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeStart;
|
||||
/**
|
||||
* 创建时间至
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "GMT+8")
|
||||
@Schema(description = "创建时间至,格式yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeEnd;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.springblade.openapi.ocr.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 分页查询参数
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "分页查询参数")
|
||||
public class PageQuery implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 每页最大数量 200
|
||||
*/
|
||||
public static final int MAX_SIZE = 200;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@Schema(description = "当前页,默认1")
|
||||
protected Integer current = 1;
|
||||
|
||||
/**
|
||||
* 每页的数量
|
||||
*/
|
||||
@Schema(description = "每页的数量,默认10,超过200会修改为200")
|
||||
protected Integer size = 10;
|
||||
|
||||
public void setSize(Integer size) {
|
||||
if (size != null && size > MAX_SIZE) {
|
||||
size = MAX_SIZE;
|
||||
}
|
||||
this.size = size;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "提供给ocr的项目信息")
|
||||
public class Api4OCRProjectVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "项目id")
|
||||
private Long id;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@Schema(description = "项目名称")
|
||||
private String name;
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
@Schema(description = "项目简称")
|
||||
private String abbreviation;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.openapi.ocr.pojo.vo.result.AttachmentType;
|
||||
import org.springblade.openapi.ocr.pojo.vo.result.ErrorAttachmentType;
|
||||
import org.springblade.openapi.ocr.pojo.vo.result.ErrorField;
|
||||
import org.springblade.openapi.ocr.pojo.vo.result.TransportCertificateBatchDetailData;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "凭证ocr结果")
|
||||
public class Api4OCRResultVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 凭证号
|
||||
*/
|
||||
@Schema(description = "凭证号")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 识别类型(batch 批量识别,mixed 单张识别合并)
|
||||
*/
|
||||
@Schema(description = "识别类型(batch 批量识别,mixed 单张识别合并)")
|
||||
private String identifyType;
|
||||
|
||||
/**
|
||||
* 是否类型错误(1 否 2 是)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "是否类型错误(1 否 2 是)")
|
||||
private Integer isTypeError;
|
||||
|
||||
/**
|
||||
* 是否数据错误(1 否 2 是)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "是否数据错误(1 否 2 是)")
|
||||
private Integer isDataError;
|
||||
|
||||
/**
|
||||
* 附件类型列表
|
||||
*/
|
||||
@Schema(description = "附件类型列表")
|
||||
private List<AttachmentType> attachmentTypeList;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@Schema(description = "数据")
|
||||
private TransportCertificateBatchDetailData data;
|
||||
|
||||
/**
|
||||
* 错误类型列表
|
||||
*/
|
||||
@Schema(description = "错误类型列表")
|
||||
private List<ErrorAttachmentType> errorTypeList;
|
||||
|
||||
/**
|
||||
* 错误字段列表
|
||||
*/
|
||||
@Schema(description = "错误字段列表")
|
||||
private List<ErrorField> errorFieldList;
|
||||
|
||||
/**
|
||||
* 错误字段列表
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo.result;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 附件类型
|
||||
* @author bfhuange
|
||||
* @since 2025/4/18
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "附件类型")
|
||||
public class AttachmentType implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* ocr附件类型
|
||||
*/
|
||||
@Schema(description = "ocr附件类型")
|
||||
private String ocrType;
|
||||
/**
|
||||
* 附件url
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@Schema(description = "附件url")
|
||||
private String url;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo.result;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 错误附件类型
|
||||
* @author bfhuange
|
||||
* @since 2025/4/21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(description = "错误附件类型")
|
||||
public class ErrorAttachmentType extends AttachmentType {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* erp附件类型
|
||||
*/
|
||||
@Schema(description = "erp附件类型")
|
||||
private String erpType;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo.result;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 错误字段
|
||||
* @author bfhuange
|
||||
* @since 2025/4/21
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "错误字段")
|
||||
public class ErrorField implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
@Schema(description = "字段名")
|
||||
private String filed;
|
||||
/**
|
||||
* ocr类型
|
||||
*/
|
||||
@Schema(description = "ocr类型")
|
||||
private String ocrType;
|
||||
/**
|
||||
* ocr字段值
|
||||
*/
|
||||
@Schema(description = "ocr字段值")
|
||||
private String ocrValue;
|
||||
/**
|
||||
* erp字段值
|
||||
*/
|
||||
@Schema(description = "erp字段值")
|
||||
private String erpValue;
|
||||
/**
|
||||
* 附件列表
|
||||
*/
|
||||
@Schema(description = "附件列表")
|
||||
private List<AttachmentType> attachmentList;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package org.springblade.openapi.ocr.pojo.vo.result;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆运输凭证批次明细表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-10-23
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "凭证数据对象")
|
||||
public class TransportCertificateBatchDetailData implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 磅单车牌号
|
||||
*/
|
||||
@Schema(description = "磅单车牌号")
|
||||
private String poundPlateNo;
|
||||
/**
|
||||
* 行驶证上的车牌号
|
||||
*/
|
||||
@Schema(description = "行驶证上的车牌号")
|
||||
private String drivingPlateNo;
|
||||
/**
|
||||
* 车头车牌号
|
||||
*/
|
||||
@Schema(description = "车头车牌号")
|
||||
private String carFrontPlateNo;
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "GMT+8")
|
||||
@Schema(description = "到货日期")
|
||||
private Date supplyMaterialDate;
|
||||
/**
|
||||
* 货物名称
|
||||
*/
|
||||
@Schema(description = "货物名称")
|
||||
private String productName;
|
||||
/**
|
||||
* 规格料型
|
||||
*/
|
||||
@Schema(description = "规格料型")
|
||||
private String specificationMaterial;
|
||||
/**
|
||||
* 毛重(吨)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "毛重(吨)")
|
||||
private BigDecimal grossWeight;
|
||||
/**
|
||||
* 皮重(吨)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "皮重(吨)")
|
||||
private BigDecimal skinWeight;
|
||||
/**
|
||||
* 净重(吨)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "净重(吨)")
|
||||
private BigDecimal netWeight;
|
||||
/**
|
||||
* 扣杂(吨)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "扣杂(吨)")
|
||||
private BigDecimal miscellaneousWeight;
|
||||
/**
|
||||
* 实收(吨)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "实收(吨)")
|
||||
private BigDecimal realityWeight;
|
||||
/**
|
||||
* 驾驶证是否有效(1 否 2 是)
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "驾驶证是否有效(1 否 2 是)")
|
||||
private Integer isDriverLicenseValid;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.openapi.track.api;
|
||||
|
||||
import org.springblade.openapi.track.pojo.dto.Api4TrackWaybillDTO;
|
||||
import org.springblade.openapi.track.pojo.vo.Api4TrackResultVO;
|
||||
import org.springblade.openapi.track.pojo.vo.Api4TrackWaybillVO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
public interface IApi4Track {
|
||||
String API_PREFIX = "/openApi/gj";
|
||||
String WAYBILL_LIST = API_PREFIX + "/mycode/zhcx/getZhcx";
|
||||
String WAYBILL_TRACK_UPDATE = API_PREFIX + "/mycode/zhcx/callback";
|
||||
|
||||
/**
|
||||
* 轨迹查询运单信息
|
||||
*
|
||||
* @param param@return
|
||||
*/
|
||||
@PostMapping(WAYBILL_LIST)
|
||||
Api4TrackResultVO<List<Api4TrackWaybillVO>> queryWaybillList(@RequestBody Api4TrackWaybillDTO param);
|
||||
|
||||
/**
|
||||
* 轨迹更新运单轨迹url和状态
|
||||
* @param waybillId
|
||||
* @param trajectoryId
|
||||
* @param trajectoryStatus
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(WAYBILL_TRACK_UPDATE)
|
||||
Api4TrackResultVO<Void> updateWaybillTrack(@RequestParam(name = "zhcxId", required = false) String waybillId,
|
||||
@RequestParam(name = "diTuUrl", required = false) String trajectoryId,
|
||||
@RequestParam(name = "guiJiZhuangTai", required = false) String trajectoryStatus);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.openapi.track.constant;
|
||||
|
||||
/**
|
||||
* 轨迹常量
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
public class TrackConstant {
|
||||
/**
|
||||
* 响应成功状态码
|
||||
*/
|
||||
public static final Integer SUCCESS_CODE = 200;
|
||||
/**
|
||||
* 响应失败状态码
|
||||
*/
|
||||
public static final Integer FAIL_CODE = 500;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.openapi.track.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
@Data
|
||||
public class Api4TrackWaybillDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 运单id列表
|
||||
*/
|
||||
private List<String> ids;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.openapi.track.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
@Data
|
||||
public class Api4TrackWaybillUpdateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 运单id
|
||||
*/
|
||||
@JsonProperty("zhcxId")
|
||||
private String waybillId;
|
||||
/**
|
||||
* 轨迹id
|
||||
*/
|
||||
@JsonProperty("diTuUrl")
|
||||
private String trajectoryId;
|
||||
/**
|
||||
* 轨迹状态
|
||||
*/
|
||||
@JsonProperty("guiJiZhuangTai")
|
||||
private String trajectoryStatus;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.springblade.openapi.track.pojo.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springblade.openapi.track.constant.TrackConstant;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Api4TrackResultVO<T> implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 响应代码。200为正确
|
||||
*/
|
||||
private Integer state;
|
||||
/**
|
||||
* 对应的提示信息
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
private T data;
|
||||
|
||||
public Api4TrackResultVO(Integer state, T data) {
|
||||
this.state = state;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static <T> Api4TrackResultVO<T> success() {
|
||||
return Api4TrackResultVO.success(null);
|
||||
}
|
||||
|
||||
public static <T> Api4TrackResultVO<T> fail(String message) {
|
||||
return new Api4TrackResultVO<>(TrackConstant.FAIL_CODE, message, null);
|
||||
}
|
||||
|
||||
public static <T> Api4TrackResultVO<T> success(T data) {
|
||||
return new Api4TrackResultVO<>(TrackConstant.SUCCESS_CODE, data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.springblade.openapi.track.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/16
|
||||
*/
|
||||
@Data
|
||||
public class Api4TrackWaybillVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 运单id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 收货日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
|
||||
@JsonProperty("shouHuoRiQi")
|
||||
private Date enterDate;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@JsonProperty("chePaiHao")
|
||||
private String plateNo;
|
||||
/**
|
||||
* 钢厂简称
|
||||
*/
|
||||
@JsonProperty("gangChangJianCheng")
|
||||
private String customerAbbreviation;
|
||||
/**
|
||||
* 钢厂合同编号
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String contractGcCode;
|
||||
|
||||
//===========================设置默认值的参数==========================
|
||||
/**
|
||||
* 托运人
|
||||
*/
|
||||
@JsonProperty("tuoYunRen")
|
||||
private String shipper = "托运人";
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
@JsonProperty("shouHuoRen")
|
||||
private String consignee = "收货人";
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@JsonProperty("shouHuoDiZhi")
|
||||
private String address = "收货地址";
|
||||
/**
|
||||
* 投送人
|
||||
*/
|
||||
@JsonProperty("touSongRen")
|
||||
private String delivery = "投送人";
|
||||
/**
|
||||
* 货物名称
|
||||
*/
|
||||
@JsonProperty("huoWuMingCheng")
|
||||
private String goodsName = "货物名称";
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
@JsonProperty("zhongLiang")
|
||||
private BigDecimal weight = BigDecimal.ZERO;
|
||||
/**
|
||||
* 事业部
|
||||
*/
|
||||
@JsonProperty("shiYeBu")
|
||||
private String division = "事业部";
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.springblade.openapi.wps.api;
|
||||
|
||||
import org.springblade.openapi.wps.pojo.dto.Api4WpsFileInfoDTO;
|
||||
import org.springblade.openapi.wps.pojo.vo.Api4WpsFileInfoVO;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 给wps回调的api
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
public interface IApi4Wps {
|
||||
String API_PREFIX = "/openApi/wps";
|
||||
String VERSION = "/v1";
|
||||
String FILE_INFO = API_PREFIX + VERSION + "/3rd/file/info";
|
||||
String FILE_SAVE = API_PREFIX + VERSION + "/3rd/file/save";
|
||||
|
||||
/**
|
||||
* wps回调查询文件信息
|
||||
*
|
||||
* @param fileId 文件id,必填
|
||||
* @param token 非必填
|
||||
* @param param 在获取预览链接时按需求传入的所有自定义参数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(FILE_INFO)
|
||||
Api4WpsFileInfoVO getFileInfo(@RequestHeader("X-Weboffice-File-Id") String fileId,
|
||||
@RequestHeader(value = "X-Wps-Weboffice-Token", required = false) String token,
|
||||
@SpringQueryMap Api4WpsFileInfoDTO param);
|
||||
|
||||
/**
|
||||
* wps回调-上传文件新版本
|
||||
*
|
||||
* @param fileId 文件id,必填
|
||||
* @param token 非必填
|
||||
* @param param 在获取预览链接时按需求传入的所有自定义参数
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(FILE_SAVE)
|
||||
Api4WpsFileInfoVO getFileSave(@RequestHeader("X-Weboffice-File-Id") String fileId,
|
||||
@RequestHeader(value = "X-Weboffice-Save-Type") String saveType,
|
||||
@RequestHeader(value = "X-Wps-Weboffice-Token", required = false) String token,
|
||||
@RequestPart("file") MultipartFile file,
|
||||
@SpringQueryMap Api4WpsFileInfoDTO param);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.springblade.openapi.wps.constant;
|
||||
|
||||
/**
|
||||
* wps常量类
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
public class WpsConstant {
|
||||
/**
|
||||
* 是
|
||||
*/
|
||||
public static final Integer YES = 1;
|
||||
/**
|
||||
* 否
|
||||
*/
|
||||
public static final Integer NO = 0;
|
||||
/**
|
||||
* 文件信息查询默认缓存时间 120 秒
|
||||
*/
|
||||
public static final String FILE_INFO_DEFAULT_CACHE_TIME = "120";
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.openapi.wps.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps文件信息查询参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
public class Api4WpsFileInfoDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package org.springblade.openapi.wps.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* wps 回调接口错误枚举
|
||||
* @author bfhuange
|
||||
* @since 2024/11/26
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum Api4WpsError {
|
||||
/**
|
||||
* 服务处理正常
|
||||
*/
|
||||
OK(0, "OK"),
|
||||
/**
|
||||
* token过期
|
||||
*/
|
||||
SESSION_EXPIRED(40002, "SessionExpired"),
|
||||
/**
|
||||
* 用户无权限访问
|
||||
*/
|
||||
PERMISSION_DENIED(40003, "PermissionDenied"),
|
||||
/**
|
||||
* 资源不存在
|
||||
*/
|
||||
NOT_EXISTS(40004, "NotExists"),
|
||||
/**
|
||||
* 参数错误
|
||||
*/
|
||||
INVALID_ARGUMENT(40005, "InvalidArgument"),
|
||||
/**
|
||||
* 保存空间已满
|
||||
*/
|
||||
SPACE_FULL(40006, "SpaceFull"),
|
||||
/**
|
||||
* 自定义错误提示,前端页面将显示此错误内容,在回调错误响应中的hint字段中自定义错误提示,该错误提示不支持多语言
|
||||
*/
|
||||
CUSTOM_MSG(40007, "CustomMsg"),
|
||||
/**
|
||||
* 文件重命名冲突
|
||||
*/
|
||||
FNAME_CONFLICT(40008, "FnameConflict"),
|
||||
/**
|
||||
* 对接系统错误
|
||||
*/
|
||||
SERVER_ERROR(50001, "ServerError"),
|
||||
;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private final Integer code;
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
private final String message;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps附加参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Api4WpsAttrsVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 单位秒,取值范围为1-300,超过300秒不会缓存回调信息,此字段需服务端全局配置开启缓存,且需要使用token访问预览链接,非必填
|
||||
*/
|
||||
@JsonProperty("cachetime")
|
||||
private String cacheTime;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps回调接口错误
|
||||
* @author bfhuange
|
||||
* @since 2024/11/26
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Api4WpsErrorVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private Integer code;
|
||||
/**
|
||||
* 错误提示
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* 错误提示详细信息
|
||||
*/
|
||||
private String details;
|
||||
/**
|
||||
* 自定义错误信息,当code为40007错误码时必填
|
||||
*/
|
||||
private String hint;
|
||||
|
||||
public Api4WpsErrorVO(Integer code, String message, String hint) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.hint = hint;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps文件信息查询结果
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
public class Api4WpsFileInfoVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文件信息,必填
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
private Api4WpsFileVO file;
|
||||
/**
|
||||
* 用户信息,必填
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
private Api4WpsUserVO user;
|
||||
/**
|
||||
* 附加参数,v6.0.2209.20220920新增
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
private Api4WpsAttrsVO attrs;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps文件结果
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
public class Api4WpsFileVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文件id,字符串长度不超过64位,必填
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 文件名必须带后缀,必填
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 文档版本号,从1开始累加,位数小于11,必填
|
||||
*/
|
||||
private Integer version = 1;
|
||||
/**
|
||||
* 文档大小,单位为字节;此处需传文件真实大小,否则会出现异常,必填
|
||||
*/
|
||||
private Integer size;
|
||||
/**
|
||||
* readonly默认为false
|
||||
* true开启表格筛选,支持对EXCEL表格文档筛选,但不支持对EXCEL表格文档开启多人同步筛选,该预览特性见常见问题
|
||||
* false关闭表格筛选(20220707新增),非必填
|
||||
*/
|
||||
private Boolean readonly = true;
|
||||
/**
|
||||
* 创建者id,字符串长度不超过32位。与user里的id一致,必填
|
||||
*/
|
||||
private String creator;
|
||||
/**
|
||||
* 创建时间,时间戳,单位为秒,必填
|
||||
*/
|
||||
@JsonProperty("create_time")
|
||||
private Integer createTime;
|
||||
/**
|
||||
* 修改者id,字符串长度不超过32位,必填
|
||||
*/
|
||||
private String modifier;
|
||||
/**
|
||||
* 最近修改时间,时间戳,单位为秒,必填
|
||||
*/
|
||||
@JsonProperty("modify_time")
|
||||
private Integer modifyTime;
|
||||
/**
|
||||
* 文档下载地址,必填
|
||||
*/
|
||||
@JsonProperty("download_url")
|
||||
private String downloadUrl;
|
||||
/**
|
||||
* 普通预览模式下可限制预览页数(不超过5000)
|
||||
* previewPages 默认值为 0,不限制预览页数;
|
||||
* previewPages >= 1 时,限制生效,限制的页数为 previewpages 字段的值,必填
|
||||
*/
|
||||
@JsonProperty("preview_pages")
|
||||
private Integer previewPages = 0;
|
||||
/**
|
||||
* 用户权限,非必填
|
||||
*/
|
||||
@JsonProperty("user_acl")
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
private Api4WpsUserAclVO userAcl;
|
||||
/**
|
||||
* 水印参数,非必填
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
private Api4WpsWatermarkVO watermark;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps用户权限
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
public class Api4WpsUserAclVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 重命名权限,1为打开该权限,0为关闭该权限,默认为0,非必填
|
||||
*/
|
||||
private Integer rename;
|
||||
/**
|
||||
* 历史文件打开权限,1为打开该权限,0为关闭该权限,默认为1,非必填
|
||||
*/
|
||||
private Integer history;
|
||||
/**
|
||||
* 复制权限,1为打开该权限,0为关闭该权限,默认为1,非必填
|
||||
*/
|
||||
private Integer copy;
|
||||
/**
|
||||
* 导出权限,1为打开该权限,0为关闭该权限,默认为1,非必填
|
||||
*/
|
||||
private Integer export;
|
||||
/**
|
||||
* 打印权限,1为打开该权限,0为关闭该权限,默认为1,非必填
|
||||
*/
|
||||
private Integer print;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps用户信息
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Api4WpsUserVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 用户id,长度不超过32位,与creator、modifier一致,必填
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 用户名称,必填
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 用户操作权限,预览固定为read,必填
|
||||
*/
|
||||
private String permission = "write";
|
||||
|
||||
public Api4WpsUserVO(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.springblade.openapi.wps.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* wps水印参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
public class Api4WpsWatermarkVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 水印类型, 0为无水印; 1为文字水印,非必填
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 文字水印的文字,支持通过\r\n换行,支持emoji表情
|
||||
* 当type为1时此字段必选
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 水印的颜色(含透明度),非必选,有默认值。格式为:rgba( 192, 192, 192, 0.6 )
|
||||
*/
|
||||
@JsonProperty("fillstyle")
|
||||
private String fillStyle;
|
||||
/**
|
||||
* 水印的字体,非必选,有默认值,格式为bold 20px Serif,非必填
|
||||
*/
|
||||
private String font;
|
||||
/**
|
||||
* 水印的旋转度(弧度),非必选,有默认值,默认为-0.7853982,非必填
|
||||
*/
|
||||
private Float rotate;
|
||||
/**
|
||||
* 水印水平间距,非必选,有默认值,默认为50,非必填
|
||||
*/
|
||||
private Integer horizontal;
|
||||
/**
|
||||
* 水印垂直间距,非必选,有默认值,默认为100,非必填
|
||||
*/
|
||||
private Integer vertical;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.SqlCondition;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(description = "APP版本管理")
|
||||
@TableName("t_app_version")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AppVersion extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "更新类型")
|
||||
protected String updateType;
|
||||
|
||||
@TableField(condition = SqlCondition.LIKE)
|
||||
@NotEmpty
|
||||
@Schema(description = "版本号")
|
||||
protected String version;
|
||||
|
||||
@TableField(condition = SqlCondition.LIKE)
|
||||
@NotEmpty
|
||||
@Schema(description = "子版本号")
|
||||
protected String subVersion;
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "强制更新(是/否)")
|
||||
protected String isForceUpdate;
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "安装方式")
|
||||
protected String installMethod;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "安装包(附件Id)")
|
||||
protected Long installAttachmentId;
|
||||
|
||||
@TableField(condition = SqlCondition.LIKE)
|
||||
@NotEmpty
|
||||
@Schema(description = "更新说明")
|
||||
protected String updateExplanation;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据同步记录表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-27
|
||||
*/
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
@TableName("blade_data_sync_record")
|
||||
@Schema(description = "DataSyncRecord对象")
|
||||
public class DataSyncRecord implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 系统编码
|
||||
*/
|
||||
@Schema(description = "系统编码")
|
||||
private String systemCode;
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@Schema(description = "数据类型")
|
||||
private String dataType;
|
||||
/**
|
||||
* 模式
|
||||
*/
|
||||
@Schema(description = "模式")
|
||||
private String mode;
|
||||
/**
|
||||
* 结果
|
||||
*/
|
||||
@Schema(description = "结果")
|
||||
private String result;
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
@Schema(description = "同步时间")
|
||||
private Date syncTime;
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -33,9 +33,11 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
@@ -45,7 +47,7 @@ import java.io.Serializable;
|
||||
@Data
|
||||
@TableName("blade_dept")
|
||||
@Schema(description = "Dept对象")
|
||||
public class Dept implements Serializable {
|
||||
public class Dept extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -127,4 +129,30 @@ public class Dept implements Serializable {
|
||||
private Integer isDeleted;
|
||||
|
||||
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
@Schema(description = "部门编码")
|
||||
private String deptCode;
|
||||
/**
|
||||
* 父部门编码
|
||||
*/
|
||||
@Schema(description = "父部门编码")
|
||||
private String parentCode;
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
@Schema(description = "同步时间")
|
||||
private Date syncTime;
|
||||
/**
|
||||
* 所属公司编码
|
||||
*/
|
||||
@Schema(description = "所属公司编码")
|
||||
private String belongCompanyCode;
|
||||
/**
|
||||
* 是否是oa的部门
|
||||
*/
|
||||
@Schema(description = "是否是oa的部门")
|
||||
private Integer isOa;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.springblade.system.pojo.enums;
|
||||
|
||||
/**
|
||||
* 数据同步枚举类
|
||||
* @author bfhuange
|
||||
* @date 2024/9/27
|
||||
*/
|
||||
public class DataSync {
|
||||
|
||||
/**
|
||||
* 系统编码
|
||||
*/
|
||||
public enum SystemCode {
|
||||
/**
|
||||
* oa 系统
|
||||
*/
|
||||
OA,
|
||||
/**
|
||||
* mk 系统
|
||||
*/
|
||||
MK,
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
public enum DataType {
|
||||
/**
|
||||
* 组织,包含公司和部门
|
||||
*/
|
||||
ORG,
|
||||
/**
|
||||
* 人员
|
||||
*/
|
||||
PERSON,
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模式
|
||||
*/
|
||||
public enum Mode {
|
||||
/**
|
||||
* 获取
|
||||
*/
|
||||
FETCH,
|
||||
/**
|
||||
* 推送
|
||||
*/
|
||||
PUSH,
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结果
|
||||
*/
|
||||
public enum Result {
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
SUCCESS,
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
FAIL,
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.springblade.system.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 部门类型枚举
|
||||
* @author bfhuange
|
||||
* @date 2024/8/26
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum DeptCategory {
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
COMPANY(1, "公司"),
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
DEPT(2, "部门"),
|
||||
;
|
||||
|
||||
/**
|
||||
* 部门类型编码
|
||||
*/
|
||||
private final Integer code;
|
||||
/**
|
||||
* 部门类型名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.springblade.system.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 用户性别枚举
|
||||
* @author bfhuange
|
||||
* @date 2024/8/27
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum UserSex {
|
||||
/**
|
||||
* 男
|
||||
*/
|
||||
MAN(1, "男"),
|
||||
/**
|
||||
* 女
|
||||
*/
|
||||
WOMAN(2, "女"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final Integer code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static Integer getCodeByName(String name) {
|
||||
if (name == null || name.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return Stream.of(values())
|
||||
.filter(e -> e.getName().equals(name))
|
||||
.map(UserSex::getCode)
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/8/27
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "DeptListVO")
|
||||
public class DeptListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
@Schema(description = "部门编码")
|
||||
private String deptCode;
|
||||
/**
|
||||
* 机构名
|
||||
*/
|
||||
@Schema(description = "机构名")
|
||||
private String deptName;
|
||||
/**
|
||||
* 父主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "父主键")
|
||||
private Long parentId;
|
||||
/**
|
||||
* 父部门编码
|
||||
*/
|
||||
@Schema(description = "父部门编码")
|
||||
private String parentCode;
|
||||
/**
|
||||
* 部门类型
|
||||
*/
|
||||
@Schema(description = "部门类型")
|
||||
private Integer deptCategory;
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -44,4 +45,12 @@ public class FeeItemVO extends FeeItem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "组织")
|
||||
private String createDeptName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人")
|
||||
private String updateUserName;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户部门id
|
||||
* @author bfhuange
|
||||
* @date 2024/9/12
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "UserDeptIdsVO对象")
|
||||
public class UserDeptIdsVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门id,多个用逗号拼接
|
||||
*/
|
||||
@Schema(description = "部门id,多个用逗号拼接")
|
||||
private String deptIds;
|
||||
|
||||
/**
|
||||
* 部门编码,多个用逗号拼接
|
||||
*/
|
||||
@Schema(description = "部门编码,多个用逗号拼接")
|
||||
private String deptCodes;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.springblade.system.util;
|
||||
|
||||
import org.springblade.system.pojo.entity.DataSyncRecord;
|
||||
import org.springblade.system.pojo.enums.DataSync;
|
||||
|
||||
/**
|
||||
* 数据同步记录工具类
|
||||
* @author bfhuange
|
||||
* @date 2024/9/27
|
||||
*/
|
||||
public class DataSyncRecordUtils {
|
||||
private DataSyncRecordUtils() {}
|
||||
|
||||
/**
|
||||
* 创建获取oa组织的数据同步记录
|
||||
* @return
|
||||
*/
|
||||
public static DataSyncRecord createOAOrgFetch() {
|
||||
return DataSyncRecordUtils.createOAFetch()
|
||||
// 数据类型是组织
|
||||
.setDataType(DataSync.DataType.ORG.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建获取oa人员的数据同步记录
|
||||
* @return
|
||||
*/
|
||||
public static DataSyncRecord createOAPersonFetch() {
|
||||
return DataSyncRecordUtils.createOAFetch()
|
||||
// 数据类型是人员
|
||||
.setDataType(DataSync.DataType.PERSON.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建推送mk组织的数据同步记录
|
||||
* @return
|
||||
*/
|
||||
public static DataSyncRecord createMKOrgPush() {
|
||||
return DataSyncRecordUtils.createMKPush()
|
||||
// 数据类型是组织
|
||||
.setDataType(DataSync.DataType.ORG.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建推送mk人员的数据同步记录
|
||||
* @return
|
||||
*/
|
||||
public static DataSyncRecord createMKPersonPush() {
|
||||
return DataSyncRecordUtils.createMKPush()
|
||||
// 数据类型是人员
|
||||
.setDataType(DataSync.DataType.PERSON.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建oa 获取数据记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static DataSyncRecord createOAFetch() {
|
||||
return new DataSyncRecord()
|
||||
// oa 系统
|
||||
.setSystemCode(DataSync.SystemCode.OA.name())
|
||||
// 获取数据
|
||||
.setMode(DataSync.Mode.FETCH.name())
|
||||
// 默认结果是成功
|
||||
.setResult(DataSync.Result.SUCCESS.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建mk 推送数据记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static DataSyncRecord createMKPush() {
|
||||
return new DataSyncRecord()
|
||||
// mk 系统
|
||||
.setSystemCode(DataSync.SystemCode.MK.name())
|
||||
// 推送数据
|
||||
.setMode(DataSync.Mode.PUSH.name())
|
||||
// 默认结果是成功
|
||||
.setResult(DataSync.Result.SUCCESS.name());
|
||||
}
|
||||
}
|
||||
@@ -67,4 +67,8 @@ public class ProjectApplyVO extends ProjectApply {
|
||||
@Schema(description = "生效类型名称")
|
||||
private String effectiveTypeName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "变更类型")
|
||||
private String changeType;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.springblade.system.pojo.context;
|
||||
|
||||
/**
|
||||
* 获取设置手机号接口
|
||||
* @author bfhuange
|
||||
* @since 2026/4/1
|
||||
*/
|
||||
public interface IPhone {
|
||||
/**
|
||||
* 设置手机号
|
||||
* @return
|
||||
*/
|
||||
void setPhone(String phone);
|
||||
/**
|
||||
* 获取手机号
|
||||
* @return
|
||||
*/
|
||||
String getPhone();
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
import org.springblade.core.tool.jackson.Sensitive;
|
||||
import org.springblade.core.tool.sensitive.SensitiveType;
|
||||
import org.springblade.system.pojo.context.IPhone;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
@@ -43,7 +44,7 @@ import java.util.Date;
|
||||
@Data
|
||||
@TableName("blade_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class User extends TenantEntity {
|
||||
public class User extends TenantEntity implements IPhone {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -116,4 +117,22 @@ public class User extends TenantEntity {
|
||||
private Integer isLeader;
|
||||
|
||||
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
private String deptCodes;
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
private Date syncTime;
|
||||
/**
|
||||
* 是否是oa的账号
|
||||
*/
|
||||
private Integer isOa;
|
||||
/**
|
||||
* 是否推送mk
|
||||
*/
|
||||
private Integer isPushMk;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
@@ -85,4 +86,45 @@ public class UserDept implements Serializable {
|
||||
@Schema(description = "是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
|
||||
/**
|
||||
* 公司编码
|
||||
*/
|
||||
@Schema(description = "公司编码")
|
||||
private String companyCode;
|
||||
/**
|
||||
* 公司名
|
||||
*/
|
||||
@Schema(description = "公司名")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
@Schema(description = "部门编码")
|
||||
private String deptCode;
|
||||
/**
|
||||
* 部门名
|
||||
*/
|
||||
@Schema(description = "部门名")
|
||||
private String deptName;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* oaid
|
||||
*/
|
||||
@Schema(description = "oaid")
|
||||
private String oaId;
|
||||
/**
|
||||
* oa的loginId
|
||||
*/
|
||||
@Schema(description = "oa的loginId")
|
||||
private String oaLoginId;
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
@Schema(description = "同步时间")
|
||||
private Date syncTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/8/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "UserListVO对象")
|
||||
public class UserListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String phone;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user