fix(mapper): 修复多个查询的排序和字段映射问题
- 在采购发票查询中添加 purchase_contract_number 字段到 GROUP BY 子句并按 sales_contract_no 降序排列
- 为个人考勤记录查询添加按 id 降序排列的排序规则
- 为生产产品主表查询修正 quantity 字段映射为 finished_num 并添加按 id 降序排列
- 为产品工单查询添加按 id 降序排列的排序规则
- 为库存盘点查询添加按 update_time 降序排列的排序规则
| | |
| | | <if test="c.version != null"> |
| | | and version = #{c.version} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | <select id="getById" resultType="com.ruoyi.production.dto.ProductBomDto"> |
| | | select pb.*, |
| | |
| | | pm.unit, |
| | | p.product_name, |
| | | po.nps_no |
| | | order by pwo.id desc |
| | | </select> |
| | | <select id="selectWorkOrderStartStats" resultType="com.ruoyi.production.dto.ProductWorkOrderDto"> |
| | | SELECT |
| | |
| | | pm.model as product_model_name, |
| | | pm.unit, |
| | | slpa.process, |
| | | ppo.quantity, |
| | | slpa.finished_num as quantity, |
| | | slpa.work_hours, |
| | | slpa.work_hours * slpa.finished_num AS wages |
| | | FROM |
| | |
| | | and slpa.scheduling_date < date_add(#{ew.entryDateEnd}, INTERVAL 1 DAY) |
| | | </if> |
| | | </where> |
| | | order by ppm.id desc |
| | | </select> |
| | | <select id="listMain" resultType="java.lang.Long"> |
| | | SELECT ppm.id FROM production_product_main ppm |
| | |
| | | GROUP BY |
| | | sl.sales_contract_no, |
| | | sl.customer_name, |
| | | sl.contract_amount |
| | | sl.contract_amount, |
| | | pl.purchase_contract_number |
| | | ORDER BY |
| | | sl.sales_contract_no |
| | | sl.sales_contract_no desc |
| | | </select> |
| | | <select id="listVat" resultType="com.ruoyi.purchase.dto.VatDto"> |
| | | select * |
| | |
| | | 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 |
| | | </select> |
| | | |
| | | <!-- 查询指定日期没有考勤记录的在职员工(在指定时间之前入职的) --> |
| | |
| | | WHERE par.staff_on_job_id = soj.id |
| | | AND par.date = #{date} |
| | | ) |
| | | ORDER BY soj.id |
| | | </select> |
| | | |
| | | <!-- 检查指定员工在指定日期是否已存在考勤记录 --> |
| | |
| | | <if test="ew.productName != null and ew.productName !=''"> |
| | | and p.product_name like concat('%',#{ew.productName},'%') |
| | | </if> |
| | | order by si.update_time desc |
| | | </select> |
| | | |
| | | <select id="pageListCombinedStockInventory" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |