| | |
| | | List<AttResManagePerson> attResManagePeople) { |
| | | |
| | | //取设计流量大的进行描述 |
| | | List<TbAttResWaterDelivery> sortList = |
| | | tbAttResWaterDeliveryList.stream() |
| | | .sorted((a, b) -> { |
| | | Optional<Double> flowA = Optional.ofNullable(a.getDesignFlow()); |
| | | Optional<Double> flowB = Optional.ofNullable(b.getDesignFlow()); |
| | | return flowA.isPresent() && flowB.isPresent() ? flowA.get().compareTo(flowB.get()) : (flowA.isPresent() ? 1 : (flowB.isPresent() ? -1 : 0)); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | // List<TbAttResWaterDelivery> sortList = |
| | | // tbAttResWaterDeliveryList.stream() |
| | | // .sorted((a, b) -> { |
| | | // Optional<Double> flowA = Optional.ofNullable(a.getDesignFlow()); |
| | | // Optional<Double> flowB = Optional.ofNullable(b.getDesignFlow()); |
| | | // return flowA.isPresent() && flowB.isPresent() ? flowA.get().compareTo(flowB.get()) : (flowA.isPresent() ? 1 : (flowB.isPresent() ? -1 : 0)); |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | |
| | | List<TbAttResWaterDelivery> sortList = tbAttResWaterDeliveryList.stream() |
| | | .sorted(Comparator.nullsLast( |
| | | Comparator.comparingDouble(a -> a.getDesignFlow() == null ? Double.POSITIVE_INFINITY : a.getDesignFlow()) |
| | | )) |
| | | .collect(Collectors.toList()); |
| | | |
| | | formatTbAttResBase(tbAttResBase); |
| | | formatTbAttResStagChar(tbAttResStagChar); |
| | |
| | | if (norspi.getIsGate().equals("是")) { |
| | | gateText = "有闸控制"; |
| | | String hole = norspi.getGateNum() == 1 ? "单" : String.valueOf(norspi.getGateNum()); |
| | | holeText = StringUtil.format(",设{}孔", hole); |
| | | holeText = StringUtil.format(",{}孔", hole); |
| | | } else { |
| | | gateText = "无闸控制"; |
| | | } |
| | |
| | | |
| | | this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水"; |
| | | |
| | | this.section = isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh()); |
| | | |
| | | if (null == tbAttResWaterDelivery.getSectionHigh()) { |
| | | this.section = "φ" + isNull(tbAttResWaterDelivery.getSectionWide()); |
| | | } else { |
| | | this.section = isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh()); |
| | | } |
| | | |
| | | this.thresholdElevation = String.format("%.2f",tbAttResWaterDelivery.getThresholdElevation()); |
| | | |
| | |
| | | if (StringUtil.isNotBlank(importFactory)&& !importFactory.equals("无")) { |
| | | protectList.add(importFactory); |
| | | } |
| | | this.protectThings = ""; |
| | | this.protectThings = "及"; |
| | | //超过三个列出第二个后为“XX等”,后面不需罗列 |
| | | if (protectList.size() > 3) { |
| | | List<String> sublist = protectList.subList(0, 2); |
| | |
| | | if (StringUtils.isNotBlank(this.economicBenefit)) { |
| | | this.economicBenefit = this.economicBenefit + |
| | | StringUtil.format("此外,水库为{}{}万人提供生活用水,年均供水量{}万m³。", |
| | | tbAttResEngBene.getSupplyObject(),StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":String.format("%.2f", Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), tbAttResEngBene.getMoyearSupplyAvg()); |
| | | tbAttResEngBene.getSupplyObject(), |
| | | StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":String.format("%.2f", Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), |
| | | tbAttResEngBene.getMoyearSupplyAvg()); |
| | | } else { |
| | | //无灌溉有供水直接介绍供水 |
| | | this.economicBenefit = |
| | | StringUtil.format("水库为{}{}万人提供生活用水,年均供水量{}万m³。", |
| | | tbAttResEngBene.getSupplyObject(),String.format("%.2f", StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":Double.parseDouble(tbAttResEngBene.getSupplyPopulation())/ 10000), tbAttResEngBene.getMoyearSupplyAvg()); |
| | | tbAttResEngBene.getSupplyObject(), |
| | | String.format("%.2f", StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), |
| | | tbAttResEngBene.getMoyearSupplyAvg()); |
| | | } |
| | | } |
| | | |
| | |
| | | //key值表示其他 |
| | | if (StringUtil.isNotBlank(typeKey)) { |
| | | if (typeKey.equals("9") || typeKey.equals("其他") || Integer.parseInt(typeKey) == 9 ) { |
| | | text = explain; |
| | | text = explain.trim(); |
| | | }else{ |
| | | switch (enumName) { |
| | | case "AqueductTypeEnum": |