|
@@ -4,7 +4,7 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.sooka.sponest.construction.gas.mapper.GasDeviceMonitoringDataMapper">
|
|
<mapper namespace="com.sooka.sponest.construction.gas.mapper.GasDeviceMonitoringDataMapper">
|
|
|
|
|
|
|
|
- <resultMap type="GasDeviceMonitoring" id="GasDeviceMonitoringDataResult">
|
|
|
|
|
|
|
+ <resultMap type="GasDeviceMonitoringData" id="GasDeviceMonitoringDataResult">
|
|
|
<result property="id" column="id"/>
|
|
<result property="id" column="id"/>
|
|
|
<result property="deviceCode" column="device_code"/>
|
|
<result property="deviceCode" column="device_code"/>
|
|
|
<result property="pressure" column="pressure"/>
|
|
<result property="pressure" column="pressure"/>
|
|
@@ -29,7 +29,7 @@
|
|
|
from gas_device_monitoring_data
|
|
from gas_device_monitoring_data
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
- <select id="selectGasDeviceMonitoringDataList" parameterType="GasDeviceMonitoring" resultMap="GasDeviceMonitoringDataResult">
|
|
|
|
|
|
|
+ <select id="selectGasDeviceMonitoringDataList" parameterType="GasDeviceMonitoringData" resultMap="GasDeviceMonitoringDataResult">
|
|
|
select
|
|
select
|
|
|
a.id,
|
|
a.id,
|
|
|
a.device_code,
|
|
a.device_code,
|
|
@@ -65,31 +65,49 @@
|
|
|
where a.id = #{id}
|
|
where a.id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <insert id="insertGasDeviceMonitoringData" parameterType="GasDeviceMonitoring" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
|
+ <insert id="insertGasDeviceMonitoringData" parameterType="GasDeviceMonitoringData" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into gas_device_monitoring_data
|
|
insert into gas_device_monitoring_data
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="deviceCode != null and deviceCode != ''">device_code,</if>
|
|
|
|
|
+ <if test="pointId != null and pressure != ''">point_id,</if>
|
|
|
|
|
+ <if test="indicator != null and pressure != ''">indicator,</if>
|
|
|
|
|
+ <if test="monitoringValue != null and pressure != ''">monitoring_value,</if>
|
|
|
|
|
+ <if test="valueUnit != null and pressure != ''">value_unit,</if>
|
|
|
|
|
+ <if test="collectionTime != null and pressure != ''">collection_time,</if>
|
|
|
|
|
+ <if test="reportTime != null and pressure != ''">report_time,</if>
|
|
|
|
|
+ <if test="syncTime != null and pressure != ''">sync_time,</if>
|
|
|
|
|
+ <if test="syncStatus != null and pressure != ''">sync_status,</if>
|
|
|
|
|
+ <if test="deviceStatus != null and pressure != ''">device_status,</if>
|
|
|
<if test="pressure != null and pressure != ''">pressure,</if>
|
|
<if test="pressure != null and pressure != ''">pressure,</if>
|
|
|
<if test="flowRate != null and flowRate != ''">flow_rate,</if>
|
|
<if test="flowRate != null and flowRate != ''">flow_rate,</if>
|
|
|
<if test="mgc != null and mgc != ''">mgc,</if>
|
|
<if test="mgc != null and mgc != ''">mgc,</if>
|
|
|
<if test="stationConcentration != null and stationConcentration != ''">station_concentration,</if>
|
|
<if test="stationConcentration != null and stationConcentration != ''">station_concentration,</if>
|
|
|
<if test="cgc != null and cgc != ''">cgc,</if>
|
|
<if test="cgc != null and cgc != ''">cgc,</if>
|
|
|
- <if test="deviceCode != null and deviceCode != ''">device_code,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
|
|
|
|
|
+ <if test="pointId != null and pointId != ''">#{pointId},</if>
|
|
|
|
|
+ <if test="indicator != null and indicator != ''">#{indicator},</if>
|
|
|
|
|
+ <if test="monitoringValue != null and monitoringValue != ''">#{monitoringValue},</if>
|
|
|
|
|
+ <if test="valueUnit != null and valueUnit != ''">#{valueUnit},</if>
|
|
|
|
|
+ <if test="collectionTime != null and collectionTime != ''">#{collectionTime},</if>
|
|
|
|
|
+ <if test="reportTime != null and reportTime != ''">#{reportTime},</if>
|
|
|
|
|
+ <if test="syncTime != null and syncTime != ''">#{syncTime},</if>
|
|
|
|
|
+ <if test="syncStatus != null and syncStatus != ''">#{syncStatus},</if>
|
|
|
|
|
+ <if test="deviceStatus != null and deviceStatus != ''">#{deviceStatus},</if>
|
|
|
<if test="pressure != null and pressure != ''">#{pressure},</if>
|
|
<if test="pressure != null and pressure != ''">#{pressure},</if>
|
|
|
<if test="flowRate != null and flowRate != ''">#{flowRate},</if>
|
|
<if test="flowRate != null and flowRate != ''">#{flowRate},</if>
|
|
|
<if test="mgc != null and mgc != ''">#{mgc},</if>
|
|
<if test="mgc != null and mgc != ''">#{mgc},</if>
|
|
|
<if test="stationConcentration != null and stationConcentration != ''">#{stationConcentration},</if>
|
|
<if test="stationConcentration != null and stationConcentration != ''">#{stationConcentration},</if>
|
|
|
<if test="cgc != null and cgc != ''">#{cgc},</if>
|
|
<if test="cgc != null and cgc != ''">#{cgc},</if>
|
|
|
- <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
- <update id="updateGasDeviceMonitoringData" parameterType="GasDeviceMonitoring">
|
|
|
|
|
|
|
+ <update id="updateGasDeviceMonitoringData" parameterType="GasDeviceMonitoringData">
|
|
|
update gas_device_monitoring_data
|
|
update gas_device_monitoring_data
|
|
|
<set>
|
|
<set>
|
|
|
<if test="pressure != null and pressure != ''">pressure = #{pressure},</if>
|
|
<if test="pressure != null and pressure != ''">pressure = #{pressure},</if>
|
|
@@ -118,23 +136,41 @@
|
|
|
|
|
|
|
|
<insert id="insertDeviceMonitoring" parameterType="java.util.List">
|
|
<insert id="insertDeviceMonitoring" parameterType="java.util.List">
|
|
|
insert into gas_device_monitoring_data (
|
|
insert into gas_device_monitoring_data (
|
|
|
|
|
+ device_code,
|
|
|
|
|
+ pointId,
|
|
|
|
|
+ indicator,
|
|
|
|
|
+ monitoringValue,
|
|
|
|
|
+ valueUnit,
|
|
|
|
|
+ collectionTime,
|
|
|
|
|
+ reportTime,
|
|
|
|
|
+ syncTime,
|
|
|
|
|
+ syncStatus,
|
|
|
|
|
+ deviceStatus,
|
|
|
pressure,
|
|
pressure,
|
|
|
flow_rate,
|
|
flow_rate,
|
|
|
mgc,
|
|
mgc,
|
|
|
station_concentration,
|
|
station_concentration,
|
|
|
cgc,
|
|
cgc,
|
|
|
- device_code,
|
|
|
|
|
create_time,
|
|
create_time,
|
|
|
update_time
|
|
update_time
|
|
|
) values
|
|
) values
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
(
|
|
(
|
|
|
|
|
+ #{item.deviceCode},
|
|
|
|
|
+ #{item.pointId},
|
|
|
|
|
+ #{item.indicator},
|
|
|
|
|
+ #{item.monitoringValue},
|
|
|
|
|
+ #{item.valueUnit},
|
|
|
|
|
+ #{item.collectionTime},
|
|
|
|
|
+ #{item.reportTime},
|
|
|
|
|
+ #{item.syncTime},
|
|
|
|
|
+ #{item.syncStatus},
|
|
|
|
|
+ #{item.deviceStatus},
|
|
|
#{item.pressure},
|
|
#{item.pressure},
|
|
|
#{item.flowRate},
|
|
#{item.flowRate},
|
|
|
#{item.mgc},
|
|
#{item.mgc},
|
|
|
#{item.stationConcentration},
|
|
#{item.stationConcentration},
|
|
|
#{item.cgc},
|
|
#{item.cgc},
|
|
|
- #{item.deviceCode},
|
|
|
|
|
#{item.createTime},
|
|
#{item.createTime},
|
|
|
#{item.updateTime}
|
|
#{item.updateTime}
|
|
|
)
|
|
)
|