|
|
|
@ -11,10 +11,7 @@ import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.ValidationLogMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CalendarMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.RateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
@ -157,6 +154,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
|
@Resource
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientDeviceMapper clientDeviceMapper;
|
|
|
|
|
|
|
|
|
|
@Value("${app.settlement.email-to}")
|
|
|
|
|
private String settlementEmailTo;
|
|
|
|
|
@Value("${app.settlement.email-cc}")
|
|
|
|
@ -828,13 +828,15 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
|
int rowNum = 0;
|
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
|
String[] title = {"order Id", "Client Order Id", "Transaction Time", "Channel", "Gateway", "Exchange Rate", "Transaction Type", "Currency",
|
|
|
|
|
"Input Amount", "Total Amount", "Clearing Amount", "Sruchange Rate", "Settle Amount", "Remark"};
|
|
|
|
|
"Input Amount", "Total Amount", "Clearing Amount", "Sruchange Rate", "Settle Amount", "Remark", "Dev No"};
|
|
|
|
|
String[] analysis = {"Total Credit", "Total Debit", "Gross Amount", "Total Charge", "Net Amount"};
|
|
|
|
|
for (int i = 0; i < title.length; i++) {
|
|
|
|
|
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
|
|
|
|
|
}
|
|
|
|
|
JSONObject channels = clearTransation.getJSONObject("channels");
|
|
|
|
|
|
|
|
|
|
JSONObject device;
|
|
|
|
|
String clientDevId = "";
|
|
|
|
|
for (Object o : clearTransation.getJSONArray("report")) {
|
|
|
|
|
JSONObject settle = (JSONObject) o;
|
|
|
|
|
if (settle.getBigDecimal("clearing_amount").compareTo(BigDecimal.ZERO) == 0) {
|
|
|
|
@ -865,6 +867,10 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
|
row.createCell(12, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("settle_amount") == null ? ""
|
|
|
|
|
: settle.getBigDecimal("settle_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString());
|
|
|
|
|
row.createCell(13, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("order_detail"));
|
|
|
|
|
device = clientDeviceMapper.find(settle.getString("dev_id"));
|
|
|
|
|
if (device != null)
|
|
|
|
|
clientDevId = device.getString("client_dev_id");
|
|
|
|
|
row.createCell(14, Cell.CELL_TYPE_STRING).setCellValue(clientDevId);
|
|
|
|
|
}
|
|
|
|
|
row = sheet.createRow(++rowNum);
|
|
|
|
|
for (int i = 0; i < analysis.length; i++) {
|
|
|
|
|