|
|
@@ -0,0 +1,204 @@
|
|
|
+<?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="cn.oleauto.config.mapper.ConfigStationMapper">
|
|
|
+
|
|
|
+ <resultMap type="ConfigStation" id="ConfigStationResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="stationName" column="station_name" />
|
|
|
+ <result property="stationCode" column="station_code" />
|
|
|
+ <result property="superiorAreaId" column="superior_area_id" />
|
|
|
+ <result property="periodTotal" column="period_total" />
|
|
|
+ <result property="longitude" column="longitude" />
|
|
|
+ <result property="latitude" column="latitude" />
|
|
|
+ <result property="provinceNumber" column="province_number" />
|
|
|
+ <result property="cityNumber" column="city_number" />
|
|
|
+ <result property="position" column="position" />
|
|
|
+ <result property="installedCapacity" column="installed_capacity" />
|
|
|
+ <result property="gridConnectedCapacity" column="grid_connected_capacity" />
|
|
|
+ <result property="fansPvPanelquantity" column="fans_pv_panelquantity" />
|
|
|
+ <result property="elevation" column="elevation" />
|
|
|
+ <result property="operationTime" column="operation_time" />
|
|
|
+ <result property="boosterstationVoltageLevel" column="boosterstation_voltage_level" />
|
|
|
+ <result property="boosterStationLongitude" column="booster_station_longitude" />
|
|
|
+ <result property="boosterstationLatitude" column="boosterstation_latitude" />
|
|
|
+ <result property="responsiblePersonName" column="responsible_person_name" />
|
|
|
+ <result property="responsiblePersonPhone" column="responsible_person_phone" />
|
|
|
+ <result property="isEnable" column="is_enable" />
|
|
|
+ <result property="pushStatus" column="push_status" />
|
|
|
+ <result property="subjectTotal" column="subject_total" />
|
|
|
+ <result property="isFullPower" column="is_full_power" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="stationType" column="station_type" />
|
|
|
+ <result property="systemPowerUuid" column="system_power_uuid" />
|
|
|
+ <result property="areaId" column="area_id" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectConfigStationVo">
|
|
|
+ select id, station_name, station_code, superior_area_id, period_total, longitude, latitude, province_number, city_number, position, installed_capacity, grid_connected_capacity, fans_pv_panelquantity, elevation, operation_time, boosterstation_voltage_level, booster_station_longitude, boosterstation_latitude, responsible_person_name, responsible_person_phone, is_enable, push_status, subject_total, is_full_power, is_del, create_by, create_time, update_by, update_time, station_type, system_power_uuid, area_id from config_station
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectConfigStationList" parameterType="ConfigStation" resultMap="ConfigStationResult">
|
|
|
+ <include refid="selectConfigStationVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
|
+ <if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
|
|
+ <if test="superiorAreaId != null and superiorAreaId != ''"> and superior_area_id = #{superiorAreaId}</if>
|
|
|
+ <if test="periodTotal != null "> and period_total = #{periodTotal}</if>
|
|
|
+ <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
|
+ <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
|
|
+ <if test="provinceNumber != null and provinceNumber != ''"> and province_number = #{provinceNumber}</if>
|
|
|
+ <if test="cityNumber != null and cityNumber != ''"> and city_number = #{cityNumber}</if>
|
|
|
+ <if test="position != null and position != ''"> and position = #{position}</if>
|
|
|
+ <if test="installedCapacity != null "> and installed_capacity = #{installedCapacity}</if>
|
|
|
+ <if test="gridConnectedCapacity != null "> and grid_connected_capacity = #{gridConnectedCapacity}</if>
|
|
|
+ <if test="fansPvPanelquantity != null "> and fans_pv_panelquantity = #{fansPvPanelquantity}</if>
|
|
|
+ <if test="elevation != null and elevation != ''"> and elevation = #{elevation}</if>
|
|
|
+ <if test="operationTime != null and operationTime != ''"> and operation_time = #{operationTime}</if>
|
|
|
+ <if test="boosterstationVoltageLevel != null and boosterstationVoltageLevel != ''"> and boosterstation_voltage_level = #{boosterstationVoltageLevel}</if>
|
|
|
+ <if test="boosterStationLongitude != null and boosterStationLongitude != ''"> and booster_station_longitude = #{boosterStationLongitude}</if>
|
|
|
+ <if test="boosterstationLatitude != null and boosterstationLatitude != ''"> and boosterstation_latitude = #{boosterstationLatitude}</if>
|
|
|
+ <if test="responsiblePersonName != null and responsiblePersonName != ''"> and responsible_person_name like concat('%', #{responsiblePersonName}, '%')</if>
|
|
|
+ <if test="responsiblePersonPhone != null and responsiblePersonPhone != ''"> and responsible_person_phone = #{responsiblePersonPhone}</if>
|
|
|
+ <if test="isEnable != null and isEnable != ''"> and is_enable = #{isEnable}</if>
|
|
|
+ <if test="pushStatus != null "> and push_status = #{pushStatus}</if>
|
|
|
+ <if test="subjectTotal != null "> and subject_total = #{subjectTotal}</if>
|
|
|
+ <if test="isFullPower != null and isFullPower != ''"> and is_full_power = #{isFullPower}</if>
|
|
|
+ <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
+ <if test="stationType != null "> and station_type = #{stationType}</if>
|
|
|
+ <if test="systemPowerUuid != null and systemPowerUuid != ''"> and system_power_uuid = #{systemPowerUuid}</if>
|
|
|
+ <if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectConfigStationById" parameterType="Long" resultMap="ConfigStationResult">
|
|
|
+ <include refid="selectConfigStationVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertConfigStation" parameterType="ConfigStation">
|
|
|
+ insert into config_station
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="stationName != null and stationName != ''">station_name,</if>
|
|
|
+ <if test="stationCode != null">station_code,</if>
|
|
|
+ <if test="superiorAreaId != null">superior_area_id,</if>
|
|
|
+ <if test="periodTotal != null">period_total,</if>
|
|
|
+ <if test="longitude != null and longitude != ''">longitude,</if>
|
|
|
+ <if test="latitude != null and latitude != ''">latitude,</if>
|
|
|
+ <if test="provinceNumber != null and provinceNumber != ''">province_number,</if>
|
|
|
+ <if test="cityNumber != null and cityNumber != ''">city_number,</if>
|
|
|
+ <if test="position != null">position,</if>
|
|
|
+ <if test="installedCapacity != null">installed_capacity,</if>
|
|
|
+ <if test="gridConnectedCapacity != null">grid_connected_capacity,</if>
|
|
|
+ <if test="fansPvPanelquantity != null">fans_pv_panelquantity,</if>
|
|
|
+ <if test="elevation != null">elevation,</if>
|
|
|
+ <if test="operationTime != null">operation_time,</if>
|
|
|
+ <if test="boosterstationVoltageLevel != null">boosterstation_voltage_level,</if>
|
|
|
+ <if test="boosterStationLongitude != null">booster_station_longitude,</if>
|
|
|
+ <if test="boosterstationLatitude != null">boosterstation_latitude,</if>
|
|
|
+ <if test="responsiblePersonName != null">responsible_person_name,</if>
|
|
|
+ <if test="responsiblePersonPhone != null">responsible_person_phone,</if>
|
|
|
+ <if test="isEnable != null and isEnable != ''">is_enable,</if>
|
|
|
+ <if test="pushStatus != null">push_status,</if>
|
|
|
+ <if test="subjectTotal != null">subject_total,</if>
|
|
|
+ <if test="isFullPower != null and isFullPower != ''">is_full_power,</if>
|
|
|
+ <if test="isDel != null and isDel != ''">is_del,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null and createTime != ''">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null and updateTime != ''">update_time,</if>
|
|
|
+ <if test="stationType != null">station_type,</if>
|
|
|
+ <if test="systemPowerUuid != null">system_power_uuid,</if>
|
|
|
+ <if test="areaId != null">area_id,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="stationName != null and stationName != ''">#{stationName},</if>
|
|
|
+ <if test="stationCode != null">#{stationCode},</if>
|
|
|
+ <if test="superiorAreaId != null">#{superiorAreaId},</if>
|
|
|
+ <if test="periodTotal != null">#{periodTotal},</if>
|
|
|
+ <if test="longitude != null and longitude != ''">#{longitude},</if>
|
|
|
+ <if test="latitude != null and latitude != ''">#{latitude},</if>
|
|
|
+ <if test="provinceNumber != null and provinceNumber != ''">#{provinceNumber},</if>
|
|
|
+ <if test="cityNumber != null and cityNumber != ''">#{cityNumber},</if>
|
|
|
+ <if test="position != null">#{position},</if>
|
|
|
+ <if test="installedCapacity != null">#{installedCapacity},</if>
|
|
|
+ <if test="gridConnectedCapacity != null">#{gridConnectedCapacity},</if>
|
|
|
+ <if test="fansPvPanelquantity != null">#{fansPvPanelquantity},</if>
|
|
|
+ <if test="elevation != null">#{elevation},</if>
|
|
|
+ <if test="operationTime != null">#{operationTime},</if>
|
|
|
+ <if test="boosterstationVoltageLevel != null">#{boosterstationVoltageLevel},</if>
|
|
|
+ <if test="boosterStationLongitude != null">#{boosterStationLongitude},</if>
|
|
|
+ <if test="boosterstationLatitude != null">#{boosterstationLatitude},</if>
|
|
|
+ <if test="responsiblePersonName != null">#{responsiblePersonName},</if>
|
|
|
+ <if test="responsiblePersonPhone != null">#{responsiblePersonPhone},</if>
|
|
|
+ <if test="isEnable != null and isEnable != ''">#{isEnable},</if>
|
|
|
+ <if test="pushStatus != null">#{pushStatus},</if>
|
|
|
+ <if test="subjectTotal != null">#{subjectTotal},</if>
|
|
|
+ <if test="isFullPower != null and isFullPower != ''">#{isFullPower},</if>
|
|
|
+ <if test="isDel != null and isDel != ''">#{isDel},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null and createTime != ''">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
|
|
|
+ <if test="stationType != null">#{stationType},</if>
|
|
|
+ <if test="systemPowerUuid != null">#{systemPowerUuid},</if>
|
|
|
+ <if test="areaId != null">#{areaId},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateConfigStation" parameterType="ConfigStation">
|
|
|
+ update config_station
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="stationName != null and stationName != ''">station_name = #{stationName},</if>
|
|
|
+ <if test="stationCode != null">station_code = #{stationCode},</if>
|
|
|
+ <if test="superiorAreaId != null">superior_area_id = #{superiorAreaId},</if>
|
|
|
+ <if test="periodTotal != null">period_total = #{periodTotal},</if>
|
|
|
+ <if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
|
|
|
+ <if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
|
|
|
+ <if test="provinceNumber != null and provinceNumber != ''">province_number = #{provinceNumber},</if>
|
|
|
+ <if test="cityNumber != null and cityNumber != ''">city_number = #{cityNumber},</if>
|
|
|
+ <if test="position != null">position = #{position},</if>
|
|
|
+ <if test="installedCapacity != null">installed_capacity = #{installedCapacity},</if>
|
|
|
+ <if test="gridConnectedCapacity != null">grid_connected_capacity = #{gridConnectedCapacity},</if>
|
|
|
+ <if test="fansPvPanelquantity != null">fans_pv_panelquantity = #{fansPvPanelquantity},</if>
|
|
|
+ <if test="elevation != null">elevation = #{elevation},</if>
|
|
|
+ <if test="operationTime != null">operation_time = #{operationTime},</if>
|
|
|
+ <if test="boosterstationVoltageLevel != null">boosterstation_voltage_level = #{boosterstationVoltageLevel},</if>
|
|
|
+ <if test="boosterStationLongitude != null">booster_station_longitude = #{boosterStationLongitude},</if>
|
|
|
+ <if test="boosterstationLatitude != null">boosterstation_latitude = #{boosterstationLatitude},</if>
|
|
|
+ <if test="responsiblePersonName != null">responsible_person_name = #{responsiblePersonName},</if>
|
|
|
+ <if test="responsiblePersonPhone != null">responsible_person_phone = #{responsiblePersonPhone},</if>
|
|
|
+ <if test="isEnable != null and isEnable != ''">is_enable = #{isEnable},</if>
|
|
|
+ <if test="pushStatus != null">push_status = #{pushStatus},</if>
|
|
|
+ <if test="subjectTotal != null">subject_total = #{subjectTotal},</if>
|
|
|
+ <if test="isFullPower != null and isFullPower != ''">is_full_power = #{isFullPower},</if>
|
|
|
+ <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
|
|
|
+ <if test="stationType != null">station_type = #{stationType},</if>
|
|
|
+ <if test="systemPowerUuid != null">system_power_uuid = #{systemPowerUuid},</if>
|
|
|
+ <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteConfigStationById" parameterType="Long">
|
|
|
+ delete from config_station where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteConfigStationByIds" parameterType="Long">
|
|
|
+ delete from config_station where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|