gaoluyang
2026-10-28 737bbdc3acf3796f162592e6dc804d26a7d6c0f4
fix(list): 各业务台账列表按业务日期倒序排列

- 打卡签到:按打卡日期倒序
- 销售出库(财务台账按发货日期、出库台账按出库时间)倒序
- 开票申请、销项发票、收款单、进项发票、付款申请、付款单倒序
- 对账单按对账月份 + id 倒序

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改9个文件
22 ■■■■■ 文件已修改
src/main/resources/mapper/account/AccountStatementMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/purchase/AccountPurchaseInvoiceMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/sales/AccountInvoiceApplicationMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/sales/AccountSalesInvoiceMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/staff/PersonalAttendanceRecordsMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/stock/StockOutRecordMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/account/AccountStatementMapper.xml
@@ -43,7 +43,7 @@
                      AND lj.statement_month BETWEEN DATE_FORMAT(#{req.startDate}, '%Y-%m') AND DATE_FORMAT(#{req.endDate}, '%Y-%m'))
                  )
            </if>
    ORDER BY lj.statement_month DESC
    ORDER BY lj.statement_month DESC, lj.id DESC
    </select>
    <select id="selectVatDtoPage" resultType="com.ruoyi.purchase.dto.VatDto">
    SELECT
src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
@@ -44,7 +44,7 @@
                AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by A.id desc
        order by A.apply_date desc, A.id desc
    </select>
    <select id="getInboundBatchesBySupplier"
src/main/resources/mapper/account/purchase/AccountPurchaseInvoiceMapper.xml
@@ -42,7 +42,7 @@
                AND api.issue_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by api.id desc
        order by api.issue_date desc, api.id desc
    </select>
    <select id="getInboundBatchesBySupplier"
            resultType="com.ruoyi.account.bean.vo.purchase.PurchaseInboundVo">
src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml
@@ -44,7 +44,7 @@
                AND app.payment_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by app.id desc
        order by app.payment_date desc, app.id desc
    </select>
    <select id="selectPayment" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto">
        SELECT DATE_FORMAT(payment_date, #{dateFormat}) AS dateStr,
src/main/resources/mapper/account/sales/AccountInvoiceApplicationMapper.xml
@@ -25,7 +25,7 @@
                AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by A.id desc
        order by A.apply_date desc, A.id desc
    </select>
    <select id="getOutboundBatchesByCustomer"
            resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo">
src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml
@@ -45,7 +45,7 @@
                AND A.collection_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by A.id desc
        order by A.collection_date desc, A.id desc
    </select>
    <select id="existsByStockOutRecordId" resultType="java.lang.Boolean">
        SELECT COUNT(*) > 0
src/main/resources/mapper/account/sales/AccountSalesInvoiceMapper.xml
@@ -42,7 +42,7 @@
                AND asi.issue_date BETWEEN #{req.startDate} AND #{req.endDate}
            </if>
        </where>
        order by asi.id desc
        order by asi.issue_date desc, asi.id desc
    </select>
</mapper>
src/main/resources/mapper/staff/PersonalAttendanceRecordsMapper.xml
@@ -39,7 +39,7 @@
            and personal_attendance_records.date &gt;= #{params.date}
            and personal_attendance_records.date &lt; DATE_ADD(DATE(#{params.date}), INTERVAL 1 DAY)
        </if>
        order by personal_attendance_records.id desc
        order by personal_attendance_records.date desc, personal_attendance_records.id desc
    </select>
    <!-- 查询指定日期有排班(非请假)但没有考勤记录的在职员工,没排班视为休息不标记缺勤 -->
src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -62,7 +62,7 @@
                and p.id in (select id from product_tree)
            </if>
        </where>
        order by sor.id desc
        order by sor.create_time desc, sor.id desc
    </select>
    <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData">
        SELECT
@@ -89,7 +89,7 @@
                and sor.record_type = #{params.recordType}
            </if>
        </where>
        order by sor.id desc
        order by sor.create_time desc, sor.id desc
    </select>
    <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo">
@@ -123,6 +123,6 @@
        <if test="req.startDate != null and req.endDate != null">
            AND DATE(s.shipping_date) BETWEEN #{req.startDate} AND #{req.endDate}
        </if>
        order by sor.id DESC
        order by s.shipping_date desc, sor.id desc
    </select>
</mapper>