新增 个人桩充电记录添加充电停止原因码字段

This commit is contained in:
Lemon
2024-12-17 10:08:15 +08:00
parent 424d94d8a5
commit 6c85fe49f8
5 changed files with 72 additions and 9 deletions

View File

@@ -155,6 +155,11 @@ public class PersonalChargingRecord {
*/
private BigDecimal valleyUsedElectricity;
/**
* 停止原因码
*/
private String stopReasonCode;
/**
* 异常原因
*/

View File

@@ -47,6 +47,11 @@ public class PersonPileConnectorSumInfoVO {
*/
private String sourceType;
/**
* 停止原因码
*/
private String stopReasonCode;
/**
* 停止原因
*/

View File

@@ -31,6 +31,7 @@
<result column="peak_used_electricity" jdbcType="DECIMAL" property="peakUsedElectricity" />
<result column="flat_used_electricity" jdbcType="DECIMAL" property="flatUsedElectricity" />
<result column="valley_used_electricity" jdbcType="DECIMAL" property="valleyUsedElectricity" />
<result column="stop_reason_code" jdbcType="VARCHAR" property="stopReasonCode" />
<result column="reason" jdbcType="VARCHAR" property="reason" />
<result column="trade_date" jdbcType="TIMESTAMP" property="tradeDate" />
<result column="source_type" jdbcType="VARCHAR" property="sourceType" />
@@ -46,7 +47,7 @@
pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time,
charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc,
end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity,
peak_used_electricity, flat_used_electricity, valley_used_electricity, reason, trade_date,
peak_used_electricity, flat_used_electricity, valley_used_electricity, stop_reason_code, reason, trade_date,
source_type, create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -72,7 +73,7 @@
start_soc, end_soc, ammeter_total_start,
ammeter_total_end, total_used_electricity,
sharp_used_electricity, peak_used_electricity,
flat_used_electricity, valley_used_electricity,
flat_used_electricity, valley_used_electricity, stop_reason_code,
reason, trade_date, source_type,
create_by, create_time, update_by,
update_time, del_flag)
@@ -85,7 +86,7 @@
#{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{ammeterTotalStart,jdbcType=VARCHAR},
#{ammeterTotalEnd,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL},
#{sharpUsedElectricity,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL}, #{stopReasonCode,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{tradeDate,jdbcType=TIMESTAMP}, #{sourceType,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR})
@@ -172,6 +173,9 @@
<if test="valleyUsedElectricity != null">
valley_used_electricity,
</if>
<if test="stopReasonCode != null">
stop_reason_code,
</if>
<if test="reason != null">
reason,
</if>
@@ -276,6 +280,9 @@
<if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="stopReasonCode != null">
#{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null">
#{reason,jdbcType=VARCHAR},
</if>
@@ -384,6 +391,9 @@
<if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="stopReasonCode != null">
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null">
reason = #{reason,jdbcType=VARCHAR},
</if>
@@ -440,6 +450,7 @@
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR},
trade_date = #{tradeDate,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=VARCHAR},
@@ -584,6 +595,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="stop_reason_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.stopReasonCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="reason = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.reason,jdbcType=VARCHAR}
@@ -816,6 +832,13 @@
</if>
</foreach>
</trim>
<trim prefix="stop_reason_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.stopReasonCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.stopReasonCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="reason = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.reason != null">
@@ -885,7 +908,7 @@
pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time,
charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc,
end_soc, ammeter_total_start, ammeter_total_end, total_used_electricity, sharp_used_electricity,
peak_used_electricity, flat_used_electricity, valley_used_electricity, reason,
peak_used_electricity, flat_used_electricity, valley_used_electricity, stop_reason_code, reason,
trade_date, source_type, create_by, create_time, update_by, update_time, del_flag
)
values
@@ -900,7 +923,7 @@
#{item.endSoc,jdbcType=VARCHAR}, #{item.ammeterTotalStart,jdbcType=VARCHAR}, #{item.ammeterTotalEnd,jdbcType=VARCHAR},
#{item.totalUsedElectricity,jdbcType=DECIMAL}, #{item.sharpUsedElectricity,jdbcType=DECIMAL},
#{item.peakUsedElectricity,jdbcType=DECIMAL}, #{item.flatUsedElectricity,jdbcType=DECIMAL},
#{item.valleyUsedElectricity,jdbcType=DECIMAL}, #{item.reason,jdbcType=VARCHAR},
#{item.valleyUsedElectricity,jdbcType=DECIMAL}, #{item.stopReasonCode,jdbcType=VARCHAR}, #{item.reason,jdbcType=VARCHAR},
#{item.tradeDate,jdbcType=TIMESTAMP}, #{item.sourceType,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.delFlag,jdbcType=CHAR})
@@ -939,6 +962,7 @@
peak_used_electricity,
flat_used_electricity,
valley_used_electricity,
stop_reason_code,
reason,
trade_date,
source_type,
@@ -979,6 +1003,7 @@
#{peakUsedElectricity,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL},
#{valleyUsedElectricity,jdbcType=DECIMAL},
#{stopReasonCode,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR},
#{tradeDate,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=VARCHAR},
@@ -1019,6 +1044,7 @@
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR},
trade_date = #{tradeDate,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=VARCHAR},
@@ -1114,6 +1140,9 @@
<if test="valleyUsedElectricity != null">
valley_used_electricity,
</if>
<if test="stopReasonCode != null">
stop_reason_code,
</if>
<if test="reason != null">
reason,
</if>
@@ -1222,6 +1251,9 @@
<if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="stopReasonCode != null">
#{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null">
#{reason,jdbcType=VARCHAR},
</if>
@@ -1330,6 +1362,9 @@
<if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="stopReasonCode != null">
stop_reason_code = #{stopReasonCode,jdbcType=VARCHAR},
</if>
<if test="reason != null">
reason = #{reason,jdbcType=VARCHAR},
</if>