|  |  | 
 |  |  |         io.failure_factors AS result | 
 |  |  |     FROM ir_intake_operate io | 
 |  |  |         inner JOIN ir_group_intake gi ON gi.intake_id = io.intake_id | 
 |  |  |     WHERE io.plan_id = #{planId} AND gi.group_id = #{groupId}; | 
 |  |  |     WHERE io.plan_id = #{planId} AND gi.group_id = #{groupId} AND operate_type = 1; | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据计划ID获取取水口命令发布失败数量,灌溉计划详情页使用--> | 
 |  |  |   <select id="getFailureCount" resultType="java.lang.Integer"> | 
 |  |  |     SELECT | 
 |  |  |       COUNT(1) AS failureCount | 
 |  |  |     FROM ir_intake_operate | 
 |  |  |     WHERE operate_type = 1 AND command_result != 1 AND plan_id = #{planId} | 
 |  |  |   </select> | 
 |  |  | </mapper> |