mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 18:30:02 +08:00
订单日报添加结算金额字段
This commit is contained in:
@@ -75,6 +75,11 @@ public class SettleOrderReport {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal virtualAmount;
|
private BigDecimal virtualAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易日期
|
* 交易日期
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.jsowell.pile.service.impl;
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
@@ -693,6 +692,7 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
|||||||
settleOrderReport.setServiceAmount(totalServiceAmount);
|
settleOrderReport.setServiceAmount(totalServiceAmount);
|
||||||
settleOrderReport.setTotalAmount(totalOrderAmount);
|
settleOrderReport.setTotalAmount(totalOrderAmount);
|
||||||
settleOrderReport.setVirtualAmount(totalVirtualAmount);
|
settleOrderReport.setVirtualAmount(totalVirtualAmount);
|
||||||
|
settleOrderReport.setSettleAmount(totalSettleAmount);
|
||||||
settleOrderReport.setTradeDate(tradeDate);
|
settleOrderReport.setTradeDate(tradeDate);
|
||||||
settleOrderReport.setOrderCodes(Joiner.on(",").join(orderCodeList));
|
settleOrderReport.setOrderCodes(Joiner.on(",").join(orderCodeList));
|
||||||
// 计算手续费 = 结算金额 * 0.55%
|
// 计算手续费 = 结算金额 * 0.55%
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.jsowell.pile.vo.web;
|
package com.jsowell.pile.vo.web;
|
||||||
|
|
||||||
import com.jsowell.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -68,6 +67,11 @@ public class SettleOrderReportVO {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal virtualAmount;
|
private BigDecimal virtualAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易日期
|
* 交易日期
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<result column="service_amount" jdbcType="DECIMAL" property="serviceAmount" />
|
<result column="service_amount" jdbcType="DECIMAL" property="serviceAmount" />
|
||||||
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
|
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
|
||||||
<result column="virtual_amount" jdbcType="DECIMAL" property="virtualAmount" />
|
<result column="virtual_amount" jdbcType="DECIMAL" property="virtualAmount" />
|
||||||
|
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
|
||||||
<result column="trade_date" jdbcType="VARCHAR" property="tradeDate" />
|
<result column="trade_date" jdbcType="VARCHAR" property="tradeDate" />
|
||||||
<result column="trade_amount" jdbcType="DECIMAL" property="tradeAmount" />
|
<result column="trade_amount" jdbcType="DECIMAL" property="tradeAmount" />
|
||||||
<result column="trade_fee" jdbcType="DECIMAL" property="tradeFee" />
|
<result column="trade_fee" jdbcType="DECIMAL" property="tradeFee" />
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
id, settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, trade_date,
|
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount, trade_date,
|
||||||
trade_amount, trade_fee, create_time, update_time, del_flag
|
trade_amount, trade_fee, create_time, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
@@ -46,13 +47,14 @@
|
|||||||
insert into settle_order_report (settle_code, merchant_id, station_id,
|
insert into settle_order_report (settle_code, merchant_id, station_id,
|
||||||
order_codes, use_electricity, charge_num,
|
order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount,
|
charge_time, electricity_amount, service_amount,
|
||||||
total_amount, virtual_amount, trade_date,
|
total_amount, virtual_amount, settle_amount, trade_date,
|
||||||
trade_amount, trade_fee, create_time,
|
trade_amount, trade_fee, create_time,
|
||||||
update_time, del_flag)
|
update_time, del_flag)
|
||||||
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
|
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
|
||||||
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
|
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
|
||||||
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
|
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
|
||||||
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{tradeDate,jdbcType=VARCHAR},
|
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL},
|
||||||
|
#{tradeDate,jdbcType=VARCHAR},
|
||||||
#{tradeAmount,jdbcType=DECIMAL}, #{tradeFee,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
|
#{tradeAmount,jdbcType=DECIMAL}, #{tradeFee,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
@@ -93,6 +95,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount,
|
virtual_amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleCode != null">
|
||||||
|
settle_amount,
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date,
|
trade_date,
|
||||||
</if>
|
</if>
|
||||||
@@ -146,6 +151,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
#{virtualAmount,jdbcType=DECIMAL},
|
#{virtualAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleCode != null">
|
||||||
|
#{settleAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
#{tradeDate,jdbcType=VARCHAR},
|
#{tradeDate,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -203,6 +211,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleCode != null">
|
||||||
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -238,6 +249,7 @@
|
|||||||
service_amount = #{serviceAmount,jdbcType=DECIMAL},
|
service_amount = #{serviceAmount,jdbcType=DECIMAL},
|
||||||
total_amount = #{totalAmount,jdbcType=DECIMAL},
|
total_amount = #{totalAmount,jdbcType=DECIMAL},
|
||||||
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
||||||
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||||
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
||||||
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
|
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
|
||||||
trade_fee = #{tradeFee,jdbcType=DECIMAL},
|
trade_fee = #{tradeFee,jdbcType=DECIMAL},
|
||||||
@@ -305,6 +317,11 @@
|
|||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.virtualAmount,jdbcType=DECIMAL}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.virtualAmount,jdbcType=DECIMAL}
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
|
<trim prefix="settle_amount = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
<trim prefix="trade_date = case" suffix="end,">
|
<trim prefix="trade_date = case" suffix="end,">
|
||||||
<foreach collection="list" index="index" item="item">
|
<foreach collection="list" index="index" item="item">
|
||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.tradeDate,jdbcType=VARCHAR}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.tradeDate,jdbcType=VARCHAR}
|
||||||
@@ -345,7 +362,7 @@
|
|||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into settle_order_report
|
insert into settle_order_report
|
||||||
(settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
(settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount, total_amount, virtual_amount,
|
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount,
|
||||||
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
|
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
@@ -353,7 +370,7 @@
|
|||||||
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,jdbcType=DECIMAL},
|
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,jdbcType=DECIMAL},
|
||||||
#{item.chargeNum,jdbcType=VARCHAR}, #{item.chargeTime,jdbcType=VARCHAR}, #{item.electricityAmount,jdbcType=DECIMAL},
|
#{item.chargeNum,jdbcType=VARCHAR}, #{item.chargeTime,jdbcType=VARCHAR}, #{item.electricityAmount,jdbcType=DECIMAL},
|
||||||
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.totalAmount,jdbcType=DECIMAL}, #{item.virtualAmount,jdbcType=DECIMAL},
|
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.totalAmount,jdbcType=DECIMAL}, #{item.virtualAmount,jdbcType=DECIMAL},
|
||||||
#{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
|
#{item.settleAmount,jdbcType=DECIMAL}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
|
||||||
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
|
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
@@ -376,6 +393,7 @@
|
|||||||
service_amount,
|
service_amount,
|
||||||
total_amount,
|
total_amount,
|
||||||
virtual_amount,
|
virtual_amount,
|
||||||
|
settle_amount,
|
||||||
trade_date,
|
trade_date,
|
||||||
trade_amount,
|
trade_amount,
|
||||||
trade_fee,
|
trade_fee,
|
||||||
@@ -399,6 +417,7 @@
|
|||||||
#{serviceAmount,jdbcType=DECIMAL},
|
#{serviceAmount,jdbcType=DECIMAL},
|
||||||
#{totalAmount,jdbcType=DECIMAL},
|
#{totalAmount,jdbcType=DECIMAL},
|
||||||
#{virtualAmount,jdbcType=DECIMAL},
|
#{virtualAmount,jdbcType=DECIMAL},
|
||||||
|
#{settleAmount,jdbcType=DECIMAL},
|
||||||
#{tradeDate,jdbcType=VARCHAR},
|
#{tradeDate,jdbcType=VARCHAR},
|
||||||
#{tradeAmount,jdbcType=DECIMAL},
|
#{tradeAmount,jdbcType=DECIMAL},
|
||||||
#{tradeFee,jdbcType=DECIMAL},
|
#{tradeFee,jdbcType=DECIMAL},
|
||||||
@@ -422,6 +441,7 @@
|
|||||||
service_amount = #{serviceAmount,jdbcType=DECIMAL},
|
service_amount = #{serviceAmount,jdbcType=DECIMAL},
|
||||||
total_amount = #{totalAmount,jdbcType=DECIMAL},
|
total_amount = #{totalAmount,jdbcType=DECIMAL},
|
||||||
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
||||||
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||||
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
||||||
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
|
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
|
||||||
trade_fee = #{tradeFee,jdbcType=DECIMAL},
|
trade_fee = #{tradeFee,jdbcType=DECIMAL},
|
||||||
@@ -470,6 +490,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount,
|
virtual_amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
settle_amount,
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date,
|
trade_date,
|
||||||
</if>
|
</if>
|
||||||
@@ -527,6 +550,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
#{virtualAmount,jdbcType=DECIMAL},
|
#{virtualAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
#{settleAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
#{tradeDate,jdbcType=VARCHAR},
|
#{tradeDate,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -584,6 +610,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
trade_date = #{tradeDate,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -616,6 +645,7 @@
|
|||||||
<result column="service_amount" property="serviceAmount" />
|
<result column="service_amount" property="serviceAmount" />
|
||||||
<result column="total_amount" property="totalAmount" />
|
<result column="total_amount" property="totalAmount" />
|
||||||
<result column="virtual_amount" property="virtualAmount" />
|
<result column="virtual_amount" property="virtualAmount" />
|
||||||
|
<result column="settle_amount" property="settleAmount" />
|
||||||
<result column="trade_date" property="tradeDate" />
|
<result column="trade_date" property="tradeDate" />
|
||||||
<result column="trade_amount" property="tradeAmount" />
|
<result column="trade_amount" property="tradeAmount" />
|
||||||
<result column="trade_fee" property="tradeFee" />
|
<result column="trade_fee" property="tradeFee" />
|
||||||
@@ -710,6 +740,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount,
|
virtual_amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
settle_amount,
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date,
|
trade_date,
|
||||||
</if>
|
</if>
|
||||||
@@ -757,6 +790,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
#{virtualAmount},
|
#{virtualAmount},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
#{settleAmount},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
#{tradeDate},
|
#{tradeDate},
|
||||||
</if>
|
</if>
|
||||||
@@ -805,6 +841,9 @@
|
|||||||
<if test="virtualAmount != null">
|
<if test="virtualAmount != null">
|
||||||
virtual_amount = #{virtualAmount},
|
virtual_amount = #{virtualAmount},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="settleAmount != null">
|
||||||
|
settle_amount = #{settleAmount},
|
||||||
|
</if>
|
||||||
<if test="tradeDate != null">
|
<if test="tradeDate != null">
|
||||||
trade_date = #{tradeDate},
|
trade_date = #{tradeDate},
|
||||||
</if>
|
</if>
|
||||||
@@ -850,6 +889,7 @@
|
|||||||
t1.service_amount as serviceAmount,
|
t1.service_amount as serviceAmount,
|
||||||
t1.total_amount as totalAmount,
|
t1.total_amount as totalAmount,
|
||||||
t1.virtual_amount as virtualAmount,
|
t1.virtual_amount as virtualAmount,
|
||||||
|
t1.settle_amount as settleAmount,
|
||||||
t1.trade_date as tradeDate,
|
t1.trade_date as tradeDate,
|
||||||
t1.trade_amount as tradeAmount,
|
t1.trade_amount as tradeAmount,
|
||||||
t1.trade_fee as tradeFee
|
t1.trade_fee as tradeFee
|
||||||
|
|||||||
Reference in New Issue
Block a user