From a4481c6c0e7a77ba9be4979dbeef12e300329418 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Mon, 19 Aug 2019 13:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E5=90=88=E8=A7=84=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=8D=E5=85=A8=EF=BC=8C=E8=A1=A5=E5=85=85=E5=95=86?= =?UTF-8?q?=E6=88=B7=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/ClientComplianceCompanyMapper.java | 28 +++++ .../system/ClientComplianceFilesMapper.java | 24 ++++ .../mappers/system/ClientFilesMapper.java | 13 ++ .../manage/merchants/core/ClientManager.java | 6 + .../core/impls/ClientManagerImpl.java | 79 ++++++++++++ .../web/PartnerManageController.java | 5 + .../merchants/web/PartnerViewController.java | 74 ++++++++++- .../system/ClientComplianceCompanyMapper.xml | 29 +++++ .../system/ClientComplianceFilesMapper.xml | 5 + .../mappers/system/ClientFilesMapper.xml | 16 ++- .../ui/static/dashboard/partner-dashboard.js | 19 ++- .../static/payment/partner/partner-manage.js | 11 ++ src/main/ui/static/payment/partner/partner.js | 49 +++++++- .../client_compliance_to_prefect.html | 116 ++++++++++++------ .../templates/client_partner_detail.html | 7 +- .../partner/templates/partner_auth_files.html | 84 +++++++++++-- 16 files changed, 505 insertions(+), 60 deletions(-) create mode 100644 src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.java create mode 100644 src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.java create mode 100644 src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.xml create mode 100644 src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.xml diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.java new file mode 100644 index 000000000..fe81f0e96 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.java @@ -0,0 +1,28 @@ +package au.com.royalpay.payment.manage.mappers.system; + +import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect; +import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; +import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; +import cn.yixblog.support.mybatis.autosql.annotations.SqlType; +import com.alibaba.fastjson.JSONObject; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Created by yishuqian on 06/03/2017. + */ +@AutoMapper(tablename = "client_authfile_compliance", pkName = "compliance_id") +public interface ClientComplianceCompanyMapper { + @AutoSql(type = SqlType.INSERT) + void save(JSONObject partner); + + @AutoSql(type = SqlType.UPDATE) + void update(JSONObject partner); + + + @AutoSql(type = SqlType.SELECT) + JSONObject findFileByClientId(@Param("client_id") int client_id); + + +} diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.java new file mode 100644 index 000000000..0e770e3fc --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.java @@ -0,0 +1,24 @@ +package au.com.royalpay.payment.manage.mappers.system; + +import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect; +import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; +import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; +import cn.yixblog.support.mybatis.autosql.annotations.SqlType; +import com.alibaba.fastjson.JSONObject; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Created by yishuqian on 06/03/2017. + */ +@AutoMapper(tablename = "client_authfile_compliance_detail", pkName = "file_detial_id") +public interface ClientComplianceFilesMapper { + @AutoSql(type = SqlType.INSERT) + void save(JSONObject partner); + + @AutoSql(type = SqlType.UPDATE) + void update(JSONObject partner); + + +} diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.java index 91b18b12e..c58433c26 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.java @@ -24,6 +24,17 @@ public interface ClientFilesMapper { @AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 1") List findClientFile(@Param("client_id") int clientId); + @AutoSql(type = SqlType.SELECT) + @AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 0") + List findClientFileCommit(@Param("client_id") int clientId); + + + @AutoSql(type = SqlType.SELECT) + @AdvanceSelect(addonWhereClause = "is_valid = 1 ") + List findClientViewFile(@Param("client_id") int clientId); + + void updateByFileId(@Param("file_id") String fileId); + @AutoSql(type = SqlType.SELECT) @AdvanceSelect(addonWhereClause = "is_valid = 1") List findAllClientFile(@Param("client_id") int clientId); @@ -37,4 +48,6 @@ public interface ClientFilesMapper { void confirmAgreeFile(@Param("client_id") int client_id); + void updateBeforeCompliance(@Param("client_id") int client_id); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 3c1ecec17..859d9c8e0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -235,10 +235,16 @@ public interface ClientManager { JSONObject getAuthFiles(JSONObject manager, String clientMoniker); + JSONObject getClientViewAuthFiles(JSONObject manager, String clientMoniker); + JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker); + void deleteAuthFiles(JSONObject fileInfo); + void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo); + void uploadAuthFilesForClient(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo); + JSONObject getClientsAnalysis(JSONObject manager); List getUnRegister(JSONObject manager); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index c7b0edce4..103c0b48f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3080,6 +3080,44 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid return fileJson; } + + @Override + public JSONObject getClientViewAuthFiles(JSONObject manager, String clientMoniker) + { + JSONObject client = getClientInfoByMoniker(clientMoniker); + String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"}; + if (client == null) { + throw new InvalidShortIdException(); + } + List clientFiles = clientFilesMapper.findClientViewFile(client.getIntValue("client_id")); + JSONObject fileJson = new JSONObject(); + if (clientFiles != null && clientFiles.size() > 0) { + for (String fileKey : fileKeys) { + List clientFileUrl = clientFiles.stream() + .filter(json -> (fileKey.equals(json.getString("file_name")))) + .sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date"))) + .map(json -> { + JSONObject params = new JSONObject(); + params.put("file_id", json.getString("file_id")); + params.put("file_value", json.getString("file_value")); + return params; + }) + .collect(Collectors.toList()); + if (clientFileUrl != null && clientFileUrl.size() > 0) { + fileJson.put(fileKey, clientFileUrl); + } + } + } + return fileJson; + + }; + + @Override + public void deleteAuthFiles(JSONObject fileInfo) + { + clientFilesMapper.updateByFileId(fileInfo.getString("file_id")); + } + @Override @Transactional public void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) { @@ -3104,6 +3142,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid // } } + @Override + @Transactional + public void uploadAuthFilesForClient(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) { + JSONObject client = getClientInfoByMoniker(clientMoniker); + if (client == null) { + throw new InvalidShortIdException(); + } + int clientId = client.getIntValue("client_id"); + try { + updateSysClientFilesForClient(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info()); + updateSysClientFilesForClient(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info()); + updateSysClientFilesForClient(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info()); + updateSysClientFilesForClient(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info()); + updateSysClientFilesForClient(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info()); + } catch (Exception e) { + logger.error("上传合规文件失败", e); + } + // boolean clientSource = client.getIntValue("source") == 4 ? true : false; + // if (filesInfo.getAuthStatus() == 1 && clientSource) { + // client.put("approve_result", 3); + // clientMapper.update(client); + // } + } + @Override public JSONObject getSettlementLog(JSONObject manager, String clientMoniker, TradeLogQuery query) { JSONObject client = getClientInfoByMoniker(clientMoniker); @@ -3156,6 +3218,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } } + public void updateSysClientFilesForClient(JSONObject manager, int clientId, String fileType, String fileValue) { + if (fileValue != null) { + JSONObject fileJson = new JSONObject(); + fileJson.put("client_id", clientId); + fileJson.put("last_update_date", new Date()); + fileJson.put("last_update_by", manager.getString("display_name")); + fileJson.put("file_name", fileType); + fileJson.put("file_value", fileValue); + fileJson.put("status", 0); + fileJson.put("is_valid", 1); + clientFilesMapper.save(fileJson); + logger.info(clientId + "的fileType文件上传成功"); + } + } + + + @Override public JSONObject getClientsAnalysis(JSONObject manager) { JSONObject params = new JSONObject(); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index 1fedfd0b8..13f7e6131 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -534,6 +534,11 @@ public class PartnerManageController { return clientManager.getAllAuthFiles(manager, clientMoniker); } + @ManagerMapping(value = "/{clientMoniker}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER}) + public void deleteAuthFiles(@PathVariable String clientMoniker, @RequestBody JSONObject fileInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + clientManager.deleteAuthFiles(fileInfo); + } + @ManagerMapping(value = "/{clientMoniker}/file", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER}) public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index b43d8d5d1..fa2af9365 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -2,11 +2,16 @@ package au.com.royalpay.payment.manage.merchants.web; import au.com.royalpay.payment.core.exceptions.ParamInvalidException; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; +import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper; +import au.com.royalpay.payment.manage.mappers.system.ClientComplianceFilesMapper; +import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper; +import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo; import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean; import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport; +import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.PartnerMapping; import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection; @@ -21,11 +26,14 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; +import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.wechat.WechatMapping; import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.*; @@ -35,6 +43,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; import java.io.OutputStream; +import java.util.Date; import java.util.List; /** @@ -52,6 +61,18 @@ public class PartnerViewController { private ClientSignEventSupport clientSignEventSupport; @Resource private ClientContractService clientContractService; + @Resource + private ClientComplianceCompanyMapper clientComplianceCompanyMapper; + @Resource + private ClientComplianceFilesMapper clientComplianceFilesMapper; + @Resource + private ClientFilesMapper clientFilesMapper; + @Resource + private ClientMapper clientMapper; + + + + @Resource private SimpleClientApplyService simpleClientApplyService; @@ -496,6 +517,25 @@ public class PartnerViewController { return clientManager.getAuthFiles(null,account.getString("client_moniker")); } + @PartnerMapping(value = "/compliance/complianceInfo", method = RequestMethod.GET) + @ResponseBody + public JSONObject complianceInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { + return null; + } + + @PartnerMapping(value = "/compliance/clientViewFiles", method = RequestMethod.GET) + @ResponseBody + public JSONObject complianceFiles(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { + JSONObject file = clientManager.getClientViewAuthFiles(null,account.getString("client_moniker")); + file.put("file_company",clientComplianceCompanyMapper.findFileByClientId(account.getIntValue("client_id"))); + return file; + } + +/* @PartnerMapping(value = "/{clientMoniker}/clientViewFiles", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT}) + public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + return clientManager.getAllAuthFiles(manager, clientMoniker); + }*/ + @PartnerMapping(value = "/verify/email", method = RequestMethod.PUT) @ResponseBody public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { @@ -519,12 +559,44 @@ public class PartnerViewController { @ResponseBody public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) { JSONObject client = account.getJSONObject("client"); - if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){ + /*if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){ JSONObject manager = new JSONObject(); manager.put("display_name","client"); clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo); + }*/ + if (true){ + JSONObject manager = new JSONObject(); + manager.put("display_name","client"); + clientManager.uploadAuthFilesForClient(manager, account.getString("client_moniker"), filesInfo); }else { throw new BadRequestException("已通过审核,暂不能提交和修改"); } } + + + @PartnerMapping(value = "/clientCompliance/viewCommit", method = RequestMethod.PUT) + @ResponseBody + @Transactional + public void clientComplianceViewCommit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) { + JSONObject client = account.getJSONObject("client"); + JSONObject fileComp = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id")); + + if(fileComp == null ) + { + fileComp = new JSONObject(); + String a = client.getString("client_moniker")+"-"+ RandomStringUtils.random(8, true, true).toUpperCase(); + fileComp.put("compliance_id", client.getString("client_moniker")+"-"+ RandomStringUtils.random(8, true, true).toUpperCase()); + fileComp.put("client_id",client.getIntValue("client_id")); + fileComp.put("create_time",new Date()); + fileComp.put("staus",0); + clientComplianceCompanyMapper.save(fileComp); + clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id")); + }else + { + fileComp.put("create_time",new Date()); + fileComp.put("staus",0); + clientComplianceCompanyMapper.update(fileComp); + clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id")); + } + } } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.xml new file mode 100644 index 000000000..38d692fac --- /dev/null +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceCompanyMapper.xml @@ -0,0 +1,29 @@ + + + + + + + update sys_files + set state = 2 + where file_name = 'source_agree_file' + and client_id = #{client_id} + + + + update sys_files + set is_valid = 0 + where file_id = #{file_id} + + diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.xml new file mode 100644 index 000000000..3a2a77779 --- /dev/null +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientComplianceFilesMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.xml index 6005fa2bc..529ddd6ee 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientFilesMapper.xml @@ -20,4 +20,18 @@ where file_name = 'source_agree_file' and client_id = #{client_id} - \ No newline at end of file + + + update sys_files + set is_valid = 0 + where file_id = #{file_id} + + + + update sys_files + set status = 2 + where client_id = #{client_id} + and is_valid = 1 + + + diff --git a/src/main/ui/static/dashboard/partner-dashboard.js b/src/main/ui/static/dashboard/partner-dashboard.js index 40f62f314..ecc15ece8 100644 --- a/src/main/ui/static/dashboard/partner-dashboard.js +++ b/src/main/ui/static/dashboard/partner-dashboard.js @@ -9,7 +9,12 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct $stateProvider.state('partner_dashboard', { url: '/partner_dashboard', templateUrl: '/static/dashboard/templates/partner_dashboard.html', - controller: 'partnerDashboardCtrl' + controller: 'partnerDashboardCtrl', + resolve: { + company_info: ['$http', function ($http) { + return $http.get('/client/partner_info/compliance/complianceInfo'); + }] + } }) }]); /*app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) { @@ -568,7 +573,9 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct } }]);*/ - app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog) { + app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog','company_info', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog,company_info) { + debugger; + $scope.company_info = company_info.data || {}; $scope.sendMailCount = 0; $scope.scales = [ { @@ -982,7 +989,13 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct }) }; - $scope.ComplianceToPrefect(); + /*if($scope.currentUser.client.client_less_file) + { + debugger; + var a = $scope.currentUser.client.client_less_file; + $scope.ComplianceToPrefect(); + }*/ + }]); app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) { diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 31d4da450..813d8f905 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3803,6 +3803,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return url; }; + $scope.deleteComplianceFiles = function (file_id) { + debugger; + $scope.file_id = file_id; + + /*$http.put('/sys/partners/' + $scope.partner.client_moniker + '/saveAdditional_content', {additional_content: $scope.partner.additional_content}).then(function (resp) {*/ + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/delete',{file_id: $scope.file_id}).then(function (resp) { + $state.reload(); + }) +}; + + $scope.updateFile = function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/file', $scope.file).then(function () { commonDialog.alert({ diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index f0af678ad..48edc7fc7 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -38,12 +38,12 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot }] } }).state('basic.compliance_to_perfect', { - url: '/{client_moniker}/compliance_files', + url: '/{client_moniker}/compliance_to_prefect', templateUrl: '/static/payment/partner/templates/client_compliance_to_prefect.html', controller: 'clientComplianceFilesCtrl', resolve: { file: ['$http', function ($http) { - return $http.get('/client/partner_info/compliance/files'); + return $http.get('/client/partner_info/compliance/clientViewFiles'); }] } }).state('basic.clearing_config', { @@ -745,6 +745,51 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot type: 'error' }); }; + + + $scope.clientComplianceViewCommit= function () { + if(!$scope.file.client_agree_file) + { + commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'}); + return; + }else if(!$scope.file.client_id_file) + { + commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'}); + return; + }else if(!$scope.file.client_bank_file) + { + commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'}); + return; + } + else if(!$scope.file.client_company_file) + { + commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'}); + return; + }; + + $http.put('/client/partner_info/clientCompliance/viewCommit', $scope.file).then(function () { + commonDialog.alert({ + title: 'Success', + content: 'Upload Successful', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + }) + }; + + $scope.deleteComplianceFiles = function (file_id) { + debugger; + $scope.file_id = file_id; + + /*$http.put('/sys/partners/' + $scope.partner.client_moniker + '/saveAdditional_content', {additional_content: $scope.partner.additional_content}).then(function (resp) {*/ + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/delete',{file_id: $scope.file_id}).then(function (resp) { + $state.reload(); + }) + }; + + $scope.commitPartner = function () { if ($scope.file) { if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) { diff --git a/src/main/ui/static/payment/partner/templates/client_compliance_to_prefect.html b/src/main/ui/static/payment/partner/templates/client_compliance_to_prefect.html index a90c24d45..1f625fe3a 100644 --- a/src/main/ui/static/payment/partner/templates/client_compliance_to_prefect.html +++ b/src/main/ui/static/payment/partner/templates/client_compliance_to_prefect.html @@ -4,6 +4,13 @@ }
+
Audit Files     + +

正在审核中 +

+
@@ -11,15 +18,33 @@
- - + + + + + + + + + +
1 + + + +
+ +
@@ -35,15 +60,27 @@
- - + + + + + + + +
1 + + + +
@@ -67,15 +104,28 @@
- - + + + + + + + + +
1 + + + +
@@ -94,21 +144,34 @@
- + + + + + + + +
1 + + + +
@@ -120,35 +183,10 @@
-
-
- -
-
- - - -
- - - -
-
-
-

Example:请保证图片信息清晰可见,如下图

- -
-
-
-
-->
- \ No newline at end of file + diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html index 5f3f7465f..5d7d0ed3b 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html @@ -49,12 +49,13 @@ Clearing Config -
  • + -
  • +
  • Compliance to prefect +

    (资料审核中)

  • diff --git a/src/main/ui/static/payment/partner/templates/partner_auth_files.html b/src/main/ui/static/payment/partner/templates/partner_auth_files.html index 619d532ed..4b45755fe 100644 --- a/src/main/ui/static/payment/partner/templates/partner_auth_files.html +++ b/src/main/ui/static/payment/partner/templates/partner_auth_files.html @@ -26,10 +26,25 @@
    - + + + + + + + + + +
    1 + + + +
    + +
    @@ -52,8 +67,19 @@
    -
    - + + + + + + + +
    1 + + + +
    @@ -84,8 +110,20 @@
    - - + + + + + + + + +
    1 + + + +
    @@ -117,8 +155,20 @@
    - - + + + + + + + + +
    1 + + + +
    @@ -143,8 +193,20 @@
    - - + + + + + + + + +
    1 + + + +
    @@ -164,4 +226,4 @@ - \ No newline at end of file +