统一修改ruoyi->bms

This commit is contained in:
caojia
2026-09-28 10:02:38 +08:00
parent 341afc4111
commit 0408b6c35e
639 changed files with 2776 additions and 2807 deletions
@@ -0,0 +1,50 @@
package com.bms.ar.enums;
/**
* 应收账单余额核销单状态。
*
* <p>数据库保存英文编码,页面通过前端枚举展示中文名称。</p>
*/
public enum ArBalanceWriteoffStatus
{
/** 核销已生效,余额已扣减。 */
EFFECTIVE("EFFECTIVE", "有效"),
/** 核销已取消,余额已回补。 */
CANCELLED("CANCELLED", "已反核销");
private final String code;
private final String label;
ArBalanceWriteoffStatus(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
public boolean isEffective()
{
return this == EFFECTIVE;
}
public static ArBalanceWriteoffStatus of(String code)
{
for (ArBalanceWriteoffStatus status : values())
{
if (status.code.equalsIgnoreCase(code))
{
return status;
}
}
return null;
}
}
@@ -0,0 +1,22 @@
package com.bms.ar.enums;
/** 应收账单异步生成任务状态。 */
public final class ArBillGenerateTaskStatus
{
/** 待线程池领取的任务。 */
public static final String WAITING = "WAITING";
/** 已被某个执行节点领取,正在生成明细。 */
public static final String RUNNING = "RUNNING";
/** 明细全部生成成功。 */
public static final String SUCCESS = "SUCCESS";
/** 生成失败,账单已进入失败状态。 */
public static final String FAILED = "FAILED";
/** 用户已请求取消,执行器会在安全边界清理已生成数据。 */
public static final String CANCEL_REQUESTED = "CANCEL_REQUESTED";
/** 取消清理完成,账单及其生成明细已回收。 */
public static final String CANCELED = "CANCELED";
private ArBillGenerateTaskStatus()
{
}
}
@@ -0,0 +1,16 @@
package com.bms.ar.enums;
/** 应收账单生成状态,与账单业务状态分离。 */
public final class ArBillGenerationStatus
{
/** 账单头已创建,明细和费用正在异步生成。 */
public static final String GENERATING = "GENERATING";
/** 明细生成完成,允许确认、核销和导出。 */
public static final String READY = "READY";
/** 明细生成失败或取消后已完成清理。 */
public static final String FAILED = "FAILED";
private ArBillGenerationStatus()
{
}
}
@@ -0,0 +1,49 @@
package com.bms.ar.enums;
/**
* 应收账单生成时的订单选择模式。
* 数据库和接口仍保存英文 code,业务代码通过枚举统一校验和判断。
*/
public enum ArBillSelectionMode
{
/** 手动选择当前预览结果中的订单。 */
EXPLICIT("EXPLICIT", "手动选择"),
/** 选择全部查询结果,仅排除用户明确勾选的订单。 */
ALL_MATCHED("ALL_MATCHED", "全选查询结果");
private final String code;
private final String label;
ArBillSelectionMode(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
/** 空值按历史默认行为视为手动选择,非法非空值返回 null 交由业务层记录失败日志。 */
public static ArBillSelectionMode of(String code)
{
if (code == null || code.trim().isEmpty())
{
return EXPLICIT;
}
for (ArBillSelectionMode mode : values())
{
if (mode.code.equalsIgnoreCase(code.trim()))
{
return mode;
}
}
return null;
}
}
@@ -0,0 +1,65 @@
package com.bms.ar.enums;
/** 应收账单状态。数据库保存值使用 code,避免业务代码散落状态字符串。 */
public enum ArBillStatus
{
DRAFT("DRAFT", "草稿"),
CONFIRMED("CONFIRMED", "已确认"),
PARTIAL_WRITTEN_OFF("PARTIAL_WRITTEN_OFF", "部分核销"),
WRITTEN_OFF("WRITTEN_OFF", "已核销"),
VOID("VOID", "已作废");
private final String code;
private final String label;
ArBillStatus(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
/** 只有草稿账单允许确认。 */
public boolean canConfirm()
{
return this == DRAFT;
}
/** 草稿或已确认账单允许作废;已核销账单不可直接作废。 */
public boolean canVoid()
{
return this == DRAFT || this == CONFIRMED;
}
/** 已确认或部分核销账单允许继续核销。 */
public boolean canWriteOff()
{
return this == CONFIRMED || this == PARTIAL_WRITTEN_OFF;
}
public static ArBillStatus of(String code)
{
for (ArBillStatus status : values())
{
if (status.code.equalsIgnoreCase(code))
{
return status;
}
}
return null;
}
public static boolean is(String code, ArBillStatus status)
{
return status != null && status.code.equalsIgnoreCase(code);
}
}
@@ -0,0 +1,52 @@
package com.bms.ar.enums;
/**
* 应收账单导出任务状态。
*
* <p>PROCESSING 表示处理中,SUCCESS 表示生成成功,FAILED 表示生成失败。</p>
*/
public enum ArExportStatus
{
/** 文件正在生成。 */
PROCESSING("PROCESSING", "生成中"),
/** 文件已生成,可以下载。 */
SUCCESS("SUCCESS", "成功"),
/** 文件生成失败。 */
FAILED("FAILED", "失败");
private final String code;
private final String label;
ArExportStatus(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
public boolean isSuccess()
{
return this == SUCCESS;
}
public static ArExportStatus of(String code)
{
for (ArExportStatus status : values())
{
if (status.code.equalsIgnoreCase(code))
{
return status;
}
}
return null;
}
}
@@ -0,0 +1,20 @@
package com.bms.ar.enums;
/** 应收费用明细是否已经生成正式应收账单。 */
public enum ArIncomeBillFeeStatus
{
UNBILLED("UNBILLED"),
BILLED("BILLED");
private final String code;
ArIncomeBillFeeStatus(String code)
{
this.code = code;
}
public String getCode()
{
return code;
}
}
@@ -0,0 +1,31 @@
package com.bms.ar.enums;
/** 应收日志关联对象类型。 */
public enum ArLogObjectType
{
/** 应收账单主对象。 */
BILL("BILL", "应收账单"),
/** 账单导出文件对象。 */
EXPORT("EXPORT", "账单导出"),
/** 客户余额核销单对象。 */
BALANCE_WRITEOFF("BALANCE_WRITEOFF", "余额核销");
private final String code;
private final String label;
ArLogObjectType(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
}
@@ -0,0 +1,33 @@
package com.bms.ar.enums;
/** 应收日志操作来源。 */
public enum ArLogOperationSource
{
/** 浏览器页面操作。 */
WEB("WEB", "网页端"),
/** 开放接口或系统间接口调用。 */
API("API", "接口"),
/** 定时任务或后台作业。 */
JOB("JOB", "定时任务"),
/** 数据导入操作。 */
IMPORT("IMPORT", "数据导入");
private final String code;
private final String label;
ArLogOperationSource(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
}
@@ -0,0 +1,39 @@
package com.bms.ar.enums;
/** 应收日志操作类型。 */
public enum ArLogOperationType
{
/** 生成应收账单成功。 */
CREATE("CREATE", "生成账单"),
/** 生成账单前的校验或生成失败记录。 */
GENERATE("GENERATE", "生成账单校验"),
/** 确认草稿账单。 */
CONFIRM("CONFIRM", "确认账单"),
/** 作废账单并释放来源订单。 */
VOID("VOID", "作废账单"),
/** 生成账单导出文件。 */
EXPORT("EXPORT", "导出账单"),
/** 使用客户余额核销账单。 */
BALANCE_WRITEOFF("BALANCE_WRITEOFF", "余额核销"),
/** 取消余额核销并回补客户余额。 */
CANCEL_BALANCE_WRITEOFF("CANCEL_BALANCE_WRITEOFF", "取消余额核销");
private final String code;
private final String label;
ArLogOperationType(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
}
@@ -0,0 +1,41 @@
package com.bms.ar.enums;
/** 应收操作日志结果。 */
public enum ArLogResult
{
/** 操作执行成功。 */
SUCCESS("SUCCESS", "成功"),
/** 操作执行失败。 */
FAILED("FAILED", "失败");
private final String code;
private final String label;
ArLogResult(String code, String label)
{
this.code = code;
this.label = label;
}
public String getCode()
{
return code;
}
public String getLabel()
{
return label;
}
public static ArLogResult of(String code)
{
for (ArLogResult result : values())
{
if (result.code.equalsIgnoreCase(code))
{
return result;
}
}
return null;
}
}
@@ -0,0 +1,21 @@
package com.bms.ar.enums;
/** 计费订单的应收账单状态。 */
public enum ArOrderBillStatus
{
UNBILLED("UNBILLED"),
PARTIAL("PARTIAL"),
BILLED("BILLED");
private final String code;
ArOrderBillStatus(String code)
{
this.code = code;
}
public String getCode()
{
return code;
}
}