ABAfile comment update

master
yixian 6 years ago
parent bf8a94a620
commit 39e44c076d

@ -515,7 +515,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
if (settle.getBigDecimal("clearing_amount").compareTo(BigDecimal.ZERO) == 0) { if (settle.getBigDecimal("clearing_amount").compareTo(BigDecimal.ZERO) == 0) {
continue; continue;
} }
aba.addSettleMerchant(settle.getString("bsb_no"), settle.getString("account_no"), settle.getString("account_name"), aba.addSettleMerchant(settle.getString("client_moniker"), settle.getString("bsb_no"), settle.getString("account_no"), settle.getString("account_name"),
settle.getBigDecimal("clearing_amount")); settle.getBigDecimal("clearing_amount"));
} }
return aba; return aba;
@ -1016,7 +1016,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
// String mailId = mailService.sendEmail(title, "164851225@qq.com", "1029811920@qq.com", content, // String mailId = mailService.sendEmail(title, "164851225@qq.com", "1029811920@qq.com", content,
// attachList); // attachList);
JSONObject config = sysConfigManager.getSysConfig(); JSONObject config = sysConfigManager.getSysConfig();
String mailId = mailService.sendEmail(title, config.getString("settle_mail_to"),config.getString("settle_mail_cc"), content, attachList); String mailId = mailService.sendEmail(title, config.getString("settle_mail_to"), config.getString("settle_mail_cc"), content, attachList);
if (settleMail == null) { if (settleMail == null) {
JSONObject settleMailRecord = new JSONObject(); JSONObject settleMailRecord = new JSONObject();

@ -29,8 +29,8 @@ public class ABAFile {
totalSettleAmount = BigDecimal.ZERO; totalSettleAmount = BigDecimal.ZERO;
} }
public void addSettleMerchant(String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) { public void addSettleMerchant(String clientMoniker, String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
settlements.add(new SettleMerchantInfo(bsbNo, accountNo, accountName, settleAmount)); settlements.add(new SettleMerchantInfo(clientMoniker, bsbNo, accountNo, accountName, settleAmount));
totalSettleAmount = totalSettleAmount.add(settleAmount); totalSettleAmount = totalSettleAmount.add(settleAmount);
} }
@ -129,12 +129,14 @@ public class ABAFile {
} }
private class SettleMerchantInfo { private class SettleMerchantInfo {
private final String clientMoniker;
private final String bsbNo; private final String bsbNo;
private final String accountNo; private final String accountNo;
private final String accountName; private final String accountName;
private final BigDecimal settleAmount; private final BigDecimal settleAmount;
public SettleMerchantInfo(String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) { public SettleMerchantInfo(String clientMoniker, String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
this.clientMoniker = clientMoniker;
this.bsbNo = bsbNo; this.bsbNo = bsbNo;
this.accountNo = accountNo.replaceAll("\\D", ""); this.accountNo = accountNo.replaceAll("\\D", "");
this.accountName = accountName; this.accountName = accountName;
@ -149,7 +151,7 @@ public class ABAFile {
lineBuilder.replace(18, 20, "50"); lineBuilder.replace(18, 20, "50");
lineBuilder.replace(20, 30, getSettleAmount()); lineBuilder.replace(20, 30, getSettleAmount());
lineBuilder.replace(30, 62, getAccountName()); lineBuilder.replace(30, 62, getAccountName());
lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "yyyyMMdd"), 18)); lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "MMdd") + clientMoniker, 18));
lineBuilder.replace(80, 87, bsbNo(base.getBsb())); lineBuilder.replace(80, 87, bsbNo(base.getBsb()));
lineBuilder.replace(87, 96, StringUtils.leftPad(base.getAccountNo(), 9)); lineBuilder.replace(87, 96, StringUtils.leftPad(base.getAccountNo(), 9));
lineBuilder.replace(96, 112, StringUtils.left(StringUtils.rightPad(base.getAccountName(), 16), 16)); lineBuilder.replace(96, 112, StringUtils.left(StringUtils.rightPad(base.getAccountName(), 16), 16));

Loading…
Cancel
Save