| | |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and openCount != null"> |
| | | (SELECT COUNT(*) |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | (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> |
| | | <if test="openCount != null"> |
| | | > #{openCount} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <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} |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | </where>) AS openCount |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and openCount != null"> |
| | | (SELECT COUNT(*) |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount} |
| | | (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> |
| | | <if test="openCount != null"> |
| | | > #{openCount} |
| | | </if> |
| | | </where> |
| | | ORDER BY cli.id |
| | |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and openCount != null"> |
| | | (SELECT COUNT(*) |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) < #{openCount} |
| | | (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> |
| | | <if test="openCount != null"> |
| | | < #{openCount} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | </where>) AS openCount |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and openCount != null"> |
| | | (SELECT COUNT(*) |
| | | FROM rm_open_close_valve_history his |
| | | WHERE his.client_id = cli.id |
| | | AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) < #{openCount} |
| | | (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> |
| | | <if test="openCount != null"> |
| | | < #{openCount} |
| | | </if> |
| | | </where> |
| | | ORDER BY cli.id |