feat(oa): 添加收入支出类型字段并优化Excel导出显示

- 在GearOtherIncome实体类中新增type字段用于区分收入或支出
- 更新GearOtherIncomeBo业务对象,同步添加type字段- 修改GearOtherIncomeMapper.xml,增加type字段的映射配置- 在GearOtherIncomeServiceImpl中添加type字段的查询条件支持
- 优化GearOtherIncomeVo视图对象中Excel导出的列名显示
- 简化Excel表头名称,提升可读性:其他收入ID→ID、收入日期→日期等
- 在Excel导出配置中保留主键标识的转换表达式
- 统一金额相关字段在Excel中的展示格式
-为新添加的type字段在VO层添加注释说明用途
This commit is contained in:
2025-09-24 10:47:19 +08:00
parent 16ceaf052b
commit f278056c80
5 changed files with 15 additions and 6 deletions

View File

@@ -56,4 +56,7 @@ public class GearOtherIncome extends BaseEntity {
@TableLogic @TableLogic
private Integer delFlag; private Integer delFlag;
// 收入还是支出
private Integer type;
} }

View File

@@ -51,6 +51,8 @@ public class GearOtherIncomeBo extends BaseEntity {
* 收入来源 * 收入来源
*/ */
private String source; private String source;
// 收入还是支出
private Integer type;
/** /**
* 备注 * 备注

View File

@@ -29,14 +29,14 @@ public class GearOtherIncomeVo {
/** /**
* 其他收入ID主键 * 其他收入ID主键
*/ */
@ExcelProperty(value = "其他收入ID", converter = ExcelDictConvert.class) @ExcelProperty(value = "ID", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "=") @ExcelDictFormat(readConverterExp = "主键")
private Long otherIncomeId; private Long otherIncomeId;
/** /**
* 收入日期 * 收入日期
*/ */
@ExcelProperty(value = "收入日期") @ExcelProperty(value = "日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date incomeDate; private Date incomeDate;
@@ -44,19 +44,19 @@ public class GearOtherIncomeVo {
/** /**
* 收入类型 * 收入类型
*/ */
@ExcelProperty(value = "收入类型") @ExcelProperty(value = "类型")
private String incomeType; private String incomeType;
/** /**
* 收入金额 * 收入金额
*/ */
@ExcelProperty(value = "收入金额") @ExcelProperty(value = "金额")
private BigDecimal amount; private BigDecimal amount;
/** /**
* 收入来源 * 收入来源
*/ */
@ExcelProperty(value = "收入来源") @ExcelProperty(value = "来源")
private String source; private String source;
/** /**
@@ -65,5 +65,7 @@ public class GearOtherIncomeVo {
@ExcelProperty(value = "备注") @ExcelProperty(value = "备注")
private String remark; private String remark;
// 收入还是支出
private Integer type;
} }

View File

@@ -65,6 +65,7 @@ public class GearOtherIncomeServiceImpl implements IGearOtherIncomeService {
lqw.eq(StringUtils.isNotBlank(bo.getIncomeType()), GearOtherIncome::getIncomeType, bo.getIncomeType()); lqw.eq(StringUtils.isNotBlank(bo.getIncomeType()), GearOtherIncome::getIncomeType, bo.getIncomeType());
lqw.eq(bo.getAmount() != null, GearOtherIncome::getAmount, bo.getAmount()); lqw.eq(bo.getAmount() != null, GearOtherIncome::getAmount, bo.getAmount());
lqw.eq(StringUtils.isNotBlank(bo.getSource()), GearOtherIncome::getSource, bo.getSource()); lqw.eq(StringUtils.isNotBlank(bo.getSource()), GearOtherIncome::getSource, bo.getSource());
lqw.eq(bo.getType()!=null, GearOtherIncome::getType, bo.getType());
return lqw; return lqw;
} }

View File

@@ -10,6 +10,7 @@
<result property="incomeType" column="income_type"/> <result property="incomeType" column="income_type"/>
<result property="amount" column="amount"/> <result property="amount" column="amount"/>
<result property="source" column="source"/> <result property="source" column="source"/>
<result property="type" column="type"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>