/// <summary>constructor</summary>
 public ReceiptFileImportProcessor(
     ICompanyProcessor companyProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IImporterSettingProcessor importerSettingProcessor,
     IImporterSettingDetailProcessor importerSettingDetailProcessor,
     IGeneralSettingProcessor generalSettingProcessor,
     ICurrencyProcessor currencyProcessor,
     ICategoryProcessor categoryProcessor,
     ISectionProcessor sectionProcessor,
     ICustomerProcessor customerProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
     ICollationSettingProcessor collationSettingProcessor,
     IColumnNameSettingProcessor columnNameSettingProcessor,
     IImportDataProcessor importDataProcessor,
     IReceiptProcessor receiptProcessor
     )
 {
     this.companyProcessor               = companyProcessor;
     this.applicationControlProcessor    = applicationControlProcessor;
     this.importerSettingProcessor       = importerSettingProcessor;
     this.importerSettingDetailProcessor = importerSettingDetailProcessor;
     this.generalSettingProcessor        = generalSettingProcessor;
     this.currencyProcessor              = currencyProcessor;
     this.categoryProcessor              = categoryProcessor;
     this.sectionProcessor               = sectionProcessor;
     this.customerProcessor              = customerProcessor;
     this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
     this.collationSettingProcessor      = collationSettingProcessor;
     this.columnNameSettingProcessor     = columnNameSettingProcessor;
     this.importDataProcessor            = importDataProcessor;
     this.receiptProcessor               = receiptProcessor;
     this.serializer = MessagePackSerializer.Get <ReceiptInput>(new SerializationContext {
         DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
     });
 }
Exemple #2
0
        /// <summary>constructor</summary>
        public PaymentScheduleFileImportProcessor(
            ICompanyProcessor companyProcessor,
            IApplicationControlProcessor applicationControlProcessor,
            IImporterSettingProcessor importerSettingProcessor,
            IImporterSettingDetailProcessor importerSettingDetailProcessor,
            IGeneralSettingProcessor generalSettingProcessor,
            ICustomerProcessor customerProcessor,
            ICurrencyProcessor currencyProcessor,
            ICategoryProcessor categoryProcessor,
            IDepartmentProcessor departmentProcessor,
            IAccountTitleProcessor accountTitleProcessor,
            IBillingScheduledPaymentProcessor billingScheduledPaymentProcessor,
            IImportDataProcessor importDataProcessor
            )
        {
            this.companyProcessor                 = companyProcessor;
            this.applicationControlProcessor      = applicationControlProcessor;
            this.importerSettingProcessor         = importerSettingProcessor;
            this.importerSettingDetailProcessor   = importerSettingDetailProcessor;
            this.generalSettingProcessor          = generalSettingProcessor;
            this.customerProcessor                = customerProcessor;
            this.currencyProcessor                = currencyProcessor;
            this.categoryProcessor                = categoryProcessor;
            this.departmentProcessor              = departmentProcessor;
            this.accountTitleProcessor            = accountTitleProcessor;
            this.billingScheduledPaymentProcessor = billingScheduledPaymentProcessor;
            this.importDataProcessor              = importDataProcessor;

            serializerScheduledPaymentImport = MessagePackSerializer.Get <ScheduledPaymentImport>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
            serializerPaymentSchedule = MessagePackSerializer.Get <Models.Files.PaymentSchedule>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
        }
Exemple #3
0
 /// <summary>constructor</summary>
 public CompanyController(
     ICompanyProcessor companyProcessor,
     ICompanyLogoProcessor companyLogoProcessor,
     ICompanyInitializeProcessor companyInitializeProcessor
     )
 {
     this.companyProcessor           = companyProcessor;
     this.companyLogoProcessor       = companyLogoProcessor;
     this.companyInitializeProcessor = companyInitializeProcessor;
 }
Exemple #4
0
 /// <summary>constructor</summary>
 public AccountTitleFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IAccountTitleProcessor accountTitleProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.accountTitleProcessor       = accountTitleProcessor;
 }
 /// <summary>constructor</summary>
 public SectionFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ISectionProcessor sectionProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.sectionProcessor            = sectionProcessor;
 }
 /// <summary>constructor</summary>
 public HolidayCalendarFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IHolidayCalendarProcessor holidayCalendarProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.holidayCalendarProcessor    = holidayCalendarProcessor;
 }
 /// <summary>constructor</summary>
 public JuridicalPersonalityFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor
     )
 {
     this.companyProcessor              = companyProcessor;
     this.loginUserProcessor            = loginUserProcessor;
     this.applicationControlProcessor   = applicationControlProcessor;
     this.juridicalPersonalityProcessor = juridicalPersonalityProcessor;
 }
 /// <summary>constructor</summary>
 public BankBranchFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IBankBranchProcessor bankBranchProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.bankBranchProcessor         = bankBranchProcessor;
 }
