| | |
| | | ) rtus ON con.rtuAddr = rtus.rtuAddr |
| | | </if> |
| | | WHERE con.intakeId is not null |
| | | <if test="isOnLine != null"> |
| | | AND rtus.isOnLine = #{isOnLine} |
| | | <if test="isOnLine != null and isOnLine == false"> |
| | | <choose> |
| | | <when test="onLineMap != null and onLineMap !=''"> |
| | | AND (rtus.isOnLine = false OR rtus.rtuAddr IS NULL) |
| | | </when> |
| | | <otherwise> |
| | | AND rtus.rtuAddr IS NULL |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="isOnLine != null and isOnLine == true"> |
| | | AND rtus.isOnLine = true |
| | | </if> |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name = #{intakeNum} |
| | |
| | | inta.lng, |
| | | inta.lat, |
| | | IFNULL(hou.total_amount, 0) AS totalAmount, |
| | | <if test="onLineMap != null and onLineMap !='' and isOnLine != null"> |
| | | rtus.isOnLine, |
| | | </if> |
| | | alarm.alarm |
| | | FROM pr_intake inta |
| | | INNER JOIN pr_controller con ON con.intakeId = inta.id |
| | |
| | | ) rtus ON con.rtuAddr = rtus.rtuAddr |
| | | </if> |
| | | WHERE con.intakeId is not null |
| | | <if test="isOnLine != null"> |
| | | AND rtus.isOnLine = #{isOnLine} |
| | | <if test="isOnLine != null and isOnLine == false"> |
| | | <choose> |
| | | <when test="onLineMap != null and onLineMap !=''"> |
| | | AND (rtus.isOnLine = false OR rtus.rtuAddr IS NULL) |
| | | </when> |
| | | <otherwise> |
| | | AND rtus.rtuAddr IS NULL |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="isOnLine != null and isOnLine == true"> |
| | | AND rtus.isOnLine = true |
| | | </if> |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name = #{intakeNum} |