/// <summary> /// 设置Indoor,并且替换Accessory列表 /// </summary> public void SetIndoorItemWithAccessory(Indoor inItem) { if (inItem != null) { ListAccessory = inItem.ListAccessory; } IndoorItem = inItem; }
/// <summary> /// 设置Indoor,保留原Accessory /// </summary> public void SetIndoorItem(Indoor inItem) { //不能回传对象给Indoor.ListAccessory //可能会交叉污染RoomIndoor对象,因为RoomIndoor对象可能引用同一个Indoor对象 modify by Shen Junjie on 2018/5/11 //if (inItem != null) //{ // inItem.ListAccessory = ListAccessory; //统一用一个对象, 防止出问题 //} IndoorItem = inItem; }
public NodeElement_Wiring GetNodeElement_Wiring_IDU(old.Indoor inItem, string brandCode, string outType, ref List <string> strArrayList_powerType, ref List <string> strArrayList_powerVoltage, ref List <double> dArrayList_powerCurrent, ref int powerIndex, ref bool isNewPower) { string model = inItem.Model_York; if (inItem.Model_York == "-") { model = inItem.ModelFull; } if (brandCode == "H") { model = inItem.Model_Hitachi; } if (outType.Contains("YVAHP") || outType.Contains("YVAHR")) { if (inItem.Model_York == "-") { model = inItem.ModelFull; } else { model = inItem.Model_York; } } string powerSupplyCode = inItem.ModelFull.Substring(inItem.ModelFull.Length - 4, 1); JCHVRF.DAL.MyDictionaryDAL dicdal = new JCHVRF.DAL.MyDictionaryDAL(); old.MyDictionary dic = dicdal.GetItem(old.MyDictionary.DictionaryType.PowerSupply, powerSupplyCode); string strPowerLineType = "//"; string strPowerPhaseNumber = "R S"; if (dic.Name.Contains("3Ph")) { strPowerLineType = "////"; strPowerPhaseNumber = "L1L2L3N"; } if (powerSupplyCode == "R") { strPowerLineType = "///"; strPowerPhaseNumber = "R S T"; } string strPower = dic.Name; bool isFound = false; for (int i = 0; i < strArrayList_powerType.Count; i++) { string compatPower = GetCompatiblePowerVoltage(strPower, strArrayList_powerVoltage[i]); if (!string.IsNullOrEmpty(compatPower)) { strPower = compatPower; isFound = true; powerIndex = i; break; } } if (!isFound) { string strPowerPhaseNumber1 = "R S"; if (strPower.Contains("3Ph")) { strPowerPhaseNumber1 = "L1L2L3N"; } if (powerSupplyCode == "R") { strPowerPhaseNumber1 = "R S T"; } isNewPower = true; powerIndex = strArrayList_powerType.Count; strArrayList_powerType.Add(strPowerPhaseNumber1); strArrayList_powerVoltage.Add(strPower); dArrayList_powerCurrent.Add(0); } else { strArrayList_powerVoltage[powerIndex] = strPower; } strPower = strPower.Replace("/1Ph/", "/").Replace("/3Ph/", "/"); double current = inItem.RatedCurrent; dArrayList_powerCurrent[powerIndex] += current; strPower += "/" + current.ToString() + "A"; NodeElement_Wiring item = new NodeElement_Wiring("Ind", model, 1, model, strPowerPhaseNumber, strPower, strPowerLineType, brandCode); return(item); }