Merge branch 'develop'

# Conflicts:
#	pom.xml
master
luoyang 5 years ago
commit 61c6d63508

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

@ -85,6 +85,11 @@ public class LogRiskController {
@GetMapping(value = "/pre_refund/list") @GetMapping(value = "/pre_refund/list")
public JSONObject listPreRefund(PreRefundQueryBean preRefundQueryBean) { 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");
} }
} }

@ -50,6 +50,8 @@ public interface TransactionMapper {
PageList<JSONObject> listPreRefundClients(PageBounds pagination); 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); 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); 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; 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); void exportSettlementLog(TradeLogQuery query, JSONObject partner, HttpServletResponse response);

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

@ -448,16 +448,62 @@
<if test="to!=null">and t.transaction_time &lt; #{to}</if> <if test="to!=null">and t.transaction_time &lt; #{to}</if>
</select> </select>
<select id="listPreRefundClients" resultType="com.alibaba.fastjson.JSONObject"> <select id="listPreRefundClients" resultType="com.alibaba.fastjson.JSONObject">
SELECT sc.client_id, SELECT
sc.client_id,
sc.client_moniker, 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 IFNULL( MAX( pt.create_time ), sc.approve_time ) transation_time
FROM pmt_transactions pt, FROM
pmt_transactions pt,
sys_clients sc 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 AND pt.client_id = sc.client_id
GROUP BY client_id GROUP BY
HAVING amount &lt; 0 client_id
HAVING
amount &lt; 0
</select> </select>
<select id="validAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="validAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[

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

@ -6,14 +6,27 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
'use strict'; 'use strict';
var app = angular.module('preRefundApp', ['ui.router']); var app = angular.module('preRefundApp', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) { app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_monitoring.pre_refund', { $stateProvider.state('pre_refund', {
controller: 'preRefundCtrl', controller: 'preRefundCtrl',
templateUrl: '/static/analysis/templates/pre_refund.html', templateUrl: '/static/analysis/templates/pre_refund.html',
url: '/pre_refund' 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.pagination = {};
$scope.params = {}; $scope.params = {};
$scope.loadPrefund = function (page) { $scope.loadPrefund = function (page) {
@ -28,5 +41,20 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.loadPrefund(); $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; return app;
}); });

@ -1,54 +1,35 @@
<section class="content-header"> <section class="content-header">
<h1>授信退款|Credit refund</h1> <h1>商户欠款列表</h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li> <li>
<i class="fa fa-list-alt"></i> Transaction <i class="fa fa-list-alt"></i> Transaction
</li> </li>
<li class="active">授信退款|Credit refund</li> <li class="active">商户欠款列表</li>
</ol> </ol>
</section> </section>
<section class="content">
<div class="row"> <div class="content">
<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="row"> <div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total <div class="col-sm-12 analysis-nav">
Pages:{{pagination.totalPages}} <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> </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>
</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> </a>
</div> </div>
<div ng-if="('preRefund'|withModule)" class="col-sm-2 col-xs-6"> <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"> <div class="description-block">
<img src="/static/images/main_menu/transaction_arrears_green.png"/> <img src="/static/images/main_menu/transaction_arrears_green.png"/>
<div class="description-text"> <div class="description-text">
<span class="description-text">授信退款</span> <span class="description-text">商户欠款列表</span>
</div> </div>
</div> </div>
</a> </a>

Loading…
Cancel
Save