fix(repository): 处理来料检验任务检查数量为空问题

- 修改SQL查询,使用COALESCE确保返回值不为null
- 避免inspection_qty为空时返回null导致的异常
- 提升后台数据查询的稳定性和准确性
This commit is contained in:
曹鹏飞 2026-04-29 11:40:19 +08:00
parent 998cbbb074
commit fbb1e90ae4
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@
</select> </select>
<select id="getInspectedQty" resultType="java.lang.Integer"> <select id="getInspectedQty" resultType="java.lang.Integer">
SELECT SUM(inspection_qty) SELECT COALESCE(SUM(inspection_qty),0)
FROM qms_incoming_inspection_task_record FROM qms_incoming_inspection_task_record
WHERE task_id=#{id} WHERE task_id=#{id}
</select> </select>