统一修改ruoyi->bms
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bms.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应收账单余额核销 ar_balance_writeoff
|
||||
*
|
||||
* <p>用客户账户余额核销应收账单,和客户账户余额流水联动,
|
||||
* 共享 ar_bill.written_off_amount / unwritten_amount 缓存。</p>
|
||||
*
|
||||
* @author bms
|
||||
* @date 2026-09-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ArBalanceWriteoff extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 余额核销ID */
|
||||
private Long writeoffId;
|
||||
|
||||
/** 核销单号(BWO开头) */
|
||||
private String writeoffNo;
|
||||
|
||||
/** 应收账单ID */
|
||||
private Long arBillId;
|
||||
|
||||
/** 账单号快照 */
|
||||
private String billNo;
|
||||
|
||||
/** 客户ID */
|
||||
private Long customerId;
|
||||
|
||||
/** 客户账户ID */
|
||||
private Long accountId;
|
||||
|
||||
/** 币种 */
|
||||
private String currency;
|
||||
|
||||
/** 本次核销金额 */
|
||||
private BigDecimal writeoffAmount;
|
||||
|
||||
/** 核销扣款余额流水ID */
|
||||
private Long balanceFlowId;
|
||||
|
||||
/** 反核销回补余额流水ID */
|
||||
private Long reverseFlowId;
|
||||
|
||||
/** 核销日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date writeoffDate;
|
||||
|
||||
/** 状态:EFFECTIVE(有效)/CANCELLED(已反核销),取值由 ArBalanceWriteoffStatus 维护。 */
|
||||
private String status;
|
||||
|
||||
/** 核销备注 */
|
||||
private String remark;
|
||||
|
||||
/** 反核销人 */
|
||||
private String cancelBy;
|
||||
|
||||
/** 反核销时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
|
||||
/** 反核销原因 */
|
||||
private String cancelRemark;
|
||||
|
||||
/* ===== 列表关联展示字段(来自 ar_bill) ===== */
|
||||
|
||||
/** 账单名称 */
|
||||
private String billName;
|
||||
|
||||
/** 客户名称快照 */
|
||||
private String customerName;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公司收款账户配置。
|
||||
*/
|
||||
@Data
|
||||
public class ArBankAccount implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long bankAccountId;
|
||||
private String accountName;
|
||||
private String accountNo;
|
||||
private String bankName;
|
||||
private String currency;
|
||||
private String isDefault;
|
||||
private String status;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
private String updateBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.bms.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 正式应收账单。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ArBill extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 账单头主键。
|
||||
*/
|
||||
private Long arBillId;
|
||||
/**
|
||||
* 对外展示的账单编号。
|
||||
*/
|
||||
private String billNo;
|
||||
/**
|
||||
* 财务填写的账单名称。
|
||||
*/
|
||||
private String billName;
|
||||
/**
|
||||
* 账单所属客户主键。
|
||||
*/
|
||||
private Long customerId;
|
||||
private String customerCode;
|
||||
private String customerName;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
/** 账单所属期开始日期,导出模板展示用。 */
|
||||
private Date billPeriodStart;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
/** 账单所属期结束日期,同时作为生成订单的截止日期。 */
|
||||
private Date billPeriodEnd;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billDate;
|
||||
private String currency;
|
||||
private Integer orderCount;
|
||||
/**
|
||||
* 账单明细应收金额合计。
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 已通过余额核销的金额。
|
||||
*/
|
||||
private BigDecimal writtenOffAmount;
|
||||
/**
|
||||
* 尚未核销的金额,核销入口按此字段判断是否可操作。
|
||||
*/
|
||||
private BigDecimal unwrittenAmount;
|
||||
/**
|
||||
* 状态:DRAFT草稿、CONFIRMED已确认、PARTIAL_WRITTEN_OFF部分核销、WRITTEN_OFF已核销、VOID已作废。
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 生成状态:GENERATING生成中、READY可用、FAILED生成失败。
|
||||
*/
|
||||
private String generationStatus;
|
||||
private Integer billVersion;
|
||||
private String bankAccountName;
|
||||
private String bankAccountNo;
|
||||
private String bankName;
|
||||
private String remark;
|
||||
private String confirmedBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date confirmedTime;
|
||||
|
||||
/**
|
||||
* 账单明细;详情接口分页查询时通常不直接填充该集合。
|
||||
*/
|
||||
private List<ArBillDetail> details;
|
||||
/**
|
||||
* 当前账单的导出历史。
|
||||
*/
|
||||
private List<ArBillExport> exports;
|
||||
/**
|
||||
* 当前账单的操作日志。
|
||||
*/
|
||||
private List<ArBillLog> logs;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 账单订单快照。
|
||||
*/
|
||||
@Data
|
||||
public class ArBillDetail implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long detailId;
|
||||
private Long arBillId;
|
||||
private String prcOrderBillId;
|
||||
private Integer detailNo;
|
||||
private String orderNo;
|
||||
private String trackingNo;
|
||||
/** 转单号快照;账单生成时从来源计费订单复制,保证历史账单可追溯。 */
|
||||
private String transferNo;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date receiveTime;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
private String goodsDescription;
|
||||
private String countryCode;
|
||||
private String countryName;
|
||||
private String destPostcode;
|
||||
private BigDecimal actualWeight;
|
||||
private BigDecimal volumeWeight;
|
||||
private BigDecimal chargeWeight;
|
||||
private BigDecimal pkgLength;
|
||||
private BigDecimal pkgWidth;
|
||||
private BigDecimal pkgHeight;
|
||||
private String currency;
|
||||
private BigDecimal totalAmount;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
private List<ArBillDetailFee> fees;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 账单费用快照。
|
||||
*/
|
||||
@Data
|
||||
public class ArBillDetailFee implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long detailFeeId;
|
||||
private Long detailId;
|
||||
private String prcIncomeBillFeeId;
|
||||
private Integer feeNo;
|
||||
private String feeType;
|
||||
private String feeName;
|
||||
private Long scId;
|
||||
private BigDecimal quantity;
|
||||
private String unit;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal amount;
|
||||
private String currency;
|
||||
private String calculationFormula;
|
||||
private String roundMode;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 账单导出文件元数据。
|
||||
*/
|
||||
@Data
|
||||
public class ArBillExport implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long exportId;
|
||||
private Long arBillId;
|
||||
private String fileName;
|
||||
private String fileType;
|
||||
/**
|
||||
* 提交导出任务时绑定的模板版本,避免后续模板变更影响历史任务。
|
||||
*/
|
||||
private Long templateId;
|
||||
private String templateCode;
|
||||
private String templateVersion;
|
||||
private String templateStorageType;
|
||||
private String templateStorageKey;
|
||||
private String templateHash;
|
||||
/**
|
||||
* 生成文件的实际存储键,下载接口据此读取文件。
|
||||
*/
|
||||
private String storageKey;
|
||||
/**
|
||||
* 文件字节数,便于前端展示和运维排查。
|
||||
*/
|
||||
private Long fileSize;
|
||||
/**
|
||||
* 文件摘要,用于校验文件完整性。
|
||||
*/
|
||||
private String fileHash;
|
||||
/**
|
||||
* 导出的明细行数。
|
||||
*/
|
||||
private Integer rowCount;
|
||||
/**
|
||||
* 导出状态:PROCESSING生成中、SUCCESS成功可下载、FAILED失败。
|
||||
*/
|
||||
private String exportStatus;
|
||||
private String exportBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date exportTime;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 应收账单异步生成任务。
|
||||
*/
|
||||
@Data
|
||||
public class ArBillGenerateTask implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 异步任务主键。
|
||||
*/
|
||||
private Long taskId;
|
||||
/**
|
||||
* 面向日志和前端展示的任务编号。
|
||||
*/
|
||||
private String taskNo;
|
||||
/**
|
||||
* 任务对应的账单头主键。
|
||||
*/
|
||||
private Long arBillId;
|
||||
/**
|
||||
* 订单选择模式 code:EXPLICIT=手动选中,ALL_MATCHED=全选查询结果。
|
||||
*/
|
||||
private String selectionMode;
|
||||
/**
|
||||
* 生成请求快照,避免任务执行过程中依赖前端当前条件。
|
||||
*/
|
||||
private String requestPayload;
|
||||
/**
|
||||
* 任务创建时的来源订单创建时间快照。
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date snapshotCreateTime;
|
||||
/**
|
||||
* 按 bill_id 字典序处理的游标。
|
||||
*/
|
||||
private String lastSourceBillId;
|
||||
/**
|
||||
* 待处理总数;全选模式统计完成前使用 -1。
|
||||
*/
|
||||
private Integer totalCount;
|
||||
/**
|
||||
* 已扫描的来源订单数,用于进度展示。
|
||||
*/
|
||||
private Integer processedCount;
|
||||
/**
|
||||
* 成功写入账单明细的订单数。
|
||||
*/
|
||||
private Integer successCount;
|
||||
/**
|
||||
* 已写入账单明细的累计应收金额。
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 任务状态,取 ArBillGenerateTaskStatus 中定义的值。
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 失败、取消或补偿清理时返回给用户的说明。
|
||||
*/
|
||||
private String errorMessage;
|
||||
/**
|
||||
* 请求幂等号,防止重复创建账单生成任务。
|
||||
*/
|
||||
private String requestToken;
|
||||
/**
|
||||
* 发起任务的用户。
|
||||
*/
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
/** 首次被执行器领取的时间。 */
|
||||
private Date startedAt;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
/** 最近一次进度更新时间,用于识别执行节点异常。 */
|
||||
private Date heartbeatTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
/** 成功、失败或取消完成的时间。 */
|
||||
private Date finishedAt;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 应收模块追加式审计日志。
|
||||
*/
|
||||
@Data
|
||||
public class ArBillLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long logId;
|
||||
private Long arBillId;
|
||||
/**
|
||||
* 对象类型:BILL应收账单、EXPORT账单导出、BALANCE_WRITEOFF余额核销。
|
||||
*/
|
||||
private String objectType;
|
||||
private String objectId;
|
||||
/**
|
||||
* 对象业务标识,例如账单号、收款单号或核销单号。
|
||||
*/
|
||||
private String objectDisplay;
|
||||
/**
|
||||
* 操作类型,取值由 ArLogOperationType 维护。
|
||||
*/
|
||||
private String operationType;
|
||||
private String operationDesc;
|
||||
private String fromStatus;
|
||||
private String toStatus;
|
||||
private String beforeData;
|
||||
private String afterData;
|
||||
private String operatorId;
|
||||
private String operatorName;
|
||||
/**
|
||||
* 操作来源:WEB网页端、API接口、JOB定时任务、IMPORT数据导入。
|
||||
*/
|
||||
private String operationSource;
|
||||
private String requestId;
|
||||
private String traceId;
|
||||
/**
|
||||
* 操作结果:SUCCESS成功、FAILED失败。
|
||||
*/
|
||||
private String result;
|
||||
private String errorMessage;
|
||||
private String clientIp;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.bms.ar.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 应收账单导出模板元数据。
|
||||
*/
|
||||
@Data
|
||||
public class ArExportTemplate implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long templateId;
|
||||
private String templateCode;
|
||||
private String templateName;
|
||||
private String businessType;
|
||||
private String templateVersion;
|
||||
private String storageType;
|
||||
private String storageKey;
|
||||
private String fileHash;
|
||||
private String status;
|
||||
private String isDefault;
|
||||
private Date effectiveStart;
|
||||
private Date effectiveEnd;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/** 账单状态动作参数。 */
|
||||
@Data
|
||||
public class ArBillActionRequest
|
||||
{
|
||||
private String remark;
|
||||
private String requestId;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/** 生成应收账单前的订单计费结果查询条件。 */
|
||||
@Data
|
||||
public class ArBillGenerateQuery
|
||||
{
|
||||
private Long customerId;
|
||||
|
||||
private String customerCode;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billPeriodEnd;
|
||||
|
||||
private String currency;
|
||||
|
||||
/** 订单号、运单号或转单号;支持换行、逗号、分号或空格分隔多个号码。 */
|
||||
private String orderOrTrackingNo;
|
||||
|
||||
/** 全选模式下,排除弹窗使用的多行订单号、运单号或转单号。 */
|
||||
private String excludeOrderOrTrackingNo;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import com.bms.common.config.serializer.StrictDateDeserializer;
|
||||
import com.bms.ar.enums.ArBillSelectionMode;
|
||||
import lombok.Data;
|
||||
|
||||
/** 从订单计费结果生成正式账单的参数。 */
|
||||
@Data
|
||||
public class ArBillGenerateRequest
|
||||
{
|
||||
@NotNull(message = "客户不能为空")
|
||||
private Long customerId;
|
||||
@NotBlank(message = "账单名称不能为空")
|
||||
@Size(max = 100, message = "账单名称不能超过100个字符")
|
||||
private String billName;
|
||||
private String customerCode;
|
||||
private String customerName;
|
||||
@NotNull(message = "账单截止日不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonDeserialize(using = StrictDateDeserializer.class)
|
||||
private Date billPeriodEnd;
|
||||
/** 手动模式选中的来源订单 ID;全选模式为空。 */
|
||||
private List<String> sourceBillIds;
|
||||
/** 选择模式:EXPLICIT 手动选择,ALL_MATCHED 全选查询结果。 */
|
||||
private String selectionMode = ArBillSelectionMode.EXPLICIT.getCode();
|
||||
/** 全选模式中用户明确排除的来源订单 ID。 */
|
||||
private List<String> excludedSourceBillIds;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonDeserialize(using = StrictDateDeserializer.class)
|
||||
private Date billDate;
|
||||
private String currency = "CNY";
|
||||
/** 订单号、运单号或转单号原始输入,生成时会拆分并再次校验筛选条件。 */
|
||||
private String orderOrTrackingNo;
|
||||
private String bankAccountName;
|
||||
private String bankAccountNo;
|
||||
private String bankName;
|
||||
@Size(max = 500, message = "备注不能超过500个字符")
|
||||
private String remark;
|
||||
/** 前端幂等号;重复提交同一请求时复用原任务。 */
|
||||
private String requestId;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.bms.ar.domain.ArBill;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/** 应收账单列表查询参数。 */
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ArBillQuery extends ArBill
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 账单日期查询起始日。 */
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billDateStart;
|
||||
|
||||
/** 账单日期查询结束日。 */
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billDateEnd;
|
||||
}
|
||||
Reference in New Issue
Block a user