This commit is contained in:
parent
2178135bc8
commit
fa382190e3
3 changed files with 8 additions and 7 deletions
|
|
@ -17,6 +17,7 @@ import ru.spcex.clearing.service.builder.Sdf03Builder;
|
|||
import ru.spcex.clearing.service.builder.Sdf11Builder;
|
||||
import ru.spcex.clearing.service.order.PaymentInstructionSorter;
|
||||
import ru.spcex.platform.enumeration.ClearingCategory;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
|
|
@ -123,7 +124,7 @@ public class SdfCreatorBySTLDPayment {
|
|||
SdfClearingRequest kafkaMessage = new SdfClearingRequest();
|
||||
kafkaMessage.setGroupId(generationId);
|
||||
Long requestId = null;
|
||||
if (category.equals(ClearingCategory.I) || category.equals(ClearingCategory.V)) {
|
||||
if (Sender.One.equalsById(senderId) || category.equals(ClearingCategory.I) || category.equals(ClearingCategory.V)) {
|
||||
batch.stream()
|
||||
.map(paymentInstruction -> new Sdf03Builder(companyImdg).buildSdf03(paymentInstruction, generationId))
|
||||
.forEach(sdf03Imdg::insert);
|
||||
|
|
|
|||
|
|
@ -27,17 +27,17 @@ public class Sdf03Builder {
|
|||
sDf03.setPriority("9");
|
||||
sDf03.setSbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf03.setC_acc_deb(paymentInstruction.getDebitLegAccount());
|
||||
if (paymentInstruction.getSenderId().equals(Sender.One.getId())) {
|
||||
if (paymentInstruction.getAddresseeId().equals(Sender.One.getId())) {
|
||||
sDf03.setSbanknam1(paymentInstruction.getPayeeBankName());
|
||||
} else {
|
||||
Company company = companyImdg.getSingleObjectByID(paymentInstruction.getSenderId());
|
||||
Company company = companyImdg.getSingleObjectByID(paymentInstruction.getAddresseeId());
|
||||
if (company != null) {
|
||||
sDf03.setSbanknam1(company.getShortName());
|
||||
}
|
||||
}
|
||||
// =@00100, если ?;
|
||||
// =@00000, если ?.
|
||||
sDf03.setRbankcode(Sender.One.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf03.setRbankcode(Sender.One.equalsById(paymentInstruction.getAddresseeId()) ? "@09999" : "@0");
|
||||
sDf03.setC_acc_cred(paymentInstruction.getCreditLegAccount());
|
||||
if (paymentInstruction.getAddresseeId().equals(Sender.One.getId())) {
|
||||
sDf03.setRbanknam1(paymentInstruction.getAddresseeBankName());
|
||||
|
|
|
|||
|
|
@ -26,17 +26,17 @@ public class Sdf11Builder {
|
|||
sDf11.setPriority("9");
|
||||
sDf11.setSbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf11.setC_acc_deb(paymentInstruction.getDebitLegAccount());
|
||||
if (paymentInstruction.getSenderId().equals(Sender.One.getId())) {
|
||||
if (paymentInstruction.getAddresseeId().equals(Sender.One.getId())) {
|
||||
sDf11.setSbanknam1(paymentInstruction.getPayeeBankName());
|
||||
} else {
|
||||
Company company = companyImdg.getSingleObjectByID(paymentInstruction.getSenderId());
|
||||
Company company = companyImdg.getSingleObjectByID(paymentInstruction.getAddresseeId());
|
||||
if (company != null) {
|
||||
sDf11.setSbanknam1(company.getShortName());
|
||||
}
|
||||
}
|
||||
// =@00100, если ?;
|
||||
// =@00000, если ?.
|
||||
sDf11.setRbankcode(Sender.One.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf11.setRbankcode(Sender.One.equalsById(paymentInstruction.getAddresseeId()) ? "@09999" : "@0");
|
||||
sDf11.setC_acc_cred(paymentInstruction.getCreditLegAccount());
|
||||
if (paymentInstruction.getAddresseeId().equals(Sender.One.getId())) {
|
||||
sDf11.setRbanknam1(paymentInstruction.getAddresseeBankName());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue