fix: 修改库存查询排序逻辑,确保按最大创建时间和创建时间升序排列
| | |
| | | unit, |
| | | product_name, |
| | | product_id |
| | | order by combined.create_time desc |
| | | order by MAX(combined.create_time) desc |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | |
| | | left join product p on pm.product_id = p.id |
| | | where si.product_model_id = #{productModelId} |
| | | and si.qualitity > IFNULL(sd.qualitity, 0) |
| | | order by si.create_time asc |
| | | </select> |
| | | |
| | | <select id="getBatchNoQty" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |