Ejemplo n.º 1
0
        /// 从另一个System中复制属性到当前System Add on 20161126 by Yunxiao Lin
        /// <summary>
        /// 从另一个System中复制属性到当前System
        /// </summary>
        /// <param name="sys"></param>
        public void Copy(SystemVRF sys)
        {
            this._addRefrigeration      = sys._addRefrigeration;
            this._allowExceedRatio      = sys._allowExceedRatio;
            this._controlGroupID        = sys._controlGroupID;
            this._coolingCapacity       = sys._coolingCapacity;
            this._dbCooling             = sys._dbCooling;
            this._dbHeating             = sys._dbHeating;
            this._rhHeatling            = sys._rhHeatling;
            this._diversityFactor       = sys._diversityFactor;
            this._firstPipeLength       = sys._firstPipeLength;
            this._firstPipeLengthbuff   = sys._firstPipeLengthbuff;
            this._heatingCapacity       = sys._heatingCapacity;
            this._heightDiff            = sys._heightDiff;
            this._isExportToReport      = sys._isExportToReport;
            this._isPipingOK            = sys._isPipingOK;
            this._isUpdated             = sys._isUpdated;
            this._iwCooling             = sys._iwCooling;
            this._iwHeating             = sys._iwHeating;
            this._MaxDiffIndoorHeight   = sys._MaxDiffIndoorHeight;
            this._MaxDiffIndoorLength   = sys._MaxDiffIndoorLength;
            this._MaxEqPipeLength       = sys._MaxEqPipeLength;
            this._MaxIndoorLength       = sys._MaxIndoorLength;
            this._MaxOutdoorAboveHeight = sys._MaxOutdoorAboveHeight;
            this._MaxOutdoorBelowHeight = sys._MaxOutdoorBelowHeight;
            this._MaxPipeLength         = sys._MaxPipeLength;
            this._MaxPipeLengthwithFA   = sys._MaxPipeLengthwithFA;
            this._maxRatio                 = sys._maxRatio;
            this._name                     = sys._name;
            this._no                       = sys._no;
            this._optionItem               = sys._optionItem;
            this._pipeActualLength         = sys._pipeActualLength;
            this._pipeEquivalentLength     = sys._pipeEquivalentLength;
            this._pipeEquivalentLengthbuff = sys._pipeEquivalentLengthbuff;
            this._pipingLengthFactor       = sys._pipingLengthFactor;
            this._pipingPositionType       = sys._pipingPositionType;
            this._ratio                    = sys._ratio;
            this._ratioFA                  = sys._ratioFA;
            this._selOutdoorType           = sys._selOutdoorType;
            this._sysType                  = sys._sysType;
            this._wbHeating                = sys._wbHeating;
            this.OutdoorItem               = sys.OutdoorItem;
            this._IDUFirst                 = sys._IDUFirst;

            this._isAuto          = sys._isAuto;
            this._coolingFlowRate = sys._coolingFlowRate;
            this._heatingFlowRate = sys._heatingFlowRate;
            this._flowRateLevel   = sys._flowRateLevel;

            //添加新的属性  add by Shen Junjie on 2018/02/01
            this.MaxTotalPipeLength = sys.MaxTotalPipeLength;
            //this.MaxTotalPipeLength_MaxIU = sys.MaxTotalPipeLength_MaxIU;
            this.MaxMKIndoorPipeLength = sys.MaxMKIndoorPipeLength;
            //this.MaxMKIndoorPipeLength_MaxIU = sys.MaxMKIndoorPipeLength_MaxIU;
            //添加新的属性  add by xyj on 2018/06/25
            this.MaxSameCHBoxHighDiffLength       = sys.MaxSameCHBoxHighDiffLength;
            this.MaxCHBoxHighDiffLength           = sys.MaxCHBoxHighDiffLength;
            this.MaxCHBox_IndoorHighDiffLength    = sys.MaxCHBox_IndoorHighDiffLength;
            this.MaxIndoorHeightDifferenceLength  = sys.MaxIndoorHeightDifferenceLength;
            this.MaxLowerHeightDifferenceLength   = sys.MaxLowerHeightDifferenceLength;
            this.MaxUpperHeightDifferenceLength   = sys.MaxUpperHeightDifferenceLength;
            this.NormalCHBoxHighDiffLength        = sys.NormalCHBoxHighDiffLength;
            this.NormalCHBox_IndoorHighDiffLength = sys.NormalCHBox_IndoorHighDiffLength;
            this.NormalSameCHBoxHighDiffLength    = sys.NormalSameCHBoxHighDiffLength;
        }
