|
|
@ -102,6 +102,8 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private TaskManualSettleMapper taskManualSettleMapper;
|
|
|
|
private TaskManualSettleMapper taskManualSettleMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private PreSettleTaskMapper preSettleTaskMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private ValidationLogMapper validationLogMapper;
|
|
|
|
private ValidationLogMapper validationLogMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ManagerMapper managerMapper;
|
|
|
|
private ManagerMapper managerMapper;
|
|
|
@ -732,7 +734,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
new PageBounds(Order.formString("order_id.asc")));
|
|
|
|
new PageBounds(Order.formString("order_id.asc")));
|
|
|
|
|
|
|
|
|
|
|
|
for (JSONObject transaction : transactions) {
|
|
|
|
for (JSONObject transaction : transactions) {
|
|
|
|
transaction.put("rate_value",StringUtils.defaultString(clientIncrementalMapper.findByChannelAndClientId(transaction.getIntValue("client_id"),transaction.getString("source")) ,"0"));
|
|
|
|
transaction.put("rate_value", StringUtils.defaultString(clientIncrementalMapper.findByChannelAndClientId(transaction.getIntValue("client_id"), transaction.getString("source")), "0"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String timezone_client = client.getString("timezone");
|
|
|
|
String timezone_client = client.getString("timezone");
|
|
|
|
if (timezone_client != null) {
|
|
|
|
if (timezone_client != null) {
|
|
|
@ -838,7 +840,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
int rowNum = 0;
|
|
|
|
int rowNum = 0;
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
String[] title = {"order Id", "Client Order Id", "Transaction Time", "Channel", "Gateway", "Exchange Rate", "Transaction Type", "Currency",
|
|
|
|
String[] title = {"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"};
|
|
|
|
"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)"};
|
|
|
|
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++) {
|
|
|
|
for (int i = 0; i < title.length; i++) {
|
|
|
|
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
|
|
|
|
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
|
|
|
@ -864,26 +866,26 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("exchange_rate").setScale(5, BigDecimal.ROUND_DOWN).toPlainString());
|
|
|
|
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);
|
|
|
|
cell = row.createCell(6, Cell.CELL_TYPE_STRING);
|
|
|
|
cell.setCellValue(settle.getString("transaction_type"));
|
|
|
|
cell.setCellValue(settle.getString("transaction_type"));
|
|
|
|
cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type"))?analysisStyle2:null);
|
|
|
|
cell.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null);
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("transaction_currency"));
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("transaction_currency"));
|
|
|
|
cell = row.createCell(8, Cell.CELL_TYPE_STRING);
|
|
|
|
cell = row.createCell(8, Cell.CELL_TYPE_STRING);
|
|
|
|
cell.setCellValue(settle.getBigDecimal("display_amount") == null ? ""
|
|
|
|
cell.setCellValue(settle.getBigDecimal("display_amount") == null ? ""
|
|
|
|
: "Credit".equals(settle.getString("transaction_type"))?
|
|
|
|
: "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() :
|
|
|
|
"-"+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.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null);
|
|
|
|
cell = row.createCell(9, Cell.CELL_TYPE_STRING);
|
|
|
|
cell = row.createCell(9, Cell.CELL_TYPE_STRING);
|
|
|
|
cell.setCellValue(settle.getBigDecimal("transaction_amount") == null ? ""
|
|
|
|
cell.setCellValue(settle.getBigDecimal("transaction_amount") == null ? ""
|
|
|
|
: "Credit".equals(settle.getString("transaction_type"))?
|
|
|
|
: "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() :
|
|
|
|
"-"+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.setCellStyle(!"Credit".equals(settle.getString("transaction_type")) ? analysisStyle2 : null);
|
|
|
|
cell = row.createCell(10, Cell.CELL_TYPE_STRING);
|
|
|
|
cell = row.createCell(10, Cell.CELL_TYPE_STRING);
|
|
|
|
cell.setCellValue(settle.getBigDecimal("clearing_amount") == null ? ""
|
|
|
|
cell.setCellValue(settle.getBigDecimal("clearing_amount") == null ? ""
|
|
|
|
: "Credit".equals(settle.getString("transaction_type"))?
|
|
|
|
: "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() :
|
|
|
|
"-"+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);
|
|
|
|
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(11, Cell.CELL_TYPE_STRING).setCellValue(channels.getString(settle.getString("channel")) == null ? ""
|
|
|
|
: channels.getJSONObject(settle.getString("channel")).getBigDecimal("rate").toPlainString() + "%");
|
|
|
|
: channels.getJSONObject(settle.getString("channel")).getBigDecimal("rate").toPlainString() + "%");
|
|
|
|
//手续费 + gst
|
|
|
|
//手续费 + gst
|
|
|
@ -1283,6 +1285,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
}
|
|
|
|
}
|
|
|
|
transactionMapper.deleteSettlementTransaction(clearingId);
|
|
|
|
transactionMapper.deleteSettlementTransaction(clearingId);
|
|
|
|
transactionMapper.removeSettleRemark(clearingId);
|
|
|
|
transactionMapper.removeSettleRemark(clearingId);
|
|
|
|
|
|
|
|
preSettleTaskMapper.resetClearStatus(clearingId);
|
|
|
|
clearingDetailAnalysisMapper.clearAnalysis(clearingId);
|
|
|
|
clearingDetailAnalysisMapper.clearAnalysis(clearingId);
|
|
|
|
taskManualSettleMapper.rollbackExecutedTask(clearingId);
|
|
|
|
taskManualSettleMapper.rollbackExecutedTask(clearingId);
|
|
|
|
clearingDetailMapper.deleteSettleLogs(clearingId);
|
|
|
|
clearingDetailMapper.deleteSettleLogs(clearingId);
|
|
|
|