| | |
| | | cli.clientNum, |
| | | CONCAT(cli.districtTitle, cli.address) AS address, |
| | | cli.phone, |
| | | cli.idCard |
| | | cli.idCard, |
| | | IFNULL((SELECT SUM(his.cl_this_amount) |
| | | 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} |
| | | </if> |
| | | </where> |
| | | ),0) AS waterConsumption |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and waterConsumption != null"> |
| | |
| | | cli.clientNum, |
| | | CONCAT(cli.districtTitle, cli.address) AS address, |
| | | cli.phone, |
| | | cli.idCard |
| | | cli.idCard, |
| | | IFNULL((SELECT SUM(his.cl_this_money) |
| | | 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} |
| | | </if> |
| | | </where> |
| | | ),0) AS amountSpent |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and amountSpent != null"> |
| | |
| | | cli.clientNum, |
| | | CONCAT(cli.districtTitle, cli.address) AS address, |
| | | cli.phone, |
| | | cli.idCard |
| | | cli.idCard, |
| | | IFNULL((SELECT SUM(his.cl_this_time) |
| | | 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} |
| | | </if> |
| | | </where> |
| | | ),0) AS waterDuration |
| | | FROM se_client cli |
| | | <where> |
| | | <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != '' and waterDuration != null"> |