小程序板件列表查询短编号数据重复修正

This commit is contained in:
gaoqr
2026-04-14 09:34:04 +08:00
parent 68dbc0fe79
commit aa49b47d1f
@@ -780,7 +780,7 @@
op.thickness, op.thickness,
ob.name AS bodyName, ob.name AS bodyName,
ob.room_name AS roomName, ob.room_name AS roomName,
ob.id AS bodyId, t.body_id AS bodyId,
t.cad_view_id t.cad_view_id
<if test="componentIds != null and componentIds.size() > 0"> <if test="componentIds != null and componentIds.size() > 0">
, t.comp_id , t.comp_id
@@ -788,6 +788,7 @@
FROM order_plate op FROM order_plate op
JOIN ( JOIN (
SELECT plate_id, SELECT plate_id,
body_id,
MIN(cad_view_id) AS cad_view_id MIN(cad_view_id) AS cad_view_id
<if test="componentIds != null and componentIds.size() > 0"> <if test="componentIds != null and componentIds.size() > 0">
, MIN(comp_id) AS comp_id , MIN(comp_id) AS comp_id
@@ -806,9 +807,9 @@
#{componentId} #{componentId}
</foreach> </foreach>
</if> </if>
GROUP BY plate_id GROUP BY body_id, plate_id
) t ON t.plate_id = op.id ) t ON t.plate_id = op.id
JOIN order_body ob ON ob.order_id = op.order_id JOIN order_body ob ON ob.id = t.body_id
<if test="bodyIds != null and bodyIds.size() > 0"> <if test="bodyIds != null and bodyIds.size() > 0">
AND ob.id IN AND ob.id IN
<foreach item="bodyId" collection="bodyIds" open="(" separator="," close=")"> <foreach item="bodyId" collection="bodyIds" open="(" separator="," close=")">