Example #1
0
        private bool CurrentProjectRegionSupportsHeatExchanger()
        {
            bool hasHeatExchangers = false;

            var thisProject = JCHVRF.Model.Project.CurrentProject;

            if (thisProject != null)
            {
                //判断是否存在Exchanger 类型
                // if (!thisProject.RegionCode.StartsWith("EU"))
                // {
                //DataTable dt = indoor.GetExchangerTypeList(_mainRegion);
                _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.RegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode);
                DataTable dt = _indoorBll.GetExchangerTypeList();
                if (dt != null)
                {
                    hasHeatExchangers = dt.Rows.Count > 0;
                }
                //  }
            }
            return(hasHeatExchangers);
        }
Example #2
0
        private void BatchCalculateEstValue(List <IDUEquipmentModel> IDUEquipmentModelList, ref List <IDUEquipmentModel> objEquipmentList)
        {
            if (SelectedFanSpeed != -1)
            {
                _fanSpeedLevel = SelectedFanSpeed - 1;
            }
            double outdoorCoolingDB = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingDB;
            double outdoorHeatingWB = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingWB;
            double outdoorCoolingIW = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingIW;
            double outdoorHeatingIW = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingIW;
            double wb_c             = Unit.ConvertToSource(Convert.ToDouble(LblWbCool), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE);
            double db_h             = Unit.ConvertToSource(Convert.ToDouble(LblDBHeat), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE);
            double fa             = 0;
            double airflow        = 0;
            double staticPressure = 0;

            for (int i = 0; i < IDUEquipmentModelList.Count; ++i)
            {
                Indoor inItem = indoorBLL.GetItem(IDUEquipmentModelList[i].ModelFull, null, IDUEquipmentModelList[i].ProductType, null);
                if (inItem == null)
                {
                    continue;
                }
                double est_cool = 0;
                double est_heat = 0;
                double est_sh   = 0;
                string type     = inItem.Type;
                if (type.Contains("YDCF") || (type.Contains("Fresh Air") && JCHVRF.Model.Project.CurrentProject.SubRegionCode != "LA_BR") || type.Contains("Ventilation"))
                {
                    est_cool = inItem.CoolingCapacity;
                    est_heat = inItem.HeatingCapacity;
                    est_sh   = inItem.SensibleHeat;
                }
                else if (type.Contains("Hydro Free") || type == "DX-Interface")
                {
                    est_cool = inItem.CoolingCapacity;
                    est_heat = inItem.HeatingCapacity;
                    est_sh   = 0d;
                }
                else
                {
                    double db_c = inItem.ProductType.Contains("Water Source") ? outdoorCoolingIW : outdoorCoolingDB;
                    double wb_h = inItem.ProductType.Contains("Water Source") ? outdoorHeatingIW : outdoorHeatingWB;
                    est_cool = indoorBLL.CalIndoorEstCapacity(inItem, db_c, wb_c, false);
                    double shf = inItem.GetSHF(_fanSpeedLevel);
                    est_sh = est_cool * shf;
                    if (!inItem.ProductType.Contains(", CO"))
                    {
                        est_heat = indoorBLL.CalIndoorEstCapacity(inItem, wb_h, db_h, true);
                    }
                }
                if (IndoorBLL.IsFreshAirUnit(type))
                {
                    fa = inItem.AirFlow;
                }
                else if (!type.Contains("Hydro Free") && type != "DX-Interface")
                {
                    airflow = inItem.GetAirFlow(_fanSpeedLevel);
                    if (type.Contains("Ducted") || type.Contains("Total Heat Exchanger"))
                    {
                        staticPressure = inItem.GetStaticPressure();
                    }
                }
                objEquipmentList.Add(new IDUEquipmentModel
                {
                    Model        = IDUEquipmentModelList[i].Model,
                    ModelFull    = IDUEquipmentModelList[i].ModelFull,
                    ModelYork    = IDUEquipmentModelList[i].ModelYork,
                    ModelHitachi = IDUEquipmentModelList[i].ModelHitachi,
                    CoolCapacity = Math.Round(est_cool, 1),
                    SensibleHeat = Math.Round(est_sh, 1),
                    HeatCapacity = Math.Round(est_heat, 1),
                    AirFlow      = Math.Round(airflow, 1, MidpointRounding.AwayFromZero),
                    Type         = IDUEquipmentModelList[i].Type,
                    ESP          = staticPressure
                });
            }
        }
