123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.zhyc.xps.goaf.mapper.GoafSensorDataMapper">
- <resultMap id="GoafSensorDataMapper" type="com.zhyc.xps.goaf.entity.GoafSensorData">
- <id column="goaf_data_id" property="goafDataId" jdbcType="BIGINT"/>
- <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
- <result column="goaf_sensor_id" property="goafSensorId" jdbcType="BIGINT"/>
- <result column="goaf_sensor_name" property="goafSensorName" jdbcType="VARCHAR"/>
- <result column="goaf_dev_name" property="goafDevName" jdbcType="VARCHAR"/>
- <result column="goaf_dev_typename" property="goafDevTypename" jdbcType="VARCHAR"/>
- <result column="frequency_x" property="frequencyX" jdbcType="BIGINT"/>
- <result column="frequency_y" property="frequencyY" jdbcType="BIGINT"/>
- <result column="frequency_z" property="frequencyZ" jdbcType="BIGINT"/>
- <result column="acc_x" property="accX" jdbcType="BIGINT"/>
- <result column="acc_y" property="accY" jdbcType="BIGINT"/>
- <result column="acc_z" property="accZ" jdbcType="BIGINT"/>
- <result column="vel_x" property="velX" jdbcType="BIGINT"/>
- <result column="vel_y" property="velY" jdbcType="BIGINT"/>
- <result column="vel_z" property="velZ" jdbcType="BIGINT"/>
- <result column="dis_x" property="disX" jdbcType="BIGINT"/>
- <result column="dis_y" property="disY" jdbcType="BIGINT"/>
- <result column="dis_z" property="disZ" jdbcType="BIGINT"/>
- <result column="sensor_temperature" property="sensorTemperature" jdbcType="BIGINT"/>
- <result column="ang_x" property="angX" jdbcType="BIGINT"/>
- <result column="ang_y" property="angY" jdbcType="BIGINT"/>
- <result column="ang_z" property="angZ" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_x" property="fAlarmAccX" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_y" property="fAlarmAccY" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_z" property="fAlarmAccZ" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_x" property="fAlarmVelX" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_y" property="fAlarmVelY" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_z" property="fAlarmVelZ" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_x" property="fAlarmDisX" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_y" property="fAlarmDisY" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_z" property="fAlarmDisZ" jdbcType="BIGINT"/>
- <result column="f_alarm_temperature" property="fAlarmTemperature" jdbcType="BIGINT"/>
- <result column="td_wave_value_x" property="tdWaveValueX" jdbcType="VARCHAR"/>
- <result column="td_wave_value_y" property="tdWaveValueY" jdbcType="VARCHAR"/>
- <result column="td_wave_value_z" property="tdWaveValueZ" jdbcType="VARCHAR"/>
- <result column="goaf_datareport_time" property="goafDatareportTime" jdbcType="TIMESTAMP"/>
- </resultMap>
- <resultMap id="GoafSensorDataDtoMapper" type="com.zhyc.xps.goaf.dto.GoafSensorDataDto">
- <id column="goaf_data_id" property="goafDataId" jdbcType="BIGINT"/>
- <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
- <result column="goaf_sensor_id" property="goafSensorId" jdbcType="BIGINT"/>
- <result column="goaf_sensor_name" property="goafSensorName" jdbcType="VARCHAR"/>
- <result column="goaf_dev_name" property="goafDevName" jdbcType="VARCHAR"/>
- <result column="goaf_dev_typename" property="goafDevTypename" jdbcType="VARCHAR"/>
- <result column="frequency_x" property="frequencyX" jdbcType="BIGINT"/>
- <result column="frequency_y" property="frequencyY" jdbcType="BIGINT"/>
- <result column="frequency_z" property="frequencyZ" jdbcType="BIGINT"/>
- <result column="acc_x" property="accX" jdbcType="BIGINT"/>
- <result column="acc_y" property="accY" jdbcType="BIGINT"/>
- <result column="acc_z" property="accZ" jdbcType="BIGINT"/>
- <result column="vel_x" property="velX" jdbcType="BIGINT"/>
- <result column="vel_y" property="velY" jdbcType="BIGINT"/>
- <result column="vel_z" property="velZ" jdbcType="BIGINT"/>
- <result column="dis_x" property="disX" jdbcType="BIGINT"/>
- <result column="dis_y" property="disY" jdbcType="BIGINT"/>
- <result column="dis_z" property="disZ" jdbcType="BIGINT"/>
- <result column="sensor_temperature" property="sensorTemperature" jdbcType="BIGINT"/>
- <result column="ang_x" property="angX" jdbcType="BIGINT"/>
- <result column="ang_y" property="angY" jdbcType="BIGINT"/>
- <result column="ang_z" property="angZ" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_x" property="fAlarmAccX" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_y" property="fAlarmAccY" jdbcType="BIGINT"/>
- <result column="f_alarm_acc_z" property="fAlarmAccZ" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_x" property="fAlarmVelX" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_y" property="fAlarmVelY" jdbcType="BIGINT"/>
- <result column="f_alarm_vel_z" property="fAlarmVelZ" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_x" property="fAlarmDisX" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_y" property="fAlarmDisY" jdbcType="BIGINT"/>
- <result column="f_alarm_dis_z" property="fAlarmDisZ" jdbcType="BIGINT"/>
- <result column="f_alarm_temperature" property="fAlarmTemperature" jdbcType="BIGINT"/>
- <result column="td_wave_value_x" property="tdWaveValueX" jdbcType="VARCHAR"/>
- <result column="td_wave_value_y" property="tdWaveValueY" jdbcType="VARCHAR"/>
- <result column="td_wave_value_z" property="tdWaveValueZ" jdbcType="VARCHAR"/>
- <result column="goaf_datareport_time" property="goafDatareportTime" jdbcType="TIMESTAMP"/>
- <result column="goaf_sensor_alarm_level" property="goafSensorAlarmLevel" jdbcType="BIGINT"/>
- <result column="goaf_sensor_alarm_type" property="goafSensorAlarmType" jdbcType="VARCHAR"/>
- </resultMap>
- <select id="getByList" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">
- SELECT *
- FROM goaf_sensordata
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="goafSensorId !=null">
- AND goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </if>
- <if test="goafDevName !=null and goafDevName !=''">
- AND goaf_dev_name = #{goafDevName ,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null and startDate !='' and endDate != null and endDate != ''">
- AND goaf_datareport_time BETWEEN #{startDate} AND #{endDate}
- </if>
- ORDER BY goaf_datareport_time DESC
- </select>
- <!-- <select id="getByNew" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">-->
- <!-- SELECT *-->
- <!-- FROM goaf_sensordata-->
- <!-- WHERE oc_id = #{ocId ,jdbcType=BIGINT}-->
- <!-- <if test="goafSensorId !=null">-->
- <!-- AND goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}-->
- <!-- </if>-->
- <!-- ORDER BY goaf_datareport_time DESC-->
- <!-- LIMIT 1-->
- <!-- </select>-->
- <select id="getByNew" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">
- SELECT *
- FROM goaf_sensordata_new
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="goafSensorId !=null">
- AND goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </if>
- </select>
- <!-- <select id="getByNewWihoutWave" parameterType="java.util.Map" resultMap="GoafSensorDataDtoMapper">-->
- <!-- SELECT A.goaf_data_id, A.oc_id, A.goaf_sensor_id, A.goaf_sensor_name, A.frequency_x, A.frequency_y, A.frequency_z,-->
- <!-- A.acc_x, A.acc_y, A.acc_z, A.vel_x, A.vel_y, A.vel_z, A.dis_x, A.dis_y, A.dis_z, A.sensor_temperature,-->
- <!-- A.ang_x, A.ang_y, A.ang_z, A.f_alarm_acc_x, A.f_alarm_acc_y, A.f_alarm_acc_z,-->
- <!-- A.f_alarm_vel_x, A.f_alarm_vel_y, A.f_alarm_vel_z, A.f_alarm_dis_x, A.f_alarm_dis_y, A.f_alarm_dis_z,-->
- <!-- A.f_alarm_temperature, A.goaf_datareport_time,B.goaf_sensor_alarm_level,B.goaf_sensor_alarm_type-->
- <!-- FROM goaf_sensordata AS A-->
- <!-- LEFT JOIN goaf_sensoralarm AS B ON A.goaf_data_id = B.goaf_data_id-->
- <!-- WHERE A.oc_id = #{ocId ,jdbcType=BIGINT}-->
- <!-- <if test="goafSensorId !=null">-->
- <!-- AND A.goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}-->
- <!-- </if>-->
- <!-- ORDER BY A.goaf_datareport_time DESC-->
- <!-- LIMIT 1-->
- <!-- </select>-->
- <select id="getByNewWihoutWave" parameterType="java.util.Map" resultMap="GoafSensorDataDtoMapper">
- SELECT A.goaf_data_id, A.oc_id, A.goaf_sensor_id, A.goaf_sensor_name, A.frequency_x, A.frequency_y, A.frequency_z,
- A.acc_x, A.acc_y, A.acc_z, A.vel_x, A.vel_y, A.vel_z, A.dis_x, A.dis_y, A.dis_z, A.sensor_temperature,
- A.ang_x, A.ang_y, A.ang_z, A.f_alarm_acc_x, A.f_alarm_acc_y, A.f_alarm_acc_z,
- A.f_alarm_vel_x, A.f_alarm_vel_y, A.f_alarm_vel_z, A.f_alarm_dis_x, A.f_alarm_dis_y, A.f_alarm_dis_z,
- A.f_alarm_temperature, A.goaf_datareport_time,B.goaf_sensor_alarm_level,B.goaf_sensor_alarm_type
- FROM goaf_sensordata_new AS A
- LEFT JOIN goaf_sensoralarm AS B ON A.goaf_data_id = B.goaf_data_id
- WHERE A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="goafSensorId !=null">
- AND A.goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </if>
- </select>
- <select id="getWavebyDataId" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">
- SELECT td_wave_value_x, td_wave_value_y, td_wave_value_z
- FROM goaf_sensordata
- WHERE goaf_data_id = #{goafDataId ,jdbcType=BIGINT}
- </select>
- <!--分页查询-->
- <select id="getByPage" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">
- SELECT *
- FROM goaf_sensordata
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="goafSensorId !=null">
- AND goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </if>
- <if test="goafDevName !=null and goafDevName !=''">
- AND goaf_dev_name = #{goafDevName ,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null and startDate !='' and endDate != null and endDate != ''">
- AND goaf_datareport_time BETWEEN #{startDate} AND #{endDate}
- </if>
- ORDER BY goaf_datareport_time DESC
- </select>
- <insert id="create" parameterType="com.zhyc.xps.goaf.entity.GoafSensorData">
- insert into goaf_sensordata
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="goafDataId != null">
- goaf_data_id,
- </if>
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="goafSensorId != null">
- goaf_sensor_id,
- </if>
- <if test="goafSensorName != null and goafSensorName != ''">
- goaf_sensor_name,
- </if>
- <if test="goafDevName != null and goafDevName != ''">
- goaf_dev_name,
- </if>
- <if test="goafDevTypename != null and goafDevTypename != ''">
- goaf_dev_typename,
- </if>
- <if test="frequencyX != null">
- frequency_x,
- </if>
- <if test="frequencyY != null">
- frequency_y,
- </if>
- <if test="frequencyZ != null">
- frequency_z,
- </if>
- <if test="accX != null">
- acc_x,
- </if>
- <if test="accY != null">
- acc_y,
- </if>
- <if test="accZ != null">
- acc_z,
- </if>
- <if test="velX != null">
- vel_x,
- </if>
- <if test="velY != null">
- vel_y,
- </if>
- <if test="velZ != null">
- vel_z,
- </if>
- <if test="disX != null">
- dis_x,
- </if>
- <if test="disY != null">
- dis_y,
- </if>
- <if test="disZ != null">
- dis_z,
- </if>
- <if test="sensorTemperature != null">
- sensor_temperature,
- </if>
- <if test="angX != null">
- ang_x,
- </if>
- <if test="angY != null">
- ang_y,
- </if>
- <if test="angZ != null">
- ang_z,
- </if>
- <if test="fAlarmAccX != null">
- f_alarm_acc_x,
- </if>
- <if test="fAlarmAccY != null">
- f_alarm_acc_y,
- </if>
- <if test="fAlarmAccZ != null">
- f_alarm_acc_z,
- </if>
- <if test="fAlarmVelX != null">
- f_alarm_vel_x,
- </if>
- <if test="fAlarmVelY != null">
- f_alarm_vel_y,
- </if>
- <if test="fAlarmVelZ != null">
- f_alarm_vel_z,
- </if>
- <if test="fAlarmDisX != null">
- f_alarm_dis_x,
- </if>
- <if test="fAlarmDisY != null">
- f_alarm_dis_y,
- </if>
- <if test="fAlarmDisZ != null">
- f_alarm_dis_z,
- </if>
- <if test="fAlarmTemperature != null">
- f_alarm_temperature,
- </if>
- <if test="tdWaveValueX != null and tdWaveValueX != ''">
- td_wave_value_x,
- </if>
- <if test="tdWaveValueY != null and tdWaveValueY != ''">
- td_wave_value_y,
- </if>
- <if test="tdWaveValueZ != null and tdWaveValueZ != ''">
- td_wave_value_z,
- </if>
- <if test="goafDatareportTime != null">
- goaf_datareport_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="goafDataId != null">
- #{goafDataId, jdbcType=BIGINT},
- </if>
- <if test="ocId != null">
- #{ocId, jdbcType=BIGINT},
- </if>
- <if test="goafSensorId != null">
- #{goafSensorId, jdbcType=BIGINT},
- </if>
- <if test="goafSensorName != null and goafSensorName != ''">
- #{goafSensorName, jdbcType=VARCHAR},
- </if>
- <if test="goafDevName != null and goafDevName != ''">
- #{goafDevName, jdbcType=VARCHAR},
- </if>
- <if test="goafDevTypename != null and goafDevTypename != ''">
- #{goafDevTypename},
- </if>
- <if test="frequencyX != null">
- #{frequencyX, jdbcType=BIGINT},
- </if>
- <if test="frequencyY != null">
- #{frequencyY, jdbcType=BIGINT},
- </if>
- <if test="frequencyZ != null">
- #{frequencyZ, jdbcType=BIGINT},
- </if>
- <if test="accX != null">
- #{accX, jdbcType=BIGINT},
- </if>
- <if test="accY != null">
- #{accY, jdbcType=BIGINT},
- </if>
- <if test="accZ != null">
- #{accZ, jdbcType=BIGINT},
- </if>
- <if test="velX != null">
- #{velX, jdbcType=BIGINT},
- </if>
- <if test="velY != null">
- #{velY, jdbcType=BIGINT},
- </if>
- <if test="velZ != null">
- #{velZ, jdbcType=BIGINT},
- </if>
- <if test="disX != null">
- #{disX, jdbcType=BIGINT},
- </if>
- <if test="disY != null">
- #{disY, jdbcType=BIGINT},
- </if>
- <if test="disZ != null">
- #{disZ, jdbcType=BIGINT},
- </if>
- <if test="sensorTemperature != null">
- #{sensorTemperature, jdbcType=BIGINT},
- </if>
- <if test="angX != null">
- #{angX, jdbcType=BIGINT},
- </if>
- <if test="angY != null">
- #{angY, jdbcType=BIGINT},
- </if>
- <if test="angZ != null">
- #{angZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccX != null">
- #{fAlarmAccX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccY != null">
- #{fAlarmAccY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccZ != null">
- #{fAlarmAccZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelX != null">
- #{fAlarmVelX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelY != null">
- #{fAlarmVelY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelZ != null">
- #{fAlarmVelZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisX != null">
- #{fAlarmDisX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisY != null">
- #{fAlarmDisY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisZ != null">
- #{fAlarmDisZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmTemperature != null">
- #{fAlarmTemperature, jdbcType=BIGINT},
- </if>
- <if test="tdWaveValueX != null and tdWaveValueX != ''">
- #{tdWaveValueX, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueY != null and tdWaveValueY != ''">
- #{tdWaveValueY, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueZ != null and tdWaveValueZ != ''">
- #{tdWaveValueZ, jdbcType=VARCHAR},
- </if>
- <if test="goafDatareportTime != null">
- #{goafDatareportTime, jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <insert id="createLatestData" parameterType="com.zhyc.xps.goaf.entity.GoafSensorData">
- insert into goaf_sensordata_new
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="goafDataId != null">
- goaf_data_id,
- </if>
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="goafSensorId != null">
- goaf_sensor_id,
- </if>
- <if test="goafSensorName != null and goafSensorName != ''">
- goaf_sensor_name,
- </if>
- <if test="goafDevName != null and goafDevName != ''">
- goaf_dev_name,
- </if>
- <if test="goafDevTypename != null and goafDevTypename != ''">
- goaf_dev_typename,
- </if>
- <if test="frequencyX != null">
- frequency_x,
- </if>
- <if test="frequencyY != null">
- frequency_y,
- </if>
- <if test="frequencyZ != null">
- frequency_z,
- </if>
- <if test="accX != null">
- acc_x,
- </if>
- <if test="accY != null">
- acc_y,
- </if>
- <if test="accZ != null">
- acc_z,
- </if>
- <if test="velX != null">
- vel_x,
- </if>
- <if test="velY != null">
- vel_y,
- </if>
- <if test="velZ != null">
- vel_z,
- </if>
- <if test="disX != null">
- dis_x,
- </if>
- <if test="disY != null">
- dis_y,
- </if>
- <if test="disZ != null">
- dis_z,
- </if>
- <if test="sensorTemperature != null">
- sensor_temperature,
- </if>
- <if test="angX != null">
- ang_x,
- </if>
- <if test="angY != null">
- ang_y,
- </if>
- <if test="angZ != null">
- ang_z,
- </if>
- <if test="fAlarmAccX != null">
- f_alarm_acc_x,
- </if>
- <if test="fAlarmAccY != null">
- f_alarm_acc_y,
- </if>
- <if test="fAlarmAccZ != null">
- f_alarm_acc_z,
- </if>
- <if test="fAlarmVelX != null">
- f_alarm_vel_x,
- </if>
- <if test="fAlarmVelY != null">
- f_alarm_vel_y,
- </if>
- <if test="fAlarmVelZ != null">
- f_alarm_vel_z,
- </if>
- <if test="fAlarmDisX != null">
- f_alarm_dis_x,
- </if>
- <if test="fAlarmDisY != null">
- f_alarm_dis_y,
- </if>
- <if test="fAlarmDisZ != null">
- f_alarm_dis_z,
- </if>
- <if test="fAlarmTemperature != null">
- f_alarm_temperature,
- </if>
- <if test="tdWaveValueX != null and tdWaveValueX != ''">
- td_wave_value_x,
- </if>
- <if test="tdWaveValueY != null and tdWaveValueY != ''">
- td_wave_value_y,
- </if>
- <if test="tdWaveValueZ != null and tdWaveValueZ != ''">
- td_wave_value_z,
- </if>
- <if test="goafDatareportTime != null">
- goaf_datareport_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="goafDataId != null">
- #{goafDataId, jdbcType=BIGINT},
- </if>
- <if test="ocId != null">
- #{ocId, jdbcType=BIGINT},
- </if>
- <if test="goafSensorId != null">
- #{goafSensorId, jdbcType=BIGINT},
- </if>
- <if test="goafSensorName != null and goafSensorName != ''">
- #{goafSensorName, jdbcType=VARCHAR},
- </if>
- <if test="goafDevName != null and goafDevName != ''">
- #{goafDevName, jdbcType=VARCHAR},
- </if>
- <if test="goafDevTypename != null and goafDevTypename != ''">
- #{goafDevTypename},
- </if>
- <if test="frequencyX != null">
- #{frequencyX, jdbcType=BIGINT},
- </if>
- <if test="frequencyY != null">
- #{frequencyY, jdbcType=BIGINT},
- </if>
- <if test="frequencyZ != null">
- #{frequencyZ, jdbcType=BIGINT},
- </if>
- <if test="accX != null">
- #{accX, jdbcType=BIGINT},
- </if>
- <if test="accY != null">
- #{accY, jdbcType=BIGINT},
- </if>
- <if test="accZ != null">
- #{accZ, jdbcType=BIGINT},
- </if>
- <if test="velX != null">
- #{velX, jdbcType=BIGINT},
- </if>
- <if test="velY != null">
- #{velY, jdbcType=BIGINT},
- </if>
- <if test="velZ != null">
- #{velZ, jdbcType=BIGINT},
- </if>
- <if test="disX != null">
- #{disX, jdbcType=BIGINT},
- </if>
- <if test="disY != null">
- #{disY, jdbcType=BIGINT},
- </if>
- <if test="disZ != null">
- #{disZ, jdbcType=BIGINT},
- </if>
- <if test="sensorTemperature != null">
- #{sensorTemperature, jdbcType=BIGINT},
- </if>
- <if test="angX != null">
- #{angX, jdbcType=BIGINT},
- </if>
- <if test="angY != null">
- #{angY, jdbcType=BIGINT},
- </if>
- <if test="angZ != null">
- #{angZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccX != null">
- #{fAlarmAccX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccY != null">
- #{fAlarmAccY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccZ != null">
- #{fAlarmAccZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelX != null">
- #{fAlarmVelX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelY != null">
- #{fAlarmVelY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelZ != null">
- #{fAlarmVelZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisX != null">
- #{fAlarmDisX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisY != null">
- #{fAlarmDisY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisZ != null">
- #{fAlarmDisZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmTemperature != null">
- #{fAlarmTemperature, jdbcType=BIGINT},
- </if>
- <if test="tdWaveValueX != null and tdWaveValueX != ''">
- #{tdWaveValueX, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueY != null and tdWaveValueY != ''">
- #{tdWaveValueY, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueZ != null and tdWaveValueZ != ''">
- #{tdWaveValueZ, jdbcType=VARCHAR},
- </if>
- <if test="goafDatareportTime != null">
- #{goafDatareportTime, jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateLatestData" parameterType="com.zhyc.xps.goaf.entity.GoafSensorData">
- UPDATE goaf_sensordata_new
- <trim suffixOverrides=",">
- <set>
- <if test="goafDataId != null">
- goaf_data_id = #{goafDataId, jdbcType=BIGINT},
- </if>
- <if test="frequencyX != null">
- frequency_x = #{frequencyX, jdbcType=BIGINT},
- </if>
- <if test="frequencyY != null">
- frequency_y = #{frequencyY, jdbcType=BIGINT},
- </if>
- <if test="frequencyZ != null">
- frequency_z = #{frequencyZ, jdbcType=BIGINT},
- </if>
- <if test="accX != null">
- acc_x = #{accX, jdbcType=BIGINT},
- </if>
- <if test="accY != null">
- acc_y = #{accY, jdbcType=BIGINT},
- </if>
- <if test="accZ != null">
- acc_z = #{accZ, jdbcType=BIGINT},
- </if>
- <if test="velX != null">
- vel_x = #{velX, jdbcType=BIGINT},
- </if>
- <if test="velY != null">
- vel_y = #{velY, jdbcType=BIGINT},
- </if>
- <if test="velZ != null">
- vel_z = #{velZ, jdbcType=BIGINT},
- </if>
- <if test="disX != null">
- dis_x = #{disX, jdbcType=BIGINT},
- </if>
- <if test="disY != null">
- dis_y = #{disY, jdbcType=BIGINT},
- </if>
- <if test="disZ != null">
- dis_z = #{disZ, jdbcType=BIGINT},
- </if>
- <if test="sensorTemperature != null">
- sensor_temperature = #{sensorTemperature, jdbcType=BIGINT},
- </if>
- <if test="angX != null">
- ang_x = #{angX, jdbcType=BIGINT},
- </if>
- <if test="angY != null">
- ang_y = #{angY, jdbcType=BIGINT},
- </if>
- <if test="angZ != null">
- ang_z = #{angZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccX != null">
- f_alarm_acc_x = #{fAlarmAccX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccY != null">
- f_alarm_acc_y = #{fAlarmAccY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmAccZ != null">
- f_alarm_acc_z = #{fAlarmAccZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelX != null">
- f_alarm_vel_x = #{fAlarmVelX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelY != null">
- f_alarm_vel_y = #{fAlarmVelY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmVelZ != null">
- f_alarm_vel_z = #{fAlarmVelZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisX != null">
- f_alarm_dis_x = #{fAlarmDisX, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisY != null">
- f_alarm_dis_y = #{fAlarmDisY, jdbcType=BIGINT},
- </if>
- <if test="fAlarmDisZ != null">
- f_alarm_dis_z = #{fAlarmDisZ, jdbcType=BIGINT},
- </if>
- <if test="fAlarmTemperature != null">
- f_alarm_temperature = #{fAlarmTemperature, jdbcType=BIGINT},
- </if>
- <if test="tdWaveValueX != null and tdWaveValueX != ''">
- td_wave_value_x = #{tdWaveValueX, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueY != null and tdWaveValueY != ''">
- td_wave_value_y = #{tdWaveValueY, jdbcType=VARCHAR},
- </if>
- <if test="tdWaveValueZ != null and tdWaveValueZ != ''">
- td_wave_value_z = #{tdWaveValueZ, jdbcType=VARCHAR},
- </if>
- <if test="goafDatareportTime != null">
- goaf_datareport_time = #{goafDatareportTime, jdbcType=TIMESTAMP},
- </if>
- </set>
- </trim>
- WHERE goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </update>
- <select id="getLatestDatabySensorId" parameterType="java.util.Map" resultMap="GoafSensorDataMapper">
- SELECT *
- FROM goaf_sensordata_new
- WHERE goaf_sensor_id = #{goafSensorId ,jdbcType=BIGINT}
- </select>
- <select id="getLatestDatabyList" resultMap="GoafSensorDataMapper">
- SELECT *
- FROM goaf_sensordata_new
- </select>
- </mapper>
|