diff --git a/pom.xml b/pom.xml index b0501cc09..0a506a47f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.24 + 1.4.25 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java index 27925411a..7cd89a462 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java @@ -1170,7 +1170,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider Sheet sheet = wb.createSheet("Merchant_Settlement_Info_" + reportDate); int rowNum = 0; Row row = sheet.createRow(rowNum); - String[] title = {"order Id", "Client Order Id", "Transaction Time", "Channel", "Gateway", "Exchange Rate", "Transaction Type", "Currency", + String[] title = {"Client Moniker","Short Name","order Id", "Client Order Id", "Transaction Time", "Channel", "Gateway", "Exchange Rate", "Transaction Type", "Currency", "Input Amount", "Total Amount", "Clearing Amount(AUD)", "Sruchange Rate", "Surcharge(AUD)", "GST(AUD)", "Settle Amount(AUD)", "Remark", "Dev No", "Dev Remark"}; String[] analysis = {"Total Credit(AUD)", "Total Debit(AUD)", "Gross Amount(AUD)", "Total GST(AUD)", "Total Charge(AUD)", "Net Amount(AUD)"}; for (int i = 0; i < title.length; i++) { @@ -1184,53 +1184,55 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider continue; } row = sheet.createRow(++rowNum); - row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("order_id")); - row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("client_order_id")); + row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("client_moniker")); + row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("short_name")); + row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("order_id")); + row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("client_order_id")); Calendar calendar = (Calendar) settle.get("transaction_time"); - row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(DateFormatUtils.format(calendar, "yyyy-MM-dd HH:mm:ss", calendar.getTimeZone())); - row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("channel")); + row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(DateFormatUtils.format(calendar, "yyyy-MM-dd HH:mm:ss", calendar.getTimeZone())); + row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("channel")); if (settle.getInteger("gateway") != null) { - row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(TradeType.fromGatewayNumber(settle.getIntValue("gateway")).getTradeType()); + row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(TradeType.fromGatewayNumber(settle.getIntValue("gateway")).getTradeType()); } else { - row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue("-"); + row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue("-"); } - row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("exchange_rate").setScale(5, BigDecimal.ROUND_DOWN).toPlainString()); - cell = row.createCell(6, Cell.CELL_TYPE_STRING); + row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("exchange_rate").setScale(5, BigDecimal.ROUND_DOWN).toPlainString()); + cell = row.createCell(8, Cell.CELL_TYPE_STRING); cell.setCellValue(settle.getString("transaction_type")); cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null); - row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("transaction_currency")); - cell = row.createCell(8, Cell.CELL_TYPE_STRING); + row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("transaction_currency")); + cell = row.createCell(10, Cell.CELL_TYPE_STRING); cell.setCellValue(settle.getBigDecimal("display_amount") == null ? "" : "Credit".equals(settle.getString("transaction_type")) ? settle.getBigDecimal("display_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString() : "-" + settle.getBigDecimal("display_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString()); cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null); - cell = row.createCell(9, Cell.CELL_TYPE_STRING); + cell = row.createCell(11, Cell.CELL_TYPE_STRING); cell.setCellValue(settle.getBigDecimal("transaction_amount") == null ? "" : "Credit".equals(settle.getString("transaction_type")) ? settle.getBigDecimal("transaction_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString() : "-" + settle.getBigDecimal("transaction_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString()); cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null); - cell = row.createCell(10, Cell.CELL_TYPE_STRING); + cell = row.createCell(12, Cell.CELL_TYPE_STRING); cell.setCellValue(settle.getBigDecimal("clearing_amount") == null ? "" : "Credit".equals(settle.getString("transaction_type")) ? settle.getBigDecimal("clearing_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString() : "-" + settle.getBigDecimal("clearing_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString()); cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null); - row.createCell(11, Cell.CELL_TYPE_STRING).setCellValue(channels.getString(settle.getString("channel")) == null ? "" + row.createCell(13, Cell.CELL_TYPE_STRING).setCellValue(channels.getString(settle.getString("channel")) == null ? "" : channels.getJSONObject(settle.getString("channel")).getBigDecimal("rate").toPlainString() + "%"); //手续费 + gst - row.createCell(12, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("total_surcharge") == null ? "" + row.createCell(14, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("total_surcharge") == null ? "" : settle.getBigDecimal("total_surcharge").setScale(2, RoundingMode.DOWN).toPlainString()); - row.createCell(13, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("tax_amount") == null ? "" + row.createCell(15, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("tax_amount") == null ? "" : settle.getBigDecimal("tax_amount").setScale(2, RoundingMode.DOWN).toPlainString()); - cell = row.createCell(14, Cell.CELL_TYPE_STRING); + cell = row.createCell(16, Cell.CELL_TYPE_STRING); cell.setCellValue(settle.getBigDecimal("settle_amount") == null ? "" : "Credit".equals(settle.getString("transaction_type")) ? settle.getBigDecimal("settle_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString() : "-" + settle.getBigDecimal("settle_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString()); cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null); - row.createCell(15, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("order_detail")); + row.createCell(17, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("order_detail")); String clientDevId = StringUtils.defaultString(settle.getString("dev_id"), "-"); JSONObject device = clientDeviceMapper.find(settle.getString("dev_id")); String clientDevRemark = "-"; @@ -1238,8 +1240,8 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider clientDevId = device.getString("client_dev_id"); clientDevRemark = device.getString("remark"); } - row.createCell(16, Cell.CELL_TYPE_STRING).setCellValue(clientDevId); - row.createCell(17, Cell.CELL_TYPE_STRING).setCellValue(clientDevRemark); + row.createCell(18, Cell.CELL_TYPE_STRING).setCellValue(clientDevId); + row.createCell(19, Cell.CELL_TYPE_STRING).setCellValue(clientDevRemark); } row = sheet.createRow(++rowNum); for (int i = 0; i < analysis.length; i++) { diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml index e64ed299a..3c67c1566 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml @@ -1168,7 +1168,9 @@ r.client_refund_id, o.order_detail, o.dev_id, - o.source + o.source, + c.client_moniker, + c.short_name FROM pmt_transactions t LEFT JOIN pmt_orders o ON o.order_id = t.order_id LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id diff --git a/src/main/ui/static/commons/services/clearingDetailService.js b/src/main/ui/static/commons/services/clearingDetailService.js index 80a0c654c..7d347e1cf 100644 --- a/src/main/ui/static/commons/services/clearingDetailService.js +++ b/src/main/ui/static/commons/services/clearingDetailService.js @@ -21,7 +21,7 @@ define(['../app','decimal'], function (app,Decimal) { } function openDetailOfMergeSettle(url,client_id) { $uibModal.open({ - templateUrl: '/static/payment/tradelog/templates/partner_settlement_dialog.html', + templateUrl: '/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html', controller: 'clearingDetailOfMergeSettleCtrl', resolve: { detail: ['$http', function ($http) { diff --git a/src/main/ui/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html b/src/main/ui/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html new file mode 100644 index 000000000..d3bb5a488 --- /dev/null +++ b/src/main/ui/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html @@ -0,0 +1,239 @@ + +