Merge branch 'develop'

master
taylor.dang 6 years ago
commit fec38a1b07

@ -1170,7 +1170,19 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
String defaultBank = config.getRemainsTo(); String defaultBank = config.getRemainsTo();
clearingDetailMapper.updateAllBanks(defaultBank, clearingId); clearingDetailMapper.updateAllBanks(defaultBank, clearingId);
List<JSONObject> details = clearingDetailMapper.listReportsOfSettlement(clearingId); List<JSONObject> details = clearingDetailMapper.listReportsOfSettlement(clearingId);
details.sort((log1, log2) -> log2.getBigDecimal("clearing_amount").compareTo(log1.getBigDecimal("clearing_amount"))); details.sort((log1, log2) -> {
if (StringUtils.equals(defaultBank, log1.getString("account_bank")) ==
StringUtils.equals(defaultBank, log2.getString("account_bank"))) {
//两个银行都是defaultBank或者都不是defaultBank, all true or all false比较清算金额金额大的在前
return log2.getBigDecimal("clearing_amount").compareTo(log1.getBigDecimal("clearing_amount"));
}
//有一个是defaultBankdefaultBank在后
if (defaultBank.equals(log1.getString("account_bank"))) {
return -1;
} else {
return 1;
}
});
bankDistribution.remove(defaultBank); bankDistribution.remove(defaultBank);
for (String bank : bankDistribution.keySet()) { for (String bank : bankDistribution.keySet()) {
List<String> detailIds = new ArrayList<>(); List<String> detailIds = new ArrayList<>();

@ -149,7 +149,10 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
String orderIds = riskEvent.getString("order_ids"); String orderIds = riskEvent.getString("order_ids");
JSONObject client = clientMapper.findClientByMonikerAll(riskEvent.getString("client_moniker")); JSONObject client = clientMapper.findClientByMonikerAll(riskEvent.getString("client_moniker"));
List<JSONObject> tradeLogs = new ArrayList<>(); List<JSONObject> tradeLogs = new ArrayList<>();
if (StringUtils.isNotBlank(orderIds)) { /**
* client
*/
if (client != null && StringUtils.isNotBlank(orderIds)) {
String[] orderIdArray = orderIds.trim().split(","); String[] orderIdArray = orderIds.trim().split(",");
JSONObject orderInfo = new JSONObject(); JSONObject orderInfo = new JSONObject();
String realOrderId = ""; String realOrderId = "";
@ -192,6 +195,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
params.put("order_ids", orderIds); params.put("order_ids", orderIds);
String[] orderIdArray = orderIds.split(","); String[] orderIdArray = orderIds.split(",");
List<String> orderAmountList = new ArrayList<>(); List<String> orderAmountList = new ArrayList<>();
/**
* client_monikerclient_id
* clientorder_amounts
*
*/
if (client != null) {
for (int i = 0; i < orderIdArray.length; i++) { for (int i = 0; i < orderIdArray.length; i++) {
JSONObject orderInfo = orderMapper.findOrderById(orderIdArray[i],client.getIntValue("client_id")); JSONObject orderInfo = orderMapper.findOrderById(orderIdArray[i],client.getIntValue("client_id"));
// 判断该笔订单是否存在,是否属于该商户 // 判断该笔订单是否存在,是否属于该商户
@ -206,6 +215,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
params.put("order_amounts", StringUtils.join(orderAmountList, ",")); params.put("order_amounts", StringUtils.join(orderAmountList, ","));
} }
}
riskEventMapper.save(params); riskEventMapper.save(params);
} }

@ -578,7 +578,21 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.partnerParam.sub_merchant_id = $scope.riskEvent.sub_merchant_id; $scope.partnerParam.sub_merchant_id = $scope.riskEvent.sub_merchant_id;
$http.get('/risk/business/partners', {params: $scope.partnerParam}).then(function (resp) { $http.get('/risk/business/partners', {params: $scope.partnerParam}).then(function (resp) {
$scope.partners = resp.data; $scope.partners = resp.data;
if ($scope.partners != null && $scope.partners.length > 0) {
$scope.riskEvent.client_moniker = $scope.partners[0].client_moniker; $scope.riskEvent.client_moniker = $scope.partners[0].client_moniker;
}
else {
commonDialog.confirm({
title: 'Warning',
content: '该微信子商户号下暂时没有商户或者商户被禁用,是否继续?'
}).then(function () {
// 点击确定
$scope.riskEvent.client_moniker = null;
}, function () {
// 点击取消
$scope.riskEvent.sub_merchant_id = '';
});
}
if ($scope.partners != null && $scope.partners.length > 1 && $scope.riskEvent.order_type != 5) if ($scope.partners != null && $scope.partners.length > 1 && $scope.riskEvent.order_type != 5)
commonDialog.confirm({ commonDialog.confirm({
title: 'Warning', title: 'Warning',

@ -101,7 +101,7 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partners != null"> <div class="form-group" ng-if="(partners != null) && (partners.length > 0) && riskEvent.order_type == 1">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-type-input">Company Name for="order-type-input">Company Name
</label> </label>

@ -192,7 +192,9 @@
<tbody> <tbody>
<tr ng-repeat="riskEvent in riskEvents"> <tr ng-repeat="riskEvent in riskEvents">
<td> <td>
<a role="button" ui-sref="partners.detail({clientMoniker: riskEvent.client_moniker})"> <a role="button"
ng-if="riskEvent.client_moniker != null"
ui-sref="partners.detail({clientMoniker: riskEvent.client_moniker})">
{{riskEvent.short_name}}({{riskEvent.client_moniker}}) {{riskEvent.short_name}}({{riskEvent.client_moniker}})
</a> </a>
</td> </td>

Loading…
Cancel
Save