fix(list): 各业务台账列表按业务日期倒序排列
- 打卡签到:按打卡日期倒序
- 销售出库(财务台账按发货日期、出库台账按出库时间)倒序
- 开票申请、销项发票、收款单、进项发票、付款申请、付款单倒序
- 对账单按对账月份 + id 倒序
Co-Authored-By: Claude Code <noreply@anthropic.com>
| | |
| | | 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 |
| | |
| | | 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" |
| | |
| | | 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"> |
| | |
| | | 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, |
| | |
| | | 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"> |
| | |
| | | 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 |
| | |
| | | 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> |
| | |
| | | and personal_attendance_records.date >= #{params.date} |
| | | and personal_attendance_records.date < 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> |
| | | |
| | | <!-- 查询指定日期有排班(非请假)但没有考勤记录的在职员工,没排班视为休息不标记缺勤 --> |
| | |
| | | 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 |
| | |
| | | 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"> |
| | |
| | | <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> |