protected void UpdateSidePara(bool isBackSide, ElecCalsSideRes sidePara, out string waring) { waring = ""; //组装气候工况 if (sidePara.WeatherListName != null && sidePara.WeatherListName != "") { Weather waeBack = globalInst.GetLocalWeatherByName(sidePara.WeatherListName); List <ElecCalsWorkCondition> ListWkCdt = new List <ElecCalsWorkCondition>(); if (waeBack.WorkConditions != null && waeBack.WorkConditions.Count > 0) { foreach (var item in waeBack.WorkConditions) { ListWkCdt.Add(new ElecCalsWorkCondition(item)); } } if (isBackSide) { BackWeatherPara = new ElecCalsWeaRes() { Name = sidePara.WeatherListName, ID = 1, WeathComm = ListWkCdt, }; } else { FrontWeatherPara = new ElecCalsWeaRes() { Name = sidePara.WeatherListName, ID = 2, WeathComm = ListWkCdt, }; } } else { waring += "气候工况 "; } //组装导地线 Wire Ind, Grd, OPGW; if (sidePara.IndName != null && sidePara.IndName != "") { Ind = globalInst.GetLocalWireByName(true, sidePara.IndName); } else { Ind = new Wire(); waring += "导线 "; } if (sidePara.GrdName != null && sidePara.GrdName != "") { Grd = globalInst.GetLocalWireByName(false, sidePara.GrdName); } else { Grd = new Wire(); waring += "地线 "; } if (sidePara.OPGWName != null && sidePara.OPGWName != "") { OPGW = globalInst.GetLocalWireByName(false, sidePara.OPGWName); } else { OPGW = new Wire(); waring += "OPGW "; } if (isBackSide) { BackWirePara = new ElecCalsWireData() { Ind = new ElecCalsWire(Ind.ModelSpecification, 1, Ind.SectionArea, Ind.ExternalDiameter, Ind.UnitLengthMass, Ind.ModulusElasticity, Ind.LineCoefficient, Ind.RatedBreakingForce, 0, sidePara.IndDecrTem, sidePara.IndDevideNum), Grd = new ElecCalsWire(Grd.ModelSpecification, 2, Grd.SectionArea, Grd.ExternalDiameter, Grd.UnitLengthMass, Grd.ModulusElasticity, Grd.LineCoefficient, Grd.RatedBreakingForce, 1, sidePara.GrdDecrTem), OPGW = new ElecCalsWire(OPGW.ModelSpecification, 1, OPGW.SectionArea, OPGW.ExternalDiameter, OPGW.UnitLengthMass, OPGW.ModulusElasticity, OPGW.LineCoefficient, OPGW.RatedBreakingForce, 2, sidePara.OPGWDecrTem), }; } else { FrontWirePara = new ElecCalsWireData() { Ind = new ElecCalsWire(Ind.ModelSpecification, 1, Ind.SectionArea, Ind.ExternalDiameter, Ind.UnitLengthMass, Ind.ModulusElasticity, Ind.LineCoefficient, Ind.RatedBreakingForce, 0, sidePara.IndDecrTem, sidePara.IndDevideNum), Grd = new ElecCalsWire(Grd.ModelSpecification, 2, Grd.SectionArea, Grd.ExternalDiameter, Grd.UnitLengthMass, Grd.ModulusElasticity, Grd.LineCoefficient, Grd.RatedBreakingForce, 1, sidePara.GrdDecrTem), OPGW = new ElecCalsWire(OPGW.ModelSpecification, 1, OPGW.SectionArea, OPGW.ExternalDiameter, OPGW.UnitLengthMass, OPGW.ModulusElasticity, OPGW.LineCoefficient, OPGW.RatedBreakingForce, 2, sidePara.OPGWDecrTem), }; } //更新间隔棒和防震锤 FitData IndFZ, IndJGB, GrdFZ; if (sidePara.IndFZName != null && sidePara.IndFZName != "") { IndFZ = globalInst.GetLocalFitDataByName("防震锤", sidePara.IndFZName); } else { IndFZ = new FitData(); waring += "导线防震锤 "; } if (sidePara.IndJGBName != null && sidePara.IndJGBName != "") { IndJGB = globalInst.GetLocalFitDataByName("间隔棒", sidePara.IndJGBName); } else { IndJGB = new FitData(); waring += "导线间隔棒 "; } if (sidePara.GrdFZName != null && sidePara.GrdFZName != "") { GrdFZ = globalInst.GetLocalFitDataByName("防震锤", sidePara.GrdFZName); } else { GrdFZ = new FitData(); waring += "地线防震锤 "; } int IndFZNum = 0, IndJGBNum = 0, GrdFZNum = 0; //按照规则赋值的方法还不清楚 if (sidePara.FitDataCalsPara == "1 按规则") { } else { IndFZNum = sidePara.IndFZNum; IndJGBNum = sidePara.IndJGBNum; GrdFZNum = sidePara.GrdFZNum; } if (isBackSide) { BackSpanFit = new ElecCalsSpanFit(0, IndFZNum, IndFZ.Weight, 0, GrdFZNum, GrdFZ.Weight, 0, IndJGBNum, IndJGB.Weight); } else { FrontSpanFit = new ElecCalsSpanFit(0, IndFZNum, IndFZ.Weight, 0, GrdFZNum, GrdFZ.Weight, 0, IndJGBNum, IndJGB.Weight); } }