Exemple #1
0
        public string ExportExs()
        {
            var result = this.LoadData();

            return(DownloadFileService.Load("procurementPlan.xls", "年度采购计划.xls", new string[] { })
                   .ExcuteXls(result.OrderBy(r => r.Category).ToList(), this.ExportToXls));
        }
Exemple #2
0
        public string ExportDoc()
        {
            var result = this.LoadData();

            return(DownloadFileService.Load("procurementPlanReport.doc", "年度采购计划报告.doc", new string[] { })
                   .ExcuteDoc(result.OrderBy(r => r.Category).ToList(), this.ExportToDoc));
        }
        public string ExportExs()
        {
            var result = stockRepository.GetAllList();
            var dtos   = result.MapTo <List <StockListDto> >();

            return(DownloadFileService.Load("Stock.xls", "库存清单.xls", new string[] { })
                   .ExcuteXls(dtos.OrderBy(r => r.ProductName).ToList(), this.ExportToXls));
        }
Exemple #4
0
        public string ExportExs(DateTime dateFrom, DateTime dataTo)
        {
            var result = LoadData(dateFrom, dataTo);
            var dtos   = result.MapTo <List <HisStockListDto> >();

            return(DownloadFileService.Load("HisStock.xls", "出入库记录.xls", new string[] { })
                   .ExcuteXls(dtos.OrderBy(r => r.ProductName).ToList(), this.ExportToXls));
        }
        public string ExportDoc2(Guid id)
        {
            var bid  = this._bidOpeningManagementRepository.Get(id);
            var plan = this._procurementPlanRepository.Get(bid.PlanId);

            var result = new KeyValue <BidOpeningManagement, ProcurementPlan>(bid, plan);

            return(DownloadFileService.Load("中标通知书模板.doc", $"中标通知书.doc", new string[] { })
                   .ExcuteDoc(result, this.ExportToDoc2));
        }
Exemple #6
0
        public string Print(Guid id)
        {
            var old = this._processManagementRepository.Get(id);

            old.Status = ProcessStatus.NoticePrinted;
            this._processManagementRepository.Update(old);

            return(DownloadFileService.Load("LetterOfAcceptance.doc", "中标通知书.doc", new string[] { })
                   .ExcuteDoc(old, this.ExportToDoc));
        }
        public string ExportDoc3(Guid id)
        {
            var bid  = this._bidOpeningManagementRepository.Get(id);
            var plan = this._procurementPlanRepository.Get(bid.PlanId);
            var bil  = this._biddingManagementRepository.FirstOrDefault(r => r.PlanId == bid.PlanId);

            var result = new KeyValue <BidOpeningManagement, ProcurementPlan, BiddingManagement>(bid, plan, bil);

            return(DownloadFileService.Load("招投标计划模板.docx", $"招投标计划.docx", new string[] { })
                   .ExcuteDoc(result, this.ExportToDoc3));
        }
        public string ExportDoc(Guid id)
        {
            var item    = this._biddingManagementRepository.Get(id);
            var plan    = this._procurementPlanRepository.Get(item.PlanId);
            var details = this._costListRepository.GetAllList(r => r.BiddingManagementId == id);
            var result  = new KeyValue <BiddingManagement, ProcurementPlan, List <CostList> >(item, plan, details);

            if (plan.Category == ProcurementPlanCategory.Xxhcg)
            {
                return(DownloadFileService.Load("信息化采购模板.doc", $"中国人民武装警察部队四川省边防总队{plan.Name}招标文件.doc", new string[] { })
                       .ExcuteDoc(result, this.ExportToDoc));
            }

            if (plan.Category == ProcurementPlanCategory.Zccg)
            {
                return(DownloadFileService.Load("资产采购模板.doc", $"中国人民武装警察部队四川省边防总队{plan.Name}招标文件.doc", new string[] { })
                       .ExcuteDoc(result, this.ExportToDoc));
            }

            //Todo: 处理其他报告类型
            throw new Exception("未处理");
        }