Example #3
0
        public IDUEquipmentPropertiesViewModel(JCHVRF.Model.Project projectLegacy, RoomIndoor roomIndoor)
        {
            try
            {
                this.ProjectLegacy = projectLegacy;
                pbll = new ProjectBLL(this.ProjectLegacy);

                this.indoorBLL = new IndoorBLL(ProjectLegacy.SubRegionCode, ProjectLegacy.RegionCode, ProjectLegacy.BrandCode);
                // Bind Equipment Pre Selected Data To View Model
                if (roomIndoor != null)
                {
                    this.EquipmentName = roomIndoor.IndoorName;
                    this.SelectedFloor = roomIndoor.RoomName;
                }
                // End Bind Equipment Pre Selected Data To View Model
                GetFloorList();


                BindFanSpeed();
                BindToControl();


                // Bind Equipment Pre Selected Data To View Model
                //if (this.SelectedFanSpeed != null)
                //{
                if (roomIndoor != null)
                {
                    this.SelectedFanSpeed = roomIndoor.FanSpeedLevel;
                    if (ProjectBLL.IsSupportedUniversalSelection(JCHVRF.Model.Project.GetProjectInstance))
                    {
                        GetTypeLookUpData(roomIndoor.DisplayImageName);
                    }
                    else
                    {
                        GetTypeLookUpDataRegionWise(roomIndoor.DisplayImageName);
                    }
                }// roomIndoor.FanSpeedLevel == 1 ? "Max" : roomIndoor.FanSpeedLevel == 0 ? "High2" : roomIndoor.FanSpeedLevel == 1 ? "High" : roomIndoor.FanSpeedLevel == 2 ? "Medium" : roomIndoor.FanSpeedLevel == 3 ? "Low" : "";
                 // }
                 // End Bind Equipment Pre Selected Data To View Model



                // Bind Equipment Pre Selected Data To View Model
                if (roomIndoor != null)
                {
                    if (roomIndoor.IndoorItem.DisplayName != null)
                    {
                        this.SelectedType = roomIndoor.IndoorItem.DisplayName;
                    }
                    // End Bind Equipment Pre Selected Data To View Model
                    // GetSelectedIDUAccessories();


                    //this.AddAccessoryViewModel = new AddAccessoriesTemplateViewModel(this.ProjectLegacy, roomIndoor);
                    OnPropertyChanged(AddAccessoryViewModel.Accessories.ToString());
                }


                //SetEquipmentProperties();
                //To Select

                if (roomIndoor != null && roomIndoor.IndoorItem != null)
                {
                    // this.SelectedType = roomIndoor.IndoorItem.Type;
                }

                // Bind Equipment for Pre Selected Data
                if (roomIndoor != null)
                {
                    if (roomIndoor.IndoorItem != null && roomIndoor.IndoorItem.Model != null)
                    {
                        this.SelectedModel = roomIndoor.IndoorItem.Model;
                        //this.SelectedIndexModel = this.ListModel.FindIndex(a => a.Value == roomIndoor.IndoorItem.Model);
                    }
                    else
                    {
                        if (ListModel != null && ListModel.Count > 0)
                        {
                            this.SelectedModel = ListModel.FirstOrDefault().Value;
                        }
                    }
                }

                if (roomIndoor != null && roomIndoor.IndoorItem != null && roomIndoor.IndoorItem.ListAccessory != null)
                {
                    var itemIndex = this.ProjectLegacy.RoomIndoorList.FindIndex(x => x.IndoorNO == roomIndoor.IndoorNO);
                    var item      = this.ProjectLegacy.RoomIndoorList.ElementAt(itemIndex);
                    this.ProjectLegacy.RoomIndoorList.RemoveAt(itemIndex);
                    item.ListAccessory = roomIndoor.IndoorItem.ListAccessory;
                    this.ProjectLegacy.RoomIndoorList.Insert(itemIndex, item);
                }
                // this.SelectedFanSpeed = 0;
                // End Bind Equipment Pre Selected Data To View Model
            }
            catch (Exception ex)
            {
                int?id = JCHVRF.Model.Project.GetProjectInstance?.projectID;
                Logger.LogProjectError(id, ex);
            }
        }