Exemple #9
0
 /// <summary>
 /// constructor
 /// </summary>
 public LoginController(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     ILoginUserPasswordProcessor loginUserPasswordProcessor,
     IAuthenticationWebApiProcessor authenticationWebApiProcessor
     )
 {
     this.companyProcessor              = companyProcessor;
     this.loginUserProcessor            = loginUserProcessor;
     this.loginUserPasswordProcessor    = loginUserPasswordProcessor;
     this.authenticationWebApiProcessor = authenticationWebApiProcessor;
 }
        /// <summary>constructor</summary>
        public BillingFileImportProcessor(
            ICompanyProcessor companyProcessor,
            IApplicationControlProcessor applicationControlProcessor,
            IImporterSettingProcessor importerSettingProcessor,
            IImporterSettingDetailProcessor importerSettingDetailProcessor,
            IGeneralSettingProcessor generalSettingProcessor,
            ICurrencyProcessor currencyProcessor,
            ICategoryProcessor categoryProcessor,
            ICustomerProcessor customerProcessor,
            IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
            ITaxClassProcessor taxClassProcessor,
            IHolidayCalendarProcessor holidayCalendarProcessor,
            ICollationSettingProcessor collationSettingProcessor,
            IColumnNameSettingProcessor columnNameSettingProcessor,
            IDepartmentProcessor departmentProcessor,
            IAccountTitleProcessor accountTitleProcessor,
            IStaffProcessor staffProcessor,
            IInvoiceCommonSettingProcessor invoiceCommonSettingProcessor,
            IImportDataProcessor importDataProcessor,

            IBillingProcessor billingProcessor,
            IBillingImporterProcessor billingImporterProcessor,
            IBillingDivisionContractProcessor billingDivisionContractProcessor
            )
        {
            this.companyProcessor               = companyProcessor;
            this.applicationControlProcessor    = applicationControlProcessor;
            this.importerSettingProcessor       = importerSettingProcessor;
            this.importerSettingDetailProcessor = importerSettingDetailProcessor;
            this.generalSettingProcessor        = generalSettingProcessor;
            this.currencyProcessor              = currencyProcessor;
            this.categoryProcessor              = categoryProcessor;
            this.customerProcessor              = customerProcessor;
            this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
            this.taxClassProcessor              = taxClassProcessor;
            this.holidayCalendarProcessor       = holidayCalendarProcessor;
            this.collationSettingProcessor      = collationSettingProcessor;
            this.columnNameSettingProcessor     = columnNameSettingProcessor;
            this.departmentProcessor            = departmentProcessor;
            this.accountTitleProcessor          = accountTitleProcessor;
            this.staffProcessor = staffProcessor;
            this.invoiceCommonSettingProcessor = invoiceCommonSettingProcessor;
            this.importDataProcessor           = importDataProcessor;

            this.billingProcessor                 = billingProcessor;
            this.billingImporterProcessor         = billingImporterProcessor;
            this.billingDivisionContractProcessor = billingDivisionContractProcessor;

            serializer = MessagePackSerializer.Get <BillingImport>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
        }
 /// <summary>constructor</summary>
 public IgnoreKanaFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICategoryProcessor categoryProcessor,
     IIgnoreKanaProcessor ignoreKanaProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.categoryProcessor           = categoryProcessor;
     this.ignoreKanaProcessor         = ignoreKanaProcessor;
 }
 /// <summary>constructor</summary>
 public DepartmentFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IStaffProcessor staffProcessor,
     IDepartmentProcessor departmentProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.staffProcessor      = staffProcessor;
     this.departmentProcessor = departmentProcessor;
 }
 /// <summary>constructor</summary>
 public KanaHistoryPaymentAgencyFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IPaymentAgencyProcessor paymentAgencyProcessor,
     IKanaHistoryPaymentAgencyProcessor kanaHistoryPaymentAgencyProcessor
     )
 {
     this.companyProcessor                  = companyProcessor;
     this.loginUserProcessor                = loginUserProcessor;
     this.applicationControlProcessor       = applicationControlProcessor;
     this.paymentAgencyProcessor            = paymentAgencyProcessor;
     this.kanaHistoryPaymentAgencyProcessor = kanaHistoryPaymentAgencyProcessor;
 }
 /// <summary>constructor</summary>
 public CustomerGroupFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     ICustomerGroupProcessor customerGroupProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.customerProcessor           = customerProcessor;
     this.customerGroupProcessor      = customerGroupProcessor;
 }
