Beispiel #1
0
        protected virtual bool IsAllCopied(DateTime asOfDate)
        {
            var dao           = new SqlDbHelper();
            var importedItems = (string)dao.ExecuteScalar(string.Format("SELECT dbo.sfGetImportStatus('{0}')", asOfDate.ToString("yyyyMMdd")));

            return(importedItems.StartsWith("1111111"));
        }
Beispiel #2
0
        public override string GenerateReport()
        {
            var fileName = "风险贷款变化情况表.xls";

            Logger.Debug("Generating " + fileName);

            // Check YWNei import
            var dao   = new SqlDbHelper();
            var sql   = string.Format("SELECT COUNT(*) FROM ImportYWNei WHERE ImportId = (SELECT Id FROM Import I WHERE I.ImportDate = '{0}') AND OrgId < 100", this.AsOfDate.ToString("yyyyMMdd"));
            var count = (int)dao.ExecuteScalar(sql);

            if (count == 0)
            {
                Logger.Error("支行业务状况表还没导入");
                return(string.Format("导入各支行{0}的业务状况表(表内)之后才能导出此报表。", this.AsOfDate.ToString("yyyy-M-d")));
            }

            var report   = TargetTable.GetById(XEnum.ReportType.X_FXDKBH_D);
            var filePath = CreateReportFile(report.TemplateName, fileName);

            foreach (var sheet in report.Sheets)
            {
                PopulateSheet(filePath, sheet);
            }

            return(string.Empty);
        }
