예제 #1
0
        public string GetExcelNameByTemplateIdAndSpecId(int input, int[] specId, DateTime begin, DateTime endTime)
        {
            DataSearchTableDto dataInfo = GetDataInfoByTemplateIdAndSpecId(input, specId, begin, endTime);
            ExcelOper          exceler  = new ExcelOper();
            string             fileName = exceler.CreateSingleTableSearchExcel(dataInfo);

            if (string.IsNullOrEmpty(fileName))
            {
                return("-1");
            }
            else
            {
                return(fileName);
            }
        }
예제 #2
0
        public string GetExcelNameBySelfCode(int selfTplId, DateTime begin, DateTime endTime)
        {
            var       dataInfo = GetDataInfoBySelfCode(selfTplId, begin, endTime);
            ExcelOper exceler  = new ExcelOper();
            string    fileName = exceler.CreateSelfCodeSearchExcel(dataInfo);

            if (string.IsNullOrEmpty(fileName))
            {
                return("-1");
            }
            else
            {
                return(fileName);
            }
        }
예제 #3
0
        // 下载excel(多个sheet)
        public string GetExcelNameBySpecIdMultiSheet(int input, int[] specId, DateTime begin, DateTime endTime)
        {
            List <MultiTableDataInfoDto> excelData = GetMultiTableDataInfoBySpecId(input, specId, begin, endTime);
            ExcelOper exceler  = new ExcelOper();
            string    fileName = exceler.CreateExcelAndSaveLocalMultiSheet(excelData);

            if (string.IsNullOrEmpty(fileName))
            {
                return("-1");
            }
            else
            {
                return(fileName);
            }
        }