Exemple #15
0
 /// <summary>constructor</summary>
 public KanaHistoryCustomerFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     IKanaHistoryCustomerProcessor kanaHistoryCustomerProcessor
     )
 {
     this.companyProcessor             = companyProcessor;
     this.loginUserProcessor           = loginUserProcessor;
     this.applicationControlProcessor  = applicationControlProcessor;
     this.customerProcessor            = customerProcessor;
     this.kanaHistoryCustomerProcessor = kanaHistoryCustomerProcessor;
 }
Exemple #16
0
 public CompanyMaster(
     IAuthorizationProcessor authorizationProcessor,
     ICompanyProcessor companyProcessor,
     ICompanyInitializeProcessor companyInitializeProcessor,
     ICompanyLogoProcessor companyLogoProcessor,
     ILogManager logManager
     )
 {
     this.authorizationProcessor     = authorizationProcessor;
     this.companyProcessor           = companyProcessor;
     this.companyInitializeProcessor = companyInitializeProcessor;
     this.companyLogoProcessor       = companyLogoProcessor;
     logger = logManager.GetLogger(typeof(CompanyMaster));
 }
Exemple #17
0
 /// <summary>constructor</summary>
 public BankAccountFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICategoryProcessor categoryProcessor,
     ISectionProcessor sectionProcessor,
     IBankAccountProcessor bankAccountProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.categoryProcessor           = categoryProcessor;
     this.sectionProcessor            = sectionProcessor;
     this.bankAccountProcessor        = bankAccountProcessor;
 }
 /// <summary>constructor</summary>
 public CustomerDiscountFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     IDepartmentProcessor departmentProcessor,
     IAccountTitleProcessor accountTitleProcessor,
     ICustomerDiscountProcessor customerDiscountProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.customerProcessor           = customerProcessor;
     this.departmentProcessor         = departmentProcessor;
     this.accountTitleProcessor       = accountTitleProcessor;
     this.customerDiscountProcessor   = customerDiscountProcessor;
 }
