diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index 2ff7d6db5..79f301f7c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -332,13 +332,17 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo Context ctx = getMailContext(event); final List emailsTos = (List)ctx.getVariable("emailsTos"); final List emailsCcs = ctx.getVariable("emailsCcs")==null?new ArrayList<>():(List)ctx.getVariable("emailsCcs"); + final List emailsBccs = ctx.getVariable("emailsBccs") == null ? new ArrayList<>() : (List) ctx.getVariable("emailsBccs"); final String title = (String)ctx.getVariable("title"); final String content = thymeleaf.process("mail/risk_upload_mail.html", ctx); final String uploadUrl = (String)ctx.getVariable("uploadUrl"); royalThreadPoolExecutor.execute(() -> { try { - String emailId = mailService.sendRiskEmail(title, emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","), - emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type")); + String emailId = mailService.sendRiskEmail(title, + emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","), + emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), + emailsBccs.isEmpty() ? "" : StringUtils.join(emailsBccs, ","), + content, null,event.getIntValue("order_type")); event.put("email_status", RiskEmailStatusEnum.ALREADY_SEND.getEmailStatus()); event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType()); event.put("submit_url",uploadUrl); @@ -536,7 +540,15 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo if (isSendClient == 1) { ctx.setVariable("emailsTos", clientEmails); ctx.setVariable("emailsCcs", bdEmails); + if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) { + ctx.setVariable("emailsBccs", Arrays.asList( +// "locky@royalpay.com.au ", "zoe.tao@royalpay.com.au", "leo.huang@royalpay.com.au", +// "mona.zhang@royalpay.com.au", "weixinfengkong@royalpay.com.au", "thomas.li@royalpay.com.au" + "18852852189@139.com", "1370256381@qq.com" + )); + } } + switch (event.getIntValue("order_type")){ case 1: case 2: @@ -882,8 +894,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo } JSONObject result = new JSONObject(); result.put("material", materialItemList); - if (material != null && material.containsKey("description")) + if (material != null && material.containsKey("description")) { result.put("description", material.getString("description")); + } + if (material != null && material.containsKey("refuse_description")) { + result.put("refuse_description", material.getString("refuse_description")); + } return result; } diff --git a/src/main/ui/static/analysis/risk_business.js b/src/main/ui/static/analysis/risk_business.js index 7b4c1ff50..f98346da7 100644 --- a/src/main/ui/static/analysis/risk_business.js +++ b/src/main/ui/static/analysis/risk_business.js @@ -336,38 +336,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], // 以下为BD上传材料相关 $scope.material={}; - $scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss'); - $scope.material.risk_id = $scope.riskEvent.risk_id; - // $scope.uploadFile = function(files, index) { - // if (files && files.length) { - // var urls = new Array(); - // var value = 0; - // var progressKey = 'fileProgress' + (index + 1); - // $scope[progressKey] = {value: 0}; - // for (var i = 0; i < files.length; i++) { - // var file = files[i]; - // Upload.upload({ - // url: '/attachment/riskFiles', - // data: {file: file} - // }).then(function (resp) { - // urls.push(resp.data.url); - // }, function (resp) { - // delete $scope[progressKey]; - // alert('Upload Failed'); - // }, function (evt) { - // value += parseInt(100 * evt.loaded / evt.total ); - // $scope[progressKey].value = value/(files.length*2); - // }) - // } - // var fileKey = 'file' + (index + 1) +'_url'; - // $scope.material[fileKey] = urls; - // } - // }; - $scope.uploadFile1 = function (files) { + $scope.uploadFile = function(files, index) { if (files && files.length) { var urls = new Array(); var value = 0; - $scope.file1Progress = {value: 0}; + $scope.allMaterialInfo.material[index].fileProgressValue = 0; for (var i = 0; i < files.length; i++) { var file = files[i]; Upload.upload({ @@ -376,133 +349,26 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], }).then(function (resp) { urls.push(resp.data.url); }, function (resp) { - delete $scope.file1Progress; + delete $scope.allMaterialInfo.material[index].fileProgressValue; alert('Upload Failed'); }, function (evt) { value += parseInt(100 * evt.loaded / evt.total ); - $scope.file1Progress.value = value/(files.length*2); + $scope.allMaterialInfo.material[index].fileProgressValue = value/(files.length*2); }) } - $scope.material.file1_url = urls; - } - }; - $scope.uploadFile2 = function (files) { - if (files && files.length) { - var urls = new Array(); - var value = 0; - $scope.file2Progress = {value: 0}; - for (var i = 0; i < files.length; i++) { - var file = files[i]; - Upload.upload({ - url: '/attachment/riskFiles', - data: {file: file} - }).then(function (resp) { - urls.push(resp.data.url); - }, function (resp) { - delete $scope.file2Progress; - alert('Upload Failed'); - }, function (evt) { - value += parseInt(100 * evt.loaded / evt.total ); - $scope.file2Progress.value = value/(files.length*2); - }) - } - $scope.material.file2_url = urls; - } - }; - $scope.uploadFile3 = function (files) { - if (files && files.length) { - var urls = new Array(); - var value = 0; - $scope.file3Progress = {value: 0}; - for (var i = 0; i < files.length; i++) { - var file = files[i]; - Upload.upload({ - url: '/attachment/riskFiles', - data: {file: file} - }).then(function (resp) { - urls.push(resp.data.url); - }, function (resp) { - delete $scope.file3Progress; - alert('Upload Failed'); - }, function (evt) { - value += parseInt(100 * evt.loaded / evt.total ); - $scope.file3Progress.value = value/(files.length*2); - }) - } - $scope.material.file3_url = urls; - } - }; - $scope.uploadFile4 = function (files) { - if (files && files.length) { - var urls = new Array(); - var value = 0; - $scope.file4Progress = {value: 0}; - for (var i = 0; i < files.length; i++) { - var file = files[i]; - Upload.upload({ - url: '/attachment/riskFiles', - data: {file: file} - }).then(function (resp) { - urls.push(resp.data.url); - }, function (resp) { - delete $scope.file4Progress; - alert('Upload Failed'); - }, function (evt) { - value += parseInt(100 * evt.loaded / evt.total ); - $scope.file4Progress.value = value/(files.length*2); - }) - } - $scope.material.file4_url = urls; - } - }; - $scope.uploadFile5 = function (files) { - if (files && files.length) { - var urls = new Array(); - var value = 0; - $scope.file5Progress = {value: 0}; - for (var i = 0; i < files.length; i++) { - var file = files[i]; - Upload.upload({ - url: '/attachment/riskFiles', - data: {file: file} - }).then(function (resp) { - urls.push(resp.data.url); - }, function (resp) { - delete $scope.file5Progress; - alert('Upload Failed'); - }, function (evt) { - value += parseInt(100 * evt.loaded / evt.total ); - $scope.file5Progress.value = value/(files.length*2); - }) - } - $scope.material.file5_url = urls; - } - }; - $scope.uploadFile6 = function (files) { - if (files && files.length) { - var urls = new Array(); - var value = 0; - $scope.file6Progress = {value: 0}; - for (var i = 0; i < files.length; i++) { - var file = files[i]; - Upload.upload({ - url: '/attachment/riskFiles', - data: {file: file} - }).then(function (resp) { - urls.push(resp.data.url); - }, function (resp) { - delete $scope.file6Progress; - alert('Upload Failed'); - }, function (evt) { - value += parseInt(100 * evt.loaded / evt.total ); - $scope.file6Progress.value = value/(files.length*2); - }) - } - $scope.material.file6_url = urls; + $scope.allMaterialInfo.material[index].uploadFile = urls; } }; + $scope.submit = function (form) { var codeKey = $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('=') + 1) || $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('/') + 1); + $scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss'); + $scope.material.risk_id = $scope.riskEvent.risk_id; + for (var i = 0; i < $scope.allMaterialInfo.material.length; i++) { + var key = 'file' + (i + 1) + "_url"; + $scope.material[key] = $scope.allMaterialInfo.material[i].uploadFile; + } + $scope.material.description = $scope.allMaterialInfo.description; $http.post('/risk/upload/' + codeKey, $scope.material).then(function (resp) { commonDialog.alert({ title: 'Success', @@ -521,19 +387,22 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], // 加载提交材料 $scope.loadRiskMaterial = function() { - $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { - $scope.material = resp.data; - }); + // $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { + // $scope.material = resp.data; + // }); $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function(resp) { $scope.allMaterialInfo = resp.data; + if ($scope.uploadShowFlag) { + $scope.allMaterialInfo.description = ''; + } }); }; // BD是否可上传 $scope.uploadShowFlag = ($scope.riskEvent.result_type == 1 || $scope.riskEvent.result_type == 4) ? true : false; - if (!$scope.uploadShowFlag) - $scope.loadRiskMaterial(); + //if (!$scope.uploadShowFlag) + $scope.loadRiskMaterial(); } ]); @@ -548,22 +417,26 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], // 加载提交材料 // $scope.fileObject = {}; $scope.loadRiskMaterial = function() { - $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { + // $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { + // $scope.riskMaterial = resp.data; + // $scope.file1 = resp.data.file1; + // $scope.file2 = resp.data.file2; + // $scope.file3 = resp.data.file3; + // $scope.file4 = resp.data.file4; + // $scope.file5 = resp.data.file5; + // $scope.file6 = resp.data.file6; + // + // // for (var i = 1; i <= 10; i++) { + // // var key = "file" + i; + // // if (riskMaterial[key + '_url'] != null) + // // $scope.fileObject[key] = riskMaterial[key + '_url']; + // // } + // // $scope.fileLength = Object.keys($scope.fileObject).length; + // }) + + $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function(resp) { $scope.riskMaterial = resp.data; - $scope.file1 = resp.data.file1; - $scope.file2 = resp.data.file2; - $scope.file3 = resp.data.file3; - $scope.file4 = resp.data.file4; - $scope.file5 = resp.data.file5; - $scope.file6 = resp.data.file6; - - // for (var i = 1; i <= 10; i++) { - // var key = "file" + i; - // if (riskMaterial[key + '_url'] != null) - // $scope.fileObject[key] = riskMaterial[key + '_url']; - // } - // $scope.fileLength = Object.keys($scope.fileObject).length; - }) + }); }; $scope.loadRiskMaterial(); diff --git a/src/main/ui/static/analysis/templates/audit_material.html b/src/main/ui/static/analysis/templates/audit_material.html index d93b759fc..5f76d3952 100644 --- a/src/main/ui/static/analysis/templates/audit_material.html +++ b/src/main/ui/static/analysis/templates/audit_material.html @@ -42,126 +42,20 @@ -
-
-

1、物流公司发货单据照片 - 要求:每笔交易对应的物流单必须提供,且单据必须清晰可见
- Photos of logistics companies’ goods-delivery documents - Requirement: The logistics order record corresponding to each transaction must be provided, and details of records should be clearly visible. -

-

1.请解释相应的消费场景/业务模式,例如网站商城,扫码支付, 消费者到店支付等;
- Please explain the relative payment scenario/business activities, for example, online store, QR code payment, payment at the store, etc; -

-
-
-   
-
- - - -
-
-
-
-
-

2、用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、虚拟物品最终消费场景(例如何种游戏、软件)、提供消费场景网址/下载链接 - 要求:每笔交易对应的截图必须清晰可见
- Users need to provide chat records, order information, screenshots of delivery documents, final consumption scenarios of virtual goods (such as games, software); provide consumer scene URL / download link. - Requirement: The screenshot corresponding to each transaction must be clearly visible. -

-

2.提供相应购物清单,订单小票(请提供与被查交易订单号相匹配的交易时间及金额的发票);
- Provide related shopping lists, invoices. (Please provide the invoices, amount of which matches that of the abnormal transaction); -

-
-
-   
-
- - - -
-
-
-
+
-

3、购物小票/发票存根照片 - 照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称 - 购物金额等
- Photos of shopping receipts/ invoice stubs - Requirement: The photos should be clear and must show Merchant name, Business address, Transaction time, Product information, Quantity purchased, etc. -

-

3.提供相应的发货证明,报关单(若有消费者在国内购买,请提供物流单据或报关单);
- Relative proof of delivery, customs declaration (If the consumer purchased from China, please provide shipping receipt or customs declaration); -

+

  
-
-
-

4、显示商户门牌号码和店头名称的照片 - 要求:清晰可见,至少一张
- Photos of Merchant Street number & Merchant name - Requirement: At least one visible photo -

-

4.提供您的门店照片(门店照及店铺内的照片各一张, 一张可以看到商户名的门头照,一张可以看到相关商品或服务的店内照片);
- Photos of the store ( one of each front-store and in-store); -

-
-
-   
-
- - - -
-
- -
-
-
-

5、显示商户营业场景所场内部情况(如店内商品陈列、收银台等)的照片 - 要求:照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张
- Photos of internal environment of merchant business (such as in-store merchandise display, checkout counter, etc.) - Requirements: The photos (at least three) showing merchant activities including actual selling-goods or services obviously -

-

5.其他可以还原交易背景的资料,如和消费者的聊天记录等,来佐证被查单号交易的真实性;
- Other materials that can verify the payment scenario, for example, chatting history, to prove the truth of the transactions; -

-
-
-   
-
- - - -
-
- -
-
-
-

6、其他图片
- Other pictures -

-
-
-   
-
- - - -
-
- -
diff --git a/src/main/ui/static/analysis/templates/riskEvent_detail_bd.html b/src/main/ui/static/analysis/templates/riskEvent_detail_bd.html index 78aa1bf82..8ce630ed2 100644 --- a/src/main/ui/static/analysis/templates/riskEvent_detail_bd.html +++ b/src/main/ui/static/analysis/templates/riskEvent_detail_bd.html @@ -57,200 +57,55 @@
-
-
-

- 1、物流公司发货单据照片 - 要求:每笔交易对应的物流单必须提供,且单据必须清晰可见
- Photos of logistics companies’ goods-delivery documents - Requirement: The logistics order record corresponding to each transaction must be provided, - and details of records should be clearly visible. -

-

- 1.请解释相应的消费场景/业务模式,例如网站商城,扫码支付, 消费者到店支付等;
- Please explain the relative payment scenario/business activities, - for example, online store, QR code payment, payment at the store, etc; -

-
-
-
- -
-   
-
- {{file1Progress.value}}% - -
-
-
-
-
-

- 2、用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、 - 虚拟物品最终消费场景(例如何种游戏、软件)、提供消费场景网址/下载链接 - 要求:每笔交易对应的截图必须清晰可见
- Users need to provide chat records, order information, screenshots of delivery documents, - final consumption scenarios of virtual goods (such as games, software); - provide consumer scene URL / download link. - Requirement: The screenshot corresponding to each transaction must be clearly visible. -

-

- 2.提供相应购物清单,订单小票(请提供与被查交易订单号相匹配的交易时间及金额的发票);
- Provide related shopping lists, invoices. - (Please provide the invoices, amount of which matches that of the abnormal transaction); -

-
-
-
- -
-   
-
- {{file2Progress.value}}% - -
-
- -
-
-
-

- 3、购物小票/发票存根照片 - 照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称 - 购物金额等
- Photos of shopping receipts/ invoice stubs - Requirement: The photos should be clear and must show Merchant name, - Business address, Transaction time, Product information, Quantity purchased, etc. -

-

- 3.提供相应的发货证明,报关单(若有消费者在国内购买,请提供物流单据或报关单);
- Relative proof of delivery, customs declaration - (If the consumer purchased from China, please provide shipping receipt or customs declaration); -

-
-
-
- -
-   
-
- {{file3Progress.value}}% - -
-
-
-
+
-

- 4、显示商户门牌号码和店头名称的照片 - 要求:清晰可见,至少一张
- Photos of Merchant Street number & Merchant name - Requirement: At least one visible photo -

-

- 4.提供您的门店照片(门店照及店铺内的照片各一张, 一张可以看到商户名的门头照,一张可以看到相关商品或服务的店内照片);
- Photos of the store ( one of each front-store and in-store); -

+

{{item.question}}

  
- {{file4Progress.value}}% - -
-
+ {{item.fileProgressValue}}% -
-
-
-

- 5、显示商户营业场景所场内部情况(如店内商品陈列、收银台等)的照片 - 要求:照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张
- Photos of internal environment of merchant business - (such as in-store merchandise display, checkout counter, etc.) - Requirements: The photos (at least three) - showing merchant activities including actual selling-goods or services obviously -

-

- 5.其他可以还原交易背景的资料,如和消费者的聊天记录等,来佐证被查单号交易的真实性;
- Other materials that can verify the payment scenario, for example, - chatting history, to prove the truth of the transactions; -

-
-
-
- -
-   
-
- {{file5Progress.value}}% - + +
-
-
-
-

6、其他图片
- Other pictures -

-
-
-
- -
-   
-
- {{file6Progress.value}}% - -
-
-
-
- Submit