buhuazhen
6 天以前 c60f4c46134cafd36f6531114f03828faf755166
feat(account): 增加支出和收入查询的模糊筛选条件

- 在AccountExpense查询中添加supplierName和invoiceNumber的模糊匹配条件
- 在AccountIncome查询中添加customerName和invoiceNumber的模糊匹配条件
- 保持日期筛选条件的完整性和格式统一
- 提升查询灵活性,支持多维度模糊过滤查询结果
已修改2个文件
13 ■■■■■ 文件已修改
src/main/resources/mapper/account/AccountExpenseMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/AccountIncomeMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/AccountExpenseMapper.xml
@@ -10,6 +10,12 @@
        <if test="accountExpense.entryDateStart != null and accountExpense.entryDateStart != '' ">
            AND expense_date &gt;= DATE_FORMAT(#{accountExpense.entryDateStart},'%Y-%m-%d')
        </if>
        <if test=" accountExpense.supplierName != null and accountExpense.supplierName != ''">
            AND supplier_name like CONCAT('%',#{accountExpense.supplierName},'%')
        </if>
        <if test=" accountExpense.invoiceNumber != null and accountExpense.invoiceNumber != ''">
            AND invoice_number like CONCAT('%',#{accountExpense.invoiceNumber},'%')
        </if>
        <if test="accountExpense.entryDateEnd != null and accountExpense.entryDateEnd != '' ">
            AND  expense_date &lt;= DATE_FORMAT(#{accountExpense.entryDateEnd},'%Y-%m-%d')
        </if>
src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -11,6 +11,13 @@
        <if test="accountIncome.entryDateStart != null and accountIncome.entryDateStart != '' ">
            AND income_date &gt;= DATE_FORMAT(#{accountIncome.entryDateStart},'%Y-%m-%d')
        </if>
        <if test="accountIncome.customerName != null and accountIncome.customerName != '' ">
            AND customer_name like CONCAT('%',#{accountIncome.customerName},'%')
        </if>
        <if test="accountIncome.invoiceNumber != null and accountIncome.invoiceNumber != '' ">
            AND invoice_number like CONCAT('%',#{accountIncome.invoiceNumber},'%')
        </if>
        <if test="accountIncome.entryDateEnd != null and accountIncome.entryDateEnd != '' ">
            AND income_date &lt;= DATE_FORMAT(#{accountIncome.entryDateEnd},'%Y-%m-%d')
        </if>