Exemple #19
0
 /// <summary>constructor</summary>
 public CustomerFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICategoryProcessor categoryProcessor,
     IStaffProcessor staffProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
     IImporterSettingProcessor importerSettingProcessor,
     IImporterSettingDetailProcessor importerSettingDetailProcessor,
     IGeneralSettingProcessor generalSettingProcessor,
     ICustomerProcessor customerProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.categoryProcessor           = categoryProcessor;
     this.staffProcessor = staffProcessor;
     this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
     this.importerSettingProcessor       = importerSettingProcessor;
     this.importerSettingDetailProcessor = importerSettingDetailProcessor;
     this.generalSettingProcessor        = generalSettingProcessor;
     this.customerProcessor = customerProcessor;
 }
        /// <summary>constructor</summary>
        public EbFileImportProcessor(
            ICompanyProcessor companyProcessor,
            ILoginUserProcessor loginUserProcessor,
            IApplicationControlProcessor applicationControlProcessor,
            ICollationSettingProcessor collationSettingProcessor,
            ICategoryProcessor categoryProcessor,
            ICurrencyProcessor currencyProcessor,
            IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
            IBankAccountProcessor bankAccountProcessor,
            ICustomerProcessor customerProcessor,
            IIgnoreKanaProcessor ignoreKanaProcessor,
            IEBExcludeAccountSettingProcessor ebExcludeAccountSettingProcessor,
            ISectionProcessor sectionProcessor,
            IImportFileLogProcessor importFileLogProcessor
            )
        {
            this.companyProcessor                 = companyProcessor;
            this.loginUserProcessor               = loginUserProcessor;
            this.applicationControlProcessor      = applicationControlProcessor;
            this.collationSettingProcessor        = collationSettingProcessor;
            this.categoryProcessor                = categoryProcessor;
            this.currencyProcessor                = currencyProcessor;
            this.juridicalPersonalityProcessor    = juridicalPersonalityProcessor;
            this.bankAccountProcessor             = bankAccountProcessor;
            this.ignoreKanaProcessor              = ignoreKanaProcessor;
            this.customerProcessor                = customerProcessor;
            this.ebExcludeAccountSettingProcessor = ebExcludeAccountSettingProcessor;
            this.sectionProcessor                 = sectionProcessor;
            this.importFileLogProcessor           = importFileLogProcessor;

            importer = new EbDataImporterBase {
                IsAsync     = true,
                IsPlainText = true,
            };

            importer.Helper.InitializeAsync = async token => {
                var applicationControlTask = applicationControlProcessor.GetAsync(importer.Helper.CompanyId, token);
                var collationSettingTask   = collationSettingProcessor.GetAsync(importer.Helper.CompanyId, token);
                var defaultCurrencyTask    = currencyProcessor.GetAsync(new CurrencySearch {
                    CompanyId = importer.Helper.CompanyId,
                    Codes     = new[] { Rac.VOne.Common.Constants.DefaultCurrencyCode },
                }, token);
                var defaultReceiptCategoryTask = categoryProcessor.GetAsync(new CategorySearch {
                    CompanyId    = importer.Helper.CompanyId,
                    CategoryType = CategoryType.Receipt,
                    Codes        = new[] { "01" },
                }, token);
                var juridicalPersonalityTask = juridicalPersonalityProcessor.GetAsync(new JuridicalPersonality {
                    CompanyId = importer.Helper.CompanyId
                }, token);

                await Task.WhenAll(
                    applicationControlTask,
                    collationSettingTask,
                    defaultCurrencyTask,
                    defaultReceiptCategoryTask,
                    juridicalPersonalityTask
                    );

                importer.Helper.ApplicationControl     = applicationControlTask.Result;
                importer.Helper.CollationSetting       = collationSettingTask.Result;
                importer.Helper.DefaultCurrency        = defaultCurrencyTask.Result.First();
                importer.Helper.DefaultReceiptCategory = defaultReceiptCategoryTask.Result.First();
                importer.Helper.LegalPersonalities     = juridicalPersonalityTask.Result.Select(x => x.Kana).ToArray();
            };

            importer.Helper.GetBankAccountAsync = async(bankCode, branchCode, accountTypeId, accountNumber, token) => {
                var result = await bankAccountProcessor.GetAsync(new BankAccountSearch {
                    CompanyId     = importer.Helper.CompanyId,
                    BankCodes     = new[] { bankCode },
                    BranchCodes   = new[] { branchCode },
                    AccountTypeId = accountTypeId,
                    AccountNumber = accountNumber,
                }, token);

                return(result.FirstOrDefault());
            };

            importer.Helper.GetBankAccountByBankNameAsync = async(bankName, branchName, accountTypeId, accountNumber, token) => {
                var result = await bankAccountProcessor.GetAsync(new BankAccountSearch {
                    CompanyId     = importer.Helper.CompanyId,
                    BankName      = bankName,
                    BranchName    = branchName,
                    AccountTypeId = accountTypeId,
                    AccountNumber = accountNumber,
                }, token);

                return(result.FirstOrDefault());
            };

            importer.Helper.GetBankAccountByBranchNameAsync = async(bankCode, branchName, token) => {
                var result = await bankAccountProcessor.GetAsync(new BankAccountSearch {
                    CompanyId  = importer.Helper.CompanyId,
                    BankCodes  = new[] { bankCode },
                    BranchName = branchName,
                }, token);

                return(result.FirstOrDefault());
            };

            importer.Helper.GetBankAccountByBranchNameAndNumberAsync = async(bankCode, branchName, accountTypeId, accountNumber, token) => {
                var result = await bankAccountProcessor.GetAsync(new BankAccountSearch {
                    CompanyId     = importer.Helper.CompanyId,
                    BankCodes     = new[] { bankCode },
                    BranchName    = branchName,
                    AccountTypeId = accountTypeId,
                    AccountNumber = accountNumber,
                }, token);

                return(result.FirstOrDefault());
            };

            importer.Helper.GetCustomerIdByExclusiveInfoAsync = async(bankCode, branchCode, payerCode, token) => {
                var result = await customerProcessor.GetAsync(new CustomerSearch {
                    CompanyId              = importer.Helper.CompanyId,
                    ExclusiveBankCode      = bankCode,
                    ExclusiveBranchCode    = branchCode,
                    ExclusiveAccountNumber = payerCode,
                }, token);

                return(result.FirstOrDefault()?.Id);
            };

            importer.Helper.GetSectionIdByPayerCodeAsync = async(payerCode, token) => {
                var result = await sectionProcessor.GetAsync(new SectionSearch {
                    CompanyId  = importer.Helper.CompanyId,
                    PayerCodes = new[] { payerCode },
                }, token);

                return(result.FirstOrDefault()?.Id);
            };

            importer.Helper.GetExcludeCategoryIdAsync = async(payerName, token) => {
                var result = await ignoreKanaProcessor.GetAsync(new IgnoreKana {
                    CompanyId = importer.Helper.CompanyId,
                    Kana      = payerName,
                }, token);

                return(result.FirstOrDefault()?.ExcludeCategoryId);
            };

            importer.Helper.GetEBExcludeAccountSettingListAsync = async token
                                                                  => (await ebExcludeAccountSettingProcessor.GetAsync(importer.Helper.CompanyId, token)).ToList();

            importer.Helper.SaveDataInnerAsync = async(logs, token)
                                                 => (await importFileLogProcessor.SaveAsync(logs, token)).ToList();
        }