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

queryPlanStepByEquipCode查询错误

parent c719da47
...@@ -112,17 +112,25 @@ ...@@ -112,17 +112,25 @@
FROM FROM
c_plan_step_config c_plan_step_config
WHERE WHERE
id = ( type = (
SELECT DISTINCT SELECT
( t3.classify_id ) CONVERT(plan_type USING utf8mb4)
FROM FROM
f_equipment t1 c_plan_classify_tree
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 WHERE
t1.code = #{equipCode} id = (
ORDER BY t1.create_date desc SELECT DISTINCT
LIMIT 1 ( 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> </select>
</mapper> </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