parent
2367e27ed8
commit
8524367385
@ -1,13 +1,7 @@
|
||||
package au.com.royalpay.payment.manage.merchants.beans;
|
||||
package au.com.royalpay.payment.manage.compliance_audit.bean;
|
||||
|
||||
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
|
||||
/**
|
@ -0,0 +1,18 @@
|
||||
package au.com.royalpay.payment.manage.compliance_audit.core;
|
||||
|
||||
|
||||
import au.com.royalpay.payment.manage.compliance_audit.bean.ClientComplianceQuery;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
|
||||
/**
|
||||
* Created by yishuqian on 18/10/2016.
|
||||
*/
|
||||
public interface ClientComplianceApply {
|
||||
JSONObject listClientComplianceApply(JSONObject manager, ClientComplianceQuery apply);
|
||||
void passComplianceFiles(JSONObject manager, JSONObject passInfo);
|
||||
void refuseComplianceFiles(JSONObject manager, JSONObject refuseInfo);
|
||||
JSONObject complianceAuthFile(JSONObject client);
|
||||
void passComplianceFile(JSONObject manager,int clientId,JSONObject passInfo);
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package au.com.royalpay.payment.manage.compliance_audit.web;
|
||||
|
||||
import au.com.royalpay.payment.manage.compliance_audit.bean.ClientComplianceQuery;
|
||||
import au.com.royalpay.payment.manage.compliance_audit.core.ClientComplianceApply;
|
||||
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
||||
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
||||
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
|
||||
import au.com.royalpay.payment.tools.CommonConsts;
|
||||
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by yishuqian on 18/10/2016.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/compliance/audit")
|
||||
public class ComplianceAuditController
|
||||
{
|
||||
@Resource
|
||||
private ClientComplianceApply clientComplianceApply;
|
||||
@Resource
|
||||
private ClientManager clientManager;
|
||||
|
||||
@RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET)
|
||||
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
||||
public JSONObject clientComplianceList(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ClientComplianceQuery apply) {
|
||||
/*return clientApply.listPartnerApply(manager,apply);*/
|
||||
return clientComplianceApply.listClientComplianceApply(manager,apply);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/pass/complianceFiles",method = RequestMethod.GET)
|
||||
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
||||
public void passCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject passInfo) {
|
||||
|
||||
}
|
||||
|
||||
@ManagerMapping(value = "/{clientId}/pass/complianceFile", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
|
||||
public void addUploadPaymentLogo(@PathVariable int clientId, @RequestBody JSONObject passInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
clientComplianceApply.passComplianceFile(manager,clientId,passInfo);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/refuse/complianceFiles",method = RequestMethod.GET)
|
||||
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
||||
public void refuseCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject refuseInfo) {
|
||||
clientComplianceApply.passComplianceFiles(manager,refuseInfo);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/compliance/clientViewFiles/{client_id}",method = RequestMethod.GET)
|
||||
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
||||
public JSONObject searchCompliances(@PathVariable int client_id) {
|
||||
JSONObject clientId = new JSONObject();
|
||||
clientId.put("client_id",client_id);
|
||||
return clientManager.getComplianceFilesForBD(clientId);
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package au.com.royalpay.payment.manage.merchants.core;
|
||||
|
||||
import au.com.royalpay.payment.manage.merchants.beans.ClientApplyInfo;
|
||||
import au.com.royalpay.payment.manage.merchants.beans.ClientComplianceQuery;
|
||||
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Created by yishuqian on 18/10/2016.
|
||||
*/
|
||||
public interface ClientComplianceApply {
|
||||
JSONObject listClientComplianceApply(JSONObject manager, ClientComplianceQuery apply);
|
||||
void passComplianceFiles(JSONObject manager,JSONObject passInfo);
|
||||
void refuseComplianceFiles(JSONObject manager,JSONObject refuseInfo);
|
||||
JSONObject complianceAuthFile(JSONObject client);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
|
||||
'use strict';
|
||||
var app = angular.module('partnerComplianceApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.select']);
|
||||
app.config(['$stateProvider', function ($stateProvider) {
|
||||
$stateProvider.state('partner_compliance_auth', {
|
||||
url: '/partners/complianceForClient',
|
||||
templateUrl: 'static/sys/templates/partner_compliance_for_client.html',
|
||||
controller: 'compliancePartnerForClientCtrl'
|
||||
}).state('partner_apply.compliance_detail', {
|
||||
url: '/{client_id}/compliance_detail',
|
||||
templateUrl: '/static/payment/partner/templates/client_compliance_to_auth.html',
|
||||
controller: 'partnerComplianceCompanyDetail',
|
||||
resolve: {
|
||||
file: ['$http','$stateParams',function ($http, $stateParams) {
|
||||
return $http.get('/partners/application/compliance/clientViewFiles/'+ $stateParams.client_id);
|
||||
}]
|
||||
}
|
||||
})
|
||||
}]);
|
||||
|
||||
app.controller('compliancePartnerForClientCtrl', ['$scope', '$sce', '$http', '$filter', '$uibModal', 'businessStructuresMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap',
|
||||
function ($scope, $sce, $http, $filter, $uibModal, businessStructuresMap, industryMap, stateMap, sectorMap, countryMap) {
|
||||
$scope.pagination = {};
|
||||
$scope.industries = industryMap.configs()
|
||||
$scope.states = stateMap.configs();
|
||||
$scope.countries = countryMap.configs();
|
||||
$scope.params = {};
|
||||
$scope.loadClientCompliance = function (page) {
|
||||
var params = angular.copy($scope.params);
|
||||
params.page = page || $scope.pagination.page || 1;
|
||||
$http.get('/partners/application/listClientCompliances', {params: params}).then(function (resp) {
|
||||
debugger;
|
||||
$scope.compliances = resp.data.data;
|
||||
$scope.pagination = resp.data.pagination;
|
||||
});
|
||||
};
|
||||
$scope.loadClientCompliance(1);
|
||||
}]);
|
||||
|
||||
app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) {
|
||||
debugger;
|
||||
$scope.file = file.data || {};
|
||||
|
||||
/*未完成*/
|
||||
$scope.passPartnerComplianceFiles = function () {
|
||||
debugger;
|
||||
$http.put('/partners/application/pass/complianceFiles' + $scope.account.account_id, $scope.account).then(function (resp) {
|
||||
$scope.$close();
|
||||
}, function (resp) {
|
||||
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
||||
})
|
||||
}
|
||||
|
||||
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/upload_payment_logo', {logo_url: $scope.partner.logo_url})
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
return app;
|
||||
});
|
Loading…
Reference in new issue