aix
2024-08-12 65bf414c8946330b65ef6a1310bea6d14f7e6384
资料整编
4 files modified
55 ■■■■■ changed files
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java 10 ●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/util/WordUtil.java 2 ●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java 43 ●●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/resources/word/doc/skcgmb.docx patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java
@@ -226,8 +226,8 @@
        tableMap.put("midFloodEnd", mfe);
        tableMap.put("afterFloodStart", afs);
        tableMap.put("afterFloodEnd", afe);
        tableMap.put("desFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getDesFloodFlowMax()==null?"":tbAttResStagChar.getDesFloodFlowMax());
        tableMap.put("checFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getChecFloodFlowMax()==null?"":tbAttResStagChar.getChecFloodFlowMax());
        tableMap.put("desFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getDesFloodFlowMax()==null?"":String.format("%.2f",tbAttResStagChar.getDesFloodFlowMax()));
        tableMap.put("checFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getChecFloodFlowMax()==null?"":String.format("%.2f",tbAttResStagChar.getChecFloodFlowMax()));;
        String mainDamType = "";
        String mainDamMainFoundation = "";
@@ -288,7 +288,7 @@
        tableMap.put("mainUpDamProtectType", mainUpDamProtectType);
        tableMap.put("mainDownDamProtectType", mainDownDamProtectType);
        tableMap.put("damMainBodyType", damMainBodyType);
        tableMap.put("damMainBodyTopElevation", damMainBodyTopElevation);
        tableMap.put("damMainBodyTopElevation", null !=damMainBodyTopElevation?String.format("%.2f",Double.parseDouble(damMainBodyTopElevation)):"");
        tableMap.put("damMainDrainType", damMainDrainType);
        tableMap.put("mainDamBodyType", mainDamBodyType);
        int subDamNumNew = tbAttResWaterBlockList.size() - 1;
@@ -624,13 +624,13 @@
            tableMap.put("protect", String.join("、", protectList));
        }
        double person = 0;
        if (tbAttResEngBene !=null && tbAttResEngBene.getFlControlPerson() != null) {
        if (tbAttResEngBene !=null && tbAttResEngBene.getFlControlPerson() != null && tbAttResEngBene.getFlControlPerson() > 0 ) {
            person = tbAttResEngBene.getFlControlPerson() / 10000.0;
            tableMap.put("flControlPerson", WordUtil.removeTrailingZero(String.format("%.2f", person)));
        } else {
            tableMap.put("flControlPerson", "");
        }
        tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null?"":
        tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null || tbAttResEngBene.getFlControlLand() <= 0?"":
            WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 10000)));
        tableMap.put("irrObject", tbAttResEngBene==null?"":tbAttResEngBene.getIrrObject()==null?"":tbAttResEngBene.getIrrObject());
        tableMap.put("moyearIrrAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearIrrAvg() == null?"":
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/util/WordUtil.java
@@ -79,7 +79,7 @@
        params.put("挡水建筑物泄洪建筑物正常溢洪道", tbWordVO.getBuildingText());
        params.put("主坝信息", tbWordVO.getMainDamInfo());
        params.put("挡水建筑物泄洪建筑物正常溢洪道等详情", tbWordVO.getBuildingInfo());
        params.put("输水建筑物输水道形式", tbWordVO.getAqueductType());//若有两个以上输水建筑物,则描述设计流量较大的,若只有一个输水建筑物则去掉“主要”
        params.put("输水建筑物输水道形式", tbWordVO.getAqueductType().trim());//若有两个以上输水建筑物,则描述设计流量较大的,若只有一个输水建筑物则去掉“主要”
        params.put("断面尺寸", tbWordVO.getSection());
        params.put("进口底槛高程", tbWordVO.getThresholdElevation());
        params.put("设计流量", tbWordVO.getDesignFlow());
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java
@@ -163,14 +163,20 @@
                    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);
@@ -313,7 +319,7 @@
        if (norspi.getIsGate().equals("是")) {
            gateText = "有闸控制";
            String hole = norspi.getGateNum() == 1 ? "单" : String.valueOf(norspi.getGateNum());
            holeText = StringUtil.format(",设{}孔", hole);
            holeText = StringUtil.format(",{}孔", hole);
        } else {
            gateText = "无闸控制";
        }
@@ -549,7 +555,12 @@
        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());
@@ -609,7 +620,7 @@
        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);
@@ -633,12 +644,16 @@
            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());
            }
        }
@@ -690,7 +705,7 @@
        //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":
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/resources/word/doc/skcgmb.docx
Binary files differ