更新清分历史订单字段更改

This commit is contained in:
panshuling321 2022-04-26 14:39:55 +08:00
parent 6c97020b06
commit 0243c7f7e5
5 changed files with 184 additions and 125 deletions

View File

@ -1037,7 +1037,7 @@ CREATE TABLE `xhpc_clearing_history_order`
`operator_id3rdpty_evcs` varchar(50) DEFAULT NULL COMMENT '流量方OperatorID', `operator_id3rdpty_evcs` varchar(50) DEFAULT NULL COMMENT '流量方OperatorID',
`start_time` datetime DEFAULT NULL, `start_time` datetime DEFAULT NULL,
`end_time` datetime DEFAULT NULL COMMENT '结束时间', `end_time` datetime DEFAULT NULL COMMENT '结束时间',
`stop_reason_evcs` int(11) DEFAULT NULL, `stop_reason_evcs` varchar(255) DEFAULT NULL,
`total_power` double(10, 4) DEFAULT NULL COMMENT '电量', `total_power` double(10, 4) DEFAULT NULL COMMENT '电量',
`user_name_evcs` varchar(100) DEFAULT NULL, `user_name_evcs` varchar(100) DEFAULT NULL,
`phone` varchar(50) DEFAULT NULL, `phone` varchar(50) DEFAULT NULL,

View File

