perf(wms): 优化钢卷质量改判原因查询性能

- 在WmsCoilQualityRejudgeMapper中新增原生SQL查询方法selectMapsBySql
- 添加对应的XML映射配置执行动态SQL查询
- 将原有的Java端分组逻辑改为数据库端SQL聚合查询
- 使用内连接和子查询直接获取每个钢卷的最新改判原因
- 避免大量数据传输和客户端分组处理,提升查询效率
This commit is contained in:
2026-05-06 18:05:15 +08:00
parent bb97d0d2a7
commit d71b1c4959
3 changed files with 37 additions and 20 deletions

View File

@@ -18,5 +18,9 @@
<result property="remark" column="remark"/>
</resultMap>
<!-- 执行原生SQL查询返回Map列表 -->
<select id="selectMapsBySql" resultType="java.util.HashMap">
${sql}
</select>
</mapper>