Esempio n. 1
0
 private void processExportQuittanceResponse(
     ExchangeContext context, ExportDataResponse exportDataResponse) {
   ExportQuittanceResponse exportQuittanceResponse =
       (ExportQuittanceResponse) exportDataResponse.getResponseTemplate();
   List<ExportQuittanceResponse.Quittances.Quittance> quittanceList =
       exportQuittanceResponse.getQuittances() != null
           ? exportQuittanceResponse.getQuittances().getQuittance()
           : Arrays.<ExportQuittanceResponse.Quittances.Quittance>asList();
   context.setVariable("quittance", (long) quittanceList.size());
   // context.setVariable("-quittance", "");
   for (int idx = 0; idx < quittanceList.size(); idx++) {
     int blockIndex = idx + 1;
     ExportQuittanceResponse.Quittances.Quittance quittance = quittanceList.get(idx);
     context.setVariable("quittanceIsRevoked_" + blockIndex, quittance.isIsRevoked());
     context.setVariable("quittanceSupplierBillID_" + blockIndex, quittance.getSupplierBillID());
     context.setVariable("quittancePayerIdentifier_" + blockIndex, quittance.getPayerIdentifier());
     context.setVariable("quittanceBalance_" + blockIndex, quittance.getBalance());
     context.setVariable("quittanceBillStatus_" + blockIndex, quittance.getBillStatus());
     PaymentIdentificationDataType paymentIdentificationData =
         quittance.getPaymentIdentificationData();
     if (paymentIdentificationData != null) {
       context.setVariable(
           "quittanceSystemIdentifier_" + blockIndex,
           paymentIdentificationData.getSystemIdentifier());
       context.setVariable(
           "quittanceBankBIK_" + blockIndex, paymentIdentificationData.getBank().getBIK());
       context.setVariable(
           "quittanceBankName_" + blockIndex, paymentIdentificationData.getBank().getName());
       context.setVariable(
           "quittanceBankCorrAccount_" + blockIndex,
           paymentIdentificationData.getBank().getCorrespondentBankAccount());
       context.setVariable(
           "quittanceBankSWIFT_" + blockIndex, paymentIdentificationData.getBank().getSWIFT());
     } else {
       PaymentIdentificationDataType incomeRowIdentificationData =
           quittance.getIncomeRowIdentificationData();
       if (incomeRowIdentificationData != null) {
         context.setVariable(
             "quittanceUFKName_" + blockIndex, incomeRowIdentificationData.getUFK());
       }
     }
     context.setVariable("quittanceApplicationId_" + blockIndex, quittance.getApplicationID());
     context.setVariable("payeeINN_" + blockIndex, quittance.getPayeeINN());
     context.setVariable("payeeKPP_" + blockIndex, quittance.getPayeeKPP());
     context.setVariable("KBK_" + blockIndex, quittance.getKBK());
     context.setVariable("OKATO_" + blockIndex, quittance.getOKATO());
   }
 }
Esempio n. 2
0
 private void fillAcknowledgmentQuinttancesToContext(
     ExchangeContext context,
     List<DoAcknowledgmentResponseType.Quittances.Quittance> quittanceList) {
   context.setVariable("quittance", (long) quittanceList.size());
   // context.setVariable("-quittance", "");
   for (int idx = 0; idx < quittanceList.size(); idx++) {
     int blockIndex = idx + 1;
     DoAcknowledgmentResponseType.Quittances.Quittance quittance = quittanceList.get(idx);
     context.setVariable("quittanceSupplierBillID_" + blockIndex, quittance.getSupplierBillID());
     context.setVariable("quittancePayerIdentifier_" + blockIndex, quittance.getPayerIdentifier());
     context.setVariable("quittanceBalance_" + blockIndex, quittance.getBalance());
     context.setVariable("quittanceBillStatus_" + blockIndex, quittance.getBillStatus());
     PaymentIdentificationDataType paymentIdentificationData =
         quittance.getPaymentIdentificationData();
     if (paymentIdentificationData != null) {
       context.setVariable(
           "quittanceSystemIdentifier_" + blockIndex,
           paymentIdentificationData.getSystemIdentifier());
       context.setVariable(
           "quittanceBankBIK_" + blockIndex, paymentIdentificationData.getBank().getBIK());
       context.setVariable(
           "quittanceBankName_" + blockIndex, paymentIdentificationData.getBank().getName());
       context.setVariable(
           "quittanceBankCorrAccount_" + blockIndex,
           paymentIdentificationData.getBank().getCorrespondentBankAccount());
       context.setVariable(
           "quittanceBankSWIFT_" + blockIndex, paymentIdentificationData.getBank().getSWIFT());
     } else {
       PaymentIdentificationDataType incomeRowIdentificationData =
           quittance.getIncomeRowIdentificationData();
       if (incomeRowIdentificationData != null) {
         context.setVariable(
             "quittanceUFKName_" + blockIndex, incomeRowIdentificationData.getUFK());
       }
     }
     context.setVariable("quittanceApplicationId_" + blockIndex, quittance.getApplicationID());
     context.setVariable("payeeINN_" + blockIndex, quittance.getPayeeINN());
     context.setVariable("payeeKPP_" + blockIndex, quittance.getPayeeKPP());
     context.setVariable("KBK_" + blockIndex, quittance.getKBK());
     context.setVariable("OKATO_" + blockIndex, quittance.getOKATO());
   }
 }