2021-12-31 10:37:40 +08:00
|
|
|
<?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">
|
2022-02-22 10:49:25 +08:00
|
|
|
<mapper namespace="com.xhpc.pp.mapper.XhpcDeviceMessageMapper">
|
2021-12-31 10:37:40 +08:00
|
|
|
|
|
|
|
|
<resultMap type="com.xhpc.pp.domain.XhpcDeviceMessage" id="XhpcDeviceMessageResult">
|
|
|
|
|
<id property="deviceMessageId" column="device_message_id"/>
|
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
|
<result property="serialNumber" column="serial_number"/>
|
|
|
|
|
<result property="content" column="content"/>
|
2022-01-12 16:07:43 +08:00
|
|
|
<result property="chargeOrderNo" column="charge_order_no"/>
|
2021-12-31 10:37:40 +08:00
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2023-09-15 15:09:04 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.xhpc.evcs.domain.XhpcChargingPile">
|
|
|
|
|
<result property="id" column="charging_pile_id"/>
|
|
|
|
|
<result property="chargingStationId" column="charging_station_id"/>
|
|
|
|
|
<result property="name" column="name"/>
|
|
|
|
|
<result property="nationalStandard" column="national_standard"/>
|
|
|
|
|
<result property="power" column="power"/>
|
|
|
|
|
<result property="auxiliaryPowerSupply" column="auxiliary_power_supply"/>
|
|
|
|
|
<result property="inputVoltage" column="input_voltage"/>
|
|
|
|
|
<result property="maxVoltage" column="max_voltage"/>
|
|
|
|
|
<result property="minVoltage" column="min_voltage"/>
|
|
|
|
|
<result property="maxElectricCurrent" column="max_electric_current"/>
|
|
|
|
|
<result property="minElectricCurrent" column="min_electric_current"/>
|
|
|
|
|
<result property="serialNumber" column="serial_number"/>
|
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
|
<result property="programVersion" column="program_version"/>
|
|
|
|
|
<result property="networkLinkType" column="network_link_type"/>
|
|
|
|
|
<result property="gunNumber" column="gun_number"/>
|
|
|
|
|
<result property="communicationProtocolVersion" column="communication_protocol_version"/>
|
|
|
|
|
<result property="communicationOperator" column="communication_operator"/>
|
|
|
|
|
<result property="simCard" column="sim_card"/>
|
|
|
|
|
<result property="rateModelId" column="rate_model_id"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="brandModel" column="brand_model"/>
|
|
|
|
|
<result property="manufactureName" column="manufacture_name"/>
|
|
|
|
|
<result property="connectorType" column="connector_type"/>
|
|
|
|
|
<result property="equipmentType" column="equipment_type"/>
|
|
|
|
|
<result property="current" column="current"/>
|
|
|
|
|
<result property="searchValue" column="search_value"/>
|
|
|
|
|
<result property="equipmentProductCode" column="equipment_product_code"/>
|
|
|
|
|
<result property="transformerID" column="transformer_id"/>
|
|
|
|
|
<result property="newNationalStandard" column="new_national_standard"/>
|
|
|
|
|
<result property="vinFlag" column="vin_flag"/>
|
|
|
|
|
<result property="equipmentStatus" column="equipment_status"/>
|
|
|
|
|
<result property="equipmentPurpose" column="equipment_purpose"/>
|
|
|
|
|
<result property="manufacturerId" column="manufacturer_id"/>
|
|
|
|
|
</resultMap>
|
2021-12-31 10:37:40 +08:00
|
|
|
<insert id="insertByDomain" parameterType="com.xhpc.pp.domain.XhpcDeviceMessage">
|
|
|
|
|
insert into xhpc_device_message(
|
2022-01-13 09:48:20 +08:00
|
|
|
|
2022-01-12 16:07:43 +08:00
|
|
|
<if test="type != null">type,</if>
|
2021-12-31 10:37:40 +08:00
|
|
|
<if test="serialNumber != null and serialNumber != 0">serial_number,</if>
|
|
|
|
|
<if test="content != null and content != ''">content,</if>
|
2022-01-12 16:07:43 +08:00
|
|
|
<if test="chargeOrderNo != null and chargeOrderNo != ''">charge_order_no,</if>
|
2021-12-31 10:37:40 +08:00
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
|
create_time,
|
|
|
|
|
update_time
|
|
|
|
|
)values(
|
2022-01-13 10:44:50 +08:00
|
|
|
<if test="type != null">#{type},</if>
|
2021-12-31 10:37:40 +08:00
|
|
|
<if test="serialNumber != null and serialNumber != 0">#{serialNumber},</if>
|
|
|
|
|
<if test="content != null and content != ''">#{content},</if>
|
2022-01-12 16:07:43 +08:00
|
|
|
<if test="chargeOrderNo != null and chargeOrderNo != ''">#{chargeOrderNo},</if>
|
2021-12-31 10:37:40 +08:00
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
|
sysdate(),
|
|
|
|
|
sysdate()
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByLastThreeMonth">
|
|
|
|
|
delete from xhpc_message
|
|
|
|
|
where create_time <![CDATA[ <= ]]> #{expireDate};
|
|
|
|
|
</delete>
|
2023-08-11 10:28:54 +08:00
|
|
|
|
2023-09-15 15:09:04 +08:00
|
|
|
<select id="getXhpcChargingPile" parameterType="com.xhpc.evcs.domain.XhpcChargingPile"
|
|
|
|
|
resultType="com.xhpc.evcs.domain.XhpcChargingPile">
|
|
|
|
|
select
|
|
|
|
|
xcp.charging_pile_id as id,
|
|
|
|
|
xcp.charging_station_id as chargingStationId,
|
|
|
|
|
xcp.name name,
|
|
|
|
|
xcp.national_standard as nationalStandard,
|
|
|
|
|
xcp.power power,
|
|
|
|
|
xcp.auxiliary_power_supply auxiliaryPowerSupply,
|
|
|
|
|
xcp.input_voltage inputVoltage,
|
|
|
|
|
xcp.max_voltage maxVoltage,
|
|
|
|
|
xcp.min_voltage minVoltage,
|
|
|
|
|
xcp.max_electric_current maxElectricCurrent,
|
|
|
|
|
xcp.min_electric_current minElectricCurrent,
|
|
|
|
|
xcp.serial_number serialNumber,
|
|
|
|
|
xcp.type type,
|
|
|
|
|
xcp.program_version programVersion,
|
|
|
|
|
xcp.network_link_type networkLinkType,
|
|
|
|
|
xcp.gun_number gunNumber,
|
|
|
|
|
xcp.communication_protocol_version communicationProtocolVersion,
|
|
|
|
|
xcp.communication_operator communicationOperator,
|
|
|
|
|
xcp.sim_card simCard,
|
|
|
|
|
xcp.status status,
|
|
|
|
|
xcp.del_flag delFlag,
|
|
|
|
|
xcp.rate_model_id rateModelId,
|
|
|
|
|
xcp.brand_model brandModel,
|
|
|
|
|
date_format(xcp.production_date,'%Y-%m-%d') productionDate,
|
|
|
|
|
xcp.manufacture_name manufactureName,
|
|
|
|
|
xcp.connector_type connectorType,
|
|
|
|
|
xcp.equipment_type equipmentType,
|
|
|
|
|
xcp.current as current,
|
|
|
|
|
xcp.search_value searchValue,
|
|
|
|
|
xcp.equipment_product_code equipmentProductCode,
|
|
|
|
|
xcp.transformer_id transformerID,
|
|
|
|
|
xcp.new_national_standard newNationalStandard,
|
|
|
|
|
xcp.vin_flag vinFlag,
|
|
|
|
|
xcp.equipment_status equipmentStatus,
|
|
|
|
|
xcp.equipment_purpose equipmentPurpose,
|
|
|
|
|
xcp.manufacturer_id manufacturerId,
|
|
|
|
|
date_format(xcs.construction_time,'%Y-%m-%d') as constructionTime
|
|
|
|
|
from xhpc_charging_pile xcp
|
|
|
|
|
left join xhpc_charging_station xcs on xcs.charging_station_id = xcp.charging_station_id
|
|
|
|
|
where xcp.serial_number =#{pileNo} and xcp.del_flag =0 limit 1
|
2023-08-11 10:28:54 +08:00
|
|
|
</select>
|
|
|
|
|
|
2023-09-15 15:09:04 +08:00
|
|
|
<select id="getXhpcChargingStation" parameterType="com.xhpc.evcs.cdjgpc.dto.CDStationInfo"
|
|
|
|
|
resultType="com.xhpc.evcs.cdjgpc.dto.CDStationInfo">
|
|
|
|
|
select CAST(ct.charging_station_id AS CHAR(10)) as stationId,
|
|
|
|
|
ct.name as stationName,
|
|
|
|
|
ct.operator_id_evcs as operatorId,
|
|
|
|
|
ct.equipment_owner_id as equipmentOwnerId,
|
|
|
|
|
ct.is_alone_apply as isAloneApply,
|
|
|
|
|
ct.account_number as accountNumber,
|
|
|
|
|
ct.capacity as capacity,
|
|
|
|
|
ct.country_code as countryCcode,
|
|
|
|
|
CAST(ct.area_code AS CHAR(10)) as areaCode,
|
|
|
|
|
ct.address as address,
|
|
|
|
|
ct.service_tel as serviceTel,
|
|
|
|
|
ct.station_type as stationType,
|
|
|
|
|
ct.is_open as isOpen,
|
|
|
|
|
ct.country_code as countryCode,
|
|
|
|
|
ct.station_status as stationStatus,
|
|
|
|
|
ct.park_nums as parkNums,
|
|
|
|
|
ROUND(ct.longitude,6) as stationLng,
|
|
|
|
|
ROUND(ct.latitude,6) as stationLat,
|
|
|
|
|
ct.construction_site as construction,
|
|
|
|
|
ct.open_all_day as openAllDay,
|
|
|
|
|
ct.busine_hours as busineHours,
|
|
|
|
|
ct.service_fee as serviceFee,
|
|
|
|
|
ct.park_free as parkFree,
|
|
|
|
|
ct.park_fee as parkFee,
|
|
|
|
|
ct.payment as payment,
|
|
|
|
|
ct.park_fee_type as parkFeeType,
|
|
|
|
|
ct.toilet_flag as toiletFlag,
|
|
|
|
|
ct.store_flag as storeFlag,
|
|
|
|
|
ct.lounge_flag as loungeFlag,
|
|
|
|
|
ct.canopy_flag as canopyFlag,
|
|
|
|
|
ct.printer_flag as printerFlag,
|
|
|
|
|
ct.barrier_flag as barrierFlag,
|
|
|
|
|
ct.parking_lock_flag as parkingLockFlag,
|
|
|
|
|
ct.is_demand_response as isDemandResponse,
|
|
|
|
|
ct.is_support_orderly_charging as isSupportOrderlyCharging,
|
|
|
|
|
ct.is_energystorage as isEnergystorage
|
|
|
|
|
from xhpc_charging_station as ct
|
|
|
|
|
where ct.charging_station_id = #{chargingStationId}
|
|
|
|
|
and ct.del_flag = 0
|
|
|
|
|
</select>
|
2021-12-31 10:37:40 +08:00
|
|
|
</mapper>
|