财务门户设计
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
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.ErpAccountIncomeExpense;
|
||||
|
||||
/**
|
||||
* 账户收支DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpAccountIncomeExpenseDao extends CrudDao<ErpAccountIncomeExpense> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpCategoryFlow;
|
||||
|
||||
/**
|
||||
* erp_category_flowDAO接口
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpCategoryFlowDao extends CrudDao<ErpCategoryFlow> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpCategoryIncomeExpense;
|
||||
|
||||
/**
|
||||
* 类别收支DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpCategoryIncomeExpenseDao extends CrudDao<ErpCategoryIncomeExpense> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpExpInc;
|
||||
|
||||
/**
|
||||
* 收支信息DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2025-12-10
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpExpIncDao extends CrudDao<ErpExpInc> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpIncExpRatio;
|
||||
|
||||
/**
|
||||
* 支出占比DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpIncExpRatioDao extends CrudDao<ErpIncExpRatio> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpIncomeExpenseCycle;
|
||||
|
||||
/**
|
||||
* 年度收支信息DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpIncomeExpenseCycleDao extends CrudDao<ErpIncomeExpenseCycle> {
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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.ErpSummaryAll;
|
||||
|
||||
/**
|
||||
* 汇总信息DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2025-12-09
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface ErpSummaryAllDao extends CrudDao<ErpSummaryAll> {
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 账户收支Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "erp_account_income_expense_view", alias = "a", label = "账户收支信息", columns = {
|
||||
@Column(name = "account_id", attrName = "accountId", label = "交易账户", isPK = true),
|
||||
@Column(name = "year_date", attrName = "yearDate", label = "year_date", isPK = true),
|
||||
@Column(name = "income_amount", attrName = "incomeAmount", label = "income_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_amount", attrName = "expenseAmount", label = "expense_amount", isUpdateForce = true),
|
||||
}, joinTable = {
|
||||
@JoinTable(type = JoinTable.Type.LEFT_JOIN, entity = ErpAccount.class, attrName = "this", alias = "b",
|
||||
on = "a.account_id = b.account_id",
|
||||
columns = {
|
||||
@Column(name = "account_name", attrName = "accountName", label = "账户名称"),
|
||||
}),
|
||||
}, orderBy = "a.account_id DESC, a.year_date DESC"
|
||||
)
|
||||
@Data
|
||||
public class ErpAccountIncomeExpense extends DataEntity<ErpAccountIncomeExpense> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String accountId; // 交易账户
|
||||
private String yearDate; // year_date
|
||||
private Double incomeAmount; // income_amount
|
||||
private Double expenseAmount; // expense_amount
|
||||
|
||||
private String accountName;
|
||||
|
||||
public ErpAccountIncomeExpense() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public ErpAccountIncomeExpense(String accountId, String yearDate) {
|
||||
this.accountId = accountId;
|
||||
this.yearDate = yearDate;
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* erp_category_flowEntity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "erp_category_flow_view", alias = "a", label = "用途信息", columns = {
|
||||
@Column(name = "cycle_type", attrName = "cycleType", label = "cycle_type"),
|
||||
@Column(name = "category_name", attrName = "categoryName", label = "分类名称", queryType = QueryType.LIKE),
|
||||
@Column(name = "stat_date", attrName = "statDate", label = "stat_date"),
|
||||
@Column(name = "this_income", attrName = "thisIncome", label = "this_income"),
|
||||
@Column(name = "prev_income", attrName = "prevIncome", label = "prev_income"),
|
||||
@Column(name = "income_mom", attrName = "incomeMom", label = "income_mom", isUpdateForce = true),
|
||||
@Column(name = "this_expense", attrName = "thisExpense", label = "this_expense"),
|
||||
@Column(name = "prev_expense", attrName = "prevExpense", label = "prev_expense"),
|
||||
@Column(name = "expense_mom", attrName = "expenseMom", label = "expense_mom", isUpdateForce = true),
|
||||
}, orderBy = "a.stat_date"
|
||||
)
|
||||
@Data
|
||||
public class ErpCategoryFlow extends DataEntity<ErpCategoryFlow> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String cycleType; // cycle_type
|
||||
private String categoryName; // 分类名称
|
||||
private String statDate; // 交易日期
|
||||
private Double thisIncome; // 本期收入
|
||||
private Double prevIncome; // 上期收入
|
||||
private Double incomeMom; // 收入环比
|
||||
private Double thisExpense; // 本期支出
|
||||
private Double prevExpense; // 上期支出
|
||||
private Double expenseMom; // 支出环比
|
||||
|
||||
public ErpCategoryFlow() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ErpCategoryFlow(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
|
||||
public String getStatDate_gte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setStatDate_gte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.GTE, statDate);
|
||||
}
|
||||
|
||||
public String getStatDate_lte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setStatDate_lte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.LTE, statDate);
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 类别收支Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Table(name = "erp_category_income_expense_view", alias = "a", label = "类别收支信息", columns = {
|
||||
@Column(name = "category_id", attrName = "categoryId", label = "交易分类", isPK = true),
|
||||
@Column(name = "year_date", attrName = "yearDate", label = "year_date", isPK = true),
|
||||
@Column(name = "income_amount", attrName = "incomeAmount", label = "income_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_amount", attrName = "expenseAmount", label = "expense_amount", isUpdateForce = true),
|
||||
}, joinTable = {
|
||||
@JoinTable(type = JoinTable.Type.LEFT_JOIN, entity = ErpCategory.class, attrName = "this", alias = "b",
|
||||
on = "a.category_id = b.category_id",
|
||||
columns = {
|
||||
@Column(name = "parent_id", attrName = "parentId", label = "父级分类"),
|
||||
@Column(name = "category_name", attrName = "categoryName", label = "分类名称"),
|
||||
}),
|
||||
}, orderBy = "a.category_id DESC, a.year_date DESC"
|
||||
)
|
||||
@Data
|
||||
public class ErpCategoryIncomeExpense extends DataEntity<ErpCategoryIncomeExpense> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String categoryId; // 交易分类
|
||||
private String yearDate; // year_date
|
||||
private Double incomeAmount; // income_amount
|
||||
private Double expenseAmount; // expense_amount
|
||||
|
||||
private String categoryName;
|
||||
|
||||
public ErpCategoryIncomeExpense() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public ErpCategoryIncomeExpense(String categoryId, String yearDate) {
|
||||
this.categoryId = categoryId;
|
||||
this.yearDate = yearDate;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 收支信息Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-10
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "erp_exp_inc_view", alias = "a", label = "收支信息", columns = {
|
||||
@Column(name = "account_name", attrName = "accountName", label = "account_name", queryType = QueryType.LIKE),
|
||||
@Column(name = "stat_date", attrName = "statDate", label = "stat_date"),
|
||||
@Column(name = "cycle_type", attrName = "cycleType", label = "cycle_type"),
|
||||
@Column(name = "income_amount", attrName = "incomeAmount", label = "income_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_amount", attrName = "expenseAmount", label = "expense_amount", isUpdateForce = true),
|
||||
}, orderBy = "a.stat_date"
|
||||
)
|
||||
@Data
|
||||
public class ErpExpInc extends DataEntity<ErpExpInc> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Date createTime; // 记录时间
|
||||
private String accountName; // account_name
|
||||
private String statDate; // stat_date
|
||||
private String cycleType; // cycle_type
|
||||
private Double incomeAmount; // income_amount
|
||||
private Double expenseAmount; // expense_amount
|
||||
|
||||
public ErpExpInc() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ErpExpInc(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public String getStatDate_gte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setStatDate_gte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.GTE, statDate);
|
||||
}
|
||||
|
||||
public String getStatDate_lte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setStatDate_lte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.LTE, statDate);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 支出占比Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "erp_inc_exp_ratio_view", alias = "a", label = "支出占比信息", columns = {
|
||||
@Column(name = "cycle_type", attrName = "cycleType", label = "cycle_type"),
|
||||
@Column(name = "stat_date", attrName = "statDate", label = "stat_date"),
|
||||
@Column(name = "income_amount", attrName = "incomeAmount", label = "income_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_amount", attrName = "expenseAmount", label = "expense_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_ratio", attrName = "expenseRatio", label = "expense_ratio"),
|
||||
}, orderBy = "a.stat_date"
|
||||
)
|
||||
@Data
|
||||
public class ErpIncExpRatio extends DataEntity<ErpIncExpRatio> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String cycleType; // cycle_type
|
||||
private String statDate; // 日期
|
||||
private Double incomeAmount; // 收入
|
||||
private Double expenseAmount; // 支出
|
||||
private Double expenseRatio; // 占比
|
||||
|
||||
public ErpIncExpRatio() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ErpIncExpRatio(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public String getStatDate_gte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setStatDate_gte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.GTE, statDate);
|
||||
}
|
||||
|
||||
public String getStatDate_lte() {
|
||||
return sqlMap.getWhere().getValue("stat_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setStatDate_lte(String statDate) {
|
||||
sqlMap.getWhere().and("stat_date", QueryType.LTE, statDate);
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 年度收支信息Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Table(name = "erp_income_expense_cycle_view", alias = "a", label = "年度收支信息信息", columns = {
|
||||
@Column(name = "year_date", attrName = "yearDate", label = "year_date", isPK = true),
|
||||
@Column(name = "month_date", attrName = "monthDate", label = "month_date", isPK = true),
|
||||
@Column(name = "income_amount", attrName = "incomeAmount", label = "income_amount", isUpdateForce = true),
|
||||
@Column(name = "expense_amount", attrName = "expenseAmount", label = "expense_amount", isUpdateForce = true),
|
||||
}, orderBy = "a.year_date DESC, a.month_date DESC"
|
||||
)
|
||||
@Data
|
||||
public class ErpIncomeExpenseCycle extends DataEntity<ErpIncomeExpenseCycle> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String yearDate; // year_date
|
||||
private String monthDate; // month_date
|
||||
private Double incomeAmount; // income_amount
|
||||
private Double expenseAmount; // expense_amount
|
||||
|
||||
@ExcelFields({
|
||||
@ExcelField(title = "year_date", attrName = "yearDate", align = Align.CENTER, sort = 10),
|
||||
@ExcelField(title = "month_date", attrName = "monthDate", align = Align.CENTER, sort = 20),
|
||||
@ExcelField(title = "income_amount", attrName = "incomeAmount", align = Align.CENTER, sort = 30),
|
||||
@ExcelField(title = "expense_amount", attrName = "expenseAmount", align = Align.CENTER, sort = 40),
|
||||
})
|
||||
public ErpIncomeExpenseCycle() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public ErpIncomeExpenseCycle(String yearDate, String monthDate) {
|
||||
this.yearDate = yearDate;
|
||||
this.monthDate = monthDate;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package com.jeesite.modules.erp.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
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 2025-12-09
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "erp_summary_all_view", alias = "a", label = "汇总信息信息", columns = {
|
||||
@Column(name = "c_date", attrName = "cdate", label = "汇总日期"),
|
||||
@Column(name = "c_type", attrName = "ctype", label = "交易类型"),
|
||||
@Column(name = "this_value", attrName = "thisValue", label = "当期金额", isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "prev_value", attrName = "prevValue", label = "上期金额", isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "mom_rate", attrName = "momRate", label = "环比", isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "cycle_type", attrName = "cycleType", label = "周期类型"),
|
||||
}, orderBy = "a.c_date"
|
||||
)
|
||||
@Data
|
||||
public class ErpSummaryAll extends DataEntity<ErpSummaryAll> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Date createTime; // 记录时间
|
||||
private String cdate; // 汇总日期
|
||||
private String ctype; // 交易类型
|
||||
private Double thisValue; // 当期金额
|
||||
private Double prevValue; // 上期金额
|
||||
private Double momRate; // 环比
|
||||
private String cycleType; // 周期类型
|
||||
|
||||
@ExcelFields({
|
||||
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||
@ExcelField(title = "主键ID", attrName = "id", align = Align.CENTER, sort = 20),
|
||||
@ExcelField(title = "汇总日期", attrName = "cdate", align = Align.CENTER, sort = 30, dataFormat = "yyyy-MM-dd"),
|
||||
@ExcelField(title = "交易类型", attrName = "ctype", dictType = "transaction_type", align = Align.CENTER, sort = 40),
|
||||
@ExcelField(title = "当期金额", attrName = "thisValue", align = Align.CENTER, sort = 50),
|
||||
@ExcelField(title = "上期金额", attrName = "prevValue", align = Align.CENTER, sort = 60),
|
||||
@ExcelField(title = "环比", attrName = "momRate", align = Align.CENTER, sort = 70),
|
||||
@ExcelField(title = "周期类型", attrName = "cycleType", dictType = "report_cycle", align = Align.CENTER, sort = 80),
|
||||
})
|
||||
public ErpSummaryAll() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ErpSummaryAll(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public String getCdate_gte() {
|
||||
return sqlMap.getWhere().getValue("c_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setCdate_gte(String cdate) {
|
||||
sqlMap.getWhere().and("c_date", QueryType.GTE, cdate);
|
||||
}
|
||||
|
||||
public String getCdate_lte() {
|
||||
return sqlMap.getWhere().getValue("c_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setCdate_lte(String cdate) {
|
||||
sqlMap.getWhere().and("c_date", QueryType.LTE, cdate);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
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.ErpAccountIncomeExpense;
|
||||
import com.jeesite.modules.erp.dao.ErpAccountIncomeExpenseDao;
|
||||
|
||||
/**
|
||||
* 账户收支Service
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Service
|
||||
public class ErpAccountIncomeExpenseService extends CrudService<ErpAccountIncomeExpenseDao, ErpAccountIncomeExpense> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpAccountIncomeExpense 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpAccountIncomeExpense get(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
return super.get(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpAccountIncomeExpense 查询条件
|
||||
* @param erpAccountIncomeExpense page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpAccountIncomeExpense> findPage(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
return super.findPage(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpAccountIncomeExpense 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpAccountIncomeExpense> findList(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
return super.findList(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpAccountIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
super.save(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param erpAccountIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
super.updateStatus(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpAccountIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
erpAccountIncomeExpense.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
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.ErpCategoryFlow;
|
||||
import com.jeesite.modules.erp.dao.ErpCategoryFlowDao;
|
||||
|
||||
/**
|
||||
* erp_category_flowService
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@Service
|
||||
public class ErpCategoryFlowService extends CrudService<ErpCategoryFlowDao, ErpCategoryFlow> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpCategoryFlow 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpCategoryFlow get(ErpCategoryFlow erpCategoryFlow) {
|
||||
return super.get(erpCategoryFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpCategoryFlow 查询条件
|
||||
* @param erpCategoryFlow page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpCategoryFlow> findPage(ErpCategoryFlow erpCategoryFlow) {
|
||||
return super.findPage(erpCategoryFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpCategoryFlow 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpCategoryFlow> findList(ErpCategoryFlow erpCategoryFlow) {
|
||||
return super.findList(erpCategoryFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpCategoryFlow 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpCategoryFlow erpCategoryFlow) {
|
||||
super.save(erpCategoryFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param erpCategoryFlow 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpCategoryFlow erpCategoryFlow) {
|
||||
super.updateStatus(erpCategoryFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpCategoryFlow 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpCategoryFlow erpCategoryFlow) {
|
||||
erpCategoryFlow.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpCategoryFlow);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
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.ErpCategoryIncomeExpense;
|
||||
import com.jeesite.modules.erp.dao.ErpCategoryIncomeExpenseDao;
|
||||
|
||||
/**
|
||||
* 类别收支Service
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Service
|
||||
public class ErpCategoryIncomeExpenseService extends CrudService<ErpCategoryIncomeExpenseDao, ErpCategoryIncomeExpense> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpCategoryIncomeExpense 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpCategoryIncomeExpense get(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
return super.get(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpCategoryIncomeExpense 查询条件
|
||||
* @param erpCategoryIncomeExpense page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpCategoryIncomeExpense> findPage(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
return super.findPage(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpCategoryIncomeExpense 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpCategoryIncomeExpense> findList(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
return super.findList(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpCategoryIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
super.save(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param erpCategoryIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
super.updateStatus(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpCategoryIncomeExpense 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
erpCategoryIncomeExpense.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
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.ErpExpInc;
|
||||
import com.jeesite.modules.erp.dao.ErpExpIncDao;
|
||||
|
||||
/**
|
||||
* 收支信息Service
|
||||
* @author gaoxq
|
||||
* @version 2025-12-10
|
||||
*/
|
||||
@Service
|
||||
public class ErpExpIncService extends CrudService<ErpExpIncDao, ErpExpInc> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpExpInc 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpExpInc get(ErpExpInc erpExpInc) {
|
||||
return super.get(erpExpInc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpExpInc 查询条件
|
||||
* @param erpExpInc page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpExpInc> findPage(ErpExpInc erpExpInc) {
|
||||
return super.findPage(erpExpInc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpExpInc 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpExpInc> findList(ErpExpInc erpExpInc) {
|
||||
return super.findList(erpExpInc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpExpInc 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpExpInc erpExpInc) {
|
||||
super.save(erpExpInc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param erpExpInc 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpExpInc erpExpInc) {
|
||||
super.updateStatus(erpExpInc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpExpInc 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpExpInc erpExpInc) {
|
||||
super.delete(erpExpInc);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
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.ErpIncExpRatio;
|
||||
import com.jeesite.modules.erp.dao.ErpIncExpRatioDao;
|
||||
|
||||
/**
|
||||
* 支出占比Service
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@Service
|
||||
public class ErpIncExpRatioService extends CrudService<ErpIncExpRatioDao, ErpIncExpRatio> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpIncExpRatio 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpIncExpRatio get(ErpIncExpRatio erpIncExpRatio) {
|
||||
return super.get(erpIncExpRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpIncExpRatio 查询条件
|
||||
* @param erpIncExpRatio page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpIncExpRatio> findPage(ErpIncExpRatio erpIncExpRatio) {
|
||||
return super.findPage(erpIncExpRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpIncExpRatio 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpIncExpRatio> findList(ErpIncExpRatio erpIncExpRatio) {
|
||||
return super.findList(erpIncExpRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpIncExpRatio 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpIncExpRatio erpIncExpRatio) {
|
||||
super.save(erpIncExpRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param erpIncExpRatio 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpIncExpRatio erpIncExpRatio) {
|
||||
super.updateStatus(erpIncExpRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpIncExpRatio 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpIncExpRatio erpIncExpRatio) {
|
||||
erpIncExpRatio.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpIncExpRatio);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
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.ErpIncomeExpenseCycle;
|
||||
import com.jeesite.modules.erp.dao.ErpIncomeExpenseCycleDao;
|
||||
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-02-17
|
||||
*/
|
||||
@Service
|
||||
public class ErpIncomeExpenseCycleService extends CrudService<ErpIncomeExpenseCycleDao, ErpIncomeExpenseCycle> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpIncomeExpenseCycle 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpIncomeExpenseCycle get(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
return super.get(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpIncomeExpenseCycle 查询条件
|
||||
* @param erpIncomeExpenseCycle page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpIncomeExpenseCycle> findPage(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
return super.findPage(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpIncomeExpenseCycle 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpIncomeExpenseCycle> findList(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
return super.findList(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpIncomeExpenseCycle 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
super.save(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* @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<ErpIncomeExpenseCycle> list = ei.getDataList(ErpIncomeExpenseCycle.class);
|
||||
for (ErpIncomeExpenseCycle erpIncomeExpenseCycle : list) {
|
||||
try{
|
||||
ValidatorUtils.validateWithException(erpIncomeExpenseCycle);
|
||||
this.save(erpIncomeExpenseCycle);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、编号 " + erpIncomeExpenseCycle.getId() + " 导入成功");
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、编号 " + erpIncomeExpenseCycle.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 erpIncomeExpenseCycle 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
super.updateStatus(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpIncomeExpenseCycle 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
erpIncomeExpenseCycle.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
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.ErpSummaryAll;
|
||||
import com.jeesite.modules.erp.dao.ErpSummaryAllDao;
|
||||
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 2025-12-09
|
||||
*/
|
||||
@Service
|
||||
public class ErpSummaryAllService extends CrudService<ErpSummaryAllDao, ErpSummaryAll> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param erpSummaryAll 主键
|
||||
*/
|
||||
@Override
|
||||
public ErpSummaryAll get(ErpSummaryAll erpSummaryAll) {
|
||||
return super.get(erpSummaryAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param erpSummaryAll 查询条件
|
||||
* @param erpSummaryAll page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<ErpSummaryAll> findPage(ErpSummaryAll erpSummaryAll) {
|
||||
return super.findPage(erpSummaryAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param erpSummaryAll 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<ErpSummaryAll> findList(ErpSummaryAll erpSummaryAll) {
|
||||
return super.findList(erpSummaryAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param erpSummaryAll 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(ErpSummaryAll erpSummaryAll) {
|
||||
super.save(erpSummaryAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* @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<ErpSummaryAll> list = ei.getDataList(ErpSummaryAll.class);
|
||||
for (ErpSummaryAll erpSummaryAll : list) {
|
||||
try{
|
||||
ValidatorUtils.validateWithException(erpSummaryAll);
|
||||
this.save(erpSummaryAll);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、编号 " + erpSummaryAll.getId() + " 导入成功");
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、编号 " + erpSummaryAll.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 erpSummaryAll 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(ErpSummaryAll erpSummaryAll) {
|
||||
super.updateStatus(erpSummaryAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param erpSummaryAll 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(ErpSummaryAll erpSummaryAll) {
|
||||
erpSummaryAll.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(erpSummaryAll);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
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.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.erp.entity.ErpAccountIncomeExpense;
|
||||
import com.jeesite.modules.erp.service.ErpAccountIncomeExpenseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户收支Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/accountIncomeExpense")
|
||||
public class ErpAccountIncomeExpenseController extends BaseController {
|
||||
|
||||
private final ErpAccountIncomeExpenseService erpAccountIncomeExpenseService;
|
||||
|
||||
public ErpAccountIncomeExpenseController(ErpAccountIncomeExpenseService erpAccountIncomeExpenseService) {
|
||||
this.erpAccountIncomeExpenseService = erpAccountIncomeExpenseService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpAccountIncomeExpense get(String accountId, String yearDate, boolean isNewRecord) {
|
||||
ErpAccountIncomeExpense erpAccountIncomeExpense = new ErpAccountIncomeExpense();
|
||||
erpAccountIncomeExpense.setAccountId(accountId);
|
||||
erpAccountIncomeExpense.setYearDate(yearDate);
|
||||
erpAccountIncomeExpense.setIsNewRecord(isNewRecord);
|
||||
return erpAccountIncomeExpenseService.getAndValid(erpAccountIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpAccountIncomeExpense erpAccountIncomeExpense, Model model) {
|
||||
model.addAttribute("erpAccountIncomeExpense", erpAccountIncomeExpense);
|
||||
return "modules/erp/erpAccountIncomeExpenseList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpAccountIncomeExpense> listData(ErpAccountIncomeExpense erpAccountIncomeExpense, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpAccountIncomeExpense.setPage(new Page<>(request, response));
|
||||
Page<ErpAccountIncomeExpense> page = erpAccountIncomeExpenseService.findPage(erpAccountIncomeExpense);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpAccountIncomeExpense erpAccountIncomeExpense, Model model) {
|
||||
model.addAttribute("erpAccountIncomeExpense", erpAccountIncomeExpense);
|
||||
return "modules/erp/erpAccountIncomeExpenseForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
erpAccountIncomeExpenseService.save(erpAccountIncomeExpense);
|
||||
return renderResult(Global.TRUE, text("保存账户收支成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
erpAccountIncomeExpenseService.delete(erpAccountIncomeExpense);
|
||||
return renderResult(Global.TRUE, text("删除账户收支成功!"));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpAccountIncomeExpense> listAll(ErpAccountIncomeExpense erpAccountIncomeExpense) {
|
||||
return erpAccountIncomeExpenseService.findList(erpAccountIncomeExpense);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
import com.jeesite.modules.app.utils.vDate;
|
||||
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.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.erp.entity.ErpCategoryFlow;
|
||||
import com.jeesite.modules.erp.service.ErpCategoryFlowService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* erp_category_flowController
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/categoryFlow")
|
||||
public class ErpCategoryFlowController extends BaseController {
|
||||
|
||||
private final ErpCategoryFlowService erpCategoryFlowService;
|
||||
|
||||
public ErpCategoryFlowController(ErpCategoryFlowService erpCategoryFlowService) {
|
||||
this.erpCategoryFlowService = erpCategoryFlowService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpCategoryFlow get(Long id, boolean isNewRecord) {
|
||||
return erpCategoryFlowService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("erp:categoryFlow:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpCategoryFlow erpCategoryFlow, Model model) {
|
||||
model.addAttribute("erpCategoryFlow", erpCategoryFlow);
|
||||
return "modules/erp/erpCategoryFlowList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("erp:categoryFlow:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpCategoryFlow> listData(ErpCategoryFlow erpCategoryFlow, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpCategoryFlow.setPage(new Page<>(request, response));
|
||||
Page<ErpCategoryFlow> page = erpCategoryFlowService.findPage(erpCategoryFlow);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("erp:categoryFlow:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpCategoryFlow erpCategoryFlow, Model model) {
|
||||
model.addAttribute("erpCategoryFlow", erpCategoryFlow);
|
||||
return "modules/erp/erpCategoryFlowForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("erp:categoryFlow:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpCategoryFlow erpCategoryFlow) {
|
||||
erpCategoryFlowService.save(erpCategoryFlow);
|
||||
return renderResult(Global.TRUE, text("保存用途信息成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("erp:categoryFlow:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpCategoryFlow erpCategoryFlow) {
|
||||
erpCategoryFlowService.delete(erpCategoryFlow);
|
||||
return renderResult(Global.TRUE, text("删除用途信息成功!"));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpCategoryFlow> listAll(ErpCategoryFlow erpCategoryFlow) {
|
||||
erpCategoryFlow.setStatDate_gte(vDate.calculateStartCycleCode(erpCategoryFlow.getCycleType()));
|
||||
return erpCategoryFlowService.findList(erpCategoryFlow);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
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.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.erp.entity.ErpCategoryIncomeExpense;
|
||||
import com.jeesite.modules.erp.service.ErpCategoryIncomeExpenseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类别收支Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/categoryIncomeExpense")
|
||||
public class ErpCategoryIncomeExpenseController extends BaseController {
|
||||
|
||||
private final ErpCategoryIncomeExpenseService erpCategoryIncomeExpenseService;
|
||||
|
||||
public ErpCategoryIncomeExpenseController(ErpCategoryIncomeExpenseService erpCategoryIncomeExpenseService) {
|
||||
this.erpCategoryIncomeExpenseService = erpCategoryIncomeExpenseService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpCategoryIncomeExpense get(String categoryId, String yearDate, boolean isNewRecord) {
|
||||
ErpCategoryIncomeExpense erpCategoryIncomeExpense = new ErpCategoryIncomeExpense();
|
||||
erpCategoryIncomeExpense.setCategoryId(categoryId);
|
||||
erpCategoryIncomeExpense.setYearDate(yearDate);
|
||||
erpCategoryIncomeExpense.setIsNewRecord(isNewRecord);
|
||||
return erpCategoryIncomeExpenseService.getAndValid(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpCategoryIncomeExpense erpCategoryIncomeExpense, Model model) {
|
||||
model.addAttribute("erpCategoryIncomeExpense", erpCategoryIncomeExpense);
|
||||
return "modules/erp/erpCategoryIncomeExpenseList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpCategoryIncomeExpense> listData(ErpCategoryIncomeExpense erpCategoryIncomeExpense, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpCategoryIncomeExpense.setPage(new Page<>(request, response));
|
||||
Page<ErpCategoryIncomeExpense> page = erpCategoryIncomeExpenseService.findPage(erpCategoryIncomeExpense);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpCategoryIncomeExpense erpCategoryIncomeExpense, Model model) {
|
||||
model.addAttribute("erpCategoryIncomeExpense", erpCategoryIncomeExpense);
|
||||
return "modules/erp/erpCategoryIncomeExpenseForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
erpCategoryIncomeExpenseService.save(erpCategoryIncomeExpense);
|
||||
return renderResult(Global.TRUE, text("保存类别收支成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
erpCategoryIncomeExpenseService.delete(erpCategoryIncomeExpense);
|
||||
return renderResult(Global.TRUE, text("删除类别收支成功!"));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpCategoryIncomeExpense> listAll(ErpCategoryIncomeExpense erpCategoryIncomeExpense) {
|
||||
return erpCategoryIncomeExpenseService.findList(erpCategoryIncomeExpense);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
import com.jeesite.modules.app.utils.vDate;
|
||||
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.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.erp.entity.ErpExpInc;
|
||||
import com.jeesite.modules.erp.service.ErpExpIncService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收支信息Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-10
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/expInc")
|
||||
public class ErpExpIncController extends BaseController {
|
||||
|
||||
private final ErpExpIncService erpExpIncService;
|
||||
|
||||
public ErpExpIncController(ErpExpIncService erpExpIncService) {
|
||||
this.erpExpIncService = erpExpIncService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpExpInc get(String id, boolean isNewRecord) {
|
||||
return erpExpIncService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("erp:expInc:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpExpInc erpExpInc, Model model) {
|
||||
model.addAttribute("erpExpInc", erpExpInc);
|
||||
return "modules/erp/erpExpIncList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("erp:expInc:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpExpInc> listData(ErpExpInc erpExpInc, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpExpInc.setPage(new Page<>(request, response));
|
||||
Page<ErpExpInc> page = erpExpIncService.findPage(erpExpInc);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("erp:expInc:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpExpInc erpExpInc, Model model) {
|
||||
model.addAttribute("erpExpInc", erpExpInc);
|
||||
return "modules/erp/erpExpIncForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("erp:expInc:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpExpInc erpExpInc) {
|
||||
erpExpIncService.save(erpExpInc);
|
||||
return renderResult(Global.TRUE, text("保存收支信息成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("erp:expInc:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpExpInc erpExpInc) {
|
||||
erpExpIncService.delete(erpExpInc);
|
||||
return renderResult(Global.TRUE, text("删除收支信息成功!"));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpExpInc> listAll(ErpExpInc erpExpInc) {
|
||||
erpExpInc.setStatDate_gte(vDate.calculateStartCycleCode(erpExpInc.getCycleType()));
|
||||
return erpExpIncService.findList(erpExpInc);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
import com.jeesite.modules.app.utils.vDate;
|
||||
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.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.erp.entity.ErpIncExpRatio;
|
||||
import com.jeesite.modules.erp.service.ErpIncExpRatioService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支出占比Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-13
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/incExpRatio")
|
||||
public class ErpIncExpRatioController extends BaseController {
|
||||
|
||||
private final ErpIncExpRatioService erpIncExpRatioService;
|
||||
|
||||
public ErpIncExpRatioController(ErpIncExpRatioService erpIncExpRatioService) {
|
||||
this.erpIncExpRatioService = erpIncExpRatioService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpIncExpRatio get(Long id, boolean isNewRecord) {
|
||||
return erpIncExpRatioService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("erp:incExpRatio:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpIncExpRatio erpIncExpRatio, Model model) {
|
||||
model.addAttribute("erpIncExpRatio", erpIncExpRatio);
|
||||
return "modules/erp/erpIncExpRatioList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("erp:incExpRatio:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpIncExpRatio> listData(ErpIncExpRatio erpIncExpRatio, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpIncExpRatio.setPage(new Page<>(request, response));
|
||||
Page<ErpIncExpRatio> page = erpIncExpRatioService.findPage(erpIncExpRatio);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("erp:incExpRatio:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpIncExpRatio erpIncExpRatio, Model model) {
|
||||
model.addAttribute("erpIncExpRatio", erpIncExpRatio);
|
||||
return "modules/erp/erpIncExpRatioForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("erp:incExpRatio:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpIncExpRatio erpIncExpRatio) {
|
||||
erpIncExpRatioService.save(erpIncExpRatio);
|
||||
return renderResult(Global.TRUE, text("保存支出占比成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("erp:incExpRatio:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpIncExpRatio erpIncExpRatio) {
|
||||
erpIncExpRatioService.delete(erpIncExpRatio);
|
||||
return renderResult(Global.TRUE, text("删除支出占比成功!"));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpIncExpRatio> listAll(ErpIncExpRatio erpIncExpRatio) {
|
||||
erpIncExpRatio.setStatDate_gte(vDate.calculateStartCycleCode(erpIncExpRatio.getCycleType()));
|
||||
return erpIncExpRatioService.findList(erpIncExpRatio);
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
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.ErpIncomeExpenseCycle;
|
||||
import com.jeesite.modules.erp.service.ErpIncomeExpenseCycleService;
|
||||
|
||||
/**
|
||||
* 年度收支信息Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-17
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/incomeExpenseCycle")
|
||||
public class ErpIncomeExpenseCycleController extends BaseController {
|
||||
|
||||
private final ErpIncomeExpenseCycleService erpIncomeExpenseCycleService;
|
||||
|
||||
public ErpIncomeExpenseCycleController(ErpIncomeExpenseCycleService erpIncomeExpenseCycleService) {
|
||||
this.erpIncomeExpenseCycleService = erpIncomeExpenseCycleService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpIncomeExpenseCycle get(String yearDate, String monthDate, boolean isNewRecord) {
|
||||
ErpIncomeExpenseCycle erpIncomeExpenseCycle = new ErpIncomeExpenseCycle();
|
||||
erpIncomeExpenseCycle.setYearDate(yearDate);
|
||||
erpIncomeExpenseCycle.setMonthDate(monthDate);
|
||||
erpIncomeExpenseCycle.setIsNewRecord(isNewRecord);
|
||||
return erpIncomeExpenseCycleService.getAndValid(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpIncomeExpenseCycle erpIncomeExpenseCycle, Model model) {
|
||||
model.addAttribute("erpIncomeExpenseCycle", erpIncomeExpenseCycle);
|
||||
return "modules/erp/erpIncomeExpenseCycleList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpIncomeExpenseCycle> listData(ErpIncomeExpenseCycle erpIncomeExpenseCycle, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpIncomeExpenseCycle.setPage(new Page<>(request, response));
|
||||
Page<ErpIncomeExpenseCycle> page = erpIncomeExpenseCycleService.findPage(erpIncomeExpenseCycle);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpIncomeExpenseCycle erpIncomeExpenseCycle, Model model) {
|
||||
model.addAttribute("erpIncomeExpenseCycle", erpIncomeExpenseCycle);
|
||||
return "modules/erp/erpIncomeExpenseCycleForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
erpIncomeExpenseCycleService.save(erpIncomeExpenseCycle);
|
||||
return renderResult(Global.TRUE, text("保存年度收支信息成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(ErpIncomeExpenseCycle erpIncomeExpenseCycle, HttpServletResponse response) {
|
||||
List<ErpIncomeExpenseCycle> list = erpIncomeExpenseCycleService.findList(erpIncomeExpenseCycle);
|
||||
String fileName = "年度收支信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("年度收支信息", ErpIncomeExpenseCycle.class)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@RequestMapping(value = "importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ErpIncomeExpenseCycle erpIncomeExpenseCycle = new ErpIncomeExpenseCycle();
|
||||
List<ErpIncomeExpenseCycle> list = ListUtils.newArrayList(erpIncomeExpenseCycle);
|
||||
String fileName = "年度收支信息模板.xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("年度收支信息", ErpIncomeExpenseCycle.class, Type.IMPORT)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping(value = "importData")
|
||||
public String importData(MultipartFile file) {
|
||||
try {
|
||||
String message = erpIncomeExpenseCycleService.importData(file);
|
||||
return renderResult(Global.TRUE, "posfull:" + message);
|
||||
} catch (Exception ex) {
|
||||
return renderResult(Global.FALSE, "posfull:" + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
erpIncomeExpenseCycleService.delete(erpIncomeExpenseCycle);
|
||||
return renderResult(Global.TRUE, text("删除年度收支信息成功!"));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpIncomeExpenseCycle> listAll(ErpIncomeExpenseCycle erpIncomeExpenseCycle) {
|
||||
return erpIncomeExpenseCycleService.findList(erpIncomeExpenseCycle);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
package com.jeesite.modules.erp.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jeesite.modules.app.utils.vDate;
|
||||
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.ErpSummaryAll;
|
||||
import com.jeesite.modules.erp.service.ErpSummaryAllService;
|
||||
|
||||
/**
|
||||
* 汇总信息Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-12-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/erp/summaryAll")
|
||||
public class ErpSummaryAllController extends BaseController {
|
||||
|
||||
private final ErpSummaryAllService erpSummaryAllService;
|
||||
|
||||
public ErpSummaryAllController(ErpSummaryAllService erpSummaryAllService) {
|
||||
this.erpSummaryAllService = erpSummaryAllService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ErpSummaryAll get(String id, boolean isNewRecord) {
|
||||
return erpSummaryAllService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ErpSummaryAll erpSummaryAll, Model model) {
|
||||
model.addAttribute("erpSummaryAll", erpSummaryAll);
|
||||
return "modules/erp/erpSummaryAllList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<ErpSummaryAll> listData(ErpSummaryAll erpSummaryAll, HttpServletRequest request, HttpServletResponse response) {
|
||||
erpSummaryAll.setPage(new Page<>(request, response));
|
||||
Page<ErpSummaryAll> page = erpSummaryAllService.findPage(erpSummaryAll);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(ErpSummaryAll erpSummaryAll, Model model) {
|
||||
model.addAttribute("erpSummaryAll", erpSummaryAll);
|
||||
return "modules/erp/erpSummaryAllForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ErpSummaryAll erpSummaryAll) {
|
||||
erpSummaryAllService.save(erpSummaryAll);
|
||||
return renderResult(Global.TRUE, text("保存汇总信息成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:view")
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(ErpSummaryAll erpSummaryAll, HttpServletResponse response) {
|
||||
List<ErpSummaryAll> list = erpSummaryAllService.findList(erpSummaryAll);
|
||||
String fileName = "汇总信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("汇总信息", ErpSummaryAll.class)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:view")
|
||||
@RequestMapping(value = "importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ErpSummaryAll erpSummaryAll = new ErpSummaryAll();
|
||||
List<ErpSummaryAll> list = ListUtils.newArrayList(erpSummaryAll);
|
||||
String fileName = "汇总信息模板.xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("汇总信息", ErpSummaryAll.class, Type.IMPORT)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequiresPermissions("erp:summaryAll:edit")
|
||||
@PostMapping(value = "importData")
|
||||
public String importData(MultipartFile file) {
|
||||
try {
|
||||
String message = erpSummaryAllService.importData(file);
|
||||
return renderResult(Global.TRUE, "posfull:" + message);
|
||||
} catch (Exception ex) {
|
||||
return renderResult(Global.FALSE, "posfull:" + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("erp:summaryAll:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(ErpSummaryAll erpSummaryAll) {
|
||||
erpSummaryAllService.delete(erpSummaryAll);
|
||||
return renderResult(Global.TRUE, text("删除汇总信息成功!"));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<ErpSummaryAll> listAll(ErpSummaryAll erpSummaryAll) {
|
||||
erpSummaryAll.setCdate_gte(vDate.calculateStartCycleCode(erpSummaryAll.getCycleType()));
|
||||
return erpSummaryAllService.findList(erpSummaryAll);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user