private ShopReportDto GetShopReportDto(string projectCode, string shopCode)
        {
            ShopReportDto shopReportDto = new ShopReportDto();

            #region 迈巴赫
            if (!checkBox1.Checked)
            {
                DataSet[] dataSetList = service.GetShopReportDto(projectCode, shopCode, false);

                List <ShopCharterScoreInfoDto> shopCharterScoreInfoDtoList = new List <ShopCharterScoreInfoDto>();
                List <ShopSubjectScoreInfoDto> shopSubjectScoreInfoDtoList = new List <ShopSubjectScoreInfoDto>();
                shopReportDto.ShopCharterScoreInfoDtoList = shopCharterScoreInfoDtoList;
                shopReportDto.ShopSubjectScoreInfoDtoList = shopSubjectScoreInfoDtoList;

                #region 经销商基本信息
                DataSet dsShop = dataSetList[0];
                if (dsShop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsShop.Tables[0].Rows.Count; i++)
                    {
                        shopReportDto.ShopCode       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopCode"]);
                        shopReportDto.ShopName       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopName"]);
                        shopReportDto.AreaName       = Convert.ToString(dsShop.Tables[0].Rows[i]["AreaCode"]);
                        shopReportDto.City           = Convert.ToString(dsShop.Tables[0].Rows[i]["City"]);
                        shopReportDto.ShopScore      = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopScore"]);
                        shopReportDto.OrderNO_All    = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_All"]);
                        shopReportDto.OrderNO_Area   = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_SmallArea"]);
                        shopReportDto.SalesContant   = Convert.ToString(dsShop.Tables[0].Rows[i]["SaleContant"]);
                        shopReportDto.SmallAreaScore = Convert.ToString(dsShop.Tables[0].Rows[i]["SmallScore"]);
                        shopReportDto.BigAreaScore   = Convert.ToString(dsShop.Tables[0].Rows[i]["BigScore"]);
                        shopReportDto.AllScore       = Convert.ToString(dsShop.Tables[0].Rows[i]["AllScore"]);
                        shopReportDto.MustLoss       = Convert.ToString(dsShop.Tables[0].Rows[i]["MustLoss"]);
                    }
                }
                #endregion
                #region 章节信息
                DataSet dsCharter = dataSetList[1];
                if (dsCharter.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsCharter.Tables[0].Rows.Count; i++)
                    {
                        ShopCharterScoreInfoDto shopCharterScoreInfo = new ShopCharterScoreInfoDto();
                        shopCharterScoreInfo.CharterCode = Convert.ToString(dsCharter.Tables[0].Rows[i]["CharterCode"]);
                        shopCharterScoreInfo.ShopScore   = Convert.ToString(dsCharter.Tables[0].Rows[i]["ShopCharterScore"]);
                        shopCharterScoreInfo.SmallScore  = Convert.ToString(dsCharter.Tables[0].Rows[i]["SmallCharterScore"]);
                        shopCharterScoreInfo.BigScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["BigCharterScore"]);
                        shopCharterScoreInfo.AllScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["AllCharterScore"]);
                        shopCharterScoreInfoDtoList.Add(shopCharterScoreInfo);
                    }
                }
                #endregion
                #region 体系信息
                DataSet dsSubject = dataSetList[2];
                if (dsSubject.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSubject.Tables[0].Rows.Count; i++)
                    {
                        ShopSubjectScoreInfoDto shopSubjectScoreInfo = new ShopSubjectScoreInfoDto();
                        shopSubjectScoreInfo.SubjectCode = Convert.ToString(dsSubject.Tables[0].Rows[i]["SubjectCode"]);
                        shopSubjectScoreInfo.CheckPoint  = Convert.ToString(dsSubject.Tables[0].Rows[i]["CheckPoint"]);
                        shopSubjectScoreInfo.Score       = Convert.ToString(dsSubject.Tables[0].Rows[i]["Score"]);
                        shopSubjectScoreInfo.LossDesc    = Convert.ToString(dsSubject.Tables[0].Rows[i]["LossDesc"]);
                        shopSubjectScoreInfo.Remark      = Convert.ToString(dsSubject.Tables[0].Rows[i]["Remark"]);
                        shopSubjectScoreInfoDtoList.Add(shopSubjectScoreInfo);
                    }
                }
                #endregion
            }
            #endregion
            #region 奔驰
            else
            {
                DataSet[] dataSetList = service.GetShopReportDto(projectCode, shopCode, true);

                List <ShopCharterScoreInfoDto>          shopCharterScoreInfoDtoList = new List <ShopCharterScoreInfoDto>();
                List <ShopSubjectScoreInfoDto>          shopSubjectScoreInfoDtoList = new List <ShopSubjectScoreInfoDto>();
                List <BDCORRepScoreInfoDto>             bdcOrrepScoreInfoList       = new List <BDCORRepScoreInfoDto>();
                List <ShopSubjectScoreInfo_BDCOrRepDto> bdcShopSubjectScoreInfoList = new List <ShopSubjectScoreInfo_BDCOrRepDto>();

                List <SaleContantScoreInfoDto>        saleContantScoreInfoList           = new List <SaleContantScoreInfoDto>();
                List <SaleContantScoreInfo_AreaDto>   saleContantScoreInfo_AreaList      = new List <SaleContantScoreInfo_AreaDto>();
                List <SaleContantCharterScoreInfoDto> saleContantCharterScoreInfoDtoList = new List <SaleContantCharterScoreInfoDto>();
                List <SaleAreaCharterScoreDto>        saleAreaCharterScoreDtoList        = new List <SaleAreaCharterScoreDto>();
                List <SaleContantSubjectScoreDto>     saleContantSubjectScoreDtoList     = new List <SaleContantSubjectScoreDto>();

                shopReportDto.ShopCharterScoreInfoDtoList = shopCharterScoreInfoDtoList;
                shopReportDto.ShopSubjectScoreInfoDtoList = shopSubjectScoreInfoDtoList;
                shopReportDto.BDCORRepScoreInfoDtoList    = bdcOrrepScoreInfoList;
                shopReportDto.BDCShopSubjectScoreInfoList = bdcShopSubjectScoreInfoList;

                shopReportDto.SaleContantScoreInfoList           = saleContantScoreInfoList;
                shopReportDto.SaleContantScoreInfo_AreaList      = saleContantScoreInfo_AreaList;
                shopReportDto.SaleContantCharterScoreInfoDtoList = saleContantCharterScoreInfoDtoList;
                shopReportDto.SaleAreaCharterScoreDtoList        = saleAreaCharterScoreDtoList;
                shopReportDto.SaleContantSubjectScoreDtoList     = saleContantSubjectScoreDtoList;

                #region 经销商基本信息
                DataSet dsShop = dataSetList[0];
                if (dsShop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsShop.Tables[0].Rows.Count; i++)
                    {
                        shopReportDto.ShopCode       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopCode"]);
                        shopReportDto.ShopName       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopName"]);
                        shopReportDto.AreaName       = Convert.ToString(dsShop.Tables[0].Rows[i]["AreaCode"]);
                        shopReportDto.City           = Convert.ToString(dsShop.Tables[0].Rows[i]["City"]);
                        shopReportDto.ShopScore      = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopScore"]);
                        shopReportDto.OrderNO_All    = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_All"]);
                        shopReportDto.OrderNO_Area   = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_SmallArea"]);
                        shopReportDto.SalesContant   = Convert.ToString(dsShop.Tables[0].Rows[i]["SaleContant"]);
                        shopReportDto.SmallAreaScore = Convert.ToString(dsShop.Tables[0].Rows[i]["SmallScore"]);
                        shopReportDto.BigAreaScore   = Convert.ToString(dsShop.Tables[0].Rows[i]["BigScore"]);
                        shopReportDto.AllScore       = Convert.ToString(dsShop.Tables[0].Rows[i]["AllScore"]);
                        shopReportDto.MustLoss       = Convert.ToString(dsShop.Tables[0].Rows[i]["MustLoss"]);
                    }
                }
                #endregion
                #region 章节信息
                DataSet dsCharter = dataSetList[1];
                if (dsCharter.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsCharter.Tables[0].Rows.Count; i++)
                    {
                        ShopCharterScoreInfoDto shopCharterScoreInfo = new ShopCharterScoreInfoDto();
                        shopCharterScoreInfo.CharterCode = Convert.ToString(dsCharter.Tables[0].Rows[i]["CharterCode"]);
                        shopCharterScoreInfo.ShopScore   = Convert.ToString(dsCharter.Tables[0].Rows[i]["ShopCharterScore"]);
                        shopCharterScoreInfo.SmallScore  = Convert.ToString(dsCharter.Tables[0].Rows[i]["SmallCharterScore"]);
                        shopCharterScoreInfo.BigScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["BigCharterScore"]);
                        shopCharterScoreInfo.AllScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["AllCharterScore"]);
                        shopCharterScoreInfoDtoList.Add(shopCharterScoreInfo);
                    }
                }
                #endregion
                #region 体系信息
                DataSet dsSubject = dataSetList[2];
                if (dsSubject.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSubject.Tables[0].Rows.Count; i++)
                    {
                        ShopSubjectScoreInfoDto shopSubjectScoreInfo = new ShopSubjectScoreInfoDto();
                        shopSubjectScoreInfo.SubjectCode = Convert.ToString(dsSubject.Tables[0].Rows[i]["SubjectCode"]);
                        shopSubjectScoreInfo.CheckPoint  = Convert.ToString(dsSubject.Tables[0].Rows[i]["CheckPoint"]);
                        shopSubjectScoreInfo.Score       = Convert.ToString(dsSubject.Tables[0].Rows[i]["Score"]);
                        shopSubjectScoreInfo.LossDesc    = Convert.ToString(dsSubject.Tables[0].Rows[i]["LossDesc"]);
                        shopSubjectScoreInfo.Remark      = Convert.ToString(dsSubject.Tables[0].Rows[i]["Remark"]);
                        shopSubjectScoreInfoDtoList.Add(shopSubjectScoreInfo);
                    }
                }
                #endregion

                //#region BDC
                //DataSet dsBDCScoreInfo = dataSetList[3];
                //if (dsBDCScoreInfo.Tables[0].Rows.Count > 0)
                //{
                //    for (int i = 0; i < dsBDCScoreInfo.Tables[0].Rows.Count; i++)
                //    {
                //        BDCORRepScoreInfoDto bdcScoreInfo = new BDCORRepScoreInfoDto();
                //        bdcScoreInfo.SaleName = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["SaleName"]);
                //        bdcScoreInfo.SalesType = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["SalesType"]);
                //        bdcScoreInfo.Score = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["Score"]);
                //        bdcScoreInfo.SmallAreaScore = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["SmallScore"]);
                //        bdcScoreInfo.BigAreaScore = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["BigScore"]);
                //        bdcScoreInfo.AllScore = Convert.ToString(dsBDCScoreInfo.Tables[0].Rows[i]["AllScore"]);
                //        bdcOrrepScoreInfoList.Add(bdcScoreInfo);
                //    }
                //}

                //DataSet dsBDCSubjectScoreInfo = dataSetList[4];
                //if (dsBDCSubjectScoreInfo.Tables[0].Rows.Count > 0)
                //{
                //    for (int i = 0; i < dsBDCSubjectScoreInfo.Tables[0].Rows.Count; i++)
                //    {
                //        ShopSubjectScoreInfo_BDCOrRepDto bdcSubjectScoreInfo = new ShopSubjectScoreInfo_BDCOrRepDto();
                //        bdcSubjectScoreInfo.SubjectCode = Convert.ToString(dsBDCSubjectScoreInfo.Tables[0].Rows[i]["SubjectCode"]);
                //        bdcSubjectScoreInfo.Score = Convert.ToString(dsBDCSubjectScoreInfo.Tables[0].Rows[i]["Score"]);
                //        bdcSubjectScoreInfo.LossDesc = Convert.ToString(dsBDCSubjectScoreInfo.Tables[0].Rows[i]["LossDesc"]);
                //        bdcSubjectScoreInfo.Remark = Convert.ToString(dsBDCSubjectScoreInfo.Tables[0].Rows[i]["Remark"]);
                //        bdcShopSubjectScoreInfoList.Add(bdcSubjectScoreInfo);
                //    }
                //}
                //#endregion
                #region 销售顾问
                DataSet dsSaleContantInfo = dataSetList[5];
                if (dsSaleContantInfo.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleContantInfo.Tables[0].Rows.Count; i++)
                    {
                        SaleContantScoreInfoDto saleContantScoreInfo = new SaleContantScoreInfoDto();
                        saleContantScoreInfo.SaleName = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["SaleName"]);
                        saleContantScoreInfo.Score    = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["Score"]);

                        saleContantScoreInfoList.Add(saleContantScoreInfo);
                    }
                }

                DataSet dsSaleContantInfo_Area = dataSetList[6];
                if (dsSaleContantInfo_Area.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleContantInfo_Area.Tables[0].Rows.Count; i++)
                    {
                        SaleContantScoreInfo_AreaDto saleContantScoreInfo_Area = new SaleContantScoreInfo_AreaDto();
                        saleContantScoreInfo_Area.SmallAreaScore = Convert.ToString(dsSaleContantInfo_Area.Tables[0].Rows[i]["SmallScore"]);
                        saleContantScoreInfo_Area.BigAreaScore   = Convert.ToString(dsSaleContantInfo_Area.Tables[0].Rows[i]["BigScore"]);
                        saleContantScoreInfo_Area.AllScore       = Convert.ToString(dsSaleContantInfo_Area.Tables[0].Rows[i]["AllScore"]);

                        saleContantScoreInfo_AreaList.Add(saleContantScoreInfo_Area);
                    }
                }

                DataSet dsSaleContantCharterScore = dataSetList[7];
                if (dsSaleContantCharterScore.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleContantCharterScore.Tables[0].Rows.Count; i++)
                    {
                        SaleContantCharterScoreInfoDto saleContantCharterScoreInfo = new SaleContantCharterScoreInfoDto();
                        saleContantCharterScoreInfo.CharterCode = Convert.ToString(dsSaleContantCharterScore.Tables[0].Rows[i]["CharterCode"]);
                        saleContantCharterScoreInfo.SaleName    = Convert.ToString(dsSaleContantCharterScore.Tables[0].Rows[i]["SaleName"]);
                        saleContantCharterScoreInfo.Score       = Convert.ToString(dsSaleContantCharterScore.Tables[0].Rows[i]["Score"]);

                        saleContantCharterScoreInfoDtoList.Add(saleContantCharterScoreInfo);
                    }
                }

                DataSet dsSaleAreaCharterScore = dataSetList[8];
                if (dsSaleAreaCharterScore.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleAreaCharterScore.Tables[0].Rows.Count; i++)
                    {
                        SaleAreaCharterScoreDto saleAreaCharterScore = new SaleAreaCharterScoreDto();
                        saleAreaCharterScore.CharterCode       = Convert.ToString(dsSaleAreaCharterScore.Tables[0].Rows[i]["CharterCode"]);
                        saleAreaCharterScore.SmallCharterScore = Convert.ToString(dsSaleAreaCharterScore.Tables[0].Rows[i]["SmallCharterScore"]);
                        saleAreaCharterScore.BigCharterScore   = Convert.ToString(dsSaleAreaCharterScore.Tables[0].Rows[i]["BigCharterScore"]);
                        saleAreaCharterScore.AllCharterScore   = Convert.ToString(dsSaleAreaCharterScore.Tables[0].Rows[i]["AllCharterScore"]);

                        saleAreaCharterScoreDtoList.Add(saleAreaCharterScore);
                    }
                }

                DataSet dsSaleSubjectScoreInfo = dataSetList[9];
                if (dsSaleSubjectScoreInfo.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleSubjectScoreInfo.Tables[0].Rows.Count; i++)
                    {
                        SaleContantSubjectScoreDto saleSubjectSore = new SaleContantSubjectScoreDto();
                        saleSubjectSore.SubjectCode = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SubjectCode"]);
                        saleSubjectSore.SaleName    = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SalesConsultant"]);
                        saleSubjectSore.Score       = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Score"]);
                        saleSubjectSore.Remark      = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Remark"]);

                        saleContantSubjectScoreDtoList.Add(saleSubjectSore);
                    }
                }
                #endregion
            }
            #endregion
            return(shopReportDto);
        }
