| | |
| | | communityId,t.machine_name,t.machine_name machineName |
| | | from maintainance_plan_machine t |
| | | where 1 =1 |
| | | and t.status_cd = '0' |
| | | <if test="mpmId !=null and mpmId != ''"> |
| | | and t.mpm_id= #{mpmId} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="planId !=null and planId != ''"> |
| | | and t.plan_id= #{planId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | select count(1) count |
| | | from maintainance_plan_machine t |
| | | where 1 =1 |
| | | and t.status_cd = '0' |
| | | <if test="mpmId !=null and mpmId != ''"> |
| | | and t.mpm_id= #{mpmId} |
| | | </if> |
| | |
| | | <if test="planId !=null and planId != ''"> |
| | | and t.plan_id= #{planId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询保养设备信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryMaintainancePlanMachinesGroupCount" parameterType="Map" resultType="Map"> |
| | | select t.plan_id planId,count(1) machineCount |
| | | from maintainance_plan_machine t |
| | | where 1 =1 |
| | | and t.status_cd = 0 |
| | | |
| | | <if test="planIds !=null "> |
| | | and t.plan_id in |
| | | <foreach collection="planIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | group by t.plan_id |
| | | |
| | | </select> |
| | | |
| | | </mapper> |