fix duplicate accounts
This commit is contained in:
parent
21bde123cb
commit
c1927b907d
4 changed files with 16 additions and 3 deletions
|
|
@ -51,6 +51,7 @@ public class AccountService extends QueueConsumer implements InitializingBean {
|
|||
Account account = new Account();
|
||||
account.setAccount(accountReq.getAccount());
|
||||
account.setCompanyId(accountReq.getCompanyId());
|
||||
account.setAccountType(accountReq.getAccountType());
|
||||
accountMap.insert(account);
|
||||
AccountSdfToStatementRequestPart responsePart = responsePart(accountReq.getSdfId());
|
||||
accountToStatement.add(responsePart);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
IMessageResolver errorResolver) {
|
||||
this.statementImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Statement, Statement.class);
|
||||
this.sdf02Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf02, SDf02.class);
|
||||
this.accountBalanceImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class);;
|
||||
this.accountBalanceImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class);
|
||||
;
|
||||
this.sDf01Validator = sDf01Validator;
|
||||
this.errorLogger = errorLogger;
|
||||
this.imdgProvider = imdgProvider;
|
||||
|
|
@ -64,7 +65,7 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
return "DF-02";
|
||||
}
|
||||
|
||||
public Result execute(Collection<SDf01> sdf, StatementRequest statementRequest){
|
||||
public Result execute(Collection<SDf01> sdf, StatementRequest statementRequest) {
|
||||
Result result = new Result();
|
||||
Long generationIdForGroup = imdgProvider.getImdgIdGenerator().nextId();
|
||||
result.setGenerationId(generationIdForGroup);
|
||||
|
|
@ -148,12 +149,12 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||
req.setAccount(account);
|
||||
req.setCompanyId(companyId);
|
||||
req.setAccountType(AccountType.Clrn.getKey());
|
||||
req.setSdfId(sdf01Id);
|
||||
return req;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private SDf02 createErrorSdf02(SDf01 sdf01, EnumMessage error, Long generationIdForGroup) {
|
||||
SDf02 sDf02 = new SDf02();
|
||||
sDf02.setCurr_code(sdf01.getCurr_code());
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ public class Sdf16Executor extends AbstractExecutor<SDf16> {
|
|||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||
req.setAccount(account);
|
||||
req.setCompanyId(companyId);
|
||||
req.setAccountType(AccountType.Clrn.getKey());
|
||||
req.setSdfId(sdfId);
|
||||
return req;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ public class AccountSdfRequestPart {
|
|||
@JsonProperty
|
||||
private String account;
|
||||
@JsonProperty
|
||||
private String accountType;
|
||||
@JsonProperty
|
||||
private Long companyId;
|
||||
|
||||
public Long getSdfId() {
|
||||
|
|
@ -26,6 +28,14 @@ public class AccountSdfRequestPart {
|
|||
this.account = account;
|
||||
}
|
||||
|
||||
public String getAccountType() {
|
||||
return accountType;
|
||||
}
|
||||
|
||||
public void setAccountType(String accountType) {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue