Пример #1
0
        }         // constructor

        public ReApprovalInputData GetInputData()
        {
            DbHelper dbHelper = new DbHelper(this.m_oDB, this.m_oLog);
            AutoReApprovalInputDataModelDb dbData = dbHelper.GetAutoReApprovalInputData(this.CustomerId);
            AvailableFunds availableFunds         = dbHelper.GetAvailableFunds();

            var model = new ReApprovalInputData {
                AutoReApproveMaxLacrAge               = dbData.AutoReApproveMaxLacrAge,
                AutoReApproveMaxLatePayment           = dbData.AutoReApproveMaxLatePayment,
                AutoReApproveMaxNumOfOutstandingLoans = dbData.AutoReApproveMaxNumOfOutstandingLoans,
                AvaliableFunds      = availableFunds.Available - availableFunds.Reserved,
                HasLoanCharges      = dbData.HasLoanCharges,
                FraudStatus         = (FraudStatus)dbData.FraudStatus,
                ManualApproveDate   = dbData.ManualApproveDate,
                MaxLateDays         = dbData.MaxLateDays,
                NewDataSourceAdded  = dbData.NewDataSourceAdded,
                NumOutstandingLoans = dbData.NumOutstandingLoans,
                ReApproveAmount     = dbData.ApprovedAmount - dbData.TookLoanAmount + dbData.RepaidPrincipal,
                WasLate             = dbData.WasLate,
                WasRejected         = dbData.WasRejected,
                MinLoan             = dbData.MinLoan,
                LacrID = dbData.LacrID,
            };

            this.m_oLog.Debug(
                "AutoReApprovalInputDataModelDb: {0}, {1}, {2}, {3}",
                dbData.ApprovedAmount,
                dbData.TookLoanAmount,
                dbData.RepaidPrincipal,
                dbData.SetupFee
                );
            this.m_oLog.Debug("ReApprovalInputData = {0}", model.Serialize());

            return(model);
        }         // GetInputData