Merge remote-tracking branch 'origin/develop' into develop

master
yixian 6 years ago
commit af2e674a2b

@ -1,9 +1,11 @@
package au.com.royalpay.payment.manage.partnerinvoice.web;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
@ -21,6 +23,9 @@ public class PartnerInvoiceController {
@Resource
private TradeLogService tradeLogService;
@Resource
private ClientManager clientManager;
@PartnerMapping(value = "/trans_flow",method = RequestMethod.GET,roles = PartnerRole.ADMIN)
public JSONObject listTransFlow(TradeLogQuery query,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) throws Exception {
return tradeLogService.listPartnerTransFlowPage(query,partner);
@ -28,6 +33,18 @@ public class PartnerInvoiceController {
@PartnerMapping(value = "/trans_flow/pdf", method = RequestMethod.GET,roles = PartnerRole.ADMIN)
public void exportTransFlowPDF(TradeLogQuery query,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,HttpServletResponse httpResponse) throws Exception {
tradeLogService.exportTransFlow(query,partner,httpResponse);
tradeLogService.exportTransFlow(query,getPartnerParams(partner,query.getClient_ids()[0]),httpResponse);
}
private JSONObject getPartnerParams(JSONObject partner,String client_id){
JSONObject client = clientManager.getClientInfo(Integer.parseInt(client_id));
if(client==null){
throw new NotFoundException("Client Not Exists");
}
JSONObject params = new JSONObject();
params.put("client_id",partner.getIntValue("client_id"));
params.put("client",client);
params.put("client_moniker",client.getString("client_moniker"));
return params;
}
}

@ -94,9 +94,14 @@
}
.footer-bottom-success{
margin-top: 100px;
margin-top: 60px;
color: #444444;
}
.hf-warning{
font-size: x-small;
color: #FF6600;
}
/*成功页*/
.order-box .success-logo{
text-align: center;

@ -12,13 +12,12 @@ define(['angular','decimal'], function (angular,decimal) {
})
}]);
app.controller('partnerInvoiceApp', ['$scope', '$http','$filter', 'commonDialog', function ($scope, $http,$filter, commonDialog) {
$scope.params = {channel:'ALL',clearing_status:-1};
$scope.params = {channel:'ALL',clearing_status:-1,client_ids:[$scope.currentUser.client.client_id]};
$scope.today = new Date();
$scope.pagination = {};
$scope.today = new Date();
$scope.clients = [$scope.currentUser.client];
if ($scope.currentUser.client.has_children) {
$scope.params.client_ids = [$scope.currentUser.client.client_id];
$http.get('/client/partner_info/sub_partners').then(function (resp) {
var clientList = resp.data;
clientList.forEach(function (client) {
@ -126,6 +125,9 @@ define(['angular','decimal'], function (angular,decimal) {
params.page = page || $scope.pagination.page || 1;
url += connectSymbol + 'page=' + params.page;
url+="&channel=ALL&clearing_status=-1";
if(params.client_ids){
url+=connectSymbol +'client_ids='+params.client_ids;
}
return url;
}

Loading…
Cancel
Save