973 lines
44 KiB
XML
Raw Normal View History

<?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.xhpc.order.mapper.XhpcHistoryOrderMapper">
<resultMap type="com.xhpc.order.domain.XhpcHistoryOrder" id="XhpcHistoryOrderResult">
2021-09-23 10:42:06 +08:00
<id column="history_order_id" jdbcType="BIGINT" property="historyOrderId"/>
<result column="charging_station_id" jdbcType="BIGINT" property="chargingStationId"/>
<result column="charge_order_id" jdbcType="BIGINT" property="chargeOrderId"/>
<result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="terminal_id" jdbcType="BIGINT" property="terminalId"/>
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber"/>
<result column="internet_serial_number" jdbcType="VARCHAR" property="internetSerialNumber"/>
<result column="power_price_total" jdbcType="DECIMAL" property="powerPriceTotal"/>
<result column="service_price_total" jdbcType="DECIMAL" property="servicePriceTotal"/>
<result column="total_price" jdbcType="DECIMAL" property="totalPrice"/>
<result column="promotion_discount" jdbcType="DECIMAL" property="promotionDiscount"/>
<result column="act_price" jdbcType="DECIMAL" property="actPrice"/>
<result column="act_power_price" jdbcType="DECIMAL" property="actPowerPrice"/>
<result column="act_service_price" jdbcType="DECIMAL" property="actServicePrice"/>
<result column="internet_commission" jdbcType="DECIMAL" property="internetCommission"/>
<result column="internet_svc_commission" jdbcType="DECIMAL" property="internetSvcCommission"/>
<result column="platform_commission" jdbcType="DECIMAL" property="platformCommission"/>
<result column="platform_svc_commisssion" jdbcType="DECIMAL" property="platformSvcCommisssion"/>
<result column="operation_commission" jdbcType="DECIMAL" property="operationCommission"/>
<result column="operation_svc_commission" jdbcType="DECIMAL" property="operationSvcCommission"/>
<result column="start_soc" jdbcType="VARCHAR" property="startSoc"/>
<result column="end_soc" jdbcType="VARCHAR" property="endSoc"/>
<result column="reconciliation_status" jdbcType="INTEGER" property="reconciliationStatus"/>
<result column="sorting_status" jdbcType="INTEGER" property="sortingStatus"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="vin_normal" jdbcType="VARCHAR" property="vinNormal"/>
<result column="search_value" jdbcType="VARCHAR" property="searchValue"/>
<result column="operator_id_evcs" jdbcType="VARCHAR" property="operatorIdEvcs"/>
<result column="charge_model_evcs" jdbcType="INTEGER" property="chargeModelEvcs"/>
<result column="connector_power_evcs" jdbcType="DOUBLE" property="connectorPowerEvcs"/>
<result column="meter_value_end_evcs" jdbcType="DOUBLE" property="meterValueEndEvcs"/>
<result column="meter_value_start_evcs" jdbcType="DOUBLE" property="meterValueStartEvcs"/>
<result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs"/>
<result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
2021-10-22 14:37:29 +08:00
<result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
2021-09-23 10:42:06 +08:00
<result column="stop_reason_evcs" jdbcType="INTEGER" property="stopReasonEvcs"/>
<result column="rate_model_id" jdbcType="BIGINT" property="rateModelId"/>
2021-09-23 10:42:06 +08:00
<result column="total_power" jdbcType="DOUBLE" property="totalPower"/>
<result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
2021-12-15 15:14:59 +08:00
<result column="internet_degree_commission" jdbcType="DECIMAL" property="internetDegreeCommission"/>
<result column="source" jdbcType="INTEGER" property="source"/>
</resultMap>
2021-09-23 10:42:06 +08:00
<sql id="Base_Column_List">
history_order_id, charging_station_id, charge_order_id, user_id, terminal_id, serial_number,
internet_serial_number, power_price_total, service_price_total, total_price, promotion_discount,
act_price, act_power_price, act_service_price, internet_commission, internet_svc_commission,
platform_commission, platform_svc_commisssion, operation_commission, operation_svc_commission,
start_soc, end_soc, reconciliation_status, sorting_status, `type`, `status`, del_flag,
create_time, create_by, update_time, update_by, remark, `state`, vin_normal, search_value,
operator_id_evcs, charge_model_evcs, connector_power_evcs, meter_value_end_evcs,
meter_value_start_evcs, operator_id3rdpty_evcs, start_time, stop_reason_evcs, total_power,
user_name_evcs, phone, rate_model_id
2021-09-23 10:42:06 +08:00
</sql>
<insert id="insert" parameterType="com.xhpc.order.domain.XhpcHistoryOrder" useGeneratedKeys="true"
keyProperty="historyOrderId">
INSERT INTO xhpc_history_order
<trim prefix="(" suffix=")" suffixOverrides=",">
2021-09-23 10:42:06 +08:00
<if test="chargingStationId != null">
charging_station_id,
</if>
2021-09-23 10:42:06 +08:00
<if test="chargeOrderId != null">
2021-08-09 18:47:43 +08:00
charge_order_id,
</if>
2021-09-23 10:42:06 +08:00
<if test="userId != null">
user_id,
</if>
2021-09-23 10:42:06 +08:00
<if test="terminalId != null">
terminal_id,
</if>
2021-09-23 10:42:06 +08:00
<if test="serialNumber != null">
serial_number,
</if>
2021-09-23 10:42:06 +08:00
<if test="internetSerialNumber != null">
internet_serial_number,
</if>
2021-09-23 10:42:06 +08:00
<if test="powerPriceTotal != null">
power_price_total,
</if>
<if test="servicePriceTotal != null">
service_price_total,
</if>
<if test="totalPrice != null">
total_price,
</if>
2021-09-23 10:42:06 +08:00
<if test="promotionDiscount != null">
promotion_discount,
</if>
2021-09-23 10:42:06 +08:00
<if test="actPrice != null">
act_price,
</if>
2021-09-23 10:42:06 +08:00
<if test="actPowerPrice != null">
act_power_price,
</if>
2021-09-23 10:42:06 +08:00
<if test="actServicePrice != null">
act_service_price,
</if>
2021-09-23 10:42:06 +08:00
<if test="internetCommission != null">
internet_commission,
</if>
2021-09-23 10:42:06 +08:00
<if test="internetSvcCommission != null">
internet_svc_commission,
</if>
2021-09-23 10:42:06 +08:00
<if test="platformCommission != null">
platform_commission,
</if>
2021-09-23 10:42:06 +08:00
<if test="platformSvcCommisssion != null">
platform_svc_commisssion,
</if>
2021-09-23 10:42:06 +08:00
<if test="operationCommission != null">
operation_commission,
</if>
2021-09-23 10:42:06 +08:00
<if test="operationSvcCommission != null">
operation_svc_commission,
</if>
2021-09-23 10:42:06 +08:00
<if test="startSoc != null">
start_soc,
</if>
2021-09-23 10:42:06 +08:00
<if test="endSoc != null">
end_soc,
</if>
2021-09-23 10:42:06 +08:00
<if test="reconciliationStatus != null">
reconciliation_status,
</if>
2021-09-23 10:42:06 +08:00
<if test="sortingStatus != null">
sorting_status,
</if>
2021-09-23 10:42:06 +08:00
<if test="type != null">
`type`,
</if>
2021-09-23 10:42:06 +08:00
<if test="status != null">
`status`,
</if>
2021-09-23 10:42:06 +08:00
<if test="delFlag != null">
del_flag,
</if>
2021-09-23 10:42:06 +08:00
<if test="createTime != null">
create_time,
</if>
2021-09-23 10:42:06 +08:00
<if test="createBy != null">
create_by,
</if>
2021-09-23 10:42:06 +08:00
<if test="updateTime != null">
update_time,
</if>
2021-09-23 10:42:06 +08:00
<if test="updateBy != null">
update_by,
</if>
2021-09-23 10:42:06 +08:00
<if test="remark != null">
2021-08-25 18:45:52 +08:00
remark,
</if>
2021-09-23 10:42:06 +08:00
<if test="state != null">
`state`,
2021-08-25 18:45:52 +08:00
</if>
2021-09-23 10:42:06 +08:00
<if test="vinNormal != null">
vin_normal,
</if>
<if test="searchValue != null">
search_value,
</if>
<if test="operatorIdEvcs != null">
operator_id_evcs,
</if>
<if test="chargeModelEvcs != null">
charge_model_evcs,
</if>
2021-09-23 10:42:06 +08:00
<if test="connectorPowerEvcs != null">
connector_power_evcs,
</if>
<if test="meterValueEndEvcs != null">
meter_value_end_evcs,
</if>
<if test="meterValueStartEvcs != null">
meter_value_start_evcs,
</if>
<if test="operatorId3rdptyEvcs != null">
operator_id3rdpty_evcs,
</if>
<if test="startTime != null">
start_time,
</if>
2021-10-22 14:37:29 +08:00
<if test="endTime != null">
end_time,
</if>
2021-09-23 10:42:06 +08:00
<if test="stopReasonEvcs != null">
stop_reason_evcs,
</if>
<if test="null != rateModelId">
rate_model_id,
</if>
2021-09-23 10:42:06 +08:00
<if test="totalPower != null">
total_power,
</if>
<if test="userNameEvcs != null">
user_name_evcs,
</if>
<if test="phone != null">
2021-10-08 15:41:14 +08:00
phone,
</if>
<if test="chargingMode != null">
charging_mode,
</if>
2021-12-15 15:14:59 +08:00
<if test="source != null">
source,
</if>
<if test="internetDegreeCommission != null">
internet_degree_commission,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
2021-09-23 10:42:06 +08:00
<if test="chargingStationId != null">
2021-10-08 15:41:14 +08:00
#{chargingStationId,jdbcType=BIGINT},
2021-09-23 10:42:06 +08:00
</if>
<if test="chargeOrderId != null">
2021-10-08 15:41:14 +08:00
#{chargeOrderId,jdbcType=BIGINT},
2021-09-23 10:42:06 +08:00
</if>
<if test="userId != null">
2021-10-08 15:41:14 +08:00
#{userId,jdbcType=BIGINT},
</if>
2021-09-23 10:42:06 +08:00
<if test="terminalId != null">
2021-10-08 15:41:14 +08:00
#{terminalId,jdbcType=BIGINT},
</if>
2021-09-23 10:42:06 +08:00
<if test="serialNumber != null">
2021-10-08 15:41:14 +08:00
#{serialNumber,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="internetSerialNumber != null">
2021-10-08 15:41:14 +08:00
#{internetSerialNumber,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="powerPriceTotal != null">
2021-10-08 15:41:14 +08:00
#{powerPriceTotal,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="servicePriceTotal != null">
2021-10-08 15:41:14 +08:00
#{servicePriceTotal,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="totalPrice != null">
2021-10-08 15:41:14 +08:00
#{totalPrice,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="promotionDiscount != null">
#{promotionDiscount},
</if>
2021-09-23 10:42:06 +08:00
<if test="actPrice != null">
2021-10-08 15:41:14 +08:00
#{actPrice,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="actPowerPrice != null">
2021-10-08 15:41:14 +08:00
#{actPowerPrice,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="actServicePrice != null">
2021-10-08 15:41:14 +08:00
#{actServicePrice,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="internetCommission != null">
2021-10-08 15:41:14 +08:00
#{internetCommission,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="internetSvcCommission != null">
2021-10-08 15:41:14 +08:00
#{internetSvcCommission,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="platformCommission != null">
2021-10-08 15:41:14 +08:00
#{platformCommission,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="platformSvcCommisssion != null">
2021-10-08 15:41:14 +08:00
#{platformSvcCommisssion,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="operationCommission != null">
2021-10-08 15:41:14 +08:00
#{operationCommission,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="operationSvcCommission != null">
2021-10-08 15:41:14 +08:00
#{operationSvcCommission,jdbcType=DECIMAL},
</if>
2021-09-23 10:42:06 +08:00
<if test="startSoc != null">
2021-10-08 15:41:14 +08:00
#{startSoc,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="endSoc != null">
2021-10-08 15:41:14 +08:00
#{endSoc,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="reconciliationStatus != null">
2021-10-08 15:41:14 +08:00
#{reconciliationStatus,jdbcType=INTEGER},
</if>
2021-09-23 10:42:06 +08:00
<if test="sortingStatus != null">
2021-10-08 15:41:14 +08:00
#{sortingStatus,jdbcType=INTEGER},
</if>
2021-09-23 10:42:06 +08:00
<if test="type != null">
2021-10-08 15:41:14 +08:00
#{type,jdbcType=TINYINT},
</if>
2021-09-23 10:42:06 +08:00
<if test="status != null">
2021-10-08 15:41:14 +08:00
#{status,jdbcType=INTEGER},
</if>
2021-09-23 10:42:06 +08:00
<if test="delFlag != null">
2021-10-08 15:41:14 +08:00
#{delFlag,jdbcType=INTEGER},
</if>
2021-09-23 10:42:06 +08:00
<if test="createTime != null">
2021-10-08 15:41:14 +08:00
#{createTime,jdbcType=TIMESTAMP},
</if>
2021-09-23 10:42:06 +08:00
<if test="createBy != null">
2021-10-08 15:41:14 +08:00
#{createBy,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="updateTime != null">
2021-10-08 15:41:14 +08:00
#{updateTime,jdbcType=TIMESTAMP},
</if>
2021-09-23 10:42:06 +08:00
<if test="updateBy != null">
2021-10-08 15:41:14 +08:00
#{updateBy,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="remark != null">
2021-10-08 15:41:14 +08:00
#{remark,jdbcType=VARCHAR},
2021-08-25 18:45:52 +08:00
</if>
2021-09-23 10:42:06 +08:00
<if test="state != null">
2021-10-08 15:41:14 +08:00
#{state,jdbcType=INTEGER},
2021-08-25 18:45:52 +08:00
</if>
2021-09-23 10:42:06 +08:00
<if test="vinNormal != null">
2021-10-08 15:41:14 +08:00
#{vinNormal,jdbcType=VARCHAR},
</if>
2021-09-23 10:42:06 +08:00
<if test="searchValue != null">
2021-10-08 15:41:14 +08:00
#{searchValue,jdbcType=VARCHAR},
2021-09-23 10:42:06 +08:00
</if>
<if test="operatorIdEvcs != null">
2021-10-08 15:41:14 +08:00
#{operatorIdEvcs,jdbcType=VARCHAR},
2021-09-23 10:42:06 +08:00
</if>
<if test="chargeModelEvcs != null">
2021-10-08 15:41:14 +08:00
#{chargeModelEvcs,jdbcType=INTEGER},
2021-09-23 10:42:06 +08:00
</if>
<if test="connectorPowerEvcs != null">
2021-10-08 15:41:14 +08:00
#{connectorPowerEvcs,jdbcType=DOUBLE},
2021-09-23 10:42:06 +08:00
</if>
<if test="meterValueEndEvcs != null">
2021-10-08 15:41:14 +08:00
#{meterValueEndEvcs,jdbcType=DOUBLE},
2021-09-23 10:42:06 +08:00
</if>
<if test="meterValueStartEvcs != null">
2021-10-08 15:41:14 +08:00
#{meterValueStartEvcs,jdbcType=DOUBLE},
2021-09-23 10:42:06 +08:00
</if>
<if test="operatorId3rdptyEvcs != null">
2021-10-08 15:41:14 +08:00
#{operatorId3rdptyEvcs,jdbcType=VARCHAR},
2021-09-23 10:42:06 +08:00
</if>
<if test="startTime != null">
2021-10-08 15:41:14 +08:00
#{startTime,jdbcType=TIMESTAMP},
2021-09-23 10:42:06 +08:00
</if>
2021-10-22 14:37:29 +08:00
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
2021-09-23 10:42:06 +08:00
<if test="stopReasonEvcs != null">
2021-10-08 15:41:14 +08:00
#{stopReasonEvcs,jdbcType=INTEGER},
2021-09-23 10:42:06 +08:00
</if>
<if test="null != rateModelId">
#{rateModelId},
</if>
2021-09-23 10:42:06 +08:00
<if test="totalPower != null">
2021-10-08 15:41:14 +08:00
#{totalPower,jdbcType=DOUBLE},
2021-09-23 10:42:06 +08:00
</if>
<if test="userNameEvcs != null">
2021-10-08 15:41:14 +08:00
#{userNameEvcs,jdbcType=VARCHAR},
2021-09-23 10:42:06 +08:00
</if>
<if test="phone != null">
2021-10-08 15:41:14 +08:00
#{phone,jdbcType=VARCHAR},
</if>
<if test="chargingMode != null">
#{chargingMode,jdbcType=VARCHAR},
</if>
2021-12-15 15:14:59 +08:00
<if test="source != null">
#{source},
</if>
<if test="internetDegreeCommission != null">
#{internetDegreeCommission},
</if>
</trim>
</insert>
<update id="update" parameterType="com.xhpc.order.domain.XhpcHistoryOrder">
UPDATE xhpc_history_order
<set>
2021-09-23 10:42:06 +08:00
<if test="chargingStationId != null">
2021-09-27 09:49:43 +08:00
charging_station_id = #{chargingStationId},
2021-09-23 10:42:06 +08:00
</if>
<if test="chargeOrderId != null">
2021-09-27 09:49:43 +08:00
charge_order_id = #{chargeOrderId},
2021-09-23 10:42:06 +08:00
</if>
<if test="userId != null">
2021-09-27 09:49:43 +08:00
user_id = #{userId},
2021-09-23 10:42:06 +08:00
</if>
<if test="terminalId != null">
2021-09-27 09:49:43 +08:00
terminal_id = #{terminalId},
2021-09-23 10:42:06 +08:00
</if>
<if test="serialNumber != null">
2021-09-27 09:49:43 +08:00
serial_number = #{serialNumber},
2021-09-23 10:42:06 +08:00
</if>
<if test="internetSerialNumber != null">
2021-09-27 09:49:43 +08:00
internet_serial_number = #{internetSerialNumber},
2021-09-23 10:42:06 +08:00
</if>
<if test="powerPriceTotal != null">
2021-09-27 09:49:43 +08:00
power_price_total = #{powerPriceTotal},
2021-09-23 10:42:06 +08:00
</if>
<if test="servicePriceTotal != null">
2021-09-27 09:49:43 +08:00
service_price_total = #{servicePriceTotal},
2021-09-23 10:42:06 +08:00
</if>
<if test="totalPrice != null">
2021-09-27 09:49:43 +08:00
total_price = #{totalPrice},
2021-09-23 10:42:06 +08:00
</if>
<if test="promotionDiscount != null">
2021-09-27 09:49:43 +08:00
promotion_discount = #{promotionDiscount},
2021-09-23 10:42:06 +08:00
</if>
<if test="actPrice != null">
2021-09-27 09:49:43 +08:00
act_price = #{actPrice},
2021-09-23 10:42:06 +08:00
</if>
<if test="actPowerPrice != null">
2021-09-27 09:49:43 +08:00
act_power_price = #{actPowerPrice},
2021-09-23 10:42:06 +08:00
</if>
<if test="actServicePrice != null">
2021-09-27 09:49:43 +08:00
act_service_price = #{actServicePrice},
2021-09-23 10:42:06 +08:00
</if>
<if test="internetCommission != null">
2021-09-27 09:49:43 +08:00
internet_commission = #{internetCommission},
2021-09-23 10:42:06 +08:00
</if>
<if test="internetSvcCommission != null">
2021-09-27 09:49:43 +08:00
internet_svc_commission = #{internetSvcCommission},
2021-09-23 10:42:06 +08:00
</if>
<if test="platformCommission != null">
2021-09-27 09:49:43 +08:00
platform_commission = #{platformCommission},
2021-09-23 10:42:06 +08:00
</if>
<if test="platformSvcCommisssion != null">
2021-09-27 09:49:43 +08:00
platform_svc_commisssion = #{platformSvcCommisssion},
2021-09-23 10:42:06 +08:00
</if>
<if test="operationCommission != null">
2021-09-27 09:49:43 +08:00
operation_commission = #{operationCommission},
2021-09-23 10:42:06 +08:00
</if>
<if test="operationSvcCommission != null">
2021-09-27 09:49:43 +08:00
operation_svc_commission = #{operationSvcCommission},
2021-09-23 10:42:06 +08:00
</if>
<if test="startSoc != null">
2021-09-27 09:49:43 +08:00
start_soc = #{startSoc},
2021-09-23 10:42:06 +08:00
</if>
<if test="endSoc != null">
2021-09-27 09:49:43 +08:00
end_soc = #{endSoc},
2021-09-23 10:42:06 +08:00
</if>
<if test="reconciliationStatus != null">
2021-09-27 09:49:43 +08:00
reconciliation_status = #{reconciliationStatus},
2021-09-23 10:42:06 +08:00
</if>
<if test="sortingStatus != null">
2021-09-27 09:49:43 +08:00
sorting_status = #{sortingStatus},
2021-09-23 10:42:06 +08:00
</if>
<if test="type != null">
2021-09-27 09:49:43 +08:00
`type` = #{type},
2021-09-23 10:42:06 +08:00
</if>
<if test="status != null">
2021-09-27 09:49:43 +08:00
`status` = #{status},
2021-09-23 10:42:06 +08:00
</if>
<if test="delFlag != null">
2021-09-27 09:49:43 +08:00
del_flag = #{delFlag},
2021-09-23 10:42:06 +08:00
</if>
<if test="createTime != null">
2021-09-27 09:49:43 +08:00
create_time = #{createTime},
2021-09-23 10:42:06 +08:00
</if>
<if test="createBy != null">
2021-09-27 09:49:43 +08:00
create_by = #{createBy},
2021-09-23 10:42:06 +08:00
</if>
<if test="updateTime != null">
2021-09-27 09:49:43 +08:00
update_time = #{updateTime},
2021-09-23 10:42:06 +08:00
</if>
<if test="updateBy != null">
2021-09-27 09:49:43 +08:00
update_by = #{updateBy},
2021-09-23 10:42:06 +08:00
</if>
<if test="remark != null">
2021-09-27 09:49:43 +08:00
remark = #{remark},
2021-09-23 10:42:06 +08:00
</if>
<if test="state != null">
2021-09-27 09:49:43 +08:00
`state` = #{state},
2021-09-23 10:42:06 +08:00
</if>
<if test="vinNormal != null">
2021-09-27 09:49:43 +08:00
vin_normal = #{vinNormal},
2021-09-23 10:42:06 +08:00
</if>
<if test="searchValue != null">
2021-09-27 09:49:43 +08:00
search_value = #{searchValue},
2021-09-23 10:42:06 +08:00
</if>
<if test="operatorIdEvcs != null">
2021-09-27 09:49:43 +08:00
operator_id_evcs = #{operatorIdEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="chargeModelEvcs != null">
2021-09-27 09:49:43 +08:00
charge_model_evcs = #{chargeModelEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="connectorPowerEvcs != null">
2021-09-27 09:49:43 +08:00
connector_power_evcs = #{connectorPowerEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="meterValueEndEvcs != null">
2021-09-27 09:49:43 +08:00
meter_value_end_evcs = #{meterValueEndEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="meterValueStartEvcs != null">
2021-09-27 09:49:43 +08:00
meter_value_start_evcs = #{meterValueStartEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="operatorId3rdptyEvcs != null">
2021-09-27 09:49:43 +08:00
operator_id3rdpty_evcs = #{operatorId3rdptyEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="startTime != null">
2021-09-27 09:49:43 +08:00
start_time = #{startTime},
2021-09-23 10:42:06 +08:00
</if>
<if test="stopReasonEvcs != null">
2021-09-27 09:49:43 +08:00
stop_reason_evcs = #{stopReasonEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="totalPower != null">
2021-09-27 09:49:43 +08:00
total_power = #{totalPower},
2021-09-23 10:42:06 +08:00
</if>
<if test="userNameEvcs != null">
2021-09-27 09:49:43 +08:00
user_name_evcs = #{userNameEvcs},
2021-09-23 10:42:06 +08:00
</if>
<if test="phone != null">
2021-09-27 09:49:43 +08:00
phone = #{phone},
2021-09-23 10:42:06 +08:00
</if>
</set>
2021-09-27 09:49:43 +08:00
where history_order_id = #{historyOrderId}
</update>
<select id="info" parameterType="java.lang.Long" resultMap="XhpcHistoryOrderResult">
select *
from xhpc_history_order xho
where xho.del_flag = 0 and xho.history_order_id = #{historyOrderId}
</select>
2021-07-26 18:02:59 +08:00
2021-08-06 18:46:55 +08:00
<update id="updateReconciliation" parameterType="java.lang.String">
2021-07-26 18:02:59 +08:00
update xhpc_history_order set reconciliation_status = #{status} where history_order_id in
2021-08-06 18:46:55 +08:00
<foreach collection="xhpcHistoryOrderIds" item="item" open="(" separator="," close=")">
#{item}
2021-07-26 18:02:59 +08:00
</foreach>
</update>
2021-08-06 18:46:55 +08:00
<update id="updateSorting" parameterType="java.lang.String">
2021-07-26 18:02:59 +08:00
update xhpc_history_order set sorting_status = #{status} where history_order_id in
2021-08-06 18:46:55 +08:00
<foreach collection="xhpcHistoryOrderIds" item="item" open="(" separator="," close=")">
#{item}
2021-07-26 18:02:59 +08:00
</foreach>
</update>
2021-08-03 22:41:53 +08:00
<select id="list" resultType="map">
SELECT
ho.history_order_id as historyOrderId,
ho.serial_number as serialNumber,
ho.create_time as createTime,
co.status as status,
2021-08-03 22:41:53 +08:00
cs.name as chargingStationName,
te.name as terminalName,
ho.act_price as actPrice,
co.charging_degree as chargingDegree,
co.charging_time as chargingTime
2021-08-03 22:41:53 +08:00
FROM xhpc_history_order as ho
LEFT JOIN xhpc_charging_station as cs on cs.charging_station_id = ho.charging_station_id
LEFT JOIN xhpc_terminal as te on te.terminal_id = ho.terminal_id
2021-08-09 18:47:43 +08:00
left join xhpc_charge_order as co on co.charge_order_id =ho.charge_order_id
2021-08-03 22:41:53 +08:00
where ho.status=0 and ho.del_flag=0 and ho.user_id =#{userId}
2022-01-05 14:52:00 +08:00
<if test="tenantId !=null and tenantId !=''">
and ho.tenant_id =#{tenantId}
</if>
<if test="source !=null">
and ho.source =#{source}
</if>
2021-08-24 13:59:16 +08:00
order by ho.create_time desc
2021-08-03 22:41:53 +08:00
</select>
<select id="gethistotyOrderMessage" resultType="map">
SELECT
ho.history_order_id as historyOrderId,
ho.serial_number as serialNumber,
ho.type as type,
cs.name as chargingStationName,
te.name as terminalName,
ho.act_price as actPrice,
ho.act_power_price as actPowerPrice,
co.charging_time as chargingTime,
co.charging_degree as chargingDegree,
DATE_FORMAT(co.start_time,'%m月%d日') as daysOne,
2021-09-02 20:08:21 +08:00
DATE_FORMAT(co.start_time,'%H:%i:%s') as timeOne,
DATE_FORMAT(co.end_time,'%m月%d日') as daysTwo,
2021-09-02 20:08:21 +08:00
DATE_FORMAT(co.end_time,'%H:%i:%s') as timeTwo,
2021-08-11 16:25:10 +08:00
co.status as status,
2021-09-03 14:24:44 +08:00
co.type as type,
case when co.type=40 then "APP远程停止"
when co.type=41 then "SOC达到100%"
when co.type=42 then "充电电量满足设定条件"
when co.type=43 then "充电金额满足设定条件"
when co.type=44 then "充电时间满足设定条件"
when co.type=45 then "手动停止充电"
when co.type=46 then "手动停止充电."
when co.type=47 then "手动停止充电.."
when co.type=48 then "急停停止充电"
when co.type=49 then "手动停止充电..."
2021-09-23 12:06:14 +08:00
else "手动停止充电!"
2021-09-03 14:24:44 +08:00
end typeName
2021-08-03 22:41:53 +08:00
FROM xhpc_history_order as ho
LEFT JOIN xhpc_charging_station as cs on cs.charging_station_id = ho.charging_station_id
LEFT JOIN xhpc_terminal as te on te.terminal_id = ho.terminal_id
2021-08-09 18:47:43 +08:00
left join xhpc_charge_order as co on co.charge_order_id =ho.charge_order_id
2021-08-11 16:25:10 +08:00
where ho.status=0 and ho.del_flag=0
2021-08-03 22:41:53 +08:00
<if test="userId !=null">
and ho.user_id =#{userId}
</if>
2021-08-11 16:25:10 +08:00
<if test="historyOrderId !=null">
and ho.history_order_id =#{historyOrderId}
</if>
<if test="chargingOrderId !=null">
and ho.charge_order_id =#{chargingOrderId}
</if>
<if test="tenantId !=null and tenantId !=''">
and ho.tenant_id =#{tenantId}
</if>
2022-01-13 19:07:34 +08:00
<if test="source !=null ">
and ho.source =#{source}
</if>
2021-08-31 19:47:36 +08:00
order by ho.create_time desc
2021-08-03 22:41:53 +08:00
</select>
<select id="getListPage" resultType="map">
select
ho.history_order_id as historyOrderId,
2021-08-25 18:45:52 +08:00
co.charge_order_id as chargeOrderId,
ho.serial_number as serialNumber,
ct.name as chargingStationName,
ter.pile_serial_number as pileSerialNumber,
ter.name as terminalName,
op.operator_id as operatorId,
op.name as operatorName,
cp.power as power,
cp.type as type,
ho.type as orderType,
ho.start_soc as startSoc,
ho.end_soc as endSoc,
2021-11-30 18:21:02 +08:00
ho.vin_normal as vinCode,
ho.internet_serial_number as internetSerialNumber,
2021-11-30 18:21:02 +08:00
ho.evcs_order_no as evcsOrderNo,
ho.total_price as totalPrice,
ho.act_price as actPrice,
2021-11-11 16:27:36 +08:00
ho.confirm_Result as confirmResult,
co.charging_time as chargingTime,
co.charging_degree as chargingDegree,
co.start_time as startTime,
co.end_time as endTime,
co.update_time as updateTime,
co.source as source,
2021-11-22 18:53:46 +08:00
co.Plate_num as plateNum,
dispute_order_status as disputeOrderStatus,
2021-11-30 18:21:02 +08:00
inu.phone as internetUserPhone,
inu.name as internetName,
2021-12-15 15:14:59 +08:00
apu.phone as appUserPhone,
2021-12-15 17:01:50 +08:00
ho.power_price_total as powerPriceTotal,
ho.service_price_total as servicePriceTotal,
ho.total_price as totalPrice,
ho.promotion_discount as promotionDiscount,
ho.act_price as actPrice,
ho.act_power_price as actPowerPrice,
ho.act_service_price as actServicePrice,
(ho.act_power_price+ho.act_service_price) as actSumPrice,
ho.internet_commission as internetCommission,
ho.internet_svc_commission as internetSvcCommission,
ho.internet_degree_commission as internetDegreeCommission,
ho.platform_commission as platformCommission,
ho.platform_svc_commisssion as platformSvcCommisssion,
ho.operation_commission as operationCommission,
ho.operation_svc_commission as operationSvcCommission,
2021-12-15 15:14:59 +08:00
case when co.source=0 then "C端用户"
when co.source=1 then "流量方用户"
when co.source=2 then "社区用户"
else "B端客户!"
end sourceName,
case when ho.charging_mode="1" then "快电"
when ho.charging_mode="2" then "恒大"
when ho.charging_mode="3" then "新电途"
when ho.charging_mode="4" then "小桔"
when ho.charging_mode="微信" then "微信"
when ho.charging_mode="支付宝" then "支付宝"
else "C端客户"
end chargingModeName
from xhpc_history_order as ho
left join xhpc_charging_station as ct on ct.charging_station_id = ho.charging_station_id
left join xhpc_operator as op on op.operator_id = ct.operator_id
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id
left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id
left join et_dispute_orders as ed on ed.start_charge_seq = ho.internet_serial_number and ed.dispute_order_status !=2
2021-11-30 18:21:02 +08:00
left join xhpc_internet_user as inu on inu.internet_user_id = ho.user_id and ho.internet_serial_number is not null
left join xhpc_app_user as apu on apu.app_user_id = ho.user_id and ho.internet_serial_number is null
2021-12-27 15:45:06 +08:00
<if test="number==1">
inner join (
select xiu.internet_user_id as user_id from xhpc_internet_user as xiu inner join(select user_id from xhpc_history_order where source=1) us1 on us1.user_id = xiu.internet_user_id where xiu.phone like concat('%', #{phone}, '%')
union
select xau.app_user_id as user_id from xhpc_app_user as xau inner join(select user_id from xhpc_history_order where source=0) us2 on us2.user_id = xau.app_user_id where xau.phone like concat('%', #{phone}, '%')
union
select xcp.community_personnel_id as user_id from xhpc_community_personnel as xcp inner join(select user_id from xhpc_history_order where source=2)us3 on us3.user_id = xcp.community_personnel_id where xcp.account like concat('%', #{phone}, '%')
2021-12-27 15:45:06 +08:00
union
select xcup.customers_personnel_id as user_id from xhpc_customers_personnel as xcup inner join(select user_id from xhpc_history_order where source=3)us3 on us4.user_id = xcup.customers_personnel_id where xcup.account like concat('%', #{phone}, '%')
2021-12-27 15:45:06 +08:00
) ut on ut.app_user_id = ho.user_id
</if>
2021-11-30 18:21:02 +08:00
where ho.status =0 and ho.del_flag=0
<if test="type !=null">
and ho.type=#{type}
</if>
2021-11-22 18:53:46 +08:00
<if test="source !=null">
and ho.source=#{source}
2021-11-22 18:53:46 +08:00
</if>
2021-11-30 18:21:02 +08:00
<if test="plateNum !=null and plateNum !=''">
2021-12-01 12:02:29 +08:00
and co.Plate_num like concat('%', #{plateNum}, '%')
2021-11-30 18:21:02 +08:00
</if>
<if test="internetId !=null">
and inu.internet_user_id=#{internetId}
</if>
<if test="internetSerialNumber !=null and internetSerialNumber !=''">
and ho.internet_serial_number like concat('%', #{internetSerialNumber}, '%')
</if>
<if test="terminalName !=null and terminalName !=''">
2022-01-07 13:45:59 +08:00
and ter.name like concat(#{terminalName}, '%')
2021-11-30 18:21:02 +08:00
</if>
<if test="vinCode !=null and vinCode !=''">
and ho.vin_normal like concat('%', #{vinCode}, '%')
</if>
<if test="evcsOrderNo !=null and evcsOrderNo !=''">
and co.evcs_order_no like concat('%', #{evcsOrderNo}, '%')
</if>
<if test="beginStartTime !=null and beginStartTime !=''">
and ho.start_time &gt;= #{beginStartTime}
</if>
<if test="beginEndTime !=null and beginEndTime !=''">
and ho.start_time &lt;= #{beginEndTime}
</if>
<if test="overStartTime !=null and overStartTime !=''">
and ho.end_time &gt;= #{overStartTime}
</if>
2021-11-30 18:21:02 +08:00
<if test="overEndTime !=null and overEndTime !=''">
and ho.end_time &lt;= #{overEndTime}
</if>
<if test="transactionNumber !=null and transactionNumber !=''">
and ho.serial_number like concat('%', #{transactionNumber}, '%')
</if>
<if test="chargingStationName !=null and chargingStationName !=''">
2021-11-11 01:22:40 +08:00
and ct.name like concat('%', #{chargingStationName}, '%')
</if>
<if test="operatorId !=null">
and op.operator_id =#{operatorId}
</if>
2021-12-27 15:45:06 +08:00
<if test="number==2">
<if test="source ==0">
and ho.user_id in(select app_user_id from xhpc_app_user where app_user_id in (select user_id from xhpc_history_order where source=0))
</if>
<if test="source ==1">
and ho.user_id in(select internet_user_id from xhpc_internet_user where internet_user_id in (select user_id from xhpc_history_order where source=1))
</if>
<if test="source ==2">
and ho.user_id in(select community_personnel_id from xhpc_community_personnel where community_personnel_id in (select user_id from xhpc_history_order where source=2))
</if>
<if test="source ==3">
and ho.user_id in(select customers_personnel_id from xhpc_customers_personnel where customers_personnel_id in (select user_id from xhpc_history_order where source=3))
</if>
</if>
<if test="number==3">
<if test="source ==0">
and ho.user_id in(select app_user_id from xhpc_app_user where phone like concat('%', #{phone}, '%') and app_user_id in (select user_id from xhpc_history_order where source=0))
</if>
<if test="source ==1">
and ho.user_id in(select internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%') and internet_user_id in (select user_id from xhpc_history_order where source=1))
</if>
<if test="source ==2">
and ho.user_id in(select community_personnel_id from xhpc_community_personnel where account like concat('%', #{phone}, '%') and community_personnel_id in (select user_id from xhpc_history_order where source=2))
</if>
<if test="source ==3">
and ho.user_id in(select customers_personnel_id from xhpc_customers_personnel where account like concat('%', #{phone}, '%') and customers_personnel_id in (select user_id from xhpc_history_order where source=3))
</if>
</if>
<if test="status==1">
and co.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{userId})
</if>
<if test="status==2">
and co.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{userId})
</if>
<if test="personnelId !=null">
and ho.user_id=#{personnelId}
</if>
order by ho.create_time desc
</select>
2021-08-25 18:45:52 +08:00
<select id="getReatTimeList" resultType="map">
select
rt.start_time as startTime,
rt.end_time as endTime,
ra.power_fee as powerFee,
ra.service_fee as serviceFee
from xhpc_rate_time as rt
left join xhpc_rate ra on rt.rate_id =ra.rate_id
2021-11-22 18:53:46 +08:00
WHERE
rt.rate_time_id &gt;= (
SELECT rate_time_id FROM xhpc_rate_time WHERE rate_model_id = #{rateModelId} AND start_time &lt;= #{startTime} AND replace(end_time, '00:00:00', '23:59:59') &gt;= #{startTime}
)
AND rt.rate_time_id &lt;= (
SELECT rate_time_id FROM xhpc_rate_time WHERE rate_model_id = #{rateModelId} AND start_time &lt;= #{endTime} AND replace(end_time, '00:00:00', '23:59:59') &gt;= #{endTime}
2021-11-11 01:22:40 +08:00
)
2021-08-25 18:45:52 +08:00
</select>
<select id="getById" resultType="map">
select
ho.history_order_id as historyOrderId,
co.charge_order_id as chargeOrderId,
ho.serial_number as serialNumber,
ho.internet_serial_number as internetSerialNumber,
co.source as source,
ct.name as chargingStationName,
ter.pile_serial_number as pileSerialNumber,
ter.name as terminalName,
op.operator_id as operatorId,
op.name as operatorName,
cp.type as type,
co.type as orderType,
co.create_time as createTime,
co.start_time as startTime,
co.end_time as endTime,
co.update_time as updateTime,
2021-10-22 18:10:47 +08:00
co.charging_time as chargingTimeTotal,
2021-08-25 18:45:52 +08:00
ho.total_price as totalPrice,
2021-10-22 14:37:29 +08:00
ho.remark as remark,
2021-08-25 18:45:52 +08:00
ho.promotion_discount as promotionDiscount,
ho.act_price as actPrice,
co.erro_remark as erroRemark,
ho.power_price_total as powerPriceTotal,
ho.service_price_total as servicePriceTotal,
ho.internet_commission as internetCommission,
ho.internet_svc_commission as internetSvcCommission,
2021-12-15 15:14:59 +08:00
ho.internet_degree_commission as internetDegreeCommission,
2021-08-25 18:45:52 +08:00
ho.platform_commission as platformCommission,
ho.platform_svc_commisssion as platformSvcCommisssion,
ho.operation_commission as operationCommission,
ho.operation_svc_commission as operationSvcCommission,
ho.act_power_price as actPowerPrice,
ho.act_service_price as actServicePrice,
ed.total_power as sanTotalPower,
ed.total_money as sanTotalMoney,
case when ed.dispute_reason=1 then "交易不存在"
when ed.dispute_reason=2 then "交易金额错误"
when ed.dispute_reason=3 then "交易电量错误"
else "自定义!"
end sanDisputeReason,
ed.check_order_seq as sanCheckOrderSeq,
2021-08-25 18:45:52 +08:00
(SELECT phone FROM xhpc_app_user where app_user_id = co.user_id) as appUserPhone,
2021-10-22 18:10:47 +08:00
(SELECT phone from xhpc_internet_user where internet_user_id = co.user_id) as internetUserPhone,
2021-11-22 18:53:46 +08:00
co.Plate_num as plateNum,
(SELECT name from xhpc_internet_user where internet_user_id = co.user_id and co.source =1) as internetName,
2021-10-22 18:10:47 +08:00
case when ho.stop_reason_evcs=40 then "APP远程停止"
when ho.stop_reason_evcs=41 then "SOC达到100%"
when ho.stop_reason_evcs=42 then "充电电量满足设定条件"
when ho.stop_reason_evcs=43 then "充电金额满足设定条件"
when ho.stop_reason_evcs=44 then "充电时间满足设定条件"
when ho.stop_reason_evcs=45 then "手动停止充电"
when ho.stop_reason_evcs=46 then "手动停止充电."
when ho.stop_reason_evcs=47 then "手动停止充电.."
when ho.stop_reason_evcs=48 then "急停停止充电"
when ho.stop_reason_evcs=49 then "手动停止充电..."
else "手动停止充电!"
end stopReasonRvcsName
2021-08-25 18:45:52 +08:00
from xhpc_history_order ho
left join xhpc_charging_station as ct on ct.charging_station_id = ho.charging_station_id
left join xhpc_operator as op on op.operator_id = ct.operator_id
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id
left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id
left join et_dispute_orders as ed on ed.start_charge_seq = ho.internet_serial_number and ed.dispute_order_status !=2
2021-08-25 18:45:52 +08:00
where ho.history_order_id=#{historyOrderId}
</select>
2021-09-02 20:08:21 +08:00
<select id="getStatistisList" resultType="com.xhpc.order.dto.XhpcChargeHistoryOrder">
select ho.history_order_id as historyOrderId,
ho.power_price_total as powerPriceTotal,
ho.service_price_total as servicePriceTotal,
ho.promotion_discount as promotionDiscount,
ho.total_price as totalPrice,
ho.act_price as actPrice,
ho.act_power_price as actPowerPrice,
ho.act_service_price as actServicePrice,
ho.internet_commission as internetCommission,
ho.internet_svc_commission as internetSvcCommission,
ho.internet_degree_commission as internetDegreeCommission,
ho.platform_commission as platformCommission,
ho.platform_svc_commisssion as platformSvcCommisssion,
ho.operation_commission as operationCommission,
ho.operation_svc_commission as operationSvcCommission,
co.source as source,
co.charge_order_id as chargeOrderId,
co.charging_station_id as chargingStationId,
co.terminal_id as terminalId,
ho.start_time as startTime,
ho.end_time as endTime,
co.charging_time_number as chargingTimeNumber,
co.charging_degree as chargingDegree,
co.rate_model_id as rateModelId,
cs.operator_id as operatorId,
te.charging_pile_id as chargingPileId,
co.user_id as userId,
co.user_id as internetUserId,
ho.charging_mode as chargingMode,
ho.create_time as createTime
2021-09-02 20:08:21 +08:00
from xhpc_history_order ho
2021-09-23 10:42:06 +08:00
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
left join xhpc_charging_station cs on cs.charging_station_id = co.charging_station_id
left join xhpc_terminal as te on te.terminal_id = ho.terminal_id
where ho.state = #{state} and ho.total_price is not null
2021-09-23 10:42:06 +08:00
limit 0,#{number}
2021-09-02 20:08:21 +08:00
</select>
<update id="updateXhpcHistoryOrder">
update xhpc_history_order set state = #{state} where history_order_id=#{historyOrderId}
</update>
<select id="getLandUser" resultType="map">
select user_id as userId,user_type as userType,operator_id as operatorId from sys_user where user_id =#{userId}
</select>
2022-01-13 18:05:37 +08:00
<select id="getchargingOrderById" resultType="map">
select
co.serial_number AS serialNumber,
co.charging_time AS chargingTime,
co.charging_degree AS chargingDegree,
co.rate_model_id AS rateModelId,
DATE_FORMAT(co.start_time, '%m月%d日') AS daysOne,
DATE_FORMAT(co.start_time, '%H:%i:%s') AS timeOne,
DATE_FORMAT(co.end_time, '%m月%d日') AS daysTwo,
DATE_FORMAT(co.end_time, '%H:%i:%s') AS timeTwo,
te. NAME AS terminalName,
co. STATUS AS STATUS,
co.type AS type,
cs. NAME AS chargingStationName,
te. NAME AS terminalName,
CASE
WHEN co.type = 40 THEN
"APP远程停止"
WHEN co.type = 41 THEN
"SOC达到100%"
WHEN co.type = 42 THEN
"充电电量满足设定条件"
WHEN co.type = 43 THEN
"充电金额满足设定条件"
WHEN co.type = 44 THEN
"充电时间满足设定条件"
WHEN co.type = 45 THEN
"手动停止充电"
WHEN co.type = 46 THEN
"手动停止充电."
WHEN co.type = 47 THEN
"手动停止充电.."
WHEN co.type = 48 THEN
"急停停止充电"
WHEN co.type = 49 THEN
"手动停止充电..."
ELSE
"手动停止充电!"
END typeName
from xhpc_charge_order co
LEFT JOIN xhpc_terminal AS te ON te.terminal_id = co.terminal_id
LEFT JOIN xhpc_charging_station AS cs ON cs.charging_station_id = co.charging_station_id
where charge_order_id=#{chargingOrderId}
2022-01-13 19:07:34 +08:00
<if test="userId !=null">
and co.user_id = #{userId}
</if>
<if test="source !=null">
and co.source = #{source}
</if>
<if test="tenantId !=null and tenantId !=''">
and co.tenant_id = #{tenantId}
</if>
2022-01-13 18:05:37 +08:00
</select>
2021-09-23 10:42:06 +08:00
</mapper>