|
|
|
@ -134,6 +134,15 @@ |
|
|
|
<if test="query.maintenanceStatus != null"> |
|
|
|
<if test="query.maintenanceStatus != null"> |
|
|
|
AND em.maintenance_status = #{query.maintenanceStatus} |
|
|
|
AND em.maintenance_status = #{query.maintenanceStatus} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="query.pleuripotent != null and query.pleuripotent"> |
|
|
|
|
|
|
|
AND ph.id IN ( |
|
|
|
|
|
|
|
SELECT em_inner.ph_id |
|
|
|
|
|
|
|
FROM MES_EQUIPMENT_MAINTENANCE em_inner |
|
|
|
|
|
|
|
WHERE em_inner.is_deleted = 0 |
|
|
|
|
|
|
|
GROUP BY em_inner.ph_id |
|
|
|
|
|
|
|
HAVING COUNT(em_inner.id) >= 2 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
</if> |
|
|
|
ORDER BY ph.create_time DESC, em.equipment_date DESC |
|
|
|
ORDER BY ph.create_time DESC, em.equipment_date DESC |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|