feat: 添加企业文件管理功能及相关任务类
refactor: 重构企业文件验证和移动逻辑 fix: 修复企业合规验证逻辑及路径处理问题 docs: 添加VerifyContext工具类及相关文档 style: 优化代码格式及注释
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.ecep.contract.util;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.vo.ContractVo;
|
||||
|
||||
public class ContractUtils {
|
||||
/**
|
||||
* 检查合同代码是否是子合同代码
|
||||
*
|
||||
* @param code 合同代码
|
||||
* @return 是否是子合同代码
|
||||
*/
|
||||
public static boolean isSubContractCode(String code) {
|
||||
return StringUtils.hasText(code) && code.contains("-");
|
||||
}
|
||||
|
||||
public static String getParentCode(String code) {
|
||||
if (!isSubContractCode(code)) {
|
||||
return null;
|
||||
}
|
||||
int index = code.indexOf("-");
|
||||
if (index <= 4) {
|
||||
return null;
|
||||
}
|
||||
return code.substring(0, index);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user