更新清分金额显示

This commit is contained in:
panshuling321 2022-06-20 16:43:02 +08:00
parent f9ff849691
commit 9dc6f0f7d9
3 changed files with 34 additions and 17 deletions

View File

@ -1,13 +1,14 @@
package com.xhpc.activity.domain;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* xhpc_clearing_checkout
* @author
* @author
*/
@Data
public class XhpcClearingCheckoutDomain implements Serializable {
@ -22,10 +23,17 @@ public class XhpcClearingCheckoutDomain implements Serializable {
private Long clearingBankId;
/**
* 申请金额
* 申请金额
*/
private BigDecimal applyAmount;
/**
* 申请电费金额
*/
private BigDecimal applyPowerAmount;
/**
* 申请服务金额
*/
private BigDecimal applyServiceAmount;
/**
* 手续费
*/
@ -37,10 +45,17 @@ public class XhpcClearingCheckoutDomain implements Serializable {
private BigDecimal bankFee;
/**
* 到账金额
* 到账金额
*/
private BigDecimal receivedAmount;
/**
* 到账电费金额
*/
private BigDecimal receivedPowerAmount;
/**
* 到账服务费金额
*/
private BigDecimal receivedServiceAmount;
/**
* 状态0-已审核待清分1-提现中2-审核失败3-审核成功4-转账失败5-转账成功6-提现完成
*/

View File

@ -115,6 +115,8 @@
<select id="selectCashAmount" resultType="map">
select
ifnull(sum(ho.act_power_price + ho.act_service_price), 0) as amount,
ifnull(sum(ho.act_service_price), 0) as serviceAmount,
ifnull(sum(ho.act_power_price), 0) as powerAmount,
group_concat(clearing_order_id) as clearingOrderIds
from xhpc_clearing_history_order as ho
where ho.check_status=2 and ho.del_flag=0 and ho.clearing_checkout_id is null and ho.operator_id=#{operatorId}
@ -179,10 +181,10 @@
and ho.serial_number like concat('%',#{params.orderNo},'%')
</if>
<choose>
<when test="params.source != null and params.source ='刷卡'">
<when test="params.source != null and params.source!='' and params.source =='刷卡'">
and ho.charging_mode is null
</when>
<when test="params.source!=null and params.source !='刷卡' and params.source!=''">
<when test="params.source!=null and params.source!='' and params.source !='刷卡'">
and ho.charging_mode =#{params.source}
</when>
<otherwise>
@ -203,22 +205,22 @@
and ho.end_time <![CDATA[ <= ]]> #{params.endTime}
</if>
<choose>
<when test="params.status!=null and params.status == '待审核'">
<when test="params.status!=null and params.status !='' and params.status == '待审核'">
and ho.check_status=0 and ho.clearing_checkout_id is null
</when>
<when test="params.status!=null and params.status == '审核失败'">
<when test="params.status!=null and params.status !='' and params.status == '审核失败'">
and ho.check_status=1 and ho.clearing_checkout_id is null
</when>
<when test="params.status!=null and params.status == '审核成功'">
<when test="params.status!=null and params.status !='' and params.status == '审核成功'">
and ho.check_status=2 and ho.clearing_checkout_id is null
</when>
<when test="params.status!=null and params.status == '待清分'">
and ho.check_status=2 and ho.clearing_checkout_id is null
<when test="params.status!=null and params.status !='' and params.status == '待清分'">
and ho.check_status not in (1, 2) and ho.clearing_checkout_id is null
</when>
<when test="params.status!=null and params.status == '提现中'">
<when test="params.status!=null and params.status !='' and params.status == '提现中'">
and ho.check_status=2 and cc.STATUS = 1
</when>
<when test="params.status!=null and params.status == '已提现'">
<when test="params.status!=null and params.status !='' and params.status == '已提现'">
and ho.check_status=2 and cc.STATUS = 6
</when>
</choose>

View File

@ -81,10 +81,10 @@
<select id="selectUnclearingAmount" resultType="java.math.BigDecimal">
select
ifnull(sum(ho.act_power_price + ho.act_service_price), 0)
from xhpc_history_order as ho
from xhpc_clearing_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
where ho.state <![CDATA[ <> ]]> 3 and ho.del_flag=0 and ct.operator_id=#{operatorId}
where ho.del_flag=0 and ho.check_status not in (1,2) and ct.operator_id=#{operatorId}
</select>