Exemplo n.º 2
0
        private ShopReportDto GetShopReportDto(string projectCode, string shopCode)
        {
            ShopReportDto shopReportDto = new ShopReportDto();

            #region 迈巴赫
            if (!checkBox1.Checked)
            {
                DataSet[] dataSetList = service.GetShopReportDto_Week(projectCode, shopCode, false);

                List <ShopSubjectScoreInfoDto> shopSubjectScoreInfoDtoList = new List <ShopSubjectScoreInfoDto>();
                shopReportDto.ShopSubjectScoreInfoDtoList = shopSubjectScoreInfoDtoList;

                #region 经销商基本信息
                DataSet dsShop = dataSetList[0];
                if (dsShop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsShop.Tables[0].Rows.Count; i++)
                    {
                        shopReportDto.ShopCode = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopCode"]);
                        shopReportDto.ShopName = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopName"]);
                        shopReportDto.AreaName = Convert.ToString(dsShop.Tables[0].Rows[i]["AreaCode"]);
                        shopReportDto.City     = Convert.ToString(dsShop.Tables[0].Rows[i]["City"]);
                    }
                }
                #endregion

                #region 体系信息
                DataSet dsSubject = dataSetList[1];
                if (dsSubject.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSubject.Tables[0].Rows.Count; i++)
                    {
                        ShopSubjectScoreInfoDto shopSubjectScoreInfo = new ShopSubjectScoreInfoDto();
                        shopSubjectScoreInfo.SubjectCode = Convert.ToString(dsSubject.Tables[0].Rows[i]["SubjectCode"]);
                        shopSubjectScoreInfo.CheckPoint  = Convert.ToString(dsSubject.Tables[0].Rows[i]["CheckPoint"]);
                        shopSubjectScoreInfo.Score       = Convert.ToString(dsSubject.Tables[0].Rows[i]["Score"]);
                        shopSubjectScoreInfo.LossDesc    = Convert.ToString(dsSubject.Tables[0].Rows[i]["LossDesc"]);
                        shopSubjectScoreInfo.Remark      = Convert.ToString(dsSubject.Tables[0].Rows[i]["Remark"]);
                        shopSubjectScoreInfoDtoList.Add(shopSubjectScoreInfo);
                    }
                }
                #endregion
            }
            #endregion
            #region 奔驰
            else
            {
                DataSet[] dataSetList = service.GetShopReportDto_Week(projectCode, shopCode, true);
                List <ShopSubjectScoreInfoDto>    shopSubjectScoreInfoDtoList    = new List <ShopSubjectScoreInfoDto>();
                List <SaleContantScoreInfoDto>    saleContantScoreInfoList       = new List <SaleContantScoreInfoDto>();
                List <SaleContantSubjectScoreDto> saleContantSubjectScoreDtoList = new List <SaleContantSubjectScoreDto>();
                shopReportDto.SaleContantScoreInfoList = saleContantScoreInfoList;
                //shopReportDto.ShopSubjectScoreInfoDtoList = shopSubjectScoreInfoDtoList;
                shopReportDto.SaleContantSubjectScoreDtoList = saleContantSubjectScoreDtoList;
                shopReportDto.ShopSubjectScoreInfoDtoList    = shopSubjectScoreInfoDtoList;
                #region 经销商基本信息
                DataSet dsShop = dataSetList[0];
                if (dsShop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsShop.Tables[0].Rows.Count; i++)
                    {
                        shopReportDto.ShopCode = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopCode"]);
                        shopReportDto.ShopName = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopName"]);
                        shopReportDto.AreaName = Convert.ToString(dsShop.Tables[0].Rows[i]["AreaCode"]);
                        shopReportDto.City     = Convert.ToString(dsShop.Tables[0].Rows[i]["City"]);
                    }
                }
                #endregion
                #region 体系信息
                DataSet dsSubject = dataSetList[1];
                if (dsSubject.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSubject.Tables[0].Rows.Count; i++)
                    {
                        ShopSubjectScoreInfoDto shopSubjectScoreInfo = new ShopSubjectScoreInfoDto();
                        shopSubjectScoreInfo.SubjectCode = Convert.ToString(dsSubject.Tables[0].Rows[i]["SubjectCode"]);
                        shopSubjectScoreInfo.CheckPoint  = Convert.ToString(dsSubject.Tables[0].Rows[i]["CheckPoint"]);
                        shopSubjectScoreInfo.Score       = Convert.ToString(dsSubject.Tables[0].Rows[i]["Score"]);
                        shopSubjectScoreInfo.LossDesc    = Convert.ToString(dsSubject.Tables[0].Rows[i]["LossDesc"]);
                        shopSubjectScoreInfo.Remark      = Convert.ToString(dsSubject.Tables[0].Rows[i]["Remark"]);
                        shopSubjectScoreInfoDtoList.Add(shopSubjectScoreInfo);
                    }
                }
                #endregion
                #region 销售顾问

                DataSet dsSaleContantInfo = dataSetList[2];
                if (dsSaleContantInfo.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleContantInfo.Tables[0].Rows.Count; i++)
                    {
                        SaleContantScoreInfoDto saleContantScoreInfo = new SaleContantScoreInfoDto();
                        saleContantScoreInfo.SaleName = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["SaleName"]);
                        //saleContantScoreInfo.Score = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["Score"]);

                        saleContantScoreInfoList.Add(saleContantScoreInfo);
                    }
                }
                DataSet dsSaleSubjectScoreInfo = dataSetList[3];
                if (dsSaleSubjectScoreInfo.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsSaleSubjectScoreInfo.Tables[0].Rows.Count; i++)
                    {
                        SaleContantSubjectScoreDto saleSubjectSore = new SaleContantSubjectScoreDto();
                        saleSubjectSore.SubjectCode = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SubjectCode"]);
                        saleSubjectSore.SaleName    = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SalesConsultant"]);
                        saleSubjectSore.Score       = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Score"]);
                        saleSubjectSore.Remark      = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Remark"]);

                        saleContantSubjectScoreDtoList.Add(saleSubjectSore);
                    }
                }
                #endregion
            }
            #endregion
            return(shopReportDto);
        }
