| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.*; |
| | | import cn.gistack.sm.sjztmd.word.enums.*; |
| | | import cn.gistack.sm.sjztmd.word.util.WordUtil; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import lombok.Data; |
| | | import org.checkerframework.checker.formatter.qual.UnknownFormat; |
| | |
| | | */ |
| | | |
| | | String typeName = SpillwayTypeEnum.find(norspi.getSpillwayType()).getLabel(); |
| | | if (StringUtil.isBlank(typeName) && norspi.getSpillwayType().indexOf(",") > -1) { |
| | | String [] tmpSt = norspi.getSpillwayType().split(","); |
| | | if (tmpSt[0].equals("9")) { |
| | | typeName = tmpSt[1]; |
| | | } |
| | | } |
| | | |
| | | String gateText = ""; |
| | | String holeText = ""; |
| | |
| | | String disCharge = isNull(norspi.getCheckingFloodDischarge()); |
| | | |
| | | String text = StringUtil.format("溢洪道为{},{},堰顶高程{}m,堰顶净宽{}m{},最大泄洪量{}m³/s。", |
| | | typeName, gateText, weirTopElevation, weirTopWidth, holeText, disCharge); |
| | | typeName, gateText, StringUtil.format("设计洪水位{}m", String.format("%.2f",norspi.getWeirTopElevation())), weirTopWidth, holeText, disCharge); |
| | | |
| | | return text; |
| | | } |
| | |
| | | |
| | | |
| | | String info = StringUtil.format("{}为{},坝顶高程{}m,最大坝高{}m,坝长{}m,坝顶宽{}m。", |
| | | name, mainDamType, mainDamTopElevation, mainDamHeight, mainDamTopLength, mainDamWidth); |
| | | name, mainDamType, Double.parseDouble(String.format("%.2f",tbAttResWaterBlock.getDamTopElevation())), mainDamHeight, mainDamTopLength, mainDamWidth); |
| | | |
| | | return info; |
| | | } |
| | |
| | | this.administrativeUnit = attResManagePerson.getUserUnit(); |
| | | } |
| | | |
| | | if (attResManagePerson.getType().equals("2")) { |
| | | if (attResManagePerson.getType().equals("3")) { |
| | | //主管 |
| | | this.competentDepartmentInfo = StringUtil.format("{}({},{})", |
| | | attResManagePerson.getUserName(), attResManagePerson.getPosition(), attResManagePerson.getUserPhone()); |
| | |
| | | |
| | | String resFuncText = String.join("、", resFucTextList); |
| | | if (resFucList.size() >= 3) { |
| | | resFuncText = resFuncText + "等综合"; |
| | | resFuncText = resFuncText + "等"; |
| | | } |
| | | this.resFuncText = resFuncText; |
| | | |
| | |
| | | |
| | | this.desFlSta = DesFlStaEnum.find(tbAttResStagChar.getDesFlSta()).getLabel(); |
| | | |
| | | this.checFlSta = ChecFlStaEnum.find(tbAttResStagChar.getDesFlSta()).getLabel(); |
| | | this.checFlSta = ChecFlStaEnum.find(tbAttResStagChar.getChecFlSta()).getLabel(); |
| | | |
| | | this.totalCap = isNull(tbAttResStagChar.getTotalCap()); |
| | | //水文特征 |
| | | List<String> hydrologicalCharacteristicsList = new ArrayList<>(); |
| | | |
| | | List<String> hydrologicalCharacteristicsList2 = new ArrayList<>(); |
| | | |
| | | if (tbAttResStagChar.getAdjustStorCap() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("兴利库容{}万m³", tbAttResStagChar.getAdjustStorCap().toString())); |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("兴利库容{}万m³", WordUtil.removeTrailingZero(tbAttResStagChar.getAdjustStorCap().toString()))); |
| | | } |
| | | if (tbAttResStagChar.getFlprCap() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("调洪库容{}万m³", tbAttResStagChar.getFlprCap().toString())); |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("调洪库容{}万m³", WordUtil.removeTrailingZero(tbAttResStagChar.getFlprCap().toString()))); |
| | | } |
| | | if (tbAttResStagChar.getDeadCap() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("死库容{}万m³", tbAttResStagChar.getDeadCap().toString())); |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("死库容{}万m³", WordUtil.removeTrailingZero(tbAttResStagChar.getDeadCap().toString()))); |
| | | } |
| | | if (tbAttResStagChar.getChecFlStag() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("校核洪水位{}m", tbAttResStagChar.getChecFlStag().toString())); |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format(this.resName + "校核洪水位{}m", String.format("%.2f",tbAttResStagChar.getChecFlStag()))); |
| | | } |
| | | if (tbAttResStagChar.getDesFlStag() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("设计洪水位{}m", tbAttResStagChar.getDesFlStag().toString())); |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("设计洪水位{}m", String.format("%.2f",tbAttResStagChar.getDesFlStag()))); |
| | | } |
| | | if (tbAttResStagChar.getCorNormStag() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("正常蓄水位{}m", tbAttResStagChar.getCorNormStag().toString())); |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("正常蓄水位{}m", String.format("%.2f",tbAttResStagChar.getCorNormStag()))); |
| | | } |
| | | if (tbAttResStagChar.getDeadStag() != null) { |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("死水位{}m", tbAttResStagChar.getDeadStag().toString())); |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("死水位{}m", String.format("%.2f",tbAttResStagChar.getDeadStag()))); |
| | | } |
| | | |
| | | this.hydrologicalCharacteristics = String.join(",", hydrologicalCharacteristicsList); |
| | | this.hydrologicalCharacteristics = String.join(",", hydrologicalCharacteristicsList) + ";" + String.join(",", hydrologicalCharacteristicsList2); |
| | | } |
| | | |
| | | private void formatTbAttResWaterDelivery(List<TbAttResWaterDelivery> tbAttResWaterDeliveryList) { |
| | |
| | | |
| | | TbAttResWaterDelivery tbAttResWaterDelivery = tbAttResWaterDeliveryList.get(0); |
| | | if (tbAttResWaterDeliveryList.size() > 1) { |
| | | this.aqueductType = "主要采用"; |
| | | this.aqueductType = "水库主要采用"; |
| | | } else { |
| | | this.aqueductType = "采用"; |
| | | this.aqueductType = "水库采用"; |
| | | } |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | this.protectCity = tbAttResEngBene.getCity().equals("无")?"":tbAttResEngBene.getCity(); |
| | | this.protectCity = tbAttResEngBene.getCity().equals("无")?tbAttResEngBene.getTown():tbAttResEngBene.getCity(); |
| | | if (StringUtil.isBlank(this.protectCity)) { |
| | | this.protectCity = tbAttResEngBene.getTown().equals("无")?"":tbAttResEngBene.getTown(); |
| | | } |
| | | |
| | | double person = tbAttResEngBene.getFlControlPerson() / 10000.0; |
| | | |
| | | if (person > 0) { |
| | | this.protectPersonLand = String.format("%.2f",person) + "万人口"; |
| | | } |
| | | |
| | | if (tbAttResEngBene.getFlControlLand() > 0) { |
| | | if (StringUtil.isBlank(this.protectPersonLand)) { |
| | | this.protectPersonLand = String.format("%.2f", tbAttResEngBene.getFlControlLand()) + "万亩耕地"; |
| | | } else { |
| | | this.protectPersonLand = this.protectPersonLand + "、" + String.format("%.2f", tbAttResEngBene.getFlControlLand()) + "万亩耕地"; |
| | | } |
| | | } |
| | | |
| | | this.protectPersonLand = |
| | | StringUtil.format("{}万人口、{}万亩耕地", String.format("%.2f",person) , String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000)); |
| | |
| | | String type = SafetyAppraisalTypeEnum.find(tbAttResSafetyMonitor.getSafetyAppraisalResult()).getLabel(); |
| | | String surveyProblem = tbAttResSafetyMonitor.getSurveyProblem(); |
| | | //(若一类坝,不介绍问题,二、三类坝介绍) |
| | | if (tbAttResSafetyMonitor.equals("1")) { |
| | | if (tbAttResSafetyMonitor.getSafetyAppraisalResult().equals("1")) { |
| | | this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为\"{}\"。", |
| | | time, type); |
| | | } else { |
| | |
| | | } |
| | | |
| | | this.mUnitName = tbAttResMgrSysB.getMUnitName(); |
| | | this.mUnitNature = tbAttResMgrSysB.getMUnitNature().replace("公益类",""); |
| | | this.mUnitNature = tbAttResMgrSysB.getMUnitNature(); |
| | | this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber().toString(); |
| | | } |
| | | |