add 商户欠款列表分类

master
luoyang 5 years ago
parent 3f613fd797
commit d2e61ea9df

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.4.19</version>
<version>1.4.20</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -85,6 +85,11 @@ public class LogRiskController {
@GetMapping(value = "/pre_refund/list")
public JSONObject listPreRefund(PreRefundQueryBean preRefundQueryBean) {
return tradeLogService.listPreRefundClients(preRefundQueryBean);
return tradeLogService.listPreRefundClients(preRefundQueryBean,null);
}
@GetMapping(value = "/pre_geek_cost/list")
public JSONObject listPreGeekCost(PreRefundQueryBean preRefundQueryBean) {
return tradeLogService.listPreRefundClients(preRefundQueryBean, "geek");
}
}

@ -51,6 +51,8 @@ public interface TransactionMapper {
PageList<JSONObject> listPreRefundClients(PageBounds pagination);
PageList<JSONObject> listPreGeekCostClients(PageBounds pagination);
JSONObject validAnalysis(@Param("from") Date from, @Param("to") Date to, @Param("channel") String channel, @Param("merchant_id") String merchantId);
List<JSONObject> listUnclearedTransactionsOfClient(@Param("client_id") int clientId, @Param("end") Date finish, @Param("settleDate") Date settleDate);

@ -56,7 +56,7 @@ public interface TradeLogService {
void fullReleasePreAuthorization(JSONObject account, TradeLogQuery query)throws Exception;
JSONObject listPreRefundClients(PreRefundQueryBean params);
JSONObject listPreRefundClients(PreRefundQueryBean params, String preType);
void exportSettlementLog(TradeLogQuery query, JSONObject partner, HttpServletResponse response);

@ -74,7 +74,6 @@ import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -1454,15 +1453,14 @@ public class TradeLogServiceImpl implements TradeLogService {
}
@Override
public JSONObject listPreRefundClients(PreRefundQueryBean params) {
String preRefundDataStr = stringRedisTemplate.boundValueOps("payment:pre_refund_data").get();
if (StringUtils.isEmpty(preRefundDataStr)) {
JSONObject preRefundData = PageListUtils.buildPageListResult(transactionMapper.listPreRefundClients(new PageBounds(params.getPage(), params.getLimit())));
stringRedisTemplate.boundValueOps("payment:pre_refund_data").set(preRefundData.toJSONString(), 1, TimeUnit.HOURS);
return preRefundData;
public JSONObject listPreRefundClients(PreRefundQueryBean params, String preType) {
PageList data = null;
if (StringUtils.equalsIgnoreCase("geek", preType)) {
data = transactionMapper.listPreGeekCostClients(new PageBounds(params.getPage(), params.getLimit()));
} else {
return JSONObject.parseObject(preRefundDataStr);
data = transactionMapper.listPreRefundClients(new PageBounds(params.getPage(), params.getLimit()));
}
return PageListUtils.buildPageListResult(data);
}
@Override

@ -448,16 +448,62 @@
<if test="to!=null">and t.transaction_time &lt; #{to}</if>
</select>
<select id="listPreRefundClients" resultType="com.alibaba.fastjson.JSONObject">
SELECT sc.client_id,
SELECT
sc.client_id,
sc.client_moniker,
IFNULL(SUM(IF(pt.transaction_type = 'Credit', pt.clearing_amount, -pt.clearing_amount)), 0) amount,
IFNULL(
SUM(
IF
(
(pt.channel = 'System'
AND pt.remark not LIKE '%RYCBSM%') or pt.channel != 'System',
IF
( pt.transaction_type = 'Credit', pt.clearing_amount,- pt.clearing_amount ),
0
)
),
0
) amount,
IFNULL( MAX( pt.create_time ), sc.approve_time ) transation_time
FROM pmt_transactions pt,
FROM
pmt_transactions pt,
sys_clients sc
WHERE clearing_status = 0
WHERE
clearing_status = 0
AND pt.client_id = sc.client_id
GROUP BY
client_id
HAVING
amount &lt; 0
</select>
<select id="listPreGeekCostClients" resultType="com.alibaba.fastjson.JSONObject">
SELECT
sc.client_id,
sc.client_moniker,
IFNULL(
SUM(
IF
(
pt.channel = 'System'
AND pt.remark LIKE '%RYCBSM%',
IF
( pt.transaction_type = 'Credit', pt.clearing_amount,- pt.clearing_amount ),
0
)
),
0
) amount,
IFNULL( MAX( pt.create_time ), sc.approve_time ) transation_time
FROM
pmt_transactions pt,
sys_clients sc
WHERE
clearing_status = 0
AND pt.client_id = sc.client_id
GROUP BY client_id
HAVING amount &lt; 0
GROUP BY
client_id
HAVING
amount &lt; 0
</select>
<select id="validAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[

@ -636,8 +636,8 @@ margin-bottom: 10%;"/>
</a>
</li>
<li ui-sref-active="active" ng-if="('preRefund'|withModule)">
<a ui-sref="analysis_monitoring.pre_refund" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>授信退款|Credit refund</span>
<a ui-sref="pre_refund" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>商户欠款列表|Credit refund</span>
</a>
</li>
<li ui-sref-active="active">

@ -6,14 +6,27 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
'use strict';
var app = angular.module('preRefundApp', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_monitoring.pre_refund', {
$stateProvider.state('pre_refund', {
controller: 'preRefundCtrl',
templateUrl: '/static/analysis/templates/pre_refund.html',
url: '/pre_refund'
}).state('pre_refund.refund_partner', {
url: '/refund_client',
templateUrl: '/static/analysis/templates/pre_refund_partners.html',
controller: 'refundPartnerListCtrl'
}).state('pre_refund.geek_partner', {
url: '/geek_partner',
templateUrl: '/static/analysis/templates/pre_refund_partners.html',
controller: 'geekPartnerListCtrl'
})
}]);
app.controller('preRefundCtrl', ['$scope', '$http', function ($scope, $http) {
app.controller('preRefundCtrl', ['$scope', '$http','$state', function ($scope, $http,$state) {
if ($state.is('pre_refund')){
$state.go('.refund_partner');
}
}]);
app.controller('refundPartnerListCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.pagination = {};
$scope.params = {};
$scope.loadPrefund = function (page) {
@ -28,5 +41,20 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.loadPrefund();
}]);
app.controller('geekPartnerListCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.pagination = {};
$scope.params = {};
$scope.loadPrefund = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/sys_logs/pre_geek_cost/list', {params: params})
.then(function (resp) {
$scope.log_risk = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadPrefund();
}]);
return app;
});

@ -1,54 +1,35 @@
<section class="content-header">
<h1>授信退款|Credit refund</h1>
<h1>商户欠款列表</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Transaction
</li>
<li class="active">授信退款|Credit refund</li>
<li class="active">商户欠款列表</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="box">
<div class="box-body table-responsive">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>商户编码</th>
<th>欠费金额(AUD)</th>
<th>最后交易时间</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in log_risk">
<td ng-bind="log.client_moniker">
</td>
<td ng-bind="log.amount"></td>
<td ng-bind="log.transation_time |date:'yyyy-MM-dd HH:mm:ss'"></td>
</tr>
</tbody>
</table>
<div class="box-footer" ng-if="log_risk.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadPrefund()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="content">
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}}
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active">
<a ui-sref="pre_refund.refund_partner"><span>授信退款</span></a>
</li>
<li ui-sref-active="active">
<a ui-sref="pre_refund.geek_partner"> <span>RP跨境商城欠款商户</span></a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
<div class="tab-content" ui-view>
</div>
</div>
</div>
</div>
</div>
</section>

@ -0,0 +1,50 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="row">
<div class="box">
<div class="box-body">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>商户编码</th>
<th>欠费金额(AUD)</th>
<th>最后交易时间</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in log_risk">
<td ng-bind="log.client_moniker">
</td>
<td ng-bind="log.amount"></td>
<td ng-bind="log.transation_time |date:'yyyy-MM-dd HH:mm:ss'"></td>
</tr>
</tbody>
</table>
<div class="box-footer" ng-if="log_risk.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadPrefund()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -884,11 +884,11 @@
</a>
</div>
<div ng-if="('preRefund'|withModule)" class="col-sm-2 col-xs-6">
<a ui-sref="analysis_monitoring.pre_refund" ui-sref-opts="{reload:true}">
<a ui-sref="pre_refund" ui-sref-opts="{reload:true}">
<div class="description-block">
<img src="/static/images/main_menu/transaction_arrears_green.png"/>
<div class="description-text">
<span class="description-text">授信退款</span>
<span class="description-text">商户欠款列表</span>
</div>
</div>
</a>

Loading…
Cancel
Save