Commit 2a00ef4e authored by 李秀明's avatar 李秀明

queryPlanStepByEquipCode查询错误

parent c719da47
......@@ -112,17 +112,25 @@
FROM
c_plan_step_config
WHERE
id = (
SELECT DISTINCT
( t3.classify_id )
type = (
SELECT
CONVERT(plan_type USING utf8mb4)
FROM
f_equipment t1
LEFT JOIN c_plan_equipment t2 ON t2.fire_equipment_id = t1.id
LEFT JOIN c_plan_detail t3 ON t3.id = t2.plan_id
c_plan_classify_tree
WHERE
t1.code = #{equipCode}
ORDER BY t1.create_date desc
LIMIT 1
id = (
SELECT DISTINCT
( t3.classify_id )
FROM
f_equipment t1
LEFT JOIN c_plan_equipment t2 ON t2.fire_equipment_id = t1.id
LEFT JOIN c_plan_detail t3 ON t3.id = t2.plan_id
WHERE
t1.CODE = #{equipCode}
ORDER BY
t1.create_date DESC
LIMIT 1
)
)
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment