aix
2024-08-17 39081183f7cc171aefc435f33b077d3ce41fd2ea
资料整编
5 files modified
102 ■■■■ changed files
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/enums/RsbWorkingGateEnum.java 3 ●●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java 26 ●●●● 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 71 ●●●● 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/enums/RsbWorkingGateEnum.java
@@ -24,9 +24,12 @@
     */
    PBZM("1","平板闸门"),
    PBZM2("平板闸门","平板闸门"),
    HXZM("2","弧形闸门"),
    HXZM2("弧形闸门","弧形闸门"),
    QI_TA("9","其他"),
    QI_TA2("其他","其他"),
    NULL_ABLE("","");
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java
@@ -298,7 +298,7 @@
        tableMap.put("mainUpDamProtectType", mainUpDamProtectType);
        tableMap.put("mainDownDamProtectType", mainDownDamProtectType);
        tableMap.put("damMainBodyType", damMainBodyType);
        tableMap.put("damMainBodyTopElevation", null !=damMainBodyTopElevation?String.format("%.2f",Double.parseDouble(damMainBodyTopElevation)):"");
        tableMap.put("damMainBodyTopElevation", StringUtil.isNotBlank(damMainBodyTopElevation)?String.format("%.2f",Double.parseDouble(damMainBodyTopElevation)):"");
        tableMap.put("damMainDrainType", damMainDrainType);
        tableMap.put("mainDamBodyType", mainDamBodyType);
        int subDamNumNew = tbAttResWaterBlockList.size() - 1;
@@ -343,7 +343,13 @@
            TbAttResRsbNorspi tbAttResRsbNorspi = tbAttResRsbNorspiList.get(0);
            if (tbAttResRsbNorspi.getSpillwayType().indexOf("9") > -1) {
                norSpillwayType = tbAttResRsbNorspi.getSpillwayType().split(",")[1];
                String [] spillwayTypeStrs = tbAttResRsbNorspi.getSpillwayType().split(",");
                if (spillwayTypeStrs.length > 1) {
                    norSpillwayType = spillwayTypeStrs[1];
                } else {
                    norSpillwayType = SpillwayTypeEnum.find(tbAttResRsbNorspi.getSpillwayType()).getLabel();
                }
            } else {
                norSpillwayType = SpillwayTypeEnum.find(tbAttResRsbNorspi.getSpillwayType()).getLabel();
            }
@@ -352,9 +358,9 @@
            norWeirTopElevation = isNullObject(tbAttResRsbNorspi.getWeirTopElevation());
            norWeirTopWidth = isNullObject(tbAttResRsbNorspi.getWeirTopWidth());
            if (tbAttResRsbNorspi.getIsGate().equals("否")) {
            if (null != tbAttResRsbNorspi.getIsGate() && tbAttResRsbNorspi.getIsGate().equals("否")) {
                norWorkingGateType = "无闸控制";
            } else if (tbAttResRsbNorspi.getIsGate().equals("是")) {
            } else if (null != tbAttResRsbNorspi.getIsGate() && tbAttResRsbNorspi.getIsGate().equals("是")) {
                // 平板闸门,3X3
                String typeName = RsbWorkingGateEnum.find(tbAttResRsbNorspi.getWorkingGateType().toString()).getLabel();
                String norwgtStr = "";
@@ -455,7 +461,11 @@
            List<String> list = new ArrayList<>();
            list.add(convertType(tbAttResRsbSpillway.getOcType(), "OcTypeEnum"));
            list.add(tbAttResRsbSpillway.getOcPower());
            if (StringUtil.isNotBlank(convertType(tbAttResRsbSpillway.getOcType(), "OcTypeEnum")) &&
            StringUtil.isNotBlank(tbAttResRsbSpillway.getOcPower())) {
            rsbOc = String.join(",", list);
            }
        }
@@ -532,7 +542,7 @@
                tableMap.put("deliverSection3", deliverSection);
                tableMap.put("designFlow3", designFlow);
                tableMap.put("workingGateType3", workingGateType);
                tableMap.put("deliverOc", deliverOc);
                tableMap.put("deliverOc3", deliverOc);
            }
        }
