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 account = new Account();
|
||||||
account.setAccount(accountReq.getAccount());
|
account.setAccount(accountReq.getAccount());
|
||||||
account.setCompanyId(accountReq.getCompanyId());
|
account.setCompanyId(accountReq.getCompanyId());
|
||||||
|
account.setAccountType(accountReq.getAccountType());
|
||||||
accountMap.insert(account);
|
accountMap.insert(account);
|
||||||
AccountSdfToStatementRequestPart responsePart = responsePart(accountReq.getSdfId());
|
AccountSdfToStatementRequestPart responsePart = responsePart(accountReq.getSdfId());
|
||||||
accountToStatement.add(responsePart);
|
accountToStatement.add(responsePart);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
||||||
IMessageResolver errorResolver) {
|
IMessageResolver errorResolver) {
|
||||||
this.statementImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Statement, Statement.class);
|
this.statementImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Statement, Statement.class);
|
||||||
this.sdf02Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf02, SDf02.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.sDf01Validator = sDf01Validator;
|
||||||
this.errorLogger = errorLogger;
|
this.errorLogger = errorLogger;
|
||||||
this.imdgProvider = imdgProvider;
|
this.imdgProvider = imdgProvider;
|
||||||
|
|
@ -64,7 +65,7 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
||||||
return "DF-02";
|
return "DF-02";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result execute(Collection<SDf01> sdf, StatementRequest statementRequest){
|
public Result execute(Collection<SDf01> sdf, StatementRequest statementRequest) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
Long generationIdForGroup = imdgProvider.getImdgIdGenerator().nextId();
|
Long generationIdForGroup = imdgProvider.getImdgIdGenerator().nextId();
|
||||||
result.setGenerationId(generationIdForGroup);
|
result.setGenerationId(generationIdForGroup);
|
||||||
|
|
@ -148,12 +149,12 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
||||||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||||
req.setAccount(account);
|
req.setAccount(account);
|
||||||
req.setCompanyId(companyId);
|
req.setCompanyId(companyId);
|
||||||
|
req.setAccountType(AccountType.Clrn.getKey());
|
||||||
req.setSdfId(sdf01Id);
|
req.setSdfId(sdf01Id);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private SDf02 createErrorSdf02(SDf01 sdf01, EnumMessage error, Long generationIdForGroup) {
|
private SDf02 createErrorSdf02(SDf01 sdf01, EnumMessage error, Long generationIdForGroup) {
|
||||||
SDf02 sDf02 = new SDf02();
|
SDf02 sDf02 = new SDf02();
|
||||||
sDf02.setCurr_code(sdf01.getCurr_code());
|
sDf02.setCurr_code(sdf01.getCurr_code());
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ public class Sdf16Executor extends AbstractExecutor<SDf16> {
|
||||||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||||
req.setAccount(account);
|
req.setAccount(account);
|
||||||
req.setCompanyId(companyId);
|
req.setCompanyId(companyId);
|
||||||
|
req.setAccountType(AccountType.Clrn.getKey());
|
||||||
req.setSdfId(sdfId);
|
req.setSdfId(sdfId);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ public class AccountSdfRequestPart {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String account;
|
private String account;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
private String accountType;
|
||||||
|
@JsonProperty
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
public Long getSdfId() {
|
public Long getSdfId() {
|
||||||
|
|
@ -26,6 +28,14 @@ public class AccountSdfRequestPart {
|
||||||
this.account = account;
|
this.account = account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAccountType() {
|
||||||
|
return accountType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountType(String accountType) {
|
||||||
|
this.accountType = accountType;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getCompanyId() {
|
public Long getCompanyId() {
|
||||||
return companyId;
|
return companyId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue