public override void UpdateToPGs() { int bracingValue = _addiInfo.defaultSet[(byte)DefaultSet.FireSprinkler_Bracing]; int ceilingValue = _addiInfo.defaultSet[(byte)DefaultSet.FireSprinkler_Ceilling]; int sdcIndex = SDCConverter.Get4LevelIndex(_addiInfo.sdc); if ((bracingValue == 0 && ceilingValue == 1) || (bracingValue == 1 && ceilingValue == 0) || (bracingValue == 1 && 2 <= sdcIndex) || (bracingValue == 2 && sdcIndex <= 1)) { _abandonWriter.WriteAbandonment(_fi, AbandonmentTable.FireSprinkler_Conflict); return; } else { string FGCode = "D4011.0" + (bracingValue + 3).ToString() + sdcIndex.ToString() + "a"; int index; if (_dictionary.TryGetValue(FGCode, out index)) { _PGItems.ElementAt(index).Num[_floor] += 0.01; //costing per 100 units } else { PGItem pgItem = new PGItem(); pgItem.PGName = "消防喷淋"; pgItem.PinYinSuffix = "XiaoFangPenLin"; pgItem.Code = FGCode; pgItem.direction = Direction.Undefined; pgItem.Num[_floor] += 0.01; pgItem.Price = _addiInfo.prices[(byte)PGComponents.FireSprinkler]; if (pgItem.Price == 0.0) { pgItem.IfDefinePrice = false; } else { pgItem.IfDefinePrice = true; } _PGItems.Add(pgItem); _dictionary.Add(FGCode, _PGItems.Count - 1); } } }
public override void UpdateToPGs() { string FGCode = "D3041.03"; int ceilingValue = _addiInfo.defaultSet[(byte)DefaultSet.Diffuser_Ceiling]; int sdcIndex = SDCConverter.Get4LevelIndex(_addiInfo.sdc); if (ceilingValue == 0 && 2 <= sdcIndex) { _abandonWriter.WriteAbandonment(_fi, AbandonmentTable.Diffuser_InsSDCConflict); return; } else { FGCode += (ceilingValue + 1).ToString(); FGCode += ConstSet.Alphabet[sdcIndex]; int index; if (_dictionary.TryGetValue(FGCode, out index)) { _PGItems.ElementAt(index).Num[_floor] += 0.1; //costing per 10 units } else { PGItem pgItem = new PGItem(); pgItem.PGName = "散流器"; pgItem.PinYinSuffix = "SanLiuQi"; pgItem.Code = FGCode; pgItem.direction = Direction.Undefined; pgItem.Num[_floor] += 0.1; pgItem.Price = _addiInfo.prices[(byte)PGComponents.Diffuser]; if (pgItem.Price == 0.0) { pgItem.IfDefinePrice = false; } else { pgItem.IfDefinePrice = true; } _PGItems.Add(pgItem); _dictionary.Add(FGCode, _PGItems.Count - 1); } } }
public override void UpdateToPGs() { int sdcIndex = SDCConverter.Get4LevelIndex(_addiInfo.sdc); if (2 <= sdcIndex) { _abandonWriter.WriteAbandonment(_fi, AbandonmentTable.VAV_SDCNonABC); return; } else { string FGCode = "D3041.041"; FGCode += ConstSet.Alphabet[sdcIndex]; int index; if (_dictionary.TryGetValue(FGCode, out index)) { _PGItems.ElementAt(index).Num[_floor] += 0.1; //costing per 10 units } else { PGItem pgItem = new PGItem(); pgItem.PGName = "变风量箱"; pgItem.PinYinSuffix = "BianFengLiangXiang"; pgItem.Code = FGCode; pgItem.direction = Direction.Undefined; pgItem.Num[_floor] += 0.1; pgItem.Price = _addiInfo.prices[(byte)PGComponents.VAV]; if (pgItem.Price == 0.0) { pgItem.IfDefinePrice = false; } else { pgItem.IfDefinePrice = true; } _PGItems.Add(pgItem); _dictionary.Add(FGCode, _PGItems.Count - 1); } } }
public override void UpdateToPGs() { string FGCode = "D3041.00"; FGCode += (_addiInfo.defaultSet[(byte)DefaultSet.HVACFan_InLine_Install] + 1).ToString(); int sdcIndex = SDCConverter.Get4LevelIndex(_addiInfo.sdc); FGCode += ConstSet.Alphabet[sdcIndex]; int index; if (_dictionary.TryGetValue(FGCode, out index)) { _PGItems.ElementAt(index).Num[_floor] += 0.1; //costing per 10 units } else { PGItem pgItem = new PGItem(); pgItem.PGName = "管道风机"; pgItem.PinYinSuffix = "GuanDaoFengJi"; pgItem.Code = FGCode; pgItem.direction = Direction.Undefined; pgItem.Num[_floor] += 0.1; pgItem.Price = _addiInfo.prices[(byte)PGComponents.HVACFan_InLine]; if (pgItem.Price == 0.0) { pgItem.IfDefinePrice = false; } else { pgItem.IfDefinePrice = true; } _PGItems.Add(pgItem); _dictionary.Add(FGCode, _PGItems.Count - 1); } }
public static void UpdateToPGs() { //assert: all materials are valid if ((_pipeType == PipeType.SanitaryWater && (_material != _addiInfo.materialTypes[(byte)PGMaterialType.CastIron_FC] && _material != _addiInfo.materialTypes[(byte)PGMaterialType.CastIron_BSC])) || (_pipeType == PipeType.FireSprinkler && (_material != _addiInfo.materialTypes[(byte)PGMaterialType.ThreadedSteel] && _material != _addiInfo.materialTypes[(byte)PGMaterialType.VitaulicSteel]))) { _abandonWriter.WriteAbandonment(_pipe, AbandonmentTable.Pipe_TypeMateConflict); return; } if (_pipeType == PipeType.SanitaryWater && _material == _addiInfo.materialTypes[(byte)PGMaterialType.CastIron_FC]) { if (_addiInfo.defaultSet[(byte)DefaultSet.Pipe_FragilityType] == 0) { _abandonWriter.WriteAbandonment(_pipe, AbandonmentTable.Pipe_MateFragConflict); return; } } if (_pipeType != PipeType.ColdWater && ((_material == _addiInfo.materialTypes[(byte)PGMaterialType.ThreadedSteel] && 2.5 < _diameter) || (_material == _addiInfo.materialTypes[(byte)PGMaterialType.WeldedSteel] && _diameter <= 2.5))) { _abandonWriter.WriteAbandonment(_pipe, AbandonmentTable.Pipe_DiameterMateConflict); return; } string FGCode = _typeMap[(byte)_pipeType]; if (_pipeType == PipeType.ColdWater) { if (_diameter <= 2.5) { _abandonWriter.WriteAbandonment(_pipe, AbandonmentTable.Pipe_DiameterOOR); return; } else { FGCode += "1"; } } else { if (_material == _addiInfo.materialTypes[(byte)PGMaterialType.ThreadedSteel]) { FGCode += "1"; } else if (_material == _addiInfo.materialTypes[(byte)PGMaterialType.VitaulicSteel]) { FGCode += "1"; } else if (_material == _addiInfo.materialTypes[(byte)PGMaterialType.WeldedSteel]) { FGCode += "2"; } else if (_material == _addiInfo.materialTypes[(byte)PGMaterialType.CastIron_FC]) { FGCode += "1"; } else if (_material == _addiInfo.materialTypes[(byte)PGMaterialType.CastIron_BSC]) { FGCode += "2"; } } FGCode += (SDCConverter.Get4LevelIndex(_addiInfo.sdc) + 1).ToString(); FGCode += ConstSet.Alphabet[_addiInfo.defaultSet[(byte)DefaultSet.Pipe_FragilityType]]; int index_pipeType = (byte)_pipeType; int index; if (_dictionary.TryGetValue(FGCode, out index)) { _PGItems.ElementAt(index).Num[_floor] += _length / _lengthBase; } else { PGItem pgItem = new PGItem(); pgItem.PGName = _nameZH[index_pipeType]; pgItem.PinYinSuffix = _namePY[index_pipeType]; pgItem.Code = FGCode; pgItem.direction = Direction.Undefined; pgItem.Num[_floor] += _length / _lengthBase; pgItem.Price = _addiInfo.prices[(byte)PGComponents.Pipe]; if (pgItem.Price == 0.0) { pgItem.IfDefinePrice = false; } else { pgItem.IfDefinePrice = true; } _PGItems.Add(pgItem); _dictionary.Add(FGCode, _PGItems.Count - 1); } }