@@ -669,7 +679,7 @@
//        }
        tableMap.put("supplyPopulation", tbAttResEngBene.getSupplyPopulation());
        tableMap.put("supplyPopulation", tbAttResEngBene==null?"":tbAttResEngBene.getSupplyPopulation()==null?"":tbAttResEngBene.getSupplyPopulation());
        tableMap.put("moyearSupplyAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearSupplyAvg()==null?"":tbAttResEngBene.getMoyearSupplyAvg());
        tableMap.put("moyearPowerAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearPowerAvg()==null?"":tbAttResEngBene.getMoyearPowerAvg());
        tableMap.put("ecologicalFlow", tbAttResEngBene==null?"":tbAttResEngBene.getEcologicalFlow()==null?"":tbAttResEngBene.getEcologicalFlow());
@@ -1249,6 +1259,10 @@
    private String convertType(String type, String enumName) {
        if (StringUtil.isBlank(type)) {
            return "";
        }
        String text = "";
        List<String> typeList = Arrays.asList(type.split(","));
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().trim());//若有两个以上输水建筑物,则描述设计流量较大的,若只有一个输水建筑物则去掉“主要”
        params.put("输水建筑物输水道形式", StringUtil.isNotBlank(tbWordVO.getAqueductType())?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
@@ -305,6 +305,9 @@
     * @return
     */
    private String GenerateNorspiInfo(TbAttResRsbNorspi norspi) {
        if(null == norspi || StringUtil.isBlank(norspi.getName())) {
            return "";
        }
        /**
         * 溢洪道(第一座泄水建筑物为溢洪道)为正槽式溢洪道(溢洪道型式),
         * 有闸控制(溢洪道根据是否有闸控制确定,填有闸控制、无闸控制),堰顶高程XXm,堰顶净宽XXm,
@@ -558,20 +561,45 @@
            this.aqueductType = "水库采用";
        }
        if (StringUtil.isNotBlank(tbAttResWaterDelivery.getAqueductType())) {
        this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水";
        if (null == tbAttResWaterDelivery.getSectionHigh()) {
            this.section = "φ" + isNull(tbAttResWaterDelivery.getSectionWide());
        } else {
            this.section = isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh());
            this.aqueductType = "";
        }
        this.thresholdElevation = String.format("%.2f",tbAttResWaterDelivery.getThresholdElevation());
        this.designFlow = WordUtil.removeTrailingZero(isNull(tbAttResWaterDelivery.getDesignFlow()));
        if (null != tbAttResWaterDelivery.getSectionWide()  && null != tbAttResWaterDelivery.getSectionHigh()) {
            if (StringUtil.isNotBlank(this.aqueductType)) {
                this.section = ",断面尺寸";
            }
            this.section = this.section + isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh()) + "m";
        } else {
            if (null != tbAttResWaterDelivery.getSectionWide()) {
                if (StringUtil.isNotBlank(this.aqueductType)) {
                    this.section = ",断面尺寸";
                }
                this.section = this.section + isNull(tbAttResWaterDelivery.getSectionWide()) + "m";
            } else {
                this.section = "";
            }
        }
        if (null != tbAttResWaterDelivery.getThresholdElevation()) {
            if (StringUtil.isNotBlank(this.aqueductType) || StringUtil.isNotBlank(this.section)) {
                this.thresholdElevation = ",进口底槛高程";
            }
            this.thresholdElevation = this.thresholdElevation + String.format("%.2f",tbAttResWaterDelivery.getThresholdElevation()) + "m";
        }
        if (null != tbAttResWaterDelivery.getDesignFlow()) {
            if (StringUtil.isNotBlank(this.aqueductType) || StringUtil.isNotBlank(this.section) || StringUtil.isNotBlank(this.thresholdElevation)) {
                this.designFlow = ",设计流量";
            }
            this.designFlow = this.designFlow + WordUtil.removeTrailingZero(isNull(tbAttResWaterDelivery.getDesignFlow())) + "m³/s。";
        }
    }
@@ -581,9 +609,9 @@
            return;
        }
        this.protectCity = tbAttResEngBene.getCity().equals("无")?tbAttResEngBene.getTown():tbAttResEngBene.getCity();
        this.protectCity = tbAttResEngBene.getCity().equals("无")?"保护下游" + tbAttResEngBene.getTown():"保护下游" + tbAttResEngBene.getCity();
        if (StringUtil.isBlank(this.protectCity)) {
            this.protectCity = tbAttResEngBene.getTown().equals("无")?"":tbAttResEngBene.getTown();
            this.protectCity = tbAttResEngBene.getTown().equals("无")?"":"保护下游" + tbAttResEngBene.getTown();
        }
        double person = tbAttResEngBene.getFlControlPerson() / 10000.0;
@@ -600,8 +628,9 @@
            }
        }
        this.protectPersonLand =
            StringUtil.format("{}万人口、{}万亩耕地", WordUtil.removeTrailingZero(String.format("%.2f",person)) , WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000)));
//        this.protectPersonLand =
//            StringUtil.format("{}万人口、{}万亩耕地", WordUtil.removeTrailingZero(String.format("%.2f",person)) , WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000)));
        ////铁路、公路、管线、企业几个依次罗列,超过三个列出第二个后为“XX等”,后面不需罗列
        String railway = tbAttResEngBene.getRailway();
@@ -626,13 +655,23 @@
        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);
            this.protectThings = String.join("、", sublist) + "等";
            this.protectThings = "及" + String.join("、", sublist) + "等";
        } else if(protectList.size() >= 1 ){
            this.protectThings = "及" + String.join("、", protectList);
        } else {
            this.protectThings = String.join("、", protectList);
            this.protectThings = "";
        }
        if ((this.protectCity.equals("无") || StringUtil.isBlank(this.protectCity) || this.protectCity.equals("保护下游无")) &&
            StringUtil.isBlank(this.protectPersonLand) &&
            StringUtil.isBlank(this.protectThings)) {
            this.protectCity = "无防洪保护对象";
        } else {
            this.protectThings = this.protectThings  + "的防洪安全";
        }
        this.economicBenefit = "";
@@ -694,7 +733,7 @@
        this.mUnitName = tbAttResMgrSysB.getMUnitName();
        this.mUnitNature = tbAttResMgrSysB.getMUnitNature().replace("公益类","事业单位");
        this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber().toString();
        this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber() + "";
    }
    //对有补充说明的选项进行转换
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/resources/word/doc/skcgmb.docx
Binary files differ