初始化项目

This commit is contained in:
2026-03-22 13:39:20 +08:00
parent 1b9448a5a3
commit 7888164aff
60 changed files with 6107 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpAccountTransfer;
/**
* 转账明细表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpAccountTransferDao extends CrudDao<ErpAccountTransfer> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpBudgets;
/**
* 月度预算表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpBudgetsDao extends CrudDao<ErpBudgets> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpDebtRecords;
/**
* 借贷记录明细表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpDebtRecordsDao extends CrudDao<ErpDebtRecords> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpDebts;
/**
* 负债借贷表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpDebtsDao extends CrudDao<ErpDebts> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpExpense;
/**
* 支出明细表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpExpenseDao extends CrudDao<ErpExpense> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpIncome;
/**
* 收入明细表 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpIncomeDao extends CrudDao<ErpIncome> {
}

View File

@@ -0,0 +1,15 @@
package com.jeesite.modules.erp.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.erp.entity.ErpTransactionFlow;
/**
* 收支流水 DAO 接口
* @author gaoxq
* @version 2026-03-22
*/
@MyBatisDao(dataSourceName="work")
public interface ErpTransactionFlowDao extends CrudDao<ErpTransactionFlow> {
}

View File

@@ -0,0 +1,94 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 转账明细表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_account_transfer", alias = "a", label = "转账信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
@Column(name = "transfer_id", attrName = "transferId", label = "转账主键", isPK = true),
@Column(name = "transfer_name", attrName = "transferName", label = "转账名称", queryType = QueryType.LIKE),
@Column(name = "out_account_id", attrName = "outAccountId", label = "转出账号"),
@Column(name = "in_account_id", attrName = "inAccountId", label = "转入账号", isQuery = false),
@Column(name = "category_id", attrName = "categoryId", label = "转账分类"),
@Column(name = "transfer_amount", attrName = "transferAmount", label = "转账金额", isQuery = false),
@Column(name = "transfer_status", attrName = "transferStatus", label = "转账状态"),
@Column(name = "remark", attrName = "remark", label = "转账备注", queryType = QueryType.LIKE),
}, orderBy = "a.transfer_id DESC"
)
@Data
public class ErpAccountTransfer extends DataEntity<ErpAccountTransfer> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String transferId; // 转账主键
private String transferName; // 转账名称
private String outAccountId; // 转出账号
private String inAccountId; // 转入账号
private String categoryId; // 转账分类
private Double transferAmount; // 转账金额
private String transferStatus; // 转账状态
private String remark; // 转账备注
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "转账主键", attrName = "transferId", align = Align.CENTER, sort = 20),
@ExcelField(title = "转账名称", attrName = "transferName", align = Align.CENTER, sort = 30),
@ExcelField(title = "转出账号", attrName = "outAccountId", align = Align.CENTER, sort = 40),
@ExcelField(title = "转入账号", attrName = "inAccountId", align = Align.CENTER, sort = 50),
@ExcelField(title = "转账分类", attrName = "categoryId", align = Align.CENTER, sort = 60),
@ExcelField(title = "转账金额", attrName = "transferAmount", align = Align.CENTER, sort = 70),
@ExcelField(title = "转账状态", attrName = "transferStatus", align = Align.CENTER, sort = 80),
@ExcelField(title = "转账备注", attrName = "remark", align = Align.CENTER, sort = 90),
})
public ErpAccountTransfer() {
this(null);
}
public ErpAccountTransfer(String id) {
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
}

View File

