1、删除无用demo代码
2、添加主数据模块项目
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
package com.pictc.constant;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 下午12:00:34
|
||||
* @Description: 合同相关规则引擎常量
|
||||
* 规则引擎的常量包括2个部分,1、规则编码 2、规则节点编码
|
||||
*/
|
||||
public interface ContractLiteflowRule {
|
||||
|
||||
|
||||
String RULE_ARG = "arg";
|
||||
|
||||
/**
|
||||
* 用于演示规则引擎在复杂业务中的使用
|
||||
* 规则节点:test_node_A、test_node_B
|
||||
* 规则参数为:
|
||||
* 参数说明:
|
||||
* */
|
||||
String RULE_TEST = "RULE_TEST";
|
||||
|
||||
String RULE_TEST_NODEA = "test_node_A";
|
||||
|
||||
String RULE_TEST_NODEB = "test_node_B";
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 合同业务, 编码范围 11000-11999
|
||||
*/
|
||||
public interface BContractCode {
|
||||
|
||||
//
|
||||
final BusinessCode NOT_FOUNT = BusinessCode.of(11000,"合同【{}】找不到");
|
||||
|
||||
final BusinessCode NOT_VALID = BusinessCode.of(11001,"合同【{}】已经失效");
|
||||
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 财务业务,编码范围 16000-16999
|
||||
*/
|
||||
public interface BFinanceCode {
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 采购业务, 编码范围 12000-12999
|
||||
*/
|
||||
public interface BProcurementCode {
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 储备业务 15000-15999
|
||||
*/
|
||||
public interface BReserveCode {
|
||||
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 销售业务,编码范围 13000-13999
|
||||
*/
|
||||
public interface BSalesCode {
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:52:42
|
||||
* @Description: 运输业务,编码范围 14000-14999
|
||||
*/
|
||||
public interface BTransportCode {
|
||||
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
import org.slf4j.helpers.MessageFormatter;
|
||||
|
||||
import com.xjrsoft.common.exception.ExceptionCode;
|
||||
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 上午10:38:49
|
||||
* @Description:
|
||||
* <div>业务错误编码 </div>
|
||||
* <p> 通用-默认 10000-10500 {@link com.xjrsoft.common.enums.ResponseCode}</p>
|
||||
* <p>通用-参数 10501-10999 {@link com.pictc.enums.ExceptionCommonCode} </p>
|
||||
* <p>合同 11000-11999 {@link com.pictc.enums.BContractCode} </p>
|
||||
* <p>采购 12000-12999 {@link com.pictc.enums.BProcurementCode} </p>
|
||||
* <p>销售 13000-13999 {@link com.pictc.enums.BSalesCode} </p>
|
||||
* <p>运输 14000-14999 {@link com.pictc.enums.BTransportCode} </p>
|
||||
* <p>储备 15000-15999 {@link com.pictc.enums.BReserveCode} </p>
|
||||
* <p>财务 16000-16999 {@link com.pictc.enums.BFinanceCode} </p>
|
||||
*/
|
||||
@Setter
|
||||
public class BusinessCode implements ExceptionCode{
|
||||
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private BusinessCode(int code, String message) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public static BusinessCode ofArgs(BusinessCode bcode,Object... args) {
|
||||
String msg = bcode.getMessage();
|
||||
if(args!=null && args.length > 0) {
|
||||
msg = MessageFormatter.arrayFormat(bcode.getMessage(),args).getMessage();
|
||||
}
|
||||
return new BusinessCode(bcode.getCode(),msg);
|
||||
}
|
||||
|
||||
public static BusinessCode of(int code,String msg) {
|
||||
return new BusinessCode(code,msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.pictc.enums;
|
||||
|
||||
/**
|
||||
* @author 张福财
|
||||
* @date 2025年10月14日 下午4:11:24
|
||||
* @Description: 合同业务, 编码范围 10501-10999
|
||||
*/
|
||||
public interface ExceptionCommonCode {
|
||||
|
||||
/**
|
||||
* 数据中某个字段值唯一,不运行重复
|
||||
*/
|
||||
final BusinessCode DATA_FIELD_DUPLICATION = BusinessCode.of(10501,"字段【{}】不允许重复");
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user