Exemple #9
0
 public string ExportDoc()
 {
     return(DownloadFileService.Load("黑名单函模板.doc", "黑名单函.doc", new string[] { })
            .ExcuteDoc(null, this.ExportToDoc));
 }
 public string ExportDoc1(Guid id)
 {
     return(DownloadFileService.Load("履约保证金抵扣没收通知书模板.docx", "履约保证金抵扣没收通知书.docx", new string[] { })
            .ExcuteDoc(id, this.ExportToDoc1));
 }
        public string Export()
        {
            var codes = this._layerRepository.GetAll()
                        .Where(r => r.Category == DictionaryCategory.Budget_Account)
                        .OrderBy(r => r.LevelCode).Select(r => new { Code = r.LevelCode, r.Name }).ToList();
            var list     = this.GetBudgetPerformances();
            var newCodes = list.Select(r => r.Code).ToList();

            foreach (var item in list)
            {
                GetNewCode(item.Code);
            }


            void GetNewCode(string code)
            {
                if (!newCodes.Contains(code))
                {
                    newCodes.Add(code);
                }
                if (code.Length > 1)
                {
                    var code2 = code.Substring(0, code.Length - 1);
                    GetNewCode(code2);
                }
            }

            newCodes.Sort();
            var result = new List <BudgetPerformanceListDto>
            {
                new BudgetPerformanceListDto
                {
                    Code    = string.Empty,
                    Id      = Guid.NewGuid(),
                    Name    = string.Empty,
                    Total4  = list.Sum(r => r.Total4),
                    Total10 = list.Sum(r => r.Total10),
                    Total12 = list.Sum(r => r.Total12),
                    Total13 = list.Sum(r => r.Total13),
                    Total14 = list.Sum(r => r.Total14),
                    Total16 = list.Sum(r => r.Total16),
                    Total17 = list.Sum(r => r.Total17),
                    Total18 = list.Sum(r => r.Total18),
                    Total19 = list.Sum(r => r.Total19),
                    Total2  = list.Sum(r => r.Total2),
                    Total22 = list.Sum(r => r.Total22),
                    Total24 = list.Sum(r => r.Total24),
                    Total25 = list.Sum(r => r.Total25),
                    Total3  = list.Sum(r => r.Total3),
                    Total5  = list.Sum(r => r.Total5),
                    Total8  = list.Sum(r => r.Total8),
                    Total9  = list.Sum(r => r.Total9)
                }
            };

            foreach (var code in newCodes)
            {
                var item = list.FirstOrDefault(r => r.Code == code);
                if (item == null)
                {
                    var codeName = codes.FirstOrDefault(r => r.Code == code);
                    if (codeName == null)
                    {
                        continue;
                    }

                    item = new BudgetPerformanceListDto
                    {
                        Code   = codeName.Code,
                        Id     = Guid.NewGuid(),
                        Name   = codeName.Name,
                        Total4 = -1234 // 给个特定值,填充行数据时替换成空
                    };
                }

                result.Add(item);
            }

            return(DownloadFileService.Load("budgetOutlay.xls", "预算执行情况.xls", new string[] { })
                   .ExcuteXls(result, this.ExportToXls));
        }
 public string ExportDoc3()
 {
     return(DownloadFileService.Load("年度采购工作情况报告模板.doc", "年度采购工作情况报告.doc", new string[] { })
            .ExcuteDoc(null, this.ExportToDoc3));
 }
 public string ExportDoc2(Guid id)
 {
     return(DownloadFileService.Load("年度采购工作情况报告模板.doc", "年度采购工作情况报告.doc", new string[] { })
            .ExcuteDoc(id.ToString(), this.ExportToDoc2));
 }
 public string ExportDoc1(Guid id)
 {
     return(DownloadFileService.Load("审计结果公示模板.doc", "审计结果公示.doc", new string[] { })
            .ExcuteDoc(id.ToString(), this.ExportToDoc1));
 }