﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenInvestUtil.EngineBase.CostOption;
using OpenInvestUtil.EngineBase.Data;
using OpenInvestUtil.EngineBase.PostStatistics;
using OpenInvestUtil.EngineBase.Strategy;
using OpenInvestUtil.FundEngine;
using OpenInvestUtil.StockEngine.Data;
using OpenInvestUtil.Util;
using OpenInvestUtil.Util.ExcelUtil;

namespace OpenInvestUtil.EngineBase.PostProcess
{



     

    public class InvestPostProcessResult
    {
        public List<InvestPostProcessResultColumnHeader> ColumnsHeader = new List<InvestPostProcessResultColumnHeader>();
        public List<InvestPostProcessResultOneFile> ResultOneFileList = new List<InvestPostProcessResultOneFile>();
        public InvestPostProcessType PostProcessType;
        public int monthsForCostOptionCompare = -1;
        public InvestPostProcessResult(InvestPostProcessType t)
        {
            this.PostProcessType = t; 
        }
        public void AddColumn(InvestPostProcessResultColumnHeader column)
        {
            this.ColumnsHeader.Add(column);
        }

        internal ExcelByOpenXml AddOneExcelFile(string fileName, List<InvestPlan> selectedFundPlan, bool outputEndDateEachRow, List<InvestData> dataQianFuQuan, List<InvestPlan> baseLineInvestPlan, int monthsForCostOptionCompare)
        {
            this.monthsForCostOptionCompare = monthsForCostOptionCompare;
            InvestPostProcessResultOneFile oneFile = new InvestPostProcessResultOneFile(this, fileName, selectedFundPlan, outputEndDateEachRow, dataQianFuQuan , baseLineInvestPlan);
            oneFile.PrepareData();
            ExcelByOpenXml task = new ExcelByOpenXml(oneFile);
            return task;
        }
    }
}