Ejemplo n.º 2
0
        public NodeElement_Wiring GetNodeElement_Wiring_ODU(old.Outdoor outItem, string brandCode)
        {
            string [] strs1 = outItem.FullModuleName.Split(new char[] { '+' }, StringSplitOptions.RemoveEmptyEntries);

            List <string> unitFullName = new List <string>();

            foreach (string str1 in strs1)
            {
                if (str1.Contains("*"))
                {
                    string[] strs2 = str1.Split(new char[] { '*' }, StringSplitOptions.RemoveEmptyEntries);
                    if (strs2.Length == 2)
                    {
                        int num = 0;
                        if (int.TryParse(strs2[1].Trim(), out num))
                        {
                            for (int i = 0; i < num; i++)
                            {
                                unitFullName.Add(strs2[0].Trim());
                            }
                        }
                    }
                }
                else
                {
                    unitFullName.Add(str1.Trim());
                }
            }
            int count = unitFullName.Count;

            old.Outdoor[] outItems = new old.Outdoor[count];
            if (count > 1)
            {
                for (int i = 0; i < count - 1; i++)
                {
                    for (int j = i + 1; j < count; j++)
                    {
                        if (unitFullName[i].CompareTo(unitFullName[j]) == -1)
                        {
                            string largemodel = unitFullName[j];
                            unitFullName[j] = unitFullName[i];
                            unitFullName[i] = largemodel;
                        }
                    }
                }
                JCHVRF.DAL.OutdoorDAL dal = new JCHVRF.DAL.OutdoorDAL(outItem.RegionCode, brandCode, ProjectLegacy.RegionCode);
                for (int i = 0; i < count; i++)
                {
                    string      modelname = (unitFullName[i]).Trim();
                    old.Outdoor coutItem  = null;
                    if (((outItem.RegionCode == "MAL" || outItem.RegionCode == "LA_BV") && brandCode == "Y") || (outItem.Series == "Commercial VRF HP, YVAHP") || (outItem.Series == "Commercial VRF HR, YVAHR")) //马来西亚的YORK品牌以及北美机型需要这样处理 20170323 by Yunxiao Lin
                    {
                        coutItem = dal.GetYorkItemBySeries(modelname, outItem.Series);
                    }
                    else if (brandCode == "H")
                    {
                        coutItem = dal.GetHitachiItemBySeries(modelname, outItem.Series);
                    }
                    else
                    {
                        coutItem = dal.GetItemBySeries(modelname, outItem.Series);
                    }
                    if (coutItem != null)
                    {
                        outItems[i] = coutItem;
                    }
                }
            }
            else
            {
                outItems[0] = outItem;
            }

            JCHVRF.DAL.MyDictionaryDAL dicdal = new JCHVRF.DAL.MyDictionaryDAL();
            string strGroup2  = "";
            string strGroup3  = "";
            string strGroup4  = "";
            string modelGroup = "";

            foreach (old.Outdoor coutItem in outItems)
            {
                if (coutItem != null)
                {
                    if (outItem.Type.Contains("YVAHP") || outItem.Type.Contains("YVAHR"))
                    {
                        if (modelGroup != "")
                        {
                            modelGroup += "," + coutItem.Model_York;
                        }
                        else
                        {
                            modelGroup += coutItem.Model_York;
                        }
                    }
                    old.MyDictionary dic = dicdal.GetItem(old.MyDictionary.DictionaryType.PowerSupply, coutItem.ModelFull.Substring(coutItem.ModelFull.Length - 4, 1));

                    string strPowerLineType    = "//";
                    string strPowerPhaseNumber = "R S";
                    if (dic.Name.Contains("3Ph"))
                    {
                        strPowerLineType    = "////";
                        strPowerPhaseNumber = "L1L2L3N";
                    }
                    if (coutItem.ModelFull.Substring(coutItem.ModelFull.Length - 4, 1) == "R")
                    {
                        strPowerPhaseNumber = "R S T";
                        strPowerLineType    = "///";
                    }
                    string strPower = dic.Name.Replace("1Ph/", "").Replace("3Ph/", "");
                    double current  = coutItem.MaxCurrent;
                    strPower += "/" + current.ToString() + "A";

                    if (strGroup2 != "")
                    {
                        strGroup2 += "|" + strPowerPhaseNumber;
                    }
                    else
                    {
                        strGroup2 += strPowerPhaseNumber;
                    }
                    if (strGroup3 != "")
                    {
                        strGroup3 += "|" + strPower;
                    }
                    else
                    {
                        strGroup3 += strPower;
                    }
                    if (strGroup4 != "")
                    {
                        strGroup4 += "," + strPowerLineType;
                    }
                    else
                    {
                        strGroup4 += strPowerLineType;
                    }
                }
            }

            string model = outItem.Model_York;

            if (!outItem.Type.Contains("YVAHP") && !outItem.Type.Contains("YVAHR"))
            {
                if (brandCode == "H")
                {
                    model = outItem.Model_Hitachi;
                }

                modelGroup = string.Join(",", unitFullName);
            }
            else
            {
                model = outItem.Model_York;
            }

            NodeElement_Wiring item = new NodeElement_Wiring("Out" + count.ToString(), model, count, modelGroup, strGroup2, strGroup3, strGroup4, brandCode);

            return(item);
        }