恢复点(restore point)。别人改崩后可 git reset --hard 回到此提交。 == 此快照内容 == - 后端 oa-backend: 734 控制器 / 711 实体 (Spring Boot 3.2.5 + SQLite, 端口8091) - 前端 modern-ui/app: Vue3+Vite, 约700页 (构建产物已在 oa-backend/src/main/resources/static) - 数据库 oa-backend/data/oa.db: 含全部演示数据 (强制入库, 6.6MB) - 交接文档 go.md + go-code-reference/endpoints/entities/database.md - 多代理建设脚本 .claude/wf-*.js == 状态 == - 对 凯迪科技ERP_20260507.xlsx 合规 MET ~73.3% (PARTIAL 75: 34可建+6种子/bug+35外部硬天花板) - 安全: 5轮红队+5轮复检, default-deny分级鉴权, 连续零可利用 - W3~W7 累计补完436缺口; W8末轮(40缺口)为半成品(源码树可编译但未集成) - 运行: cd oa-backend; java -jar build/libs/oa-backend-0.1.0.jar --server.port=8091; admin/123456 == 排除(gitignore, 可再生) == node_modules / oa-backend/build / .jdks / *.log / Backup-ERP-* / 弃用的OFBiz核心(只保留modern-ui) 完整文件夹备份见同目录 Backup-ERP-20260615-191517/ (含上述全部, 仅缺 node_modules) 时间戳: 20260615-191517 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
201 lines
4.5 KiB
Java
201 lines
4.5 KiB
Java
package com.kaidi.oa.domain;
|
|
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.GeneratedValue;
|
|
import jakarta.persistence.GenerationType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.Table;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.time.Instant;
|
|
|
|
/**
|
|
* 应收/应付款项(财务管理·往来核算)。一条 ArApItem 代表一笔往来账:
|
|
* arApType 类型(应收 / 应付);partyName 往来单位(客户/供应商);
|
|
* relatedRef 关联合同号或发票号;amount 款项金额;writtenOff 已核销;
|
|
* unwrittenOff 未核销(= 金额 - 已核销,服务端维护);status 流转
|
|
* 未核销 → 部分核销 → 已结清(全核销即「已结清」);dueDate 账期;overdue 是否逾期(按账期)。
|
|
*/
|
|
@Entity
|
|
@Table(name = "ar_ap_item")
|
|
public class ArApItem {
|
|
|
|
public static final String T_AR = "应收";
|
|
public static final String T_AP = "应付";
|
|
|
|
public static final String S_OPEN = "未核销";
|
|
public static final String S_PARTIAL = "部分核销";
|
|
public static final String S_SETTLED = "已结清";
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
private String code;
|
|
|
|
/** 类型:应收 / 应付。 */
|
|
private String arApType;
|
|
|
|
/** 往来单位(客户 / 供应商)。 */
|
|
private String partyName;
|
|
|
|
/** 关联合同号或发票号。 */
|
|
private String relatedRef;
|
|
|
|
/** 关联合同 id(可空)。 */
|
|
private Long contractId;
|
|
|
|
/** 关联发票 id(可空)。 */
|
|
private Long invoiceId;
|
|
|
|
/** 款项金额。 */
|
|
private BigDecimal amount = BigDecimal.ZERO;
|
|
|
|
/** 已核销金额。 */
|
|
private BigDecimal writtenOff = BigDecimal.ZERO;
|
|
|
|
/** 未核销金额(= 金额 - 已核销)。 */
|
|
private BigDecimal unwrittenOff = BigDecimal.ZERO;
|
|
|
|
/** 未核销 / 部分核销 / 已结清。 */
|
|
private String status;
|
|
|
|
private String dueDate;
|
|
|
|
private String companySubject;
|
|
|
|
private String owner;
|
|
|
|
private String remark;
|
|
|
|
private Instant createdAt;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
|
|
public String getArApType() {
|
|
return arApType;
|
|
}
|
|
|
|
public void setArApType(String arApType) {
|
|
this.arApType = arApType;
|
|
}
|
|
|
|
public String getPartyName() {
|
|
return partyName;
|
|
}
|
|
|
|
public void setPartyName(String partyName) {
|
|
this.partyName = partyName;
|
|
}
|
|
|
|
public String getRelatedRef() {
|
|
return relatedRef;
|
|
}
|
|
|
|
public void setRelatedRef(String relatedRef) {
|
|
this.relatedRef = relatedRef;
|
|
}
|
|
|
|
public Long getContractId() {
|
|
return contractId;
|
|
}
|
|
|
|
public void setContractId(Long contractId) {
|
|
this.contractId = contractId;
|
|
}
|
|
|
|
public Long getInvoiceId() {
|
|
return invoiceId;
|
|
}
|
|
|
|
public void setInvoiceId(Long invoiceId) {
|
|
this.invoiceId = invoiceId;
|
|
}
|
|
|
|
public BigDecimal getAmount() {
|
|
return amount;
|
|
}
|
|
|
|
public void setAmount(BigDecimal amount) {
|
|
this.amount = amount;
|
|
}
|
|
|
|
public BigDecimal getWrittenOff() {
|
|
return writtenOff;
|
|
}
|
|
|
|
public void setWrittenOff(BigDecimal writtenOff) {
|
|
this.writtenOff = writtenOff;
|
|
}
|
|
|
|
public BigDecimal getUnwrittenOff() {
|
|
return unwrittenOff;
|
|
}
|
|
|
|
public void setUnwrittenOff(BigDecimal unwrittenOff) {
|
|
this.unwrittenOff = unwrittenOff;
|
|
}
|
|
|
|
public String getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(String status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public String getDueDate() {
|
|
return dueDate;
|
|
}
|
|
|
|
public void setDueDate(String dueDate) {
|
|
this.dueDate = dueDate;
|
|
}
|
|
|
|
public String getCompanySubject() {
|
|
return companySubject;
|
|
}
|
|
|
|
public void setCompanySubject(String companySubject) {
|
|
this.companySubject = companySubject;
|
|
}
|
|
|
|
public String getOwner() {
|
|
return owner;
|
|
}
|
|
|
|
public void setOwner(String owner) {
|
|
this.owner = owner;
|
|
}
|
|
|
|
public String getRemark() {
|
|
return remark;
|
|
}
|
|
|
|
public void setRemark(String remark) {
|
|
this.remark = remark;
|
|
}
|
|
|
|
public Instant getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(Instant createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
}
|