@@ -0,0 +1,92 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import java.io.Serial;
/**
* 月度预算表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@Table(name = "erp_budgets", alias = "a", label = "预算信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
@Column(name = "budget_id", attrName = "budgetId", label = "唯一主键", isPK = true),
@Column(name = "category_id", attrName = "categoryId", label = "分类标识"),
@Column(name = "budget_month", attrName = "budgetMonth", label = "预算年月", isQuery = false),
@Column(name = "budget_amount", attrName = "budgetAmount", label = "预算金额", isQuery = false),
@Column(name = "used_amount", attrName = "usedAmount", label = "使用金额", isQuery = false),
@Column(name = "used_ratio", attrName = "usedRatio", label = "预算占比", isQuery = false),
@Column(name = "over_amount", attrName = "overAmount", label = "超支金额", isQuery = false),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
}, orderBy = "a.budget_id DESC"
)
@Data
public class ErpBudgets extends DataEntity<ErpBudgets> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String budgetId; // 唯一主键
private String categoryId; // 分类标识
private String budgetMonth; // 预算年月
private Double budgetAmount; // 预算金额
private Double usedAmount; // 使用金额
private Double usedRatio; // 预算占比
private Double overAmount; // 超支金额
private Date updateTime; // 更新时间
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一主键", attrName = "budgetId", align = Align.CENTER, sort = 20),
@ExcelField(title = "分类标识", attrName = "categoryId", align = Align.CENTER, sort = 30),
@ExcelField(title = "预算年月", attrName = "budgetMonth", align = Align.CENTER, sort = 40),
@ExcelField(title = "预算金额", attrName = "budgetAmount", align = Align.CENTER, sort = 50),
@ExcelField(title = "使用金额", attrName = "usedAmount", align = Align.CENTER, sort = 60),
@ExcelField(title = "预算占比", attrName = "usedRatio", align = Align.CENTER, sort = 70),
@ExcelField(title = "超支金额", attrName = "overAmount", align = Align.CENTER, sort = 80),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 90, dataFormat = "yyyy-MM-dd hh:mm"),
})
public ErpBudgets() {
this(null);
}
public ErpBudgets(String id) {
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
}

View File

@@ -0,0 +1,72 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 借贷记录明细表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_debt_records", alias = "a", label = "借贷明细信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isQuery = false, isUpdateForce = true),
@Column(name = "record_id", attrName = "recordId", label = "唯一标识", isPK = true),
@Column(name = "debt_id", attrName = "debtId", label = "负债标识"),
@Column(name = "account_id", attrName = "accountId", label = "账户标识"),
@Column(name = "repay_amount", attrName = "repayAmount", label = "还款金额", isQuery = false),
@Column(name = "repay_time", attrName = "repayTime", label = "还款时间", isQuery = false, isUpdateForce = true),
@Column(name = "remark", attrName = "remark", label = "备注说明", queryType = QueryType.LIKE),
}, orderBy = "a.record_id DESC"
)
@Data
public class ErpDebtRecords extends DataEntity<ErpDebtRecords> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String recordId; // 唯一标识
private String debtId; // 负债标识
private String accountId; // 账户标识
private Double repayAmount; // 还款金额
private Date repayTime; // 还款时间
private String remark; // 备注说明
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一标识", attrName = "recordId", align = Align.CENTER, sort = 20),
@ExcelField(title = "负债标识", attrName = "debtId", align = Align.CENTER, sort = 30),
@ExcelField(title = "账户标识", attrName = "accountId", align = Align.CENTER, sort = 40),
@ExcelField(title = "还款金额", attrName = "repayAmount", align = Align.CENTER, sort = 50),
@ExcelField(title = "还款时间", attrName = "repayTime", align = Align.CENTER, sort = 60, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "备注说明", attrName = "remark", align = Align.CENTER, sort = 70),
})
public ErpDebtRecords() {
this(null);
}
public ErpDebtRecords(String id) {
super(id);
}
}

View File

@@ -0,0 +1,75 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 负债借贷表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_debts", alias = "a", label = "借贷信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isQuery = false, isUpdateForce = true),
@Column(name = "debt_id", attrName = "debtId", label = "唯一标识", isPK = true),
@Column(name = "debt_type", attrName = "debtType", label = "负债类型"),
@Column(name = "debt_name", attrName = "debtName", label = "对方名称", queryType = QueryType.LIKE),
@Column(name = "debt_amount", attrName = "debtAmount", label = "借贷金额", isQuery = false),
@Column(name = "remaining", attrName = "remaining", label = "未还金额", isQuery = false, isUpdateForce = true),
@Column(name = "end_time", attrName = "endTime", label = "结清时间", isQuery = false, isUpdateForce = true),
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
}, orderBy = "a.create_time DESC"
)
@Data
public class ErpDebts extends DataEntity<ErpDebts> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String debtId; // 唯一标识
private String debtType; // 负债类型
private String debtName; // 对方名称
private Double debtAmount; // 借贷金额
private Double remaining; // 未还金额
private Date endTime; // 结清时间
private String ustatus; // 状态
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一标识", attrName = "debtId", align = Align.CENTER, sort = 20),
@ExcelField(title = "负债类型", attrName = "debtType", align = Align.CENTER, sort = 30),
@ExcelField(title = "对方名称", attrName = "debtName", align = Align.CENTER, sort = 40),
@ExcelField(title = "借贷金额", attrName = "debtAmount", align = Align.CENTER, sort = 50),
@ExcelField(title = "未还金额", attrName = "remaining", align = Align.CENTER, sort = 60),
@ExcelField(title = "结清时间", attrName = "endTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "状态", attrName = "ustatus", align = Align.CENTER, sort = 80),
})
public ErpDebts() {
this(null);
}
public ErpDebts(String id) {
super(id);
}
}

View File

@@ -0,0 +1,72 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 支出明细表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_expense", alias = "a", label = "支出信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isQuery = false, isUpdateForce = true),
@Column(name = "expense_id", attrName = "expenseId", label = "唯一标识", isPK = true),
@Column(name = "expense_name", attrName = "expenseName", label = "支出名称", queryType = QueryType.LIKE),
@Column(name = "account_id", attrName = "accountId", label = "支出账户"),
@Column(name = "category_id", attrName = "categoryId", label = "支出分类"),
@Column(name = "amount", attrName = "amount", label = "交易金额", isQuery = false),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
}, orderBy = "a.create_time DESC"
)
@Data
public class ErpExpense extends DataEntity<ErpExpense> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String expenseId; // 唯一标识
private String expenseName; // 支出名称
private String accountId; // 支出账户
private String categoryId; // 支出分类
private Double amount; // 交易金额
private Date updateTime; // 更新时间
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一标识", attrName = "expenseId", align = Align.CENTER, sort = 20),
@ExcelField(title = "支出名称", attrName = "expenseName", align = Align.CENTER, sort = 30),
@ExcelField(title = "支出账户", attrName = "accountId", align = Align.CENTER, sort = 40),
@ExcelField(title = "支出分类", attrName = "categoryId", align = Align.CENTER, sort = 50),
@ExcelField(title = "交易金额", attrName = "amount", align = Align.CENTER, sort = 60),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"),
})
public ErpExpense() {
this(null);
}
public ErpExpense(String id) {
super(id);
}
}

View File

@@ -0,0 +1,72 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 收入明细表 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_income", alias = "a", label = "收入信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isQuery = false, isUpdateForce = true),
@Column(name = "income_id", attrName = "incomeId", label = "唯一标识", isPK = true),
@Column(name = "income_name", attrName = "incomeName", label = "收入名称", queryType = QueryType.LIKE),
@Column(name = "account_id", attrName = "accountId", label = "收入账户"),
@Column(name = "category_id", attrName = "categoryId", label = "收入分类"),
@Column(name = "amount", attrName = "amount", label = "交易金额", isQuery = false),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
}, orderBy = "a.create_time DESC"
)
@Data
public class ErpIncome extends DataEntity<ErpIncome> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String incomeId; // 唯一标识
private String incomeName; // 收入名称
private String accountId; // 收入账户
private String categoryId; // 收入分类
private Double amount; // 交易金额
private Date updateTime; // 更新时间
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一标识", attrName = "incomeId", align = Align.CENTER, sort = 20),
@ExcelField(title = "收入名称", attrName = "incomeName", align = Align.CENTER, sort = 30),
@ExcelField(title = "收入账户", attrName = "accountId", align = Align.CENTER, sort = 40),
@ExcelField(title = "收入分类", attrName = "categoryId", align = Align.CENTER, sort = 50),
@ExcelField(title = "交易金额", attrName = "amount", align = Align.CENTER, sort = 60),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"),
})
public ErpIncome() {
this(null);
}
public ErpIncome(String id) {
super(id);
}
}

View File

@@ -0,0 +1,100 @@
package com.jeesite.modules.erp.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 收支流水 Entity
*
* @author gaoxq
* @version 2026-03-22
*/
@EqualsAndHashCode(callSuper = true)
@Table(name = "erp_transaction_flow", alias = "a", label = "流水信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
@Column(name = "flow_id", attrName = "flowId", label = "流水", isPK = true),
@Column(name = "flow_name", attrName = "flowName", label = "交易名称", queryType = QueryType.LIKE),
@Column(name = "flow_type", attrName = "flowType", label = "交易类型"),
@Column(name = "amount", attrName = "amount", label = "交易金额", isQuery = false),
@Column(name = "trade_time", attrName = "tradeTime", label = "交易时间", isQuery = false),
@Column(name = "account_id", attrName = "accountId", label = "交易账户"),
@Column(name = "category_id", attrName = "categoryId", label = "交易分类"),
@Column(name = "remark", attrName = "remark", label = "交易备注", isQuery = false),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
@Column(name = "business_id", attrName = "businessId", label = "业务标识"),
}, orderBy = "a.create_time DESC"
)
@Data
public class ErpTransactionFlow extends DataEntity<ErpTransactionFlow> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String flowId; // 流水
private String flowName; // 交易名称
private String flowType; // 交易类型
private Double amount; // 交易金额
private Date tradeTime; // 交易时间
private String accountId; // 交易账户
private String categoryId; // 交易分类
private String remark; // 交易备注
private Date updateTime; // 更新时间
private String businessId; // 业务标识
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "流水", attrName = "flowId", align = Align.CENTER, sort = 20),
@ExcelField(title = "交易名称", attrName = "flowName", align = Align.CENTER, sort = 30),
@ExcelField(title = "交易类型", attrName = "flowType", align = Align.CENTER, sort = 40),
@ExcelField(title = "交易金额", attrName = "amount", align = Align.CENTER, sort = 50),
@ExcelField(title = "交易时间", attrName = "tradeTime", align = Align.CENTER, sort = 60, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "交易账户", attrName = "accountId", align = Align.CENTER, sort = 70),
@ExcelField(title = "交易分类", attrName = "categoryId", align = Align.CENTER, sort = 80),
@ExcelField(title = "交易备注", attrName = "remark", align = Align.CENTER, sort = 90),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 100, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "业务标识", attrName = "businessId", align = Align.CENTER, sort = 110),
})
public ErpTransactionFlow() {
this(null);
}
public ErpTransactionFlow(String id) {
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpAccountTransfer;
import com.jeesite.modules.erp.dao.ErpAccountTransferDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 转账明细表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpAccountTransferService extends CrudService<ErpAccountTransferDao, ErpAccountTransfer> {
/**
* 获取单条数据
* @param erpAccountTransfer 主键
*/
@Override
public ErpAccountTransfer get(ErpAccountTransfer erpAccountTransfer) {
return super.get(erpAccountTransfer);
}
/**
* 查询分页数据
* @param erpAccountTransfer 查询条件
* @param erpAccountTransfer page 分页对象
*/
@Override
public Page<ErpAccountTransfer> findPage(ErpAccountTransfer erpAccountTransfer) {
return super.findPage(erpAccountTransfer);
}
/**
* 查询列表数据
* @param erpAccountTransfer 查询条件
*/
@Override
public List<ErpAccountTransfer> findList(ErpAccountTransfer erpAccountTransfer) {
return super.findList(erpAccountTransfer);
}
/**
* 保存数据(插入或更新)
* @param erpAccountTransfer 数据对象
*/
@Override
@Transactional
public void save(ErpAccountTransfer erpAccountTransfer) {
super.save(erpAccountTransfer);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpAccountTransfer> list = ei.getDataList(ErpAccountTransfer.class);
for (ErpAccountTransfer erpAccountTransfer : list) {
try{
ValidatorUtils.validateWithException(erpAccountTransfer);
this.save(erpAccountTransfer);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpAccountTransfer.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpAccountTransfer.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpAccountTransfer 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpAccountTransfer erpAccountTransfer) {
super.updateStatus(erpAccountTransfer);
}
/**
* 删除数据
* @param erpAccountTransfer 数据对象
*/
@Override
@Transactional
public void delete(ErpAccountTransfer erpAccountTransfer) {
super.delete(erpAccountTransfer);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpBudgets;
import com.jeesite.modules.erp.dao.ErpBudgetsDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 月度预算表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpBudgetsService extends CrudService<ErpBudgetsDao, ErpBudgets> {
/**
* 获取单条数据
* @param erpBudgets 主键
*/
@Override
public ErpBudgets get(ErpBudgets erpBudgets) {
return super.get(erpBudgets);
}
/**
* 查询分页数据
* @param erpBudgets 查询条件
* @param erpBudgets page 分页对象
*/
@Override
public Page<ErpBudgets> findPage(ErpBudgets erpBudgets) {
return super.findPage(erpBudgets);
}
/**
* 查询列表数据
* @param erpBudgets 查询条件
*/
@Override
public List<ErpBudgets> findList(ErpBudgets erpBudgets) {
return super.findList(erpBudgets);
}
/**
* 保存数据(插入或更新)
* @param erpBudgets 数据对象
*/
@Override
@Transactional
public void save(ErpBudgets erpBudgets) {
super.save(erpBudgets);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpBudgets> list = ei.getDataList(ErpBudgets.class);
for (ErpBudgets erpBudgets : list) {
try{
ValidatorUtils.validateWithException(erpBudgets);
this.save(erpBudgets);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpBudgets.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpBudgets.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpBudgets 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpBudgets erpBudgets) {
super.updateStatus(erpBudgets);
}
/**
* 删除数据
* @param erpBudgets 数据对象
*/
@Override
@Transactional
public void delete(ErpBudgets erpBudgets) {
super.delete(erpBudgets);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpDebtRecords;
import com.jeesite.modules.erp.dao.ErpDebtRecordsDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 借贷记录明细表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpDebtRecordsService extends CrudService<ErpDebtRecordsDao, ErpDebtRecords> {
/**
* 获取单条数据
* @param erpDebtRecords 主键
*/
@Override
public ErpDebtRecords get(ErpDebtRecords erpDebtRecords) {
return super.get(erpDebtRecords);
}
/**
* 查询分页数据
* @param erpDebtRecords 查询条件
* @param erpDebtRecords page 分页对象
*/
@Override
public Page<ErpDebtRecords> findPage(ErpDebtRecords erpDebtRecords) {
return super.findPage(erpDebtRecords);
}
/**
* 查询列表数据
* @param erpDebtRecords 查询条件
*/
@Override
public List<ErpDebtRecords> findList(ErpDebtRecords erpDebtRecords) {
return super.findList(erpDebtRecords);
}
/**
* 保存数据(插入或更新)
* @param erpDebtRecords 数据对象
*/
@Override
@Transactional
public void save(ErpDebtRecords erpDebtRecords) {
super.save(erpDebtRecords);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpDebtRecords> list = ei.getDataList(ErpDebtRecords.class);
for (ErpDebtRecords erpDebtRecords : list) {
try{
ValidatorUtils.validateWithException(erpDebtRecords);
this.save(erpDebtRecords);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpDebtRecords.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpDebtRecords.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpDebtRecords 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpDebtRecords erpDebtRecords) {
super.updateStatus(erpDebtRecords);
}
/**
* 删除数据
* @param erpDebtRecords 数据对象
*/
@Override
@Transactional
public void delete(ErpDebtRecords erpDebtRecords) {
super.delete(erpDebtRecords);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpDebts;
import com.jeesite.modules.erp.dao.ErpDebtsDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 负债借贷表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpDebtsService extends CrudService<ErpDebtsDao, ErpDebts> {
/**
* 获取单条数据
* @param erpDebts 主键
*/
@Override
public ErpDebts get(ErpDebts erpDebts) {
return super.get(erpDebts);
}
/**
* 查询分页数据
* @param erpDebts 查询条件
* @param erpDebts page 分页对象
*/
@Override
public Page<ErpDebts> findPage(ErpDebts erpDebts) {
return super.findPage(erpDebts);
}
/**
* 查询列表数据
* @param erpDebts 查询条件
*/
@Override
public List<ErpDebts> findList(ErpDebts erpDebts) {
return super.findList(erpDebts);
}
/**
* 保存数据(插入或更新)
* @param erpDebts 数据对象
*/
@Override
@Transactional
public void save(ErpDebts erpDebts) {
super.save(erpDebts);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpDebts> list = ei.getDataList(ErpDebts.class);
for (ErpDebts erpDebts : list) {
try{
ValidatorUtils.validateWithException(erpDebts);
this.save(erpDebts);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpDebts.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpDebts.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpDebts 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpDebts erpDebts) {
super.updateStatus(erpDebts);
}
/**
* 删除数据
* @param erpDebts 数据对象
*/
@Override
@Transactional
public void delete(ErpDebts erpDebts) {
super.delete(erpDebts);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpExpense;
import com.jeesite.modules.erp.dao.ErpExpenseDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 支出明细表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpExpenseService extends CrudService<ErpExpenseDao, ErpExpense> {
/**
* 获取单条数据
* @param erpExpense 主键
*/
@Override
public ErpExpense get(ErpExpense erpExpense) {
return super.get(erpExpense);
}
/**
* 查询分页数据
* @param erpExpense 查询条件
* @param erpExpense page 分页对象
*/
@Override
public Page<ErpExpense> findPage(ErpExpense erpExpense) {
return super.findPage(erpExpense);
}
/**
* 查询列表数据
* @param erpExpense 查询条件
*/
@Override
public List<ErpExpense> findList(ErpExpense erpExpense) {
return super.findList(erpExpense);
}
/**
* 保存数据(插入或更新)
* @param erpExpense 数据对象
*/
@Override
@Transactional
public void save(ErpExpense erpExpense) {
super.save(erpExpense);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpExpense> list = ei.getDataList(ErpExpense.class);
for (ErpExpense erpExpense : list) {
try{
ValidatorUtils.validateWithException(erpExpense);
this.save(erpExpense);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpExpense.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpExpense.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpExpense 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpExpense erpExpense) {
super.updateStatus(erpExpense);
}
/**
* 删除数据
* @param erpExpense 数据对象
*/
@Override
@Transactional
public void delete(ErpExpense erpExpense) {
super.delete(erpExpense);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpIncome;
import com.jeesite.modules.erp.dao.ErpIncomeDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 收入明细表 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpIncomeService extends CrudService<ErpIncomeDao, ErpIncome> {
/**
* 获取单条数据
* @param erpIncome 主键
*/
@Override
public ErpIncome get(ErpIncome erpIncome) {
return super.get(erpIncome);
}
/**
* 查询分页数据
* @param erpIncome 查询条件
* @param erpIncome page 分页对象
*/
@Override
public Page<ErpIncome> findPage(ErpIncome erpIncome) {
return super.findPage(erpIncome);
}
/**
* 查询列表数据
* @param erpIncome 查询条件
*/
@Override
public List<ErpIncome> findList(ErpIncome erpIncome) {
return super.findList(erpIncome);
}
/**
* 保存数据(插入或更新)
* @param erpIncome 数据对象
*/
@Override
@Transactional
public void save(ErpIncome erpIncome) {
super.save(erpIncome);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpIncome> list = ei.getDataList(ErpIncome.class);
for (ErpIncome erpIncome : list) {
try{
ValidatorUtils.validateWithException(erpIncome);
this.save(erpIncome);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpIncome.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpIncome.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpIncome 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpIncome erpIncome) {
super.updateStatus(erpIncome);
}
/**
* 删除数据
* @param erpIncome 数据对象
*/
@Override
@Transactional
public void delete(ErpIncome erpIncome) {
super.delete(erpIncome);
}
}

View File

@@ -0,0 +1,134 @@
package com.jeesite.modules.erp.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.erp.entity.ErpTransactionFlow;
import com.jeesite.modules.erp.dao.ErpTransactionFlowDao;
import com.jeesite.common.service.ServiceException;
import com.jeesite.common.config.Global;
import com.jeesite.common.validator.ValidatorUtils;
import com.jeesite.common.utils.excel.ExcelImport;
import org.springframework.web.multipart.MultipartFile;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
/**
* 收支流水 Service
* @author gaoxq
* @version 2026-03-22
*/
@Service
public class ErpTransactionFlowService extends CrudService<ErpTransactionFlowDao, ErpTransactionFlow> {
/**
* 获取单条数据
* @param erpTransactionFlow 主键
*/
@Override
public ErpTransactionFlow get(ErpTransactionFlow erpTransactionFlow) {
return super.get(erpTransactionFlow);
}
/**
* 查询分页数据
* @param erpTransactionFlow 查询条件
* @param erpTransactionFlow page 分页对象
*/
@Override
public Page<ErpTransactionFlow> findPage(ErpTransactionFlow erpTransactionFlow) {
return super.findPage(erpTransactionFlow);
}
/**
* 查询列表数据
* @param erpTransactionFlow 查询条件
*/
@Override
public List<ErpTransactionFlow> findList(ErpTransactionFlow erpTransactionFlow) {
return super.findList(erpTransactionFlow);
}
/**
* 保存数据(插入或更新)
* @param erpTransactionFlow 数据对象
*/
@Override
@Transactional
public void save(ErpTransactionFlow erpTransactionFlow) {
super.save(erpTransactionFlow);
}
/**
* 导入数据
* @param file 导入的数据文件
*/
@Transactional
public String importData(MultipartFile file) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
}
int successNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
List<ErpTransactionFlow> list = ei.getDataList(ErpTransactionFlow.class);
for (ErpTransactionFlow erpTransactionFlow : list) {
try{
ValidatorUtils.validateWithException(erpTransactionFlow);
this.save(erpTransactionFlow);
successNum++;
successMsg.append("<br/>" + successNum + "、编号 " + erpTransactionFlow.getId() + " 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、编号 " + erpTransactionFlow.getId() + " 导入失败:";
if (e instanceof ConstraintViolationException){
ConstraintViolationException cve = (ConstraintViolationException)e;
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
}
}else{
msg += e.getMessage();
}
failureMsg.append(msg);
logger.error(msg, e);
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
failureMsg.append(e.getMessage());
return failureMsg.toString();
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}else{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
/**
* 更新状态
* @param erpTransactionFlow 数据对象
*/
@Override
@Transactional
public void updateStatus(ErpTransactionFlow erpTransactionFlow) {
super.updateStatus(erpTransactionFlow);
}
/**
* 删除数据
* @param erpTransactionFlow 数据对象
*/
@Override
@Transactional
public void delete(ErpTransactionFlow erpTransactionFlow) {
super.delete(erpTransactionFlow);
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpAccountTransfer;
import com.jeesite.modules.erp.service.ErpAccountTransferService;
/**
* 转账明细表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/accountTransfer")
public class ErpAccountTransferController extends BaseController {
private final ErpAccountTransferService erpAccountTransferService;
public ErpAccountTransferController(ErpAccountTransferService erpAccountTransferService) {
this.erpAccountTransferService = erpAccountTransferService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpAccountTransfer get(String transferId, boolean isNewRecord) {
return erpAccountTransferService.get(transferId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:accountTransfer:view")
@RequestMapping(value = {"list", ""})
public String list(ErpAccountTransfer erpAccountTransfer, Model model) {
model.addAttribute("erpAccountTransfer", erpAccountTransfer);
return "modules/erp/erpAccountTransferList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:accountTransfer:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpAccountTransfer> listData(ErpAccountTransfer erpAccountTransfer, HttpServletRequest request, HttpServletResponse response) {
erpAccountTransfer.setPage(new Page<>(request, response));
Page<ErpAccountTransfer> page = erpAccountTransferService.findPage(erpAccountTransfer);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:accountTransfer:view")
@RequestMapping(value = "form")
public String form(ErpAccountTransfer erpAccountTransfer, Model model) {
model.addAttribute("erpAccountTransfer", erpAccountTransfer);
return "modules/erp/erpAccountTransferForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:accountTransfer:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpAccountTransfer erpAccountTransfer) {
erpAccountTransferService.save(erpAccountTransfer);
return renderResult(Global.TRUE, text("保存转账成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:accountTransfer:view")
@RequestMapping(value = "exportData")
public void exportData(ErpAccountTransfer erpAccountTransfer, HttpServletResponse response) {
List<ErpAccountTransfer> list = erpAccountTransferService.findList(erpAccountTransfer);
String fileName = "转账" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("转账", ErpAccountTransfer.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:accountTransfer:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpAccountTransfer erpAccountTransfer = new ErpAccountTransfer();
List<ErpAccountTransfer> list = ListUtils.newArrayList(erpAccountTransfer);
String fileName = "转账模板.xlsx";
try(ExcelExport ee = new ExcelExport("转账", ErpAccountTransfer.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:accountTransfer:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpAccountTransferService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:accountTransfer:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpAccountTransfer erpAccountTransfer) {
erpAccountTransferService.delete(erpAccountTransfer);
return renderResult(Global.TRUE, text("删除转账成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpBudgets;
import com.jeesite.modules.erp.service.ErpBudgetsService;
/**
* 月度预算表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/budgets")
public class ErpBudgetsController extends BaseController {
private final ErpBudgetsService erpBudgetsService;
public ErpBudgetsController(ErpBudgetsService erpBudgetsService) {
this.erpBudgetsService = erpBudgetsService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpBudgets get(String budgetId, boolean isNewRecord) {
return erpBudgetsService.get(budgetId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:budgets:view")
@RequestMapping(value = {"list", ""})
public String list(ErpBudgets erpBudgets, Model model) {
model.addAttribute("erpBudgets", erpBudgets);
return "modules/erp/erpBudgetsList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:budgets:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpBudgets> listData(ErpBudgets erpBudgets, HttpServletRequest request, HttpServletResponse response) {
erpBudgets.setPage(new Page<>(request, response));
Page<ErpBudgets> page = erpBudgetsService.findPage(erpBudgets);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:budgets:view")
@RequestMapping(value = "form")
public String form(ErpBudgets erpBudgets, Model model) {
model.addAttribute("erpBudgets", erpBudgets);
return "modules/erp/erpBudgetsForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:budgets:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpBudgets erpBudgets) {
erpBudgetsService.save(erpBudgets);
return renderResult(Global.TRUE, text("保存预算成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:budgets:view")
@RequestMapping(value = "exportData")
public void exportData(ErpBudgets erpBudgets, HttpServletResponse response) {
List<ErpBudgets> list = erpBudgetsService.findList(erpBudgets);
String fileName = "预算" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("预算", ErpBudgets.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:budgets:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpBudgets erpBudgets = new ErpBudgets();
List<ErpBudgets> list = ListUtils.newArrayList(erpBudgets);
String fileName = "预算模板.xlsx";
try(ExcelExport ee = new ExcelExport("预算", ErpBudgets.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:budgets:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpBudgetsService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:budgets:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpBudgets erpBudgets) {
erpBudgetsService.delete(erpBudgets);
return renderResult(Global.TRUE, text("删除预算成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpDebtRecords;
import com.jeesite.modules.erp.service.ErpDebtRecordsService;
/**
* 借贷记录明细表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/debtRecords")
public class ErpDebtRecordsController extends BaseController {
private final ErpDebtRecordsService erpDebtRecordsService;
public ErpDebtRecordsController(ErpDebtRecordsService erpDebtRecordsService) {
this.erpDebtRecordsService = erpDebtRecordsService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpDebtRecords get(String recordId, boolean isNewRecord) {
return erpDebtRecordsService.get(recordId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:debtRecords:view")
@RequestMapping(value = {"list", ""})
public String list(ErpDebtRecords erpDebtRecords, Model model) {
model.addAttribute("erpDebtRecords", erpDebtRecords);
return "modules/erp/erpDebtRecordsList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:debtRecords:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpDebtRecords> listData(ErpDebtRecords erpDebtRecords, HttpServletRequest request, HttpServletResponse response) {
erpDebtRecords.setPage(new Page<>(request, response));
Page<ErpDebtRecords> page = erpDebtRecordsService.findPage(erpDebtRecords);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:debtRecords:view")
@RequestMapping(value = "form")
public String form(ErpDebtRecords erpDebtRecords, Model model) {
model.addAttribute("erpDebtRecords", erpDebtRecords);
return "modules/erp/erpDebtRecordsForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:debtRecords:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpDebtRecords erpDebtRecords) {
erpDebtRecordsService.save(erpDebtRecords);
return renderResult(Global.TRUE, text("保存借贷明细成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:debtRecords:view")
@RequestMapping(value = "exportData")
public void exportData(ErpDebtRecords erpDebtRecords, HttpServletResponse response) {
List<ErpDebtRecords> list = erpDebtRecordsService.findList(erpDebtRecords);
String fileName = "借贷明细" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("借贷明细", ErpDebtRecords.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:debtRecords:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpDebtRecords erpDebtRecords = new ErpDebtRecords();
List<ErpDebtRecords> list = ListUtils.newArrayList(erpDebtRecords);
String fileName = "借贷明细模板.xlsx";
try(ExcelExport ee = new ExcelExport("借贷明细", ErpDebtRecords.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:debtRecords:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpDebtRecordsService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:debtRecords:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpDebtRecords erpDebtRecords) {
erpDebtRecordsService.delete(erpDebtRecords);
return renderResult(Global.TRUE, text("删除借贷明细成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpDebts;
import com.jeesite.modules.erp.service.ErpDebtsService;
/**
* 负债借贷表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/debts")
public class ErpDebtsController extends BaseController {
private final ErpDebtsService erpDebtsService;
public ErpDebtsController(ErpDebtsService erpDebtsService) {
this.erpDebtsService = erpDebtsService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpDebts get(String debtId, boolean isNewRecord) {
return erpDebtsService.get(debtId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:debts:view")
@RequestMapping(value = {"list", ""})
public String list(ErpDebts erpDebts, Model model) {
model.addAttribute("erpDebts", erpDebts);
return "modules/erp/erpDebtsList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:debts:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpDebts> listData(ErpDebts erpDebts, HttpServletRequest request, HttpServletResponse response) {
erpDebts.setPage(new Page<>(request, response));
Page<ErpDebts> page = erpDebtsService.findPage(erpDebts);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:debts:view")
@RequestMapping(value = "form")
public String form(ErpDebts erpDebts, Model model) {
model.addAttribute("erpDebts", erpDebts);
return "modules/erp/erpDebtsForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:debts:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpDebts erpDebts) {
erpDebtsService.save(erpDebts);
return renderResult(Global.TRUE, text("保存借贷成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:debts:view")
@RequestMapping(value = "exportData")
public void exportData(ErpDebts erpDebts, HttpServletResponse response) {
List<ErpDebts> list = erpDebtsService.findList(erpDebts);
String fileName = "借贷" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("借贷", ErpDebts.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:debts:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpDebts erpDebts = new ErpDebts();
List<ErpDebts> list = ListUtils.newArrayList(erpDebts);
String fileName = "借贷模板.xlsx";
try(ExcelExport ee = new ExcelExport("借贷", ErpDebts.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:debts:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpDebtsService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:debts:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpDebts erpDebts) {
erpDebtsService.delete(erpDebts);
return renderResult(Global.TRUE, text("删除借贷成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpExpense;
import com.jeesite.modules.erp.service.ErpExpenseService;
/**
* 支出明细表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/expense")
public class ErpExpenseController extends BaseController {
private final ErpExpenseService erpExpenseService;
public ErpExpenseController(ErpExpenseService erpExpenseService) {
this.erpExpenseService = erpExpenseService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpExpense get(String expenseId, boolean isNewRecord) {
return erpExpenseService.get(expenseId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:expense:view")
@RequestMapping(value = {"list", ""})
public String list(ErpExpense erpExpense, Model model) {
model.addAttribute("erpExpense", erpExpense);
return "modules/erp/erpExpenseList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:expense:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpExpense> listData(ErpExpense erpExpense, HttpServletRequest request, HttpServletResponse response) {
erpExpense.setPage(new Page<>(request, response));
Page<ErpExpense> page = erpExpenseService.findPage(erpExpense);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:expense:view")
@RequestMapping(value = "form")
public String form(ErpExpense erpExpense, Model model) {
model.addAttribute("erpExpense", erpExpense);
return "modules/erp/erpExpenseForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:expense:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpExpense erpExpense) {
erpExpenseService.save(erpExpense);
return renderResult(Global.TRUE, text("保存支出成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:expense:view")
@RequestMapping(value = "exportData")
public void exportData(ErpExpense erpExpense, HttpServletResponse response) {
List<ErpExpense> list = erpExpenseService.findList(erpExpense);
String fileName = "支出" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("支出", ErpExpense.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:expense:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpExpense erpExpense = new ErpExpense();
List<ErpExpense> list = ListUtils.newArrayList(erpExpense);
String fileName = "支出模板.xlsx";
try(ExcelExport ee = new ExcelExport("支出", ErpExpense.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:expense:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpExpenseService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:expense:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpExpense erpExpense) {
erpExpenseService.delete(erpExpense);
return renderResult(Global.TRUE, text("删除支出成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpIncome;
import com.jeesite.modules.erp.service.ErpIncomeService;
/**
* 收入明细表 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/income")
public class ErpIncomeController extends BaseController {
private final ErpIncomeService erpIncomeService;
public ErpIncomeController(ErpIncomeService erpIncomeService) {
this.erpIncomeService = erpIncomeService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpIncome get(String incomeId, boolean isNewRecord) {
return erpIncomeService.get(incomeId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:income:view")
@RequestMapping(value = {"list", ""})
public String list(ErpIncome erpIncome, Model model) {
model.addAttribute("erpIncome", erpIncome);
return "modules/erp/erpIncomeList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:income:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpIncome> listData(ErpIncome erpIncome, HttpServletRequest request, HttpServletResponse response) {
erpIncome.setPage(new Page<>(request, response));
Page<ErpIncome> page = erpIncomeService.findPage(erpIncome);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:income:view")
@RequestMapping(value = "form")
public String form(ErpIncome erpIncome, Model model) {
model.addAttribute("erpIncome", erpIncome);
return "modules/erp/erpIncomeForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:income:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpIncome erpIncome) {
erpIncomeService.save(erpIncome);
return renderResult(Global.TRUE, text("保存收入成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:income:view")
@RequestMapping(value = "exportData")
public void exportData(ErpIncome erpIncome, HttpServletResponse response) {
List<ErpIncome> list = erpIncomeService.findList(erpIncome);
String fileName = "收入" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("收入", ErpIncome.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:income:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpIncome erpIncome = new ErpIncome();
List<ErpIncome> list = ListUtils.newArrayList(erpIncome);
String fileName = "收入模板.xlsx";
try(ExcelExport ee = new ExcelExport("收入", ErpIncome.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:income:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpIncomeService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:income:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpIncome erpIncome) {
erpIncomeService.delete(erpIncome);
return renderResult(Global.TRUE, text("删除收入成功!"));
}
}

View File

@@ -0,0 +1,146 @@
package com.jeesite.modules.erp.web;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.utils.excel.ExcelExport;
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.erp.entity.ErpTransactionFlow;
import com.jeesite.modules.erp.service.ErpTransactionFlowService;
/**
* 收支流水 Controller
* @author gaoxq
* @version 2026-03-22
*/
@Controller
@RequestMapping(value = "${adminPath}/erp/transactionFlow")
public class ErpTransactionFlowController extends BaseController {
private final ErpTransactionFlowService erpTransactionFlowService;
public ErpTransactionFlowController(ErpTransactionFlowService erpTransactionFlowService) {
this.erpTransactionFlowService = erpTransactionFlowService;
}
/**
* 获取数据
*/
@ModelAttribute
public ErpTransactionFlow get(String flowId, boolean isNewRecord) {
return erpTransactionFlowService.get(flowId, isNewRecord);
}
/**
* 查询列表
*/
@RequiresPermissions("erp:transactionFlow:view")
@RequestMapping(value = {"list", ""})
public String list(ErpTransactionFlow erpTransactionFlow, Model model) {
model.addAttribute("erpTransactionFlow", erpTransactionFlow);
return "modules/erp/erpTransactionFlowList";
}
/**
* 查询列表数据
*/
@RequiresPermissions("erp:transactionFlow:view")
@RequestMapping(value = "listData")
@ResponseBody
public Page<ErpTransactionFlow> listData(ErpTransactionFlow erpTransactionFlow, HttpServletRequest request, HttpServletResponse response) {
erpTransactionFlow.setPage(new Page<>(request, response));
Page<ErpTransactionFlow> page = erpTransactionFlowService.findPage(erpTransactionFlow);
return page;
}
/**
* 查看编辑表单
*/
@RequiresPermissions("erp:transactionFlow:view")
@RequestMapping(value = "form")
public String form(ErpTransactionFlow erpTransactionFlow, Model model) {
model.addAttribute("erpTransactionFlow", erpTransactionFlow);
return "modules/erp/erpTransactionFlowForm";
}
/**
* 保存数据
*/
@RequiresPermissions("erp:transactionFlow:edit")
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated ErpTransactionFlow erpTransactionFlow) {
erpTransactionFlowService.save(erpTransactionFlow);
return renderResult(Global.TRUE, text("保存流水成功!"));
}
/**
* 导出数据
*/
@RequiresPermissions("erp:transactionFlow:view")
@RequestMapping(value = "exportData")
public void exportData(ErpTransactionFlow erpTransactionFlow, HttpServletResponse response) {
List<ErpTransactionFlow> list = erpTransactionFlowService.findList(erpTransactionFlow);
String fileName = "流水" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
try(ExcelExport ee = new ExcelExport("流水", ErpTransactionFlow.class)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 下载模板
*/
@RequiresPermissions("erp:transactionFlow:view")
@RequestMapping(value = "importTemplate")
public void importTemplate(HttpServletResponse response) {
ErpTransactionFlow erpTransactionFlow = new ErpTransactionFlow();
List<ErpTransactionFlow> list = ListUtils.newArrayList(erpTransactionFlow);
String fileName = "流水模板.xlsx";
try(ExcelExport ee = new ExcelExport("流水", ErpTransactionFlow.class, Type.IMPORT)){
ee.setDataList(list).write(response, fileName);
}
}
/**
* 导入数据
*/
@ResponseBody
@RequiresPermissions("erp:transactionFlow:edit")
@PostMapping(value = "importData")
public String importData(MultipartFile file) {
try {
String message = erpTransactionFlowService.importData(file);
return renderResult(Global.TRUE, "posfull:"+message);
} catch (Exception ex) {
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
}
}
/**
* 删除数据
*/
@RequiresPermissions("erp:transactionFlow:edit")
@RequestMapping(value = "delete")
@ResponseBody
public String delete(ErpTransactionFlow erpTransactionFlow) {
erpTransactionFlowService.delete(erpTransactionFlow);
return renderResult(Global.TRUE, text("删除流水成功!"));
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpAccountTransferDao">
<!-- 查询数据
<select id="findList" resultType="ErpAccountTransfer">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpBudgetsDao">
<!-- 查询数据
<select id="findList" resultType="ErpBudgets">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpDebtRecordsDao">
<!-- 查询数据
<select id="findList" resultType="ErpDebtRecords">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpDebtsDao">
<!-- 查询数据
<select id="findList" resultType="ErpDebts">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpExpenseDao">
<!-- 查询数据
<select id="findList" resultType="ErpExpense">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpIncomeDao">
<!-- 查询数据
<select id="findList" resultType="ErpIncome">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.erp.dao.ErpTransactionFlowDao">
<!-- 查询数据
<select id="findList" resultType="ErpTransactionFlow">
SELECT ${sqlMap.column.toSql()}
FROM ${sqlMap.table.toSql()}
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select> -->
</mapper>