diff --git a/YLErpDAL/Helpers/ZipHelper.cs b/YLErpDAL/Helpers/ZipHelper.cs index 12d08d43..1a72ebd8 100644 --- a/YLErpDAL/Helpers/ZipHelper.cs +++ b/YLErpDAL/Helpers/ZipHelper.cs @@ -6,6 +6,12 @@ namespace YLErp.Helpers { public static class ZipHelper { + static ZipHelper() + { + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + ZipStrings.CodePage = Encoding.GetEncoding("gb2312").CodePage; + } + /// /// 压缩文件目录 /// @@ -51,7 +57,7 @@ namespace YLErp.Helpers { strFile += Path.DirectorySeparatorChar; } - ZipOutputStream outstream = new ZipOutputStream(File.Create(strZip)); + var outstream = new ZipOutputStream(File.Create(strZip)); outstream.SetLevel(6); zip(strFile, outstream, strFile); outstream.Finish(); @@ -60,7 +66,7 @@ namespace YLErp.Helpers public static void zipOnlyFile(string strFile, string strZip, string password = "") { - ZipOutputStream outstream = new ZipOutputStream(File.Create(strZip)); + var outstream = new ZipOutputStream(File.Create(strZip)); outstream.SetLevel(6); if (!string.IsNullOrWhiteSpace(password)) { @@ -78,7 +84,7 @@ namespace YLErp.Helpers { strFile += Path.DirectorySeparatorChar; } - Crc32 crc = new Crc32(); + var crc = new Crc32(); //获取指定目录下所有文件和子目录文件名称 string[] filenames = Directory.GetFileSystemEntries(strFile); zip(filenames, outstream, staticFile); @@ -86,11 +92,8 @@ namespace YLErp.Helpers public static void zipFiles(string[] filenames, string parentDirectory, out byte[] buffer) { - MemoryStream stream = new MemoryStream(); - ZipOutputStream outstream = new ZipOutputStream(stream); - Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); - Encoding gbk = Encoding.GetEncoding("gb2312"); - ZipConstants.DefaultCodePage = gbk.CodePage; + var stream = new MemoryStream(); + var outstream = new ZipOutputStream(stream); outstream.SetLevel(6); zip(filenames, outstream, parentDirectory); outstream.Finish(); @@ -116,36 +119,32 @@ namespace YLErp.Helpers } } - using (var ZipFile = File.Create(targetZipFile)) - using (var ZipStream = new ZipOutputStream(ZipFile)) + using var ZipFile = File.Create(targetZipFile); + using var ZipStream = new ZipOutputStream(ZipFile); + foreach (var fileToZip in sourceFiles) { - foreach (var fileToZip in sourceFiles) - { - var fileName = fileToZip.Substring(fileToZip.LastIndexOf("\\")); + var fileName = fileToZip.Substring(fileToZip.LastIndexOf(Path.DirectorySeparatorChar)); - using (var fs = File.OpenRead(fileToZip)) - { - var buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); - fs.Close(); + using var fs = File.OpenRead(fileToZip); + var buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); + fs.Close(); - var ZipEntry = new ZipEntry(fileName); - ZipStream.PutNextEntry(ZipEntry); - ZipStream.SetLevel(compressionLevel); + var ZipEntry = new ZipEntry(fileName); + ZipStream.PutNextEntry(ZipEntry); + ZipStream.SetLevel(compressionLevel); - ZipStream.Write(buffer, 0, buffer.Length); - } - } - ZipStream.Finish(); - ZipStream.Close(); + ZipStream.Write(buffer, 0, buffer.Length); } + ZipStream.Finish(); + ZipStream.Close(); } private static void zip(string[] filenames, ZipOutputStream outstream, string staticFile) { - Crc32 crc = new Crc32(); + var crc = new Crc32(); //遍历文件 - foreach (string file in filenames) + foreach (var file in filenames) { if (Directory.Exists(file)) { @@ -155,15 +154,14 @@ namespace YLErp.Helpers else { //打开文件 - FileStream fs = File.OpenRead(file); + var fs = File.OpenRead(file); //定义缓存区对象 - byte[] buffer = new byte[fs.Length]; + var buffer = new byte[fs.Length]; //通过字符流,读取文件 fs.Read(buffer, 0, buffer.Length); //得到目录下的文件(比如:D:\Debug1\test),test //这里是为了得到压缩文件内的目录结构; - var splitArr = file.Split(Path.DirectorySeparatorChar); - string tempfile = splitArr[splitArr.Length - 1]; + string tempfile = file.Substring(staticFile.LastIndexOf(Path.DirectorySeparatorChar) + 1); //string tempfile = Path.GetFileName(file); ZipEntry entry = new ZipEntry(tempfile) { @@ -183,40 +181,44 @@ namespace YLErp.Helpers public static string unZipFile(string TargetFile, string fileDir, out string msg) { + LogFactory.GetLogger("UploadEventReportFile").Info($"准备解压{fileDir}->{TargetFile}"); msg = ""; //读取压缩文件(zip文件),准备解压缩 - using (ZipInputStream inputstream = new ZipInputStream(File.OpenRead(TargetFile.Trim()))) + using (var inputstream = new ZipInputStream(File.OpenRead(TargetFile.Trim()))) { ZipEntry entry; var pathName = Path.GetFileNameWithoutExtension(TargetFile); fileDir = Path.Combine(fileDir, pathName); - string path = fileDir; + LogFactory.GetLogger("UploadEventReportFile").Info($"准备解压{fileDir}"); + var path = fileDir; //压缩文件内第一层子目录 - string rootDir = ""; + var rootDir = ""; //压缩文件内子目录 - string dir = ""; - string fileName = ""; + var dir = ""; + var fileName = ""; while ((entry = inputstream.GetNextEntry()) != null) { if (!string.IsNullOrWhiteSpace(entry.Name)) { //得到根目录下的第一级子文件夹的名称 rootDir = Path.GetDirectoryName(entry.Name); - if (rootDir.IndexOf("\\") >= 0) + if (rootDir.IndexOf(Path.DirectorySeparatorChar) >= 0) { - rootDir = rootDir.Substring(0, rootDir.IndexOf("\\") + 1); + rootDir = rootDir.Substring(0, rootDir.IndexOf(Path.DirectorySeparatorChar) + 1); } //得到根目录下的第一级子文件夹下的子文件夹名称 dir = Path.GetDirectoryName(entry.Name); //根目录下的文件名称 fileName = Path.GetFileName(entry.Name); } + LogFactory.GetLogger("UploadEventReportFile").Info($"根目录下的文件名称{fileName}"); //创建根目录下的子文件夹,不限制级别 - if (!Directory.Exists(fileDir + "\\" + dir)) + if (!Directory.Exists(fileDir + Path.DirectorySeparatorChar + dir)) { - path = fileDir + "\\" + dir; + path = fileDir + Path.DirectorySeparatorChar + dir; //在指定的路径创建文件夹 Directory.CreateDirectory(path); + LogFactory.GetLogger("UploadEventReportFile").Info($"在指定的路径创建文件夹{path}"); } if (dir == "" && fileName != "") { @@ -226,25 +228,27 @@ namespace YLErp.Helpers else if (dir != "" && fileName != "") { //根目录下的第一级子文件夹下的文件 - if (dir.IndexOf("\\") > 0) + if (dir.IndexOf(Path.DirectorySeparatorChar) > 0) { //指定文件保存路径 - path = fileDir + "\\" + dir; + path = fileDir + Path.DirectorySeparatorChar + dir; + LogFactory.GetLogger("UploadEventReportFile").Info($"指定文件保存路径{path}"); } } if (dir == rootDir) { //判断是不是需要保存在根目录下的文件 - path = fileDir + "\\" + rootDir; + path = fileDir + Path.DirectorySeparatorChar + rootDir; } //以下为解压zip文件的基本步骤 //基本思路:遍历压缩文件里的所有文件,创建一个相同的文件 if (fileName != string.Empty) { - FileStream fs = File.Create(path + "\\" + fileName); - int size = 2048; - byte[] data = new byte[2048]; + var fs = File.Create(path + Path.DirectorySeparatorChar + fileName); + LogFactory.GetLogger("UploadEventReportFile").Info($"遍历压缩文件里的所有文件{fs.Name}"); + var size = 2048; + var data = new byte[2048]; while (true) { size = inputstream.Read(data, 0, data.Length); diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportBaseService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportBaseService.cs index 0d14d7a1..1c1c6bbf 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportBaseService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportBaseService.cs @@ -695,32 +695,32 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service protected void loadExcelDataSource() { - if ((_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template) || - //BusiDataType == DataFlagsEnum.A1011 || - BusiDataType == DataFlagsEnum.A1012 || - BusiDataType == DataFlagsEnum.A1013) && - !string.IsNullOrWhiteSpace(_excelDataSourcePath)) + //if ((_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template) || + // //BusiDataType == DataFlagsEnum.A1011 || + // BusiDataType == DataFlagsEnum.A1012 || + // BusiDataType == DataFlagsEnum.A1013) && + // !string.IsNullOrWhiteSpace(_excelDataSourcePath)) + //{ + var rootPath = tempFilesService.QueryTempFile(_reqInfo.ReportDate, "报送模板").Select(O => O.filePath).FirstOrDefault(); + if (string.IsNullOrWhiteSpace(rootPath)) { - var rootPath = tempFilesService.QueryTempFile(_reqInfo.ReportDate, "报送模板").Select(O => O.filePath).FirstOrDefault(); - if (string.IsNullOrWhiteSpace(rootPath)) + return; + } + _excelDataSourceRootPath = $"{Path.GetDirectoryName(rootPath)}\\{Path.GetFileNameWithoutExtension(rootPath)}\\"; + var path = $"{_excelDataSourceRootPath}{_excelDataSourcePath}"; + LogFactory.GetLogger("loadExcelDataSource").Info($"查找数据源目录:{path}"); + path = OtcAppContext.MapPath(path); + if (System.IO.Directory.Exists(path)) + { + var filePath = System.IO.Directory.GetFiles(path, _excelDataSourceFileName).FirstOrDefault(); + LogFactory.GetLogger("loadExcelDataSource").Info($"查找数据源文件:{filePath}"); + if (!string.IsNullOrWhiteSpace(filePath)) { - return; - } - _excelDataSourceRootPath = $"{Path.GetDirectoryName(rootPath)}\\{Path.GetFileNameWithoutExtension(rootPath)}\\"; - var path = $"{_excelDataSourceRootPath}{_excelDataSourcePath}"; - LogFactory.GetLogger("loadExcelDataSource").Info($"查找数据源目录:{path}"); - path = OtcAppContext.MapPath(path); - if (System.IO.Directory.Exists(path)) - { - var filePath = System.IO.Directory.GetFiles(path, _excelDataSourceFileName).FirstOrDefault(); - LogFactory.GetLogger("loadExcelDataSource").Info($"查找数据源文件:{filePath}"); - if (!string.IsNullOrWhiteSpace(filePath)) - { - _excelDataSource = new ExcelHelper().ExcelToDataSet(filePath, 0); - LogFactory.GetLogger("loadExcelDataSource").Info($"成功加载数据源"); - } + _excelDataSource = new ExcelHelper().ExcelToDataSet(filePath, 0); + LogFactory.GetLogger("loadExcelDataSource").Info($"成功加载数据源"); } } + //} } /// diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtProductService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtProductService.cs index 70dd9bac..30035dfa 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtProductService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtProductService.cs @@ -46,10 +46,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList.AddRange(GetMasterAgrmtProductModelFromExcel(ref fileList)); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList.AddRange(GetMasterAgrmtProductModelFromExcel(ref fileList)); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtService.cs index 91d4b54c..5b6b17e6 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportMasterAgrmtService.cs @@ -48,10 +48,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetMasterAgrmtModelFromExcel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetMasterAgrmtModelFromExcel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationAttService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationAttService.cs index e29762b7..9c67b766 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationAttService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationAttService.cs @@ -54,10 +54,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); BodyModel model = new BodyModel(); List dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetOptionConfirmationAttModel(out fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetOptionConfirmationAttModel(out fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) dataList.AddRange(subsystemDataList); diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationService.cs index a1a8e686..8af92268 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionConfirmationService.cs @@ -58,10 +58,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service noData = true; var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetOptionConfirmationModelFromExcel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetOptionConfirmationModelFromExcel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionTerminationService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionTerminationService.cs index c2f56ed3..f7d30309 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionTerminationService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportOptionTerminationService.cs @@ -53,10 +53,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetOptionTerminationModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetOptionTerminationModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPerformanceGuaranteeAgrmtService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPerformanceGuaranteeAgrmtService.cs index 773ea660..67927dfd 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPerformanceGuaranteeAgrmtService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPerformanceGuaranteeAgrmtService.cs @@ -42,10 +42,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetPerformanceGuaranteeAgrmtModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetPerformanceGuaranteeAgrmtModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPeriodicReportSACService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPeriodicReportSACService.cs index 29828d0f..f56977d9 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPeriodicReportSACService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportPeriodicReportSACService.cs @@ -122,12 +122,12 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service } } // To optimize the code we can use the switch statement instead of if-else statements - switch (_reqInfo.DataSource & SAC_ReportDataSourceEnum.Template) - { - case SAC_ReportDataSourceEnum.Template: - model.PeriodicReportSAC = GetPeriodicReportSACFromExcel(); - break; - } + //switch (_reqInfo.DataSource & SAC_ReportDataSourceEnum.Template) + //{ + // case SAC_ReportDataSourceEnum.Template: + model.PeriodicReportSAC = GetPeriodicReportSACFromExcel(); + // break; + //} model.PeriodicReportSAC.OperationType = _operationType; noData = string.IsNullOrWhiteSpace(model?.PeriodicReportSAC?.MainAgreementAddedThisMonth); diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSupAgrmtService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSupAgrmtService.cs index ee214f6e..a769258f 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSupAgrmtService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSupAgrmtService.cs @@ -43,10 +43,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); var model = new BodyModel(); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetSupAgrmtModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetSupAgrmtModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationAttService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationAttService.cs index 803e97bc..2e1e8b6c 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationAttService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationAttService.cs @@ -49,10 +49,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service SACReportNotesCache = base.InitReportNotes(ReportType); SACReportNotesCache_confirmation = base.InitReportNotes(SuperviseReportTypeEnum.SAC_SwapConfirmation); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetSwapConfirmationAttModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetSwapConfirmationAttModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationService.cs index 7d980eac..f8108ec6 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapConfirmationService.cs @@ -51,10 +51,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service var model = new BodyModel(); SACReportNotesCache = base.InitReportNotes(ReportType); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetSwapConfirmationModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetSwapConfirmationModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapEquityPaymentService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapEquityPaymentService.cs index 07b56618..9fc566b8 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapEquityPaymentService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapEquityPaymentService.cs @@ -50,10 +50,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service SACReportNotesCache = base.InitReportNotes(ReportType); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetSwapEquityPaymentModel(); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetSwapEquityPaymentModel(); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapTerminationService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapTerminationService.cs index 61371ac3..fe9fe4bf 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapTerminationService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportSwapTerminationService.cs @@ -57,10 +57,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service SACReportNotesCache = base.InitReportNotes(ReportType); SACReportNotesCache_confirmation = base.InitReportNotes(SuperviseReportTypeEnum.SAC_OptionConfirmation); var dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetSwapDurationManagementModel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetSwapDurationManagementModel(ref fileList); + //} var subsystemDataList = loadSubsystemDataSource(fileList, AddSubsystemNote); if (subsystemDataList != null && subsystemDataList.Count > 0) { diff --git a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportValuationInformationService.cs b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportValuationInformationService.cs index 298fff9a..042172ad 100644 --- a/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportValuationInformationService.cs +++ b/YLErpDAL/Modules/SuperviseReportModule/SAC/Service/ReportValuationInformationService.cs @@ -69,10 +69,10 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Service fileList = new List(); BodyModel model = new BodyModel(); List dataList = new List(); - if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) - { - dataList = GetValuationInformationModelFromExcel(ref fileList); - } + //if (_reqInfo.DataSource.HasFlag(SAC_ReportDataSourceEnum.Template)) + //{ + dataList = GetValuationInformationModelFromExcel(ref fileList); + //} ReadOnlyCollection useDel = null; if (_operationType == OptFlagsEnum.D && (useDel = ReportStatus.GetCacheInfo($"{DataFlagsEnum.A1018}_D")).Count > 0) { diff --git a/YLErpWeb/Controllers/supervise_reportController.cs b/YLErpWeb/Controllers/supervise_reportController.cs index 56eef48b..d4488948 100644 --- a/YLErpWeb/Controllers/supervise_reportController.cs +++ b/YLErpWeb/Controllers/supervise_reportController.cs @@ -1101,7 +1101,7 @@ namespace YLErp.Web.Controllers { foreach (var item in fileInfos.rows) { - item.ReportReponsePath = System.Text.RegularExpressions.Regex.Replace(item.ReportReponsePath, @"^.+(?=\\App_Docs\\Download)", "").Replace("\\", "/"); + item.ReportReponsePath = System.Text.RegularExpressions.Regex.Replace(item.ReportReponsePath, @"^.+(?=\WApp_Docs\WDownload)", "").Replace("\\", "/"); item.OptName = UserBLL.GetNameById((int?)item.optUserId); } } diff --git a/YLErpWeb/Views/supervise_report/supervise_SAC_Report.cshtml b/YLErpWeb/Views/supervise_report/supervise_SAC_Report.cshtml index 01e9d0e7..8a87010a 100644 --- a/YLErpWeb/Views/supervise_report/supervise_SAC_Report.cshtml +++ b/YLErpWeb/Views/supervise_report/supervise_SAC_Report.cshtml @@ -196,14 +196,14 @@
@Html.SearchDate("ValueDate", "报送日期") - @Html.SearchDate("DataDate", "交易日期") -
+ @* @Html.SearchDate("DataDate", "交易日期") *@ + @* +
*@
@MyControls.Btn("修改编号", "Upload('修改编号','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','/App_Docs/导入模板/修改约定编号导入模板.xlsx')", id: "editCode") @MyControls.Btn("手工上传", "Upload('报送模板','application/zip','/App_Docs/导入模板/Report.zip')") - @MyControls.Btn("附加信息", "showWindow($('#extendInfo'),'收益计算说明',saveReportDesc)") + @* @MyControls.Btn("附加信息", "showWindow($('#extendInfo'),'收益计算说明',saveReportDesc)") *@ @MyControls.Btn("查看附件", "jqGridInit('查看附件')") @MyControls.Btn("生成报告", "generateReportFile()") @MyControls.Btn("查看/发送", "jqGridInit('查看/发送报告')")