Example #4
0
        public static bool IsIndoorIsValidForODUSeries(JCHVRF.Model.NextGen.SystemVRF CurrentSys)
        {
            var listRISelected = JCHVRF.Model.Project.GetProjectInstance.RoomIndoorList.Where(ri => ri.SystemID == (((JCHVRF.Model.SystemBase)CurrentSys).Id)).ToList();

            if (ProjectBLL.IsSupportedUniversalSelection(JCHVRF.Model.Project.GetProjectInstance))
            {
                MyProductTypeBLL productTypeBll = new MyProductTypeBLL();
                DataTable        typeDt         = productTypeBll.GetIduTypeBySeries(JCHVRF.Model.Project.GetProjectInstance.BrandCode, JCHVRF.Model.Project.GetProjectInstance.SubRegionCode, CurrentSys.Series);
                if (typeDt != null && typeDt.Rows.Count > 0)
                {
                    foreach (var idu in listRISelected)
                    {
                        if (idu.IndoorItem != null)
                        {
                            if (!typeDt.AsEnumerable().Any(row => row["IDU_UnitType"].ToString() == idu.IndoorItem.Type))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }
            else
            {
                IndoorBLL bll     = new IndoorBLL(JCHVRF.Model.Project.GetProjectInstance.SubRegionCode, JCHVRF.Model.Project.GetProjectInstance.BrandCode);
                string    colName = "UnitType";
                DataTable typeDt  = bll.GetIndoorFacCodeList(CurrentSys.ProductType);
                foreach (DataRow dr in typeDt.Rows)
                {
                    if (System.Convert.ToInt32(dr["FactoryCount"].ToString()) > 1)
                    {
                        dr[colName] = AlterUnitTypeBasedOnFactoryCode(dr["FactoryCode"].ToString(), Convert.ToString(dr[colName]));
                    }
                }
                var dv = new DataView(typeDt);
                if (CurrentSys.ProductType == "Comm. Tier 2, HP")
                {
                    if (CurrentSys.Series == "Commercial VRF HP, FSN6Q" || CurrentSys.Series == "Commercial VRF HP, JVOH-Q")
                    {
                        dv.RowFilter = "UnitType not in ('High Static Ducted-HAPE','Medium Static Ducted-HAPE','Low Static Ducted-HAPE','High Static Ducted-SMZ','Medium Static Ducted-SMZ','Four Way Cassette-SMZ')";
                    }
                    else
                    {
                        dv.RowFilter = "UnitType <>'Four Way Cassette-HAPQ'";
                    }
                }
                typeDt = dv.Table;
                if (typeDt != null && typeDt.Rows.Count > 0)
                {
                    foreach (var idu in listRISelected)
                    {
                        if (idu.IndoorItem != null)
                        {
                            var factoryCode = idu.IndoorItem.GetFactoryCode();
                            var type        = AlterUnitTypeBasedOnFactoryCode(factoryCode, idu.IndoorItem.Type);


                            if (!typeDt.AsEnumerable().Any(row => (row["UnitType"].ToString() == idu.IndoorItem.Type ||
                                                                   (System.Convert.ToInt32(row["FactoryCount"].ToString()) > 1 && row["UnitType"].ToString() == type))))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }
            return(true);
        }
        private void CreateHeatExchanger()
        {
            string newRoomName     = "";
            string newRoomId       = "";
            double newRoomFreshAir = 0;
            string powerSelected   = "";

            double airFlow = 0;
            double ESP     = 0;

            Indoor inItem        = null;
            var    fanspeedLevel = (int)_sfanspeed;

            if (UserSelSeries != null && SelectedPower != null)
            {
                _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode);
                DataTable dt = _indoorBll.GetExchnagerListStd(UserSelSeries, "", SelectedPower.Code);
                dt.DefaultView.Sort = "AirFlow";

                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.Rows[0];
                    //DataRow dr = GetAutoModel(dt.DefaultView.ToTable().Rows);
                    _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode);
                    string ProductType = string.Empty;
                    if (thisProject.RegionCode == "EU_W" || thisProject.RegionCode == "EU_S" || thisProject.RegionCode == "EU_E")
                    {
                        ProductType = "Universal IDU";
                    }
                    else
                    {
                        ProductType = UserSelSeries;
                    }

                    inItem = _indoorBll.GetItem(dr["ModelFull"].ToString(), UserSelSeries, ProductType, UserSelSeries);
                    if (inItem != null)
                    {
                        inItem.Series = UserSelSeries;
                        //Required field for Report
                        inItem.DisplayName = UserSelSeries;
                    }
                }
            }
            if (SelectedRoom != null)
            {
                newRoomName                 = SelectedRoom.Name;
                newRoomId                   = SelectedRoom.Id;
                newRoomFreshAir             = SelectedRoom.FreshAir;
                SelectedRoom.FreshAir       = FreshAir;
                SelectedRoom.StaticPressure = ESPVal;
                SelectedRoom.Area           = Area;
                SelectedRoom.PeopleNumber   = NoOfPeople;
            }
            else
            {
                newRoomName     = "";
                newRoomId       = null;
                newRoomFreshAir = FreshAir;
            }
            if (SelectedPower != null)
            {
                powerSelected = SelectedPower.SelectedValues;
            }

            airFlow = newRoomFreshAir;
            ESP     = ESPVal;

            Project.CurrentProject.ExchangerList.Add(new RoomIndoor
            {
                IndoorName         = UnitName,
                IndoorItem         = inItem,
                Power              = powerSelected,
                FanSpeedLevel      = fanspeedLevel,
                RqFreshAir         = airFlow,
                RqAirflow          = airFlow,
                Area               = Area,
                RqStaticPressure   = ESP,
                NumberOfPeople     = NoOfPeople,
                DBCooling          = outdoorCoolingDB,
                WBCooling          = outdoorCoolingWB,
                DBHeating          = outdoorHeatingDB,
                RHCooling          = outdoorHeatingRH,
                RoomName           = newRoomName,
                RoomID             = newRoomId,
                SelectedFloor      = _sIndex,
                SystemID           = WorkFlowContext.NewSystem.Id,
                IsExchanger        = true,
                HECanvFreshAirUnit = SystemSetting.UserSetting.unitsSetting.settingAIRFLOW,
                HECanvAreaUnit     = SystemSetting.UserSetting.unitsSetting.settingAREA,
                HECanvTempUnit     = SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE
            });
        }
Example #6
0
        /// <summary>
        /// 重新选型室内机
        /// </summary>
        /// <param name="roomIndoorList"></param>
        /// <param name="Project"></param>
        /// <param name="outDBCool"></param>
        /// <param name="outWBHeat"></param>
        /// <param name="stateList"></param>
        /// <returns></returns>
        public List <RoomIndoor> DoRoomIndoorReselection(List <RoomIndoor> roomIndoorList, Project Project, double outDBCool, double outWBHeat, out List <string> stateList)
        {
            List <RoomIndoor> newRoomindoorList = new List <RoomIndoor>();

            stateList     = new List <string>();
            thisProject   = Project;
            BrandCode     = thisProject.BrandCode;
            IsCoolingMode = thisProject.IsCoolingModeEffective;
            IsHeatingMode = thisProject.IsHeatingModeEffective;
            var floorlist = thisProject.FloorList;

            bll = new IndoorBLL(thisProject.SubRegionCode, thisProject.BrandCode);
            //var dicSeries = CommonOperation.GetProductSeriesKeyValue();
            //List<RoomIndoor> list = new List<RoomIndoor>();
            //var unitlist = CommonOperation.GetUnitTypeList();
            for (int i = 0; i < roomIndoorList.Count; i++)
            {
                var roomIndoor = roomIndoorList[i];
                if (roomIndoor.IsFreshAirArea == true)
                {
                    newRoomindoorList.Add(roomIndoor);
                    //stateList.Add(roomIndoor.IndoorNO + ":Indoor_NoChange");
                    stateList.Add(roomIndoor.IndoorNO + "::Indoor_NoChange"); // 解决纯新风机 选型更改温度,选型报错 on 20180903 by xyj
                    continue;
                }
                if (roomIndoor.IsAuto == true)
                {
                    //重新选型并计算估算容量
                    string region          = roomIndoor.IndoorItem.RegionCode;
                    string unitType        = roomIndoor.IndoorItem.Type;
                    string productType     = roomIndoor.IndoorItem.ProductType;
                    double CoolCapacity    = roomIndoor.RqCoolingCapacity;
                    double CoolSensible    = roomIndoor.RqSensibleHeat;
                    double CoolAirFlow     = roomIndoor.RqAirflow;
                    double HeatCapacity    = roomIndoor.RqHeatingCapacity;
                    double FreshAir        = roomIndoor.RqFreshAir;
                    double indoorCoolingWB = roomIndoor.WBCooling;
                    double indoorHeatingDB = roomIndoor.DBHeating;
                    string Series          = roomIndoor.IndoorItem.Series;

                    if (!string.IsNullOrEmpty(roomIndoor.RoomID))
                    {
                        CoolCapacity = 0;
                        CoolSensible = 0;
                        CoolAirFlow  = 0;
                        HeatCapacity = 0;
                        FreshAir     = 0;
                        for (int j = 0; j < floorlist.Count; j++)
                        {
                            var roomlist = floorlist[j].RoomList;
                            var room     = roomlist.Find(p => p.Id == roomIndoor.RoomID);
                            if (room != null)
                            {
                                CoolCapacity = room.RqCapacityCool;
                                HeatCapacity = room.RqCapacityHeat;
                                CoolAirFlow  = room.AirFlow;
                                CoolSensible = room.SensibleHeat;
                                FreshAir     = room.FreshAir;
                                break;
                            }
                        }
                    }

                    rq_cool      = CoolCapacity;
                    rq_airflow   = CoolAirFlow;
                    rq_heat      = HeatCapacity;
                    rq_sensiable = CoolSensible;
                    rq_fa        = FreshAir;
                    RegCode      = region;
                    rq_wb_c      = indoorCoolingWB;
                    rq_db_h      = indoorHeatingDB;
                    rq_wb_h      = outWBHeat;
                    rq_db_c      = outDBCool;
                    _productType = roomIndoor.IndoorItem.ProductType;
                    _series      = roomIndoor.IndoorItem.Series;
                    //_shf_mode = roomIndoor.SHF_Mode;
                    _fanSpeedLevel = roomIndoor.FanSpeedLevel;
                    _unitType      = roomIndoor.IndoorItem.Type;
                    //var redata = CommonOperation.GetIndoorOrOutdoorList(dic);
                    //需要将type进行处理,获取厂名 20161118 by Yunxiao Lin
                    string type        = roomIndoor.IndoorItem.Type;
                    int    m           = type.IndexOf("-");
                    string factoryName = "";
                    if (m > 0)
                    {
                        if (thisProject.RegionCode != "EU_W" && thisProject.RegionCode != "EU_S" && thisProject.RegionCode != "EU_E")//EU区域的 暂时不取厂名 20180302 by xyj
                        {
                            factoryName = type.Substring(m + 1, type.Length - m - 1);
                            type        = type.Substring(0, m);
                        }
                    }
                    DataTable dtIndoorList = bll.GetIndoorListStd(type, roomIndoor.IndoorItem.ProductType, factoryName);
                    dtIndoorList.DefaultView.Sort = "CoolCapacity";
                    //List<IndoorTable> listIndoor = Common.Constant.JSON2Object<List<IndoorTable>>(redata["Data"]);
                    if (dtIndoorList.Rows.Count == 0)
                    {
                        stateList.Add(roomIndoor.IndoorNO + "::IND_NOTMATCH");
                        continue;
                    }
                    DataRow drMax = dtIndoorList.Rows[dtIndoorList.Rows.Count - 1];
                    if (IsCoolingMode && Convert.ToDecimal(drMax["CoolCapacity"]) < Convert.ToDecimal(CoolCapacity))
                    {
                        stateList.Add(roomIndoor.IndoorNO + "::IND_NOTMATCH");
                        continue;
                    }
                    if (IsHeatingMode && !roomIndoor.IndoorItem.ProductType.Contains(", CO") && Convert.ToDecimal(drMax["HeatCapacity"]) < Convert.ToDecimal(HeatCapacity))
                    {
                        stateList.Add(roomIndoor.IndoorNO + "::IND_NOTMATCH");
                        continue;
                    }
                    RoomIndoor newRoomIndoor = null;
                    for (int j = 0; j < dtIndoorList.Rows.Count; j++)
                    {
                        bool    isPass = true;
                        DataRow dr     = dtIndoorList.Rows[j];
                        if (IsCoolingMode && Convert.ToDecimal(dr["CoolCapacity"]) < Convert.ToDecimal(CoolCapacity) || Convert.ToDecimal(dr["SensibleHeat"]) < Convert.ToDecimal(CoolSensible) || Convert.ToDecimal(dr["AirFlow"]) < Convert.ToDecimal(CoolAirFlow))
                        {
                            isPass = false;
                        }

                        if (IsHeatingMode & !roomIndoor.IndoorItem.ProductType.Contains(", CO") && Convert.ToDecimal(dr["HeatCapacity"]) < Convert.ToDecimal(HeatCapacity))
                        {
                            isPass = false;
                        }
                        //ent.indoor = listIndoor[j];

                        if (!isPass || !autoCompare(_unitType, dr))
                        {
                            continue;
                        }

                        if (dr["ModelFull"].ToString() == roomIndoor.IndoorItem.ModelFull)
                        {
                            newRoomIndoor = roomIndoor;
                            stateList.Add(roomIndoor.IndoorNO + "::Indoor_NoChange");
                        }
                        else
                        {
                            //室内机型号变更,去除所有共享绑定关系 add by axj 20180503
                            bool isBinding = false;
                            thisProject.RoomIndoorList.ForEach((ind) =>
                            {
                                if (ind.IndoorNO != roomIndoor.IndoorNO)
                                {
                                    var grp = ind.IndoorItemGroup;
                                    if (grp != null)
                                    {
                                        var item = grp.Find((p) => p.IndoorNO == roomIndoor.IndoorNO);
                                        if (item != null)
                                        {
                                            isBinding = true;
                                            grp.Remove(item);
                                        }
                                    }
                                }
                            });
                            newRoomIndoor = GetNewRoomIndoor(dr, roomIndoor);
                            string sUnbinding = "";
                            if (roomIndoor.IsMainIndoor)
                            {
                                sUnbinding = "Indoor_Unbinding";
                            }
                            else
                            {
                                if (isBinding)
                                {
                                    sUnbinding = "Indoor_ResetAccessories";
                                }
                            }
                            stateList.Add(roomIndoor.IndoorNO + "::Indoor_ChangeModel::" + sUnbinding);
                        }

                        newRoomIndoor.IndoorNO        = roomIndoor.IndoorNO;
                        newRoomIndoor.SystemID        = roomIndoor.SystemID;
                        newRoomIndoor.IndoorName      = roomIndoor.IndoorName;
                        newRoomIndoor.CoolingCapacity = est_cool;
                        newRoomIndoor.HeatingCapacity = est_heat;
                        newRoomIndoor.SensibleHeat    = est_sh;
                        //newRoomIndoor.AirFlow = airflow;
                        newRoomIndoor.DBCooling         = roomIndoor.DBCooling;
                        newRoomIndoor.DBHeating         = roomIndoor.DBHeating;
                        newRoomIndoor.WBCooling         = roomIndoor.WBCooling;
                        newRoomIndoor.RqCoolingCapacity = rq_cool;
                        newRoomIndoor.RqHeatingCapacity = rq_heat;
                        newRoomIndoor.RqSensibleHeat    = rq_sensiable;
                        newRoomIndoor.RqAirflow         = rq_airflow;
                        newRoomIndoor.RqFreshAir        = rq_fa;

                        if (!string.IsNullOrEmpty(roomIndoor.RoomID))
                        {
                            newRoomIndoor.RoomID = roomIndoor.RoomID;
                        }
                        newRoomindoorList.Add(newRoomIndoor);

                        break;
                    }
                    if (newRoomIndoor == null)
                    {
                        stateList.Add(roomIndoor.IndoorNO + "::IND_NOTMATCH");
                        newRoomindoorList.Add(roomIndoor);
                    }
                }
                else
                {
                    string type        = roomIndoor.IndoorItem.Type;
                    int    m           = type.IndexOf("-");
                    string factoryName = "";
                    if (m > 0)
                    {
                        if (thisProject.RegionCode != "EU_W" && thisProject.RegionCode != "EU_S" && thisProject.RegionCode != "EU_E") //EU区域的 暂时不取厂名 20180302 by xyj
                        {
                            factoryName = type.Substring(m + 1, type.Length - m - 1);
                            type        = type.Substring(0, m);
                        }
                    }
                    DataTable dtIndoorList = bll.GetIndoorListStd(type, roomIndoor.IndoorItem.ProductType, factoryName);
                    dtIndoorList.DefaultView.Sort = "CoolCapacity";
                    DataRow stdRow = null;
                    foreach (DataRow dr in dtIndoorList.Rows)
                    {
                        if (roomIndoor.IndoorItem.ModelFull == dr["ModelFull"].ToString())
                        {
                            stdRow = dr;
                            break;
                        }
                    }
                    //重新计算估算容量
                    rq_wb_c      = roomIndoor.WBCooling;
                    rq_db_h      = roomIndoor.DBHeating;
                    rq_wb_h      = outWBHeat;
                    rq_db_c      = outDBCool;
                    RegCode      = roomIndoor.IndoorItem.RegionCode;
                    _productType = roomIndoor.IndoorItem.ProductType;
                    _series      = roomIndoor.IndoorItem.Series;
                    //_shf_mode = roomIndoor.SHF_Mode;
                    _fanSpeedLevel = roomIndoor.FanSpeedLevel;
                    _unitType      = roomIndoor.IndoorItem.Type;
                    DoCalculateEstValue(stdRow);

                    if (est_cool <= 0 || est_heat <= 0)
                    {
                        bool isContinue = true;
                        //过滤 _productType 为,CO 类型的数据 不需要制热 on 20181016 by xyj
                        if (!string.IsNullOrEmpty(_productType))
                        {
                            if (_productType.Contains(", CO") && est_heat == 0)
                            {
                                isContinue = false;
                            }
                        }
                        if (isContinue)
                        {
                            stateList.Add(roomIndoor.IndoorNO + "::DATA_EXCEED");
                            newRoomindoorList.Add(roomIndoor);
                            continue;
                        }
                    }
                    roomIndoor.CoolingCapacity = est_cool;
                    roomIndoor.HeatingCapacity = est_heat;
                    roomIndoor.SensibleHeat    = est_sh;
                    //roomIndoor.AirFlow = airflow;
                    newRoomindoorList.Add(roomIndoor);
                    stateList.Add(roomIndoor.IndoorNO + "::Indoor_NoChange");
                }
            }
            //重新计算房间需求是否满足
            var       rmlist = newRoomindoorList.FindAll(p => !string.IsNullOrEmpty(p.RoomID));
            Hashtable htChk  = new Hashtable();

            for (int i = 0; i < rmlist.Count; i++)
            {
                string roomId = rmlist[i].RoomID;
                if (htChk[roomId] != null)
                {
                    continue;
                }
                else
                {
                    htChk[roomId] = "";
                }
                bool isFreshAir = rmlist[i].IsFreshAirArea;
                var  tplist     = newRoomindoorList.FindAll(p => p.RoomID == roomId);
                Room curRoom    = null;
                //获取房间容量需求
                for (int j = 0; j < floorlist.Count; j++)
                {
                    var roomlist = floorlist[j].RoomList;
                    var room     = roomlist.Find(p => p.Id == roomId);
                    if (room != null)
                    {
                        curRoom = room;
                        break;
                    }
                }
                if (tplist.Count > 0)
                {
                    double total_cool_Capacity = 0;
                    double total_heat_Capacity = 0;
                    double total_sensible_Heat = 0;
                    double total_air_Flow      = 0;
                    double total_fresh_Air     = 0;
                    DoCalculateSelectedSumCapacity(tplist, isFreshAir, ref total_cool_Capacity, ref total_heat_Capacity, ref total_sensible_Heat, ref total_air_Flow, ref total_fresh_Air);
                    if (curRoom != null)
                    {
                        if (!isFreshAir)
                        {
                            if (IsCoolingMode)
                            {
                                if (total_cool_Capacity < curRoom.RqCapacityCool || total_sensible_Heat < curRoom.SensibleHeat || total_air_Flow < curRoom.AirFlow)
                                {
                                    if (total_cool_Capacity <= curRoom.RqCapacityCool)
                                    {
                                        foreach (var ent in tplist)
                                        {
                                            stateList.Add(ent.IndoorNO + "::IND_NOTMEET_COOLING");
                                        }
                                    }
                                }
                            }
                            if (IsHeatingMode && !_productType.Contains(", CO"))//tplist[0].IndoorItem.ProductType.Contains(", CO")
                            {
                                if (total_heat_Capacity < curRoom.RqCapacityHeat)
                                {
                                    if (total_heat_Capacity <= curRoom.RqCapacityHeat)
                                    {
                                        foreach (var ent in tplist)
                                        {
                                            stateList.Add(ent.IndoorNO + "::IND_NOTMEET_HEATING");
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (total_fresh_Air < curRoom.FreshAir)
                            {
                                foreach (var ent in tplist)
                                {
                                    stateList.Add(ent.IndoorNO + "::IND_NOTMEET_FA");
                                }
                            }
                        }
                    }
                }
            }
            return(newRoomindoorList);
        }