@ -220,7 +220,7 @@ public class XhpcClearingHistoryOrderDomain implements Serializable {
*/ */
private Date endTime; private Date endTime;
private Integer stopReasonEvcs; private String stopReasonEvcs;
/** /**
* 电量 * 电量

View File

@ -45,7 +45,7 @@
<result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs"/> <result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs"/>
<result column="start_time" jdbcType="TIMESTAMP" property="startTime"/> <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
<result column="end_time" jdbcType="TIMESTAMP" property="endTime"/> <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
<result column="stop_reason_evcs" jdbcType="INTEGER" property="stopReasonEvcs"/> <result column="stop_reason_evcs" jdbcType="VARCHAR" property="stopReasonEvcs"/>
<result column="total_power" jdbcType="DOUBLE" property="totalPower"/> <result column="total_power" jdbcType="DOUBLE" property="totalPower"/>
<result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs"/> <result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/> <result column="phone" jdbcType="VARCHAR" property="phone"/>
@ -220,21 +220,21 @@
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from xhpc_clearing_history_order from xhpc_clearing_history_order
where clearing_order_id = #{clearingOrderId,jdbcType=BIGINT} where clearing_order_id = #{clearingOrderId}
</select> </select>
<update id="deleteLogicByPrimaryKey" parameterType="java.lang.Long"> <update id="deleteLogicByPrimaryKey" parameterType="java.lang.Long">
update xhpc_clearing_history_order update xhpc_clearing_history_order
set del_flag=2 set del_flag=2
where clearing_order_id = #{clearingOrderId,jdbcType=BIGINT} where clearing_order_id = #{clearingOrderId}
</update> </update>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete delete
from xhpc_clearing_history_order from xhpc_clearing_history_order
where clearing_order_id = #{clearingOrderId,jdbcType=BIGINT} where clearing_order_id = #{clearingOrderId}
</delete> </delete>
@ -261,42 +261,42 @@
operator_name, clearing_checkout_id, check_status) operator_name, clearing_checkout_id, check_status)
values values
<foreach collection="domainList" index="index" item="domain" separator=","> <foreach collection="domainList" index="index" item="domain" separator=",">
(#{domain.clearingOrderId}, #{domain.chargingStationId,jdbcType=BIGINT}, #{domain.chargeOrderId,jdbcType=BIGINT}, (#{domain.clearingOrderId}, #{domain.chargingStationId}, #{domain.chargeOrderId},
#{domain.userId,jdbcType=BIGINT}, #{domain.userId},
#{domain.terminalId,jdbcType=BIGINT}, #{domain.serialNumber,jdbcType=VARCHAR}, #{domain.terminalId}, #{domain.serialNumber},
#{domain.internetSerialNumber,jdbcType=VARCHAR}, #{domain.internetSerialNumber},
#{domain.powerPriceTotal,jdbcType=DECIMAL}, #{domain.servicePriceTotal,jdbcType=DECIMAL}, #{domain.powerPriceTotal}, #{domain.servicePriceTotal},
#{domain.totalPrice,jdbcType=DECIMAL}, #{domain.totalPrice},
#{domain.promotionDiscount,jdbcType=DECIMAL}, #{domain.actPrice,jdbcType=DECIMAL}, #{domain.promotionDiscount}, #{domain.actPrice},
#{domain.actPowerPrice,jdbcType=DECIMAL}, #{domain.actPowerPrice},
#{domain.actServicePrice,jdbcType=DECIMAL}, #{domain.internetCommission,jdbcType=DECIMAL}, #{domain.actServicePrice}, #{domain.internetCommission},
#{domain.internetSvcCommission,jdbcType=DECIMAL}, #{domain.internetSvcCommission},
#{domain.platformCommission,jdbcType=DECIMAL}, #{domain.platformSvcCommisssion,jdbcType=DECIMAL}, #{domain.platformCommission}, #{domain.platformSvcCommisssion},
#{domain.operationCommission,jdbcType=DECIMAL}, #{domain.operationSvcCommission,jdbcType=DECIMAL}, #{domain.operationCommission}, #{domain.operationSvcCommission},
#{domain.startSoc,jdbcType=VARCHAR}, #{domain.endSoc,jdbcType=VARCHAR}, #{domain.startSoc}, #{domain.endSoc},
#{domain.reconciliationStatus,jdbcType=INTEGER}, #{domain.reconciliationStatus},
#{domain.sortingStatus,jdbcType=INTEGER}, #{domain.type,jdbcType=TINYINT}, #{domain.sortingStatus}, #{domain.type},
#{domain.status,jdbcType=INTEGER}, #{domain.status},
#{domain.delFlag,jdbcType=INTEGER}, #{domain.createTime,jdbcType=TIMESTAMP}, #{domain.delFlag}, #{domain.createTime},
#{domain.createBy,jdbcType=VARCHAR}, #{domain.createBy},
#{domain.updateTime,jdbcType=TIMESTAMP}, #{domain.updateBy,jdbcType=VARCHAR}, #{domain.updateTime}, #{domain.updateBy},
#{domain.remark,jdbcType=VARCHAR}, #{domain.remark},
#{domain.state,jdbcType=INTEGER}, #{domain.vinNormal,jdbcType=VARCHAR}, #{domain.state}, #{domain.vinNormal},
#{domain.searchValue,jdbcType=VARCHAR}, #{domain.searchValue},
#{domain.operatorIdEvcs,jdbcType=VARCHAR}, #{domain.chargeModelEvcs,jdbcType=INTEGER}, #{domain.operatorIdEvcs}, #{domain.chargeModelEvcs},
#{domain.connectorPowerEvcs,jdbcType=DOUBLE}, #{domain.connectorPowerEvcs},
#{domain.meterValueEndEvcs,jdbcType=DOUBLE}, #{domain.meterValueStartEvcs,jdbcType=DOUBLE}, #{domain.meterValueEndEvcs}, #{domain.meterValueStartEvcs},
#{domain.operatorId3rdptyEvcs,jdbcType=VARCHAR}, #{domain.operatorId3rdptyEvcs},
#{domain.startTime,jdbcType=TIMESTAMP}, #{domain.endTime,jdbcType=TIMESTAMP}, #{domain.startTime}, #{domain.endTime},
#{domain.stopReasonEvcs,jdbcType=INTEGER}, #{domain.stopReasonEvcs},
#{domain.totalPower,jdbcType=DOUBLE}, #{domain.userNameEvcs,jdbcType=VARCHAR}, #{domain.totalPower}, #{domain.userNameEvcs},
#{domain.phone,jdbcType=VARCHAR}, #{domain.phone},
#{domain.evcsOrderNo,jdbcType=VARCHAR}, #{domain.confirmResult,jdbcType=INTEGER}, #{domain.evcsOrderNo}, #{domain.confirmResult},
#{domain.rateModelId,jdbcType=BIGINT}, #{domain.rateModelId},
#{domain.chargingMode,jdbcType=VARCHAR}, #{domain.internetDegreeCommission,jdbcType=DECIMAL}, #{domain.chargingMode}, #{domain.internetDegreeCommission},
#{domain.source,jdbcType=INTEGER}, #{domain.tenantId,jdbcType=VARCHAR}, #{domain.source}, #{domain.tenantId},
#{domain.operatorId,jdbcType=BIGINT}, #{domain.operatorId},
#{domain.operatorName,jdbcType=VARCHAR}, #{domain.clearingCheckoutId,jdbcType=BIGINT}, #{domain.checkStatus}) #{domain.operatorName}, #{domain.clearingCheckoutId}, #{domain.checkStatus})
</foreach> </foreach>
</insert> </insert>
@ -323,93 +323,93 @@
charging_mode, internet_degree_commission, charging_mode, internet_degree_commission,
`source`, tenant_id, operator_id, `source`, tenant_id, operator_id,
operator_name, clearing_checkout_id, check_status) operator_name, clearing_checkout_id, check_status)
values (#{chargingStationId,jdbcType=BIGINT}, #{chargeOrderId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, values (#{chargingStationId}, #{chargeOrderId}, #{userId},
#{terminalId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR}, #{terminalId}, #{serialNumber},
#{internetSerialNumber,jdbcType=VARCHAR}, #{internetSerialNumber},
#{powerPriceTotal,jdbcType=DECIMAL}, #{servicePriceTotal,jdbcType=DECIMAL}, #{powerPriceTotal}, #{servicePriceTotal},
#{totalPrice,jdbcType=DECIMAL}, #{totalPrice},
#{promotionDiscount,jdbcType=DECIMAL}, #{actPrice,jdbcType=DECIMAL}, #{actPowerPrice,jdbcType=DECIMAL}, #{promotionDiscount}, #{actPrice}, #{actPowerPrice},
#{actServicePrice,jdbcType=DECIMAL}, #{internetCommission,jdbcType=DECIMAL}, #{actServicePrice}, #{internetCommission},
#{internetSvcCommission,jdbcType=DECIMAL}, #{internetSvcCommission},
#{platformCommission,jdbcType=DECIMAL}, #{platformSvcCommisssion,jdbcType=DECIMAL}, #{platformCommission}, #{platformSvcCommisssion},
#{operationCommission,jdbcType=DECIMAL}, #{operationSvcCommission,jdbcType=DECIMAL}, #{operationCommission}, #{operationSvcCommission},
#{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{reconciliationStatus,jdbcType=INTEGER}, #{startSoc}, #{endSoc}, #{reconciliationStatus},
#{sortingStatus,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{status,jdbcType=INTEGER}, #{sortingStatus}, #{type}, #{status},
#{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{delFlag}, #{createTime}, #{createBy},
#{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{updateTime}, #{updateBy}, #{remark},
#{state,jdbcType=INTEGER}, #{vinNormal,jdbcType=VARCHAR}, #{searchValue,jdbcType=VARCHAR}, #{state}, #{vinNormal}, #{searchValue},
#{operatorIdEvcs,jdbcType=VARCHAR}, #{chargeModelEvcs,jdbcType=INTEGER}, #{operatorIdEvcs}, #{chargeModelEvcs},
#{connectorPowerEvcs,jdbcType=DOUBLE}, #{connectorPowerEvcs},
#{meterValueEndEvcs,jdbcType=DOUBLE}, #{meterValueStartEvcs,jdbcType=DOUBLE}, #{meterValueEndEvcs}, #{meterValueStartEvcs},
#{operatorId3rdptyEvcs,jdbcType=VARCHAR}, #{operatorId3rdptyEvcs},
#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{stopReasonEvcs,jdbcType=INTEGER}, #{startTime}, #{endTime}, #{stopReasonEvcs},
#{totalPower,jdbcType=DOUBLE}, #{userNameEvcs,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{totalPower}, #{userNameEvcs}, #{phone},
#{evcsOrderNo,jdbcType=VARCHAR}, #{confirmResult,jdbcType=INTEGER}, #{rateModelId,jdbcType=BIGINT}, #{evcsOrderNo}, #{confirmResult}, #{rateModelId},
#{chargingMode,jdbcType=VARCHAR}, #{internetDegreeCommission,jdbcType=DECIMAL}, #{chargingMode}, #{internetDegreeCommission},
#{source,jdbcType=INTEGER}, #{tenantId,jdbcType=VARCHAR}, #{operatorId,jdbcType=BIGINT}, #{source}, #{tenantId}, #{operatorId},
#{operatorName,jdbcType=VARCHAR}, #{clearingCheckoutId,jdbcType=BIGINT}, #{checkStatus}) #{operatorName}, #{clearingCheckoutId}, #{checkStatus})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.xhpc.activity.domain.XhpcClearingHistoryOrderDomain"> <update id="updateByPrimaryKey" parameterType="com.xhpc.activity.domain.XhpcClearingHistoryOrderDomain">
update xhpc_clearing_history_order update xhpc_clearing_history_order
set charging_station_id = #{chargingStationId,jdbcType=BIGINT}, set charging_station_id = #{chargingStationId},
charge_order_id = #{chargeOrderId,jdbcType=BIGINT}, charge_order_id = #{chargeOrderId},
user_id = #{userId,jdbcType=BIGINT}, user_id = #{userId},
terminal_id = #{terminalId,jdbcType=BIGINT}, terminal_id = #{terminalId},
serial_number = #{serialNumber,jdbcType=VARCHAR}, serial_number = #{serialNumber},
internet_serial_number = #{internetSerialNumber,jdbcType=VARCHAR}, internet_serial_number = #{internetSerialNumber},
power_price_total = #{powerPriceTotal,jdbcType=DECIMAL}, power_price_total = #{powerPriceTotal},
service_price_total = #{servicePriceTotal,jdbcType=DECIMAL}, service_price_total = #{servicePriceTotal},
total_price = #{totalPrice,jdbcType=DECIMAL}, total_price = #{totalPrice},
promotion_discount = #{promotionDiscount,jdbcType=DECIMAL}, promotion_discount = #{promotionDiscount},
act_price = #{actPrice,jdbcType=DECIMAL}, act_price = #{actPrice},
act_power_price = #{actPowerPrice,jdbcType=DECIMAL}, act_power_price = #{actPowerPrice},
act_service_price = #{actServicePrice,jdbcType=DECIMAL}, act_service_price = #{actServicePrice},
internet_commission = #{internetCommission,jdbcType=DECIMAL}, internet_commission = #{internetCommission},
internet_svc_commission = #{internetSvcCommission,jdbcType=DECIMAL}, internet_svc_commission = #{internetSvcCommission},
platform_commission = #{platformCommission,jdbcType=DECIMAL}, platform_commission = #{platformCommission},
platform_svc_commisssion = #{platformSvcCommisssion,jdbcType=DECIMAL}, platform_svc_commisssion = #{platformSvcCommisssion},
operation_commission = #{operationCommission,jdbcType=DECIMAL}, operation_commission = #{operationCommission},
operation_svc_commission = #{operationSvcCommission,jdbcType=DECIMAL}, operation_svc_commission = #{operationSvcCommission},
start_soc = #{startSoc,jdbcType=VARCHAR}, start_soc = #{startSoc},
end_soc = #{endSoc,jdbcType=VARCHAR}, end_soc = #{endSoc},
reconciliation_status = #{reconciliationStatus,jdbcType=INTEGER}, reconciliation_status = #{reconciliationStatus},
sorting_status = #{sortingStatus,jdbcType=INTEGER}, sorting_status = #{sortingStatus},
`type` = #{type,jdbcType=TINYINT}, `type` = #{type},
`status` = #{status,jdbcType=INTEGER}, `status` = #{status},
del_flag = #{delFlag,jdbcType=INTEGER}, del_flag = #{delFlag},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime},
create_by = #{createBy,jdbcType=VARCHAR}, create_by = #{createBy},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime},
update_by = #{updateBy,jdbcType=VARCHAR}, update_by = #{updateBy},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark},
`state` = #{state,jdbcType=INTEGER}, `state` = #{state},
vin_normal = #{vinNormal,jdbcType=VARCHAR}, vin_normal = #{vinNormal},
search_value = #{searchValue,jdbcType=VARCHAR}, search_value = #{searchValue},
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR}, operator_id_evcs = #{operatorIdEvcs},
charge_model_evcs = #{chargeModelEvcs,jdbcType=INTEGER}, charge_model_evcs = #{chargeModelEvcs},
connector_power_evcs = #{connectorPowerEvcs,jdbcType=DOUBLE}, connector_power_evcs = #{connectorPowerEvcs},
meter_value_end_evcs = #{meterValueEndEvcs,jdbcType=DOUBLE}, meter_value_end_evcs = #{meterValueEndEvcs},
meter_value_start_evcs = #{meterValueStartEvcs,jdbcType=DOUBLE}, meter_value_start_evcs = #{meterValueStartEvcs},
operator_id3rdpty_evcs = #{operatorId3rdptyEvcs,jdbcType=VARCHAR}, operator_id3rdpty_evcs = #{operatorId3rdptyEvcs},
start_time = #{startTime,jdbcType=TIMESTAMP}, start_time = #{startTime},
end_time = #{endTime,jdbcType=TIMESTAMP}, end_time = #{endTime},
stop_reason_evcs = #{stopReasonEvcs,jdbcType=INTEGER}, stop_reason_evcs = #{stopReasonEvcs},
total_power = #{totalPower,jdbcType=DOUBLE}, total_power = #{totalPower},
user_name_evcs = #{userNameEvcs,jdbcType=VARCHAR}, user_name_evcs = #{userNameEvcs},
phone = #{phone,jdbcType=VARCHAR}, phone = #{phone},
evcs_order_no = #{evcsOrderNo,jdbcType=VARCHAR}, evcs_order_no = #{evcsOrderNo},
confirm_Result = #{confirmResult,jdbcType=INTEGER}, confirm_Result = #{confirmResult},
rate_model_id = #{rateModelId,jdbcType=BIGINT}, rate_model_id = #{rateModelId},
charging_mode = #{chargingMode,jdbcType=VARCHAR}, charging_mode = #{chargingMode},
internet_degree_commission = #{internetDegreeCommission,jdbcType=DECIMAL}, internet_degree_commission = #{internetDegreeCommission},
`source` = #{source,jdbcType=INTEGER}, `source` = #{source},
tenant_id = #{tenantId,jdbcType=VARCHAR}, tenant_id = #{tenantId},
operator_id = #{operatorId,jdbcType=BIGINT}, operator_id = #{operatorId},
operator_name = #{operatorName,jdbcType=VARCHAR}, operator_name = #{operatorName},
clearing_checkout_id = #{clearingCheckoutId,jdbcType=BIGINT} clearing_checkout_id = #{clearingCheckoutId}
where clearing_order_id = #{clearingOrderId,jdbcType=BIGINT} where clearing_order_id = #{clearingOrderId}
</update> </update>
<update id="updateCheckoutByOperator"> <update id="updateCheckoutByOperator">
update xhpc_clearing_history_order set clearing_checkout_id=#{checkoutId} update xhpc_clearing_history_order set clearing_checkout_id=#{checkoutId}

View File

@ -48,7 +48,7 @@
<result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs" /> <result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="stop_reason_evcs" jdbcType="INTEGER" property="stopReasonEvcs" /> <result column="stop_reason_evcs" jdbcType="VARCHAR" property="stopReasonEvcs" />
<result column="total_power" jdbcType="DOUBLE" property="totalPower" /> <result column="total_power" jdbcType="DOUBLE" property="totalPower" />
<result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs" /> <result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs" />
<result column="phone" jdbcType="VARCHAR" property="phone" /> <result column="phone" jdbcType="VARCHAR" property="phone" />

View File

@ -0,0 +1,59 @@
<?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.activity.mapper.XhpcOperatorMapper">
<resultMap type="com.xhpc.activity.domain.XhpcOperatorDomain" id="BaseResultMap">
<result column="operator_id" property="operatorId"/>
<result column="name" property="name"/>
<result column="contact_name" property="contactName"/>
<result column="contact_phone" property="contactPhone"/>
<result column="phone" property="phone"/>
<result column="attribute" property="attribute"/>
<result column="duty_paragraph" property="dutyParagraph"/>
<result column="open_bank" property="openBank"/>
<result column="card_number" property="cardNumber"/>
<result column="area_code" property="areaCode"/>
<result column="address" property="address"/>
<result column="detailed_address" property="detailedAddress"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
<result column="email" property="email"/>
<result column="commission_type" property="commissionType"/>
<result column="platform_commission_rate" property="platformCommissionRate"/>
<result column="maintenance_commission_rate" property="maintenanceCommissionRate"/>
<result column="business_license_id" property="businessLicenseId"/>
<result column="withdrawal_time" property="withdrawalTime"/>
<result column="soc" property="soc"/>
<result column="status" property="status"/>
<result column="del_flag" property="delFlag"/>
<result column="create_time" property="createTime"/>
<result column="create_by" property="createBy"/>
<result column="update_time" property="updateTime"/>
<result column="update_by" property="updateBy"/>
<result column="remark" property="remark"/>
<result column="operator_id_evcs" property="operatorIdEvcs"/>
</resultMap>
<sql id="Base_Column_List">
operator_id, name, contact_name, contact_phone,
phone, attribute,open_bank,card_number, area_code, address,
detailed_address, duty_paragraph,
longitude, latitude, email, commission_type,
platform_commission_rate,
maintenance_commission_rate,
business_license_id, withdrawal_time, soc,
status, del_flag, create_time,
create_by, update_time, update_by, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_operator
where id = #{id}
</select>
</mapper>