|
@@ -0,0 +1,256 @@
|
|
|
+<?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.huaxu.zoniot.dao.MeterReadRecordMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.huaxu.zoniot.entity.MeterReadRecord">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ <!--@Table sc_meter_read_record-->
|
|
|
+ <result column="read_date" jdbcType="INTEGER" property="readDate" />
|
|
|
+ <result column="site_id" jdbcType="INTEGER" property="siteId" />
|
|
|
+ <result column="sys_id" jdbcType="INTEGER" property="sysId" />
|
|
|
+ <result column="province" jdbcType="INTEGER" property="province" />
|
|
|
+ <result column="city" jdbcType="INTEGER" property="city" />
|
|
|
+ <result column="region" jdbcType="INTEGER" property="region" />
|
|
|
+ <result column="community" jdbcType="INTEGER" property="community" />
|
|
|
+ <result column="customer_id" jdbcType="INTEGER" property="customerId" />
|
|
|
+ <result column="concentrator_id" jdbcType="INTEGER" property="concentratorId" />
|
|
|
+ <result column="collector_id" jdbcType="INTEGER" property="collectorId" />
|
|
|
+ <result column="building_id" jdbcType="INTEGER" property="buildingId" />
|
|
|
+ <result column="location" jdbcType="VARCHAR" property="location" />
|
|
|
+ <result column="device_type_id" jdbcType="INTEGER" property="deviceTypeId" />
|
|
|
+ <result column="device_id" jdbcType="BIGINT" property="deviceId" />
|
|
|
+ <result column="device_no" jdbcType="VARCHAR" property="deviceNo" />
|
|
|
+ <result column="meter_no" jdbcType="VARCHAR" property="meterNo" />
|
|
|
+ <result column="meter_file_no" jdbcType="VARCHAR" property="meterFileNo" />
|
|
|
+ <result column="read_time" jdbcType="TIMESTAMP" property="readTime" />
|
|
|
+ <result column="read_status" jdbcType="VARCHAR" property="readStatus" />
|
|
|
+ <result column="read_data" jdbcType="VARCHAR" property="readData" />
|
|
|
+ <result column="last_valid" jdbcType="VARCHAR" property="lastValid" />
|
|
|
+ <result column="last_cost" jdbcType="DECIMAL" property="lastCost" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="date_create" jdbcType="TIMESTAMP" property="dateCreate" />
|
|
|
+ <result column="date_update" jdbcType="TIMESTAMP" property="dateUpdate" />
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ read_date, site_id, sys_id, province, city, region, community, customer_id, concentrator_id,
|
|
|
+ collector_id, building_id, `location`, device_type_id, device_id, device_no, meter_no,
|
|
|
+ meter_file_no, read_time, read_status, read_data, last_valid, last_cost, `status`,
|
|
|
+ date_create, date_update, create_by, update_by
|
|
|
+ </sql>
|
|
|
+ <insert id="insert" parameterType="com.huaxu.zoniot.entity.MeterReadRecord">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into sc_meter_read_record (read_date, site_id,
|
|
|
+ sys_id, province, city,
|
|
|
+ region, community, customer_id,
|
|
|
+ concentrator_id, collector_id, building_id,
|
|
|
+ `location`, device_type_id, device_id,
|
|
|
+ device_no, meter_no, meter_file_no,
|
|
|
+ read_time, read_status, read_data,
|
|
|
+ last_valid, last_cost, `status`,
|
|
|
+ date_create, date_update, create_by,
|
|
|
+ update_by)
|
|
|
+ values (#{readDate,jdbcType=INTEGER}, #{siteId,jdbcType=INTEGER},
|
|
|
+ #{sysId,jdbcType=INTEGER}, #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER},
|
|
|
+ #{region,jdbcType=INTEGER}, #{community,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},
|
|
|
+ #{concentratorId,jdbcType=INTEGER}, #{collectorId,jdbcType=INTEGER}, #{buildingId,jdbcType=INTEGER},
|
|
|
+ #{location,jdbcType=VARCHAR}, #{deviceTypeId,jdbcType=INTEGER}, #{deviceId,jdbcType=BIGINT},
|
|
|
+ #{deviceNo,jdbcType=VARCHAR}, #{meterNo,jdbcType=VARCHAR}, #{meterFileNo,jdbcType=VARCHAR},
|
|
|
+ #{readTime,jdbcType=TIMESTAMP}, #{readStatus,jdbcType=VARCHAR}, #{readData,jdbcType=VARCHAR},
|
|
|
+ #{lastValid,jdbcType=VARCHAR}, #{lastCost,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER},
|
|
|
+ #{dateCreate,jdbcType=TIMESTAMP}, #{dateUpdate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
|
|
|
+ #{updateBy,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.huaxu.zoniot.entity.MeterReadRecord">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into sc_meter_read_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="readDate != null">
|
|
|
+ read_date,
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ site_id,
|
|
|
+ </if>
|
|
|
+ <if test="sysId != null">
|
|
|
+ sys_id,
|
|
|
+ </if>
|
|
|
+ <if test="province != null">
|
|
|
+ province,
|
|
|
+ </if>
|
|
|
+ <if test="city != null">
|
|
|
+ city,
|
|
|
+ </if>
|
|
|
+ <if test="region != null">
|
|
|
+ region,
|
|
|
+ </if>
|
|
|
+ <if test="community != null">
|
|
|
+ community,
|
|
|
+ </if>
|
|
|
+ <if test="customerId != null">
|
|
|
+ customer_id,
|
|
|
+ </if>
|
|
|
+ <if test="concentratorId != null">
|
|
|
+ concentrator_id,
|
|
|
+ </if>
|
|
|
+ <if test="collectorId != null">
|
|
|
+ collector_id,
|
|
|
+ </if>
|
|
|
+ <if test="buildingId != null">
|
|
|
+ building_id,
|
|
|
+ </if>
|
|
|
+ <if test="location != null">
|
|
|
+ `location`,
|
|
|
+ </if>
|
|
|
+ <if test="deviceTypeId != null">
|
|
|
+ device_type_id,
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null">
|
|
|
+ device_id,
|
|
|
+ </if>
|
|
|
+ <if test="deviceNo != null">
|
|
|
+ device_no,
|
|
|
+ </if>
|
|
|
+ <if test="meterNo != null">
|
|
|
+ meter_no,
|
|
|
+ </if>
|
|
|
+ <if test="meterFileNo != null">
|
|
|
+ meter_file_no,
|
|
|
+ </if>
|
|
|
+ <if test="readTime != null">
|
|
|
+ read_time,
|
|
|
+ </if>
|
|
|
+ <if test="readStatus != null">
|
|
|
+ read_status,
|
|
|
+ </if>
|
|
|
+ <if test="readData != null">
|
|
|
+ read_data,
|
|
|
+ </if>
|
|
|
+ <if test="lastValid != null">
|
|
|
+ last_valid,
|
|
|
+ </if>
|
|
|
+ <if test="lastCost != null">
|
|
|
+ last_cost,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="dateCreate != null">
|
|
|
+ date_create,
|
|
|
+ </if>
|
|
|
+ <if test="dateUpdate != null">
|
|
|
+ date_update,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="readDate != null">
|
|
|
+ #{readDate,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ #{siteId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sysId != null">
|
|
|
+ #{sysId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="province != null">
|
|
|
+ #{province,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="city != null">
|
|
|
+ #{city,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="region != null">
|
|
|
+ #{region,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community != null">
|
|
|
+ #{community,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="customerId != null">
|
|
|
+ #{customerId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="concentratorId != null">
|
|
|
+ #{concentratorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="collectorId != null">
|
|
|
+ #{collectorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="buildingId != null">
|
|
|
+ #{buildingId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="location != null">
|
|
|
+ #{location,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deviceTypeId != null">
|
|
|
+ #{deviceTypeId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null">
|
|
|
+ #{deviceId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="deviceNo != null">
|
|
|
+ #{deviceNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="meterNo != null">
|
|
|
+ #{meterNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="meterFileNo != null">
|
|
|
+ #{meterFileNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="readTime != null">
|
|
|
+ #{readTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="readStatus != null">
|
|
|
+ #{readStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="readData != null">
|
|
|
+ #{readData,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="lastValid != null">
|
|
|
+ #{lastValid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="lastCost != null">
|
|
|
+ #{lastCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="dateCreate != null">
|
|
|
+ #{dateCreate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="dateUpdate != null">
|
|
|
+ #{dateUpdate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <insert id="batchInsert" parameterType="map">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into sc_meter_read_record
|
|
|
+ (read_date, site_id, sys_id, province, city, region, community, customer_id,
|
|
|
+ concentrator_id, collector_id, building_id, `location`, device_type_id, device_id,
|
|
|
+ device_no, meter_no, meter_file_no, read_time, read_status, read_data, last_valid,
|
|
|
+ last_cost, `status`, date_create, date_update, create_by, update_by)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (#{item.readDate,jdbcType=INTEGER}, #{item.siteId,jdbcType=INTEGER},
|
|
|
+ #{item.sysId,jdbcType=INTEGER}, #{item.province,jdbcType=INTEGER}, #{item.city,jdbcType=INTEGER},
|
|
|
+ #{item.region,jdbcType=INTEGER}, #{item.community,jdbcType=INTEGER}, #{item.customerId,jdbcType=INTEGER},
|
|
|
+ #{item.concentratorId,jdbcType=INTEGER}, #{item.collectorId,jdbcType=INTEGER},
|
|
|
+ #{item.buildingId,jdbcType=INTEGER}, #{item.location,jdbcType=VARCHAR}, #{item.deviceTypeId,jdbcType=INTEGER},
|
|
|
+ #{item.deviceId,jdbcType=BIGINT}, #{item.deviceNo,jdbcType=VARCHAR}, #{item.meterNo,jdbcType=VARCHAR},
|
|
|
+ #{item.meterFileNo,jdbcType=VARCHAR}, #{item.readTime,jdbcType=TIMESTAMP}, #{item.readStatus,jdbcType=VARCHAR},
|
|
|
+ #{item.readData,jdbcType=VARCHAR}, #{item.lastValid,jdbcType=VARCHAR}, #{item.lastCost,jdbcType=DECIMAL},
|
|
|
+ #{item.status,jdbcType=INTEGER}, #{item.dateCreate,jdbcType=TIMESTAMP}, #{item.dateUpdate,jdbcType=TIMESTAMP},
|
|
|
+ #{item.createBy,jdbcType=VARCHAR}, #{item.updateBy,jdbcType=VARCHAR})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+</mapper>
|