Exemplo n.º 3
0
        private ShopReportDto GetShopReportDto(string projectCode, string shopCode)
        {
            DataSet[]     dataSetList   = service.GetShopReportDto(projectCode, shopCode);
            ShopReportDto shopReportDto = new ShopReportDto();
            List <ShopCharterScoreInfoDto> shopCharterScoreInfoDtoList = new List <ShopCharterScoreInfoDto>();
            List <ShopSubjectScoreInfoDto> shopSubjectScoreInfoDtoList = new List <ShopSubjectScoreInfoDto>();

            List <SaleContantScoreInfoDto>    saleContantScoreInfoList       = new List <SaleContantScoreInfoDto>();
            List <SaleContantSubjectScoreDto> saleContantSubjectScoreDtoList = new List <SaleContantSubjectScoreDto>();

            shopReportDto.SaleContantScoreInfoList       = saleContantScoreInfoList;
            shopReportDto.SaleContantSubjectScoreDtoList = saleContantSubjectScoreDtoList;
            shopReportDto.ShopCharterScoreInfoDtoList    = shopCharterScoreInfoDtoList;
            shopReportDto.ShopSubjectScoreInfoDtoList    = shopSubjectScoreInfoDtoList;

            #region 经销商基本信息
            DataSet dsShop = dataSetList[0];
            if (dsShop.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsShop.Tables[0].Rows.Count; i++)
                {
                    shopReportDto.ShopCode       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopCode"]);
                    shopReportDto.ShopName       = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopName"]);
                    shopReportDto.AreaName       = Convert.ToString(dsShop.Tables[0].Rows[i]["AreaCode"]);
                    shopReportDto.City           = Convert.ToString(dsShop.Tables[0].Rows[i]["City"]);
                    shopReportDto.ShopScore      = Convert.ToString(dsShop.Tables[0].Rows[i]["ShopScore"]);
                    shopReportDto.OrderNO_All    = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_All"]);
                    shopReportDto.OrderNO_Area   = Convert.ToString(dsShop.Tables[0].Rows[i]["OrderNO_SmallArea"]);
                    shopReportDto.SalesContant   = Convert.ToString(dsShop.Tables[0].Rows[i]["SaleContant"]);
                    shopReportDto.SmallAreaScore = Convert.ToString(dsShop.Tables[0].Rows[i]["SmallScore"]);
                    shopReportDto.BigAreaScore   = Convert.ToString(dsShop.Tables[0].Rows[i]["BigScore"]);
                    shopReportDto.AllScore       = Convert.ToString(dsShop.Tables[0].Rows[i]["AllScore"]);
                    shopReportDto.MustLoss       = Convert.ToString(dsShop.Tables[0].Rows[i]["MustLoss"]);
                }
            }
            #endregion
            #region 章节信息
            DataSet dsCharter = dataSetList[1];
            if (dsCharter.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsCharter.Tables[0].Rows.Count; i++)
                {
                    ShopCharterScoreInfoDto shopCharterScoreInfo = new ShopCharterScoreInfoDto();
                    shopCharterScoreInfo.CharterCode = Convert.ToString(dsCharter.Tables[0].Rows[i]["CharterCode"]);
                    shopCharterScoreInfo.ShopScore   = Convert.ToString(dsCharter.Tables[0].Rows[i]["ShopCharterScore"]);
                    shopCharterScoreInfo.SmallScore  = Convert.ToString(dsCharter.Tables[0].Rows[i]["SmallCharterScore"]);
                    shopCharterScoreInfo.BigScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["BigCharterScore"]);
                    shopCharterScoreInfo.AllScore    = Convert.ToString(dsCharter.Tables[0].Rows[i]["AllCharterScore"]);
                    shopCharterScoreInfoDtoList.Add(shopCharterScoreInfo);
                }
            }
            #endregion
            #region 体系信息
            DataSet dsSubject = dataSetList[2];
            if (dsSubject.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsSubject.Tables[0].Rows.Count; i++)
                {
                    ShopSubjectScoreInfoDto shopSubjectScoreInfo = new ShopSubjectScoreInfoDto();
                    shopSubjectScoreInfo.SubjectCode = Convert.ToString(dsSubject.Tables[0].Rows[i]["SubjectCode"]);
                    shopSubjectScoreInfo.CheckPoint  = Convert.ToString(dsSubject.Tables[0].Rows[i]["CheckPoint"]);
                    shopSubjectScoreInfo.Score       = Convert.ToString(dsSubject.Tables[0].Rows[i]["Score"]);
                    shopSubjectScoreInfo.LossDesc    = Convert.ToString(dsSubject.Tables[0].Rows[i]["LossDesc"]);
                    shopSubjectScoreInfo.Remark      = Convert.ToString(dsSubject.Tables[0].Rows[i]["Remark"]);
                    shopSubjectScoreInfoDtoList.Add(shopSubjectScoreInfo);
                }
            }
            #endregion
            #region 销售顾问

            DataSet dsSaleContantInfo = dataSetList[3];
            if (dsSaleContantInfo.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsSaleContantInfo.Tables[0].Rows.Count; i++)
                {
                    SaleContantScoreInfoDto saleContantScoreInfo = new SaleContantScoreInfoDto();
                    saleContantScoreInfo.SaleName = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["SaleName"]);
                    //saleContantScoreInfo.Score = Convert.ToString(dsSaleContantInfo.Tables[0].Rows[i]["Score"]);

                    saleContantScoreInfoList.Add(saleContantScoreInfo);
                }
            }
            DataSet dsSaleSubjectScoreInfo = dataSetList[4];
            if (dsSaleSubjectScoreInfo.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsSaleSubjectScoreInfo.Tables[0].Rows.Count; i++)
                {
                    SaleContantSubjectScoreDto saleSubjectSore = new SaleContantSubjectScoreDto();
                    saleSubjectSore.SubjectCode = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SubjectCode"]);
                    saleSubjectSore.SaleName    = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["SalesConsultant"]);
                    saleSubjectSore.Score       = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Score"]);
                    saleSubjectSore.Remark      = Convert.ToString(dsSaleSubjectScoreInfo.Tables[0].Rows[i]["Remark"]);

                    saleContantSubjectScoreDtoList.Add(saleSubjectSore);
                }
            }
            #endregion
            return(shopReportDto);
        }