From df4c8f90d0cc4e0cb99d35130bccd74b06ba7240 Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Mon, 26 Mar 2018 17:25:42 +0800 Subject: [PATCH] fix --- .../appclient/core/RetailAppService.java | 1 + .../core/impls/RetailAppServiceImp.java | 19 ++++++++++++++++++- .../appclient/web/RetailAppController.java | 5 +++++ .../tradelog/templates/balance_report.html | 4 ++-- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java index 309a2af8f..836108a49 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java @@ -117,4 +117,5 @@ public interface RetailAppService { void changeManualSettle(JSONObject device,boolean manual_settle); + JSONObject getTradeCommonDateNew(JSONObject device, AppQueryBean appQueryBean); } diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index c8712b21d..ca848a8d7 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -205,13 +205,29 @@ public class RetailAppServiceImp implements RetailAppService { setAllClientIds(params, client_id); params.put("client_id", client_id); JSONObject res = transactionAnalysisMapper.getClientTransaction(params); - // res.put("trade_amount", transactionAnalysisMapper.analysisTotalAmount(params)); // res.put("trade_count", transactionAnalysisMapper.analysisTotalCount(params)); res.put("not_settled", transactionAnalysisMapper.analysisNotSettled(params)); return res; } + @Override + public JSONObject getTradeCommonDateNew(JSONObject device, AppQueryBean appQueryBean) { + String clientType = device.getString("client_type"); + deviceSupport.findRegister(clientType); + int client_id = device.getIntValue("client_id"); + JSONObject client = clientManager.getClientInfo(client_id); + String timezone = client.getString("timezone"); + if (timezone != null && !timezone.isEmpty()) { + appQueryBean.setTimezone(timezone); + } + JSONObject params = appQueryBean.toParams(); + setAllClientIds(params, client_id); + params.put("client_id", client_id); + JSONObject res = transactionMapper.analysisTransFlow(params); + return res; + } + @Override public void updateClient(JSONObject device, AppClientBean appClientBean) { String clientType = device.getString("client_type"); @@ -1390,6 +1406,7 @@ public class RetailAppServiceImp implements RetailAppService { clientManager.changeManualSettle(device.getIntValue("client_id"),manual_settle,device.getString("account_id"),1,"商户修改手动清算配置"); } + private static boolean mathchLetterorNum(String str) { String regex = "[A-Za-z0-9]{8}"; return str.matches(regex); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index c9135b94e..8342748a3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -94,6 +94,11 @@ public class RetailAppController { return retailAppService.getTradeCommonDate(device, appQueryBean); } + @RequestMapping(value = "/trade_common_new", method = RequestMethod.GET) + public JSONObject getTradeCommonDataNew(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) { + return retailAppService.getTradeCommonDateNew(device, appQueryBean); + } + @RequestMapping("/transactions_customers") public List getOrdersAndCustomersInDays(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) { return retailAppService.getCustomersAndOrdersInDays(device, appQueryBean); diff --git a/src/main/ui/static/payment/tradelog/templates/balance_report.html b/src/main/ui/static/payment/tradelog/templates/balance_report.html index 87700885c..eeb71a0a7 100644 --- a/src/main/ui/static/payment/tradelog/templates/balance_report.html +++ b/src/main/ui/static/payment/tradelog/templates/balance_report.html @@ -242,10 +242,10 @@
- clearing amount + Settlement Amount - ( clearing fee: {{analysis.total_surcharge + analysis.tax_amount|currency:'AUD '}} ) + ( surcharge: {{analysis.total_surcharge + analysis.tax_amount|currency:'AUD '}} )