public override string FileExtract(string extractFilePath, FileInfoType fileInfoType, string businessDate, string tableName, string fileImportFormatDirectory) { string result = string.Empty; string fileImportFormat = Path.Combine(fileImportFormatDirectory, "BILL_AccountBill.fmt"); string uploadDirectoryAbs = Path.Combine(NMBConfig.UploadDirectoryAbs, businessDate); extractFilePath = Path.Combine(uploadDirectoryAbs, Path.GetFileName(extractFilePath)); DCCommonTxtProcess dcCommonTxtProcess = new DCCommonTxtProcess(); dcCommonTxtProcess.ExtractFileToDataBaseOptimize("Proc_BILL_AccountBill_Import", businessDate, extractFilePath, fileImportFormat, ref result); return result; }
public override string FileExtract(string extractFilePath, FileInfoType fileInfoType, string businessDate, string tableName, string fileImportFormatDirectory) { string result = string.Empty; DCEngineCommonTxtParam dcEngineCommonTxtParam = new DCEngineCommonTxtParam(); dcEngineCommonTxtParam.GetContentPattern = @"(?<key>[^\n]+(?=\n?))"; dcEngineCommonTxtParam.FileEncoding = "gb2312"; dcEngineCommonTxtParam.ContentSplit = "~"; dcEngineCommonTxtParam.IsAddEnter = false; dcEngineCommonTxtParam.RowExcept = string.Empty; dcEngineCommonTxtParam.ByteSplit = string.Empty; dcEngineCommonTxtParam.ColumnSplitType = (byte)ColumnSplitType.按分隔符; dcEngineCommonTxtParam.StringSplitOptions = StringSplitOptions.None; dcEngineCommonTxtParam.FileInfoType = fileInfoType; DCCommonTxtProcess dcCommonTxtProcess = new DCCommonTxtProcess(); dcCommonTxtProcess.ExtractFileToDataBase(dcEngineCommonTxtParam, businessDate, extractFilePath, tableName, ref result); return result; }