| | |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''"> |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount} |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | <if test="openCount != null"> |
| | | > #{openCount} |
| | | </if> |
| | | ) > #{openCount} |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | (SELECT COUNT(*) |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''"> |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount} |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null"> |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | <if test="openCount != null"> |
| | | > #{openCount} |
| | | </if> |
| | | ) > #{openCount} |
| | | </where> |
| | | ORDER BY cli.id |
| | | <trim prefix="limit "> |
| | |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''"> |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount} |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | <if test="openCount != null"> |
| | | < #{openCount} |
| | | ) < #{openCount} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''"> |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount} |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | <if test="openCount != null"> |
| | | < #{openCount} |