Beispiel #3
0
        private void btnFix_Click(object sender, EventArgs e)
        {
            DateTime date;

            if (DateTime.TryParse(this.cmbDate.Text, out date))
            {
                var dao      = new SqlDbHelper();
                var importId = (int)dao.ExecuteScalar(string.Format("SELECT ISNULL(MAX(Id), 0) FROM Import WHERE ImportDate = '{0}'", date.ToString("yyyyMMdd")));
                if (importId == 0)
                {
                    MessageBox.Show(string.Format("无效的导入日期。没有找到{0}日的数据", date), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                var affected = dao.ExecuteNonQuery("UPDATE ImportPrivate SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
                affected += dao.ExecuteNonQuery("UPDATE ImportLoan SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
                affected += dao.ExecuteNonQuery("UPDATE ImportNonAccrual SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
                affected += dao.ExecuteNonQuery("UPDATE ImportOverdue SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
                if (affected > 0)
                {
                    MessageBox.Show("修改完毕。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("没有发现'高锋',可能已经修改过了。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Beispiel #4
0
        private string GetMismatchMessage(int importId, string orgName, string customerName, string amount, string startDate, string endDate)
        {
            logger.DebugFormat("Get mismatch message for importId='{0}', orgName='{1}', customerName='{2}', amount='{3}', startDate='{4}', endDate='{5}'", importId, orgName, customerName, amount, startDate, endDate);
            var msg = "";
            var dao = new SqlDbHelper();
            var sql = new StringBuilder();

            sql.AppendLine("SELECT L.Id FROM ImportLoan L INNER JOIN Org O ON L.OrgId = O.Id");
            sql.AppendLine("WHERE ImportId = '" + importId.ToString() + "'");
            sql.AppendLine("	AND CustomerName = '"+ customerName + "'");
            if (dao.ExecuteScalar(sql.ToString()) == null)
            {
                msg = string.Format("《贷款欠款查询》中,不存在客户“{0}”", customerName);
            }
            if (string.IsNullOrEmpty(msg))
            {
                sql.AppendLine("	AND O.OrgNo = (SELECT OrgNo FROM Org WHERE Id = dbo.sfGetOrgId('"+ orgName + "'))");
                if (dao.ExecuteScalar(sql.ToString()) == null)
                {
                    if (dao.ExecuteScalar("SELECT dbo.sfGetOrgId('" + orgName + "')") == DBNull.Value)
                    {
                        msg = string.Format("银行“{0}”不存在,请用规范的银行名称。", orgName);
                    }
                    else
                    {
                        msg = string.Format("《贷款欠款查询》中,客户{0}的银行不是“{1}”,请修改五级分类中该笔贷款的行名。", customerName, orgName);
                    }
                }
            }
            if (string.IsNullOrEmpty(msg))
            {
                sql.AppendLine("	AND CapitalAmount = "+ amount);
                if (dao.ExecuteScalar(sql.ToString()) == null)
                {
                    msg = string.Format("《贷款欠款查询》中,客户{0}在{1}的贷款余额不是{2}。", customerName, orgName, amount);
                }
            }
            if (string.IsNullOrEmpty(msg) && !string.IsNullOrEmpty(startDate))
            {
                sql.AppendLine("	AND LoanStartDate = '"+ startDate + "'");
                if (dao.ExecuteScalar(sql.ToString()) == null)
                {
                    msg = string.Format("《贷款欠款查询》中,客户{0}在{1}贷款余额为{2}的贷款放款日期不是{3}。", customerName, orgName, amount, startDate);
                }
            }
            if (string.IsNullOrEmpty(msg) && !string.IsNullOrEmpty(endDate))
            {
                sql.AppendLine("	AND LoanEndDate = '"+ endDate + "'");
                if (dao.ExecuteScalar(sql.ToString()) == null)
                {
                    msg = string.Format("《贷款欠款查询》中,客户{0}在{1}贷款余额为{2}的贷款到期日期不是{3}。", customerName, orgName, amount, endDate);
                }
            }

            if (msg.Length > 0)
            {
                msg = msg + string.Format("\r\n五级分类信息:\r\n\t行名:{0}, 客户名称:{1}, 贷款余额:{2}, 放款日期:{3}, 到期日期:{4}", orgName, customerName, amount, startDate, endDate);
            }
            return(msg);
        }
Beispiel #5
0
        private int GetOrgId4YW(string fileName)
        {
            var orgNo = GetOrgNo4YW(fileName);

            if (orgNo.Equals(OrgCodeYuLin))
            {
                return((int)XEnum.OrgId.YuLin);                // 榆林地区总额 (不含神府)
            }
            else if (orgNo.Equals(OrgCodeSF))
            {
                return((int)XEnum.OrgId.ShenFu);
            }
            var dao   = new SqlDbHelper();
            var orgId = dao.ExecuteScalar(string.Format("SELECT TOP 1 Id FROM Org WHERE OrgNo = '{0}'", orgNo));

            return(orgId == null ? 0 : (int)orgId);
        }
Beispiel #6
0
 private void btnFix_Click(object sender, EventArgs e)
 {
     DateTime date;
     if (DateTime.TryParse(this.cmbDate.Text, out date)) {
         var dao = new SqlDbHelper();
         var importId = (int) dao.ExecuteScalar(string.Format("SELECT ISNULL(MAX(Id), 0) FROM Import WHERE ImportDate = '{0}'", date.ToString("yyyyMMdd")));
         if (importId == 0) {
             MessageBox.Show(string.Format("无效的导入日期。没有找到{0}日的数据", date), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         var affected = dao.ExecuteNonQuery("UPDATE ImportPrivate SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
         affected += dao.ExecuteNonQuery("UPDATE ImportLoan SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
         affected += dao.ExecuteNonQuery("UPDATE ImportNonAccrual SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
         affected += dao.ExecuteNonQuery("UPDATE ImportOverdue SET CustomerName = '高峰' WHERE CustomerName = '高锋' AND ImportId = " + importId.ToString());
         if (affected > 0) {
             MessageBox.Show("修改完毕。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else {
             MessageBox.Show("没有发现'高锋',可能已经修改过了。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Beispiel #7
0
        public override string GenerateReport()
        {
            var fileName = string.Format("各支行风险贷款变化情况表{0}.xls", this.AsOfDate.ToString("M月d日"));
            Logger.Debug("Generating " + fileName);

            // Check YWNei import
            var dao = new SqlDbHelper();
            var sql = string.Format("SELECT COUNT(*) FROM ImportYWNei WHERE ImportId = (SELECT Id FROM Import I WHERE I.ImportDate = '{0}') AND OrgId < 100", this.AsOfDate.ToString("yyyyMMdd"));
            var count = (int)dao.ExecuteScalar(sql);
            if (count == 0) {
                Logger.Error("支行业务状况表还没导入");
                return string.Format("导入各支行{0}的业务状况表(表内)之后才能导出此报表。", this.AsOfDate.ToString("yyyy-M-d"));
            }

            var report = TargetTable.GetById(XEnum.ReportType.X_FXDKTB_D);
            var filePath = CreateReportFile(report.TemplateName, fileName);

            foreach (var sheet in report.Sheets) {
                PopulateSheet(filePath, sheet);
            }

            return string.Empty;
        }
Beispiel #8
0
        public string ExportData(XEnum.ReportType report, DateTime asOfDate, DateTime asOfDate2, List <string> columnNames, List <string> columnNames2)
        {
            this.AsOfDate = asOfDate;

            if (report != XEnum.ReportType.C_DQDKQK_M)
            {
                var dao    = new SqlDbHelper();
                var import = dao.ExecuteScalar(string.Format("SELECT 1 FROM Import WHERE ImportDate = '{0}'", asOfDate.ToString("yyyyMMdd")));
                if (import == null)
                {
                    return(string.Format("{0}的数据还没导入系统", asOfDate.ToString("M月d日")));
                }
            }

            var result = string.Empty;

            switch (report)
            {
            case XEnum.ReportType.X_WJFL_M:
                result = new LoanRiskPerMonth(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_HYB_M:
                result = new LoanRiskPerMonthHYB(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF0102_081_M:
                result = new GF0102_081(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF0102_161_M:
                result = new GF0102_161(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF0107_141_M:
                result = new GF0107_141(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_SF6301_141_M:
                result = new SF6301_141(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_SF6401_141_M:
                result = new SF6401_141(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_FXDKTB_D:
                result = new X_FXDKTB_D(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_FXDKBH_D:
                result = new X_FXDKBH_D(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.C_DQDKQK_M:
                result = new C_DQDKQK_M(asOfDate, columnNames, columnNames2).GenerateReport();
                break;

            case XEnum.ReportType.C_XZDKMX_D:
                result = new C_XZDKMX_D(this.AsOfDate, this.AsOfDate2, Columns).GenerateReport();
                break;

            case XEnum.ReportType.C_JQDKMX_D:
                result = new C_JQDKMX_D(this.AsOfDate, this.AsOfDate2, Columns).GenerateReport();
                break;

            case XEnum.ReportType.X_ZXQYZJXQ_S:
                result = new X_ZXQYZJXQ_S(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_DKZLFL_M:
                result = new X_DKZLFL_M(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1101_121_S:
                result = new GF1101_121(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1103_121_S:
                result = new GF1103_121(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1200_101_S:
                result = new GF1200_101(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1301_081_S:
                result = new GF1301_081(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1302_081_S:
                result = new GF1302_081(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1303_081_S:
                result = new GF1303_081(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1304_081_S:
                result = new GF1304_081(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1403_111_S:
                result = new GF1403_111(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_GF1900_151_S:
                result = new GF1900_151(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_SF6302_131_S:
                result = new SF6302_131(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.F_SF6402_131_S:
                result = new SF6402_131(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_BLDKJC_X:
                result = new X_BLDKJC_X(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_CSHSX_M:
                result = new X_CSHSX_M(asOfDate).GenerateReport();
                break;

            case XEnum.ReportType.X_WJFLPRD_D:
                result = new X_WJFLPRD_D(asOfDate).GenerateReport();
                break;

            default:
                result = "Unknown report type: " + report;
                break;
            }
            return(result);
        }
Beispiel #9
0
 private string CreateImportItem(int importId, string sourceFilePath)
 {
     logger.Debug("Updating ImportItem table");
     int itemTypeId = (int)XEnum.ImportItemType.WjflSF;
     var dao = new SqlDbHelper();
     var sql = new StringBuilder();
     sql.AppendFormat("SELECT ISNULL(MAX(Id), 0) FROM ImportItem WHERE ImportId = {0} AND ItemType = {1}", importId, itemTypeId);
     var importItemId = (int)dao.ExecuteScalar(sql.ToString());
     if (importItemId == 0) {
         sql.Clear();
         sql.AppendLine(string.Format("INSERT INTO ImportItem (ImportId, ItemType, FilePath) VALUES ({0}, {1}, '{2}')", importId, itemTypeId, sourceFilePath));
         sql.AppendLine("SELECT SCOPE_IDENTITY()");
         importItemId = (int)((decimal)dao.ExecuteScalar(sql.ToString()));
         logger.Debug("New record created. ImportItemId = " + importItemId.ToString());
     }
     else {
         sql.Clear();
         sql.AppendFormat("UPDATE ImportItem SET FilePath = '{0}', ModifyDate = getdate() WHERE Id = {1}", sourceFilePath, importItemId);
         dao.ExecuteNonQuery(sql.ToString());
         logger.Debug("Existing record updated. ImportItemId = " + importItemId.ToString());
     }
     return string.Empty;
 }
Beispiel #10
0
        protected bool CopyItem(int importId, string importFolder, string sourceFilePath, XEnum.ImportItemType itemType)
        {
            int itemTypeId = (int)itemType;

            if (sourceFilePath.Length == 0 || !File.Exists(sourceFilePath))
            {
                return(false);
            }

            string targetFileName = this.targetFileNames[itemTypeId];

            if (itemType == XEnum.ImportItemType.YWNei || itemType == XEnum.ImportItemType.YWWai || itemType == XEnum.ImportItemType.Loan)
            {
                var orgId = GetOrgId4YW(sourceFilePath);
                targetFileName = GetYWTargetFileName(itemType, orgId);
            }

            //Original
            var originalFolder = importFolder + @"\Original\";

            if (!Directory.Exists(originalFolder))
            {
                Directory.CreateDirectory(originalFolder);
            }
            File.Copy(sourceFilePath, originalFolder + @"\" + targetFileName, true);

            //Processed
            var processedFolder = importFolder + @"\Processed\";

            if (!Directory.Exists(processedFolder))
            {
                Directory.CreateDirectory(processedFolder);
            }
            File.Copy(sourceFilePath, processedFolder + @"\" + targetFileName, true);

            logger.Debug("Process copied item for " + itemType.ToString());
            ExcelHelper.ProcessCopiedItem(processedFolder + @"\" + targetFileName, itemType);

            logger.Debug("Updating ImportItem table");
            var dao = new SqlDbHelper();
            var sql = new StringBuilder();

            sql.AppendFormat("SELECT ISNULL(MAX(Id), 0) FROM ImportItem WHERE ImportId = {0} AND ItemType = {1}", importId, itemTypeId);
            var importItemId = (int)dao.ExecuteScalar(sql.ToString());

            if (importItemId == 0)
            {
                sql.Clear();
                sql.AppendLine(string.Format("INSERT INTO ImportItem (ImportId, ItemType, FilePath) VALUES ({0}, {1}, '{2}')", importId, itemTypeId, sourceFilePath));
                sql.AppendLine("SELECT SCOPE_IDENTITY()");
                importItemId = (int)((decimal)dao.ExecuteScalar(sql.ToString()));
                logger.Debug("New record created. ImportItemId = " + importItemId.ToString());
            }
            else
            {
                sql.Clear();
                sql.AppendFormat("UPDATE ImportItem SET FilePath = '{0}', ModifyDate = getdate() WHERE Id = {1}", sourceFilePath, importItemId);
                dao.ExecuteNonQuery(sql.ToString());
                logger.Debug("Existing record updated. ImportItemId = " + importItemId.ToString());
            }
            return(true);
        }
Beispiel #11
0
        private string UpdateWJFLSheet(int importId, OleDbDataReader reader)
        {
            var result = string.Empty;

            try {
                int readRows        = 0;
                int updatedRows     = 0;
                int failedRows      = 0;
                var sql             = new StringBuilder();
                var sqlSingle       = "";
                var firstColumn     = "";
                var dao             = new SqlDbHelper();
                var failedCustomers = new StringBuilder();

                while (reader.Read())
                {
                    firstColumn = DataUtility.GetValue(reader, 0);
                    if (string.IsNullOrEmpty(firstColumn) || firstColumn.Replace(" ", "").Equals("合计"))                       // Going to end
                    {
                        break;
                    }
                    readRows++;
                    sql.Clear();
                    //替换掉下面两行,解决五级分类中营业部与公司部混乱的问题
                    //sql.AppendLine("SELECT Id FROM ImportLoan");
                    //sql.AppendLine("WHERE OrgId = dbo.sfGetOrgId('{0}')");
                    sql.AppendLine("SELECT L.Id FROM ImportLoan L INNER JOIN Org O ON L.OrgId = O.Id");
                    sql.AppendLine("WHERE O.OrgNo = (SELECT OrgNo FROM Org WHERE Id = dbo.sfGetOrgId('{0}'))");
                    sql.AppendLine("	AND CustomerName = '{1}'");
                    sql.AppendLine("	AND CapitalAmount = {2}");
                    if (!string.IsNullOrEmpty(DataUtility.GetValue(reader, 3)))
                    {
                        sql.AppendLine("	AND LoanStartDate = '{3}'");
                    }
                    if (!string.IsNullOrEmpty(DataUtility.GetValue(reader, 4)))
                    {
                        sql.AppendLine("	AND LoanEndDate = '{4}'");
                    }
                    sql.AppendLine("	AND ImportId = '{5}'");
                    sqlSingle = string.Format(sql.ToString(), DataUtility.GetValue(reader, 0), DataUtility.GetValue(reader, 1), DataUtility.GetValue(reader, 2), DataUtility.GetValue(reader, 3), DataUtility.GetValue(reader, 4), importId);
                    var o = dao.ExecuteScalar(sqlSingle);
                    if (o == null)
                    {
                        failedRows++;
                        if (failedRows <= 10)
                        {
                            var msg = GetMismatchMessage(importId, DataUtility.GetValue(reader, 0), DataUtility.GetValue(reader, 1), DataUtility.GetValue(reader, 2), DataUtility.GetValue(reader, 3), DataUtility.GetValue(reader, 4));
                            failedCustomers.AppendLine(msg + "\r\n" + new string('-', 60));
                            logger.WarnFormat("No record matched for {0}-{1}-{2}-{3}-{4}", DataUtility.GetValue(reader, 0), DataUtility.GetValue(reader, 1), DataUtility.GetValue(reader, 2), DataUtility.GetValue(reader, 3), DataUtility.GetValue(reader, 4));
                        }
                        else
                        {
                            failedCustomers.AppendFormat("还有更多……\r\n", DataUtility.GetValue(reader, 1), DataUtility.GetValue(reader, 2), DataUtility.GetValue(reader, 3), DataUtility.GetValue(reader, 4));
                            logger.Warn("Stopped because of more un-matched records.");
                            break;
                        }
                    }
                    else
                    {
                        int loanId = (int)o;
                        sqlSingle = string.Format("UPDATE ImportLoan SET DangerLevel = '{0}' WHERE Id = {1} AND ISNULL(DangerLevel, '') != '{0}'", DataUtility.GetValue(reader, 5), loanId);
                        try {
                            var affected = dao.ExecuteNonQuery(sqlSingle);
                            updatedRows += affected;
                            if (affected > 0)
                            {
                                logger.DebugFormat("#{0} update to '{1}'", loanId, DataUtility.GetValue(reader, 5));
                            }
                        }
                        catch (Exception ex) {
                            logger.Error("Running: " + sql.ToString(), ex);
                            throw ex;
                        }
                    }
                }
                logger.DebugFormat("Rows read in toal: {0}", readRows);
                logger.DebugFormat("Rows updated: {0}", updatedRows);
                logger.DebugFormat("Rows not match: {0}", failedRows);
                if (failedRows == 1)
                {
                    result = Consts.MESSAGE_FORM_PREFIX + "下面客户的五级分类无法导入:\r\n" + failedCustomers.ToString() + "\r\n请确保新修改的五级分类Excel文件中,该客户的贷款余额、放款日期和到期日期格式正确。";
                }
                else if (failedRows > 1)
                {
                    result = Consts.MESSAGE_FORM_PREFIX + "下列客户的五级分类无法导入:\r\n" + (new string('-', 80)) + "\r\n" + failedCustomers.ToString() + "\r\n" + (new string('-', 80)) + "\r\n请确保新修改的五级分类Excel文件中,他们的贷款余额、放款日期和到期日期格式正确。";
                }
            }
            catch (Exception ex) {
                logger.Error("Outest catch", ex);
                return(ex.Message);
            }
            return(result);
        }
Beispiel #12
0
        public string ExportData(XEnum.ReportType report, DateTime asOfDate, DateTime asOfDate2, List<string> columnNames, List<string> columnNames2)
        {
            this.AsOfDate = asOfDate;

            if (report != XEnum.ReportType.C_DQDKQK_M) {
                var dao = new SqlDbHelper();
                var import = dao.ExecuteScalar(string.Format("SELECT 1 FROM Import WHERE ImportDate = '{0}'", asOfDate.ToString("yyyyMMdd")));
                if (import == null) {
                    return string.Format("{0}的数据还没导入系统", asOfDate.ToString("M月d日"));
                }
            }

            var result = string.Empty;
            switch (report) {
                case XEnum.ReportType.X_WJFL_M:
                    result = new LoanRiskPerMonth(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_HYB_M:
                    result = new LoanRiskPerMonthHYB(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF0102_081_M:
                    result = new GF0102_081(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF0102_161_M:
                    result = new GF0102_161(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF0107_141_M:
                    result = new GF0107_141(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_SF6301_141_M:
                    result = new SF6301_141(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_SF6401_141_M:
                    result = new SF6401_141(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_FXDKTB_D:
                    result = new X_FXDKTB_D(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_FXDKBH_D:
                    result = new X_FXDKBH_D(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.C_DQDKQK_M:
                    result = new C_DQDKQK_M(asOfDate, columnNames, columnNames2).GenerateReport();
                    break;
                case XEnum.ReportType.C_XZDKMX_D:
                    result = new C_XZDKMX_D(this.AsOfDate, this.AsOfDate2, Columns).GenerateReport();
                    break;
                case XEnum.ReportType.C_JQDKMX_D:
                    result = new C_JQDKMX_D(this.AsOfDate, this.AsOfDate2, Columns).GenerateReport();
                    break;
                case XEnum.ReportType.X_ZXQYZJXQ_S:
                    result = new X_ZXQYZJXQ_S(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_DKZLFL_M:
                    result = new X_DKZLFL_M(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1101_121_S:
                    result = new GF1101_121(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1103_121_S:
                    result = new GF1103_121(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1200_101_S:
                    result = new GF1200_101(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1301_081_S:
                    result = new GF1301_081(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1302_081_S:
                    result = new GF1302_081(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1303_081_S:
                    result = new GF1303_081(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1304_081_S:
                    result = new GF1304_081(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1403_111_S:
                    result = new GF1403_111(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_GF1900_151_S:
                    result = new GF1900_151(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_SF6302_131_S:
                    result = new SF6302_131(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.F_SF6402_131_S:
                    result = new SF6402_131(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_BLDKJC_X:
                    result = new X_BLDKJC_X(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_CSHSX_M:
                    result = new X_CSHSX_M(asOfDate).GenerateReport();
                    break;
                case XEnum.ReportType.X_WJFLPRD_D:
                    result = new X_WJFLPRD_D(asOfDate).GenerateReport();
                    break;
                default:
                    result = "Unknown report type: " + report;
                    break;
            } return result;
        }