/// <summary>
        /// 生成报文文件名
        /// </summary>
        /// yaoy    16.07.05
        /// <param name="fileId"></param>
        /// <returns></returns>
        public string BuildMessageName(int fileId)
        {
            string messageName     = string.Empty;
            string messageFileType = string.Empty;
            int    fileCount       = 0;
            // 企业金融机构代码
            string comFinancialInstitutionCode = "33207991216";

            ReportFilesInfo reportFilesInfo = _dataRule.GetReportFilesInfoById(fileId);
            int             messageFileId   = reportFilesInfo == null ? 0 : reportFilesInfo.MessageFileId;
            int             serviceObj      = reportFilesInfo == null ? 0 : reportFilesInfo.ServiceObj;

            switch (messageFileId)
            {
            case 1:
                messageFileType = "11";
                break;

            case 2:
                messageFileType = "12";
                break;

            case 3:
                messageFileType = "14";
                break;

            case 4:
                messageFileType = "31";
                break;

            default:
                return(string.Empty);
            }
            string partnerName = "11" + comFinancialInstitutionCode + DateTime.Now.ToString("yyMMdd") + messageFileType + "1";

            fileCount = new DAL.BankCredit.ReportFilesMapper().FindFileCount(partnerName);

            List <ReportFilesInfo> reportFileInfo = new DAL.BankCredit.ReportFilesMapper().FindFileByPartnerName(partnerName);

            if (reportFileInfo == null)
            {
                partnerName += "1".PadLeft(4, '0');
            }
            else
            {
                partnerName += ((Convert.ToInt32(reportFileInfo[0].ReportTextName.Substring(22, 4))) + 1).ToString().PadLeft(4, '0');
            }
            //if (fileCount >= 0 && fileCount < 9999)
            //{
            //    partnerName += (fileCount + 1).ToString().PadLeft(4, '0');
            //}
            //else
            //{
            //    return string.Empty;
            //}

            messageName = partnerName + "00";

            return(messageName);
        }
        /// <summary>
        /// 生成报文名
        /// </summary>
        /// yaoy    16.07.05
        /// <param name="fileId"></param>
        /// <returns></returns>
        public string BuildMessageName(int fileId)
        {
            string messageName     = string.Empty;
            string serialNumber    = string.Empty;
            string serialNumberExt = string.Empty;
            string parterName      = string.Empty;
            // 个人金融机构代码
            string perFinancialInstitutionCode = "B10211000H0001";

            ReportFilesInfo reportFilesInfo   = _dataRule.GetReportFilesInfoById(fileId);
            int             messageFileId     = reportFilesInfo == null ? 0 : reportFilesInfo.MessageFileId;
            MessageFileInfo messageFileInfo   = _dataRule.GetMessageFileInfoById(messageFileId);
            int             messageFileTypeId = messageFileInfo == null ? 0 : messageFileInfo.MessageFileTypeId;

            if (messageFileTypeId == 4)
            {
                parterName = perFinancialInstitutionCode + DateTime.Now.ToString("yyyyMM");
            }
            if (messageFileTypeId == 5)
            {
                parterName = perFinancialInstitutionCode + DateTime.Now.ToString("yyyyMMdd") + "04";
            }
            if (messageFileTypeId == 6)
            {
                parterName = perFinancialInstitutionCode + DateTime.Now.ToString("yyyyMMdd") + "08";
            }
            // 获取当天文件数量
            int fileCount = new DAL.BankCredit.ReportFilesMapper().FindFileCount(parterName);

            if (fileCount >= 0)
            {
                string number = new DataUtil().ConvertTo36(fileCount + 1);

                if (number.Length <= 6 && number.Length >= 3)
                {
                    serialNumber    = number.Substring(0, 3);
                    serialNumberExt = number.Substring(3, number.Length).PadLeft(3, '0');
                }
                if (number.Length > 0 && number.Length < 3)
                {
                    serialNumber    = number.PadLeft(3, '0');
                    serialNumberExt = "000";
                }
            }

            if (messageFileTypeId == 4)
            {
                messageName = parterName + serialNumber + "1" + serialNumberExt;
            }
            if (messageFileTypeId == 5)
            {
                messageName = parterName + "04" + serialNumber;
            }
            if (messageFileTypeId == 6)
            {
                messageName = parterName + "08" + serialNumber;
            }

            return(messageName);
        }