http://jira.mfd.msk:8088/browse/CLS-189 PaymentInstructionCreator добавил проверку на liabilitiesClaimsAssets.settlementDate = сегодня
This commit is contained in:
parent
4d804f9644
commit
535908f169
2 changed files with 13 additions and 5 deletions
|
|
@ -253,8 +253,12 @@ public class Clearing {
|
|||
|
||||
log.trace("creating paymentInstructions");
|
||||
List<PaymentInstruction> paymentInstructions = paymentInstructionCreator.createAndSavePaymentInstructions(execDeposit, lcaFirstLeg, Collections.singleton(category));
|
||||
paymentInstructionCreator.updateFieldLiabilitiesClaimsAssetsByPayment(lcaFirstLeg, lcmFirstLeg, paymentInstructions, Collections.singleton(category));
|
||||
liabilitiesClaimsAssetsImdg.update(lcaFirstLeg);
|
||||
if (paymentInstructions.isEmpty()) {
|
||||
log.trace("For lcaFirstLeg[{}] did not creaded paymentInstruction's", lcaFirstLeg.getId());
|
||||
} else {
|
||||
paymentInstructionCreator.updateFieldLiabilitiesClaimsAssetsByPayment(lcaFirstLeg, lcmFirstLeg, paymentInstructions, Collections.singleton(category));
|
||||
liabilitiesClaimsAssetsImdg.update(lcaFirstLeg);
|
||||
}
|
||||
log.trace("lcaFirstLeg {}, lcaSecondLeg {}", lcaFirstLeg, lcaSecondLeg);
|
||||
|
||||
// log.trace("updating LiabilitiesClaimsMoney by payment");
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ public class PaymentInstructionCreator {
|
|||
public List<PaymentInstruction> createAndSavePaymentInstructions(ExecutionDeposit executionDeposit, LiabilitiesClaimsAssets liabilitiesClaimsAssets,
|
||||
Collection<ClearingCategory> clearingCategory) {
|
||||
List<PaymentInstruction> newPaymentInstructions = createPaymentInstructions(executionDeposit, liabilitiesClaimsAssets, clearingCategory);
|
||||
log.trace("Created {} PaymentInstruction by LiabilitiesClaimsAssets[{}]. Do save ti IMDG.",
|
||||
newPaymentInstructions.size(), liabilitiesClaimsAssets.getId());
|
||||
log.trace("Created {} PaymentInstruction by LiabilitiesClaimsAssets[{}], category {}. Do save in IMDG.",
|
||||
newPaymentInstructions.size(), liabilitiesClaimsAssets.getId(), clearingCategory);
|
||||
for (PaymentInstruction instruction : newPaymentInstructions) {
|
||||
paymentInstructionImdg.insert(instruction);
|
||||
}
|
||||
|
|
@ -98,7 +98,11 @@ public class PaymentInstructionCreator {
|
|||
Collection<ClearingCategory> clearingCategory) {
|
||||
List<PaymentInstruction> newPaymentInstructions = new ArrayList<>();
|
||||
Instant now = Instant.now();
|
||||
|
||||
LocalDate today = LocalDate.now();
|
||||
if (!today.equals(liabilitiesClaimsAssets.getSettlementDate())) {
|
||||
log.debug("For liabilitiesClaimsAssets.SettlementDate={} is not today.", liabilitiesClaimsAssets.getSettlementDate());
|
||||
return newPaymentInstructions;
|
||||
}
|
||||
// I
|
||||
if (clearingCategory.contains(ClearingCategory.I)) {
|
||||
log.debug("By liabilitiesClaimsAssets[{}] create for category I 1 PaymentInstruction record", liabilitiesClaimsAssets.getId());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue