Esempio n. 1
0
        //处理数据
        public void DataHandle()
        {
            var prods = lotList.Where(w => w.Lot_Type == "Production").Select(s => s.ProdSpec_ID).Distinct();

            foreach (var f in prods)
            {
                var cur  = GetChartModelByProd(f, lotList_Prod_Cur);
                var ystd = GetChartModelByProd(f, lotList_Prod_Ystd);
                if (ystd.ChartEntities.Any())
                {
                    CurModels.Add(cur);
                    YstdModels.Add(ystd);
                }
            }
            GetTableEntities(prods);
            var curOtherModels  = new List <ReqRpt028ChartModel>();
            var ystdOtherModels = new List <ReqRpt028ChartModel>();
            var otherProds      = lotList.Where(w => w.Lot_Type != "Production").Select(s => s.ProdSpec_ID).Distinct().Except(prods);

            foreach (var prod in otherProds)
            {
                var cur  = GetChartModelByProd(prod, lotList_Other_Cur);
                var ystd = GetChartModelByProd(prod, lotList_Other_Ystd);
                if (ystd.ChartEntities.Any())
                {
                    curOtherModels.Add(cur);
                    ystdOtherModels.Add(ystd);
                }
            }
            //计算OtherModel
            if (ystdOtherModels.Any())
            {
                var CurOtherModel  = GetOtherModelByOtherModels(curOtherModels);
                var YSTDOtherModel = GetOtherModelByOtherModels(ystdOtherModels);
                CurModels.Add(CurOtherModel);
                YstdModels.Add(YSTDOtherModel);
            }
        }