SELECT ssc.dam_name, t1.SENSOR_ID, t1.DAM_ID, left(t1.UPLOAD_TIME,#{index3,jdbcType=INTEGER}) as UPLOAD_TIME, t1.WATER_TOP, t1.WATER_LEVEL, t1.HOLE_DEPTH, ( t1.HOLE_DEPTH - t1.WATER_LEVEL ) AS BURIED_DEPTH FROM ( SELECT SENSOR_ID, DAM_ID, left(UPLOAD_TIME,#{index3,jdbcType=INTEGER}) as UPLOAD_TIME, WATER_TOP, WATER_LEVEL, HOLE_DEPTH, ( HOLE_DEPTH - WATER_LEVEL ) AS BURIED_DEPTH FROM B_DAM_WATER_LEVEL WHERE ID IN ( SELECT MAX ( ID ) FROM B_DAM_WATER_LEVEL WHERE left(UPLOAD_TIME,#{index1,jdbcType=INTEGER}) = #{uploadTime,jdbcType=VARCHAR} and SENSOR_ID = #{sensorId,jdbcType=INTEGER} group by left(UPLOAD_TIME,#{index2,jdbcType=INTEGER})) ) ) AS t1 INNER JOIN setting_single_coordinate ssc ON t1.DAM_ID = ssc.dam_id WHERE ssc.set_type = 0 AND sys_type = 3; 索引下标7越界
时间: 2024-02-10 14:17:47 浏览: 115
SSC.zip_classifier_dropped3ck_signal strength
根据你提供的SQL语句,我可以看到其中有三个参数:#{index1,jdbcType=INTEGER}、#{index2,jdbcType=INTEGER}和#{index3,jdbcType=INTEGER},而且这些参数都是整数类型。从错误信息来看,似乎是索引下标7越界了,这可能是因为你在执行SQL语句时传入的参数个数或者参数位置不正确导致的。
建议你检查一下你传入的参数是否与SQL语句中的参数一一对应,并且位置是否正确。如果还是无法解决问题,你可以将完整的错误信息和相关代码以及数据表结构等信息提供给开发人员进行调试。
阅读全文