aix
2024-07-22 db44360bd8269386f06163c3561550030fb9a6ba
资料整编导出优化
4 files modified
119 ■■■■■ changed files
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/entity/TbAttResWaterBlock.java 2 ●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java 82 ●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java 35 ●●●● 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/entity/TbAttResWaterBlock.java
@@ -155,7 +155,7 @@
     * 副坝座数
     */
    @ApiModelProperty(value = "副坝座数")
    @TableField(value="\"sub_dam_num\"",fill = FieldFill.UPDATE)
    @TableField(value="\"sub_dam_num\"")
    private Integer subDamNum;
    /**
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/service/impl/SjztmdServiceImpl.java
@@ -291,10 +291,31 @@
        tableMap.put("damMainBodyTopElevation", damMainBodyTopElevation);
        tableMap.put("damMainDrainType", damMainDrainType);
        tableMap.put("mainDamBodyType", mainDamBodyType);
        tableMap.put("subDamNum", subDamNum);
        tableMap.put("subDamTotLength", subDamTotLength);
        tableMap.put("subDamMaxHeight", subDamMaxHeight);
        tableMap.put("subDamTopWidth", subDamTopWidth);
        int subDamNumNew = tbAttResWaterBlockList.size() - 1;
        tableMap.put("subDamNum", subDamNumNew);
        if (subDamNumNew > 0) {
            double damHeight = 0.0;
            int index = 0;
            double damTopLength = 0.0;
            for (int i = 1; i < tbAttResWaterBlockList.size(); i++) {
                TbAttResWaterBlock waterBlock = tbAttResWaterBlockList.get(i);
                if (waterBlock.getDamHeight() > damHeight) {
                    damHeight = waterBlock.getDamHeight();
                    index = i;
                }
                damTopLength += waterBlock.getDamTopLength();
            }
            tableMap.put("subDamMaxHeight", damHeight);//副坝最大坝高
            tableMap.put("subDamTopWidth", tbAttResWaterBlockList.get(index).getDamWidth());//坝顶宽引用最高那座的坝顶宽
            tableMap.put("subDamTotLength", damTopLength);//坝长算所有副坝的总长度
        } else {
            tableMap.put("subDamMaxHeight", "");//副坝最大坝高
            tableMap.put("subDamTopWidth", "");//坝顶宽引用最高那座的坝顶宽
            tableMap.put("subDamTotLength", "");
        }
        //正常溢洪道
        List<TbAttResRsbNorspi> tbAttResRsbNorspiList = (List<TbAttResRsbNorspi>) resRsbNorsipiVerspiMionitorDetailByGuid.get("tbAttResRsbNorspiList");
@@ -322,7 +343,19 @@
            } else if (tbAttResRsbNorspi.getIsGate() == "是") {
                // 平板闸门,3X3
                String typeName = RsbWorkingGateEnum.find(tbAttResRsbNorspi.getWorkingGateType().toString()).getLabel();
                norWorkingGateType = StringUtil.format("{},{}X{}", typeName, tbAttResRsbNorspi.getGateWide(), tbAttResRsbNorspi.getGateLength());
                String norwgtStr = "";
                if (StringUtil.isNotBlank(typeName)) {
                    norwgtStr = typeName;
                }
                if (null != tbAttResRsbNorspi.getGateWide()) {
                    if (StringUtil.isNotBlank(typeName)) {
                        norwgtStr += "," + tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength();
                    } else {
                        norwgtStr += tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength();
                    }
                }
//                norWorkingGateType = StringUtil.format("{},{}X{}", typeName, tbAttResRsbNorspi.getGateWide(), tbAttResRsbNorspi.getGateLength());
                norWorkingGateType = norwgtStr;
            }
            norCheckingFloodDischarge = isNullObject(tbAttResRsbNorspi.getCheckingFloodDischarge());
@@ -337,8 +370,12 @@
            String ocType = OcTypeEnum.find(isNullObject(tbAttResRsbNorspi.getOcType())).getLabel();
            list.add(ocType);
            list.add(tbAttResRsbNorspi.getOcPower());
            if (StringUtil.isNotBlank(ocType)) {
                list.add(ocType);
            }
            if (StringUtil.isNotBlank(tbAttResRsbNorspi.getOcPower())) {
                list.add(tbAttResRsbNorspi.getOcPower());
            }
            norOc = String.join(",", list);
        }
@@ -552,30 +589,30 @@
        //水库效益
        List<String> protectList = new ArrayList<>();
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getCity().equals("无") ) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getCity().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getCity())) {
            protectList.add(tbAttResEngBene.getCity());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getTown().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getTown().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getTown())) {
            protectList.add(tbAttResEngBene.getTown());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getRailway().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getRailway().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getRailway())) {
            protectList.add(tbAttResEngBene.getRailway());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getHighway().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getHighway().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getHighway())) {
            protectList.add(tbAttResEngBene.getHighway());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportCommunication().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportCommunication().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getImportCommunication())) {
            protectList.add(tbAttResEngBene.getImportCommunication());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportFactory().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportFactory().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getImportFactory())) {
            protectList.add(tbAttResEngBene.getImportFactory());
        }
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportOtherFac().equals("无")) {
        if (tbAttResEngBene!=null &&!tbAttResEngBene.getImportOtherFac().equals("无") && StringUtil.isNotBlank(tbAttResEngBene.getImportOtherFac())) {
            protectList.add(tbAttResEngBene.getImportOtherFac());
        }
        //只留前四个
@@ -589,16 +626,21 @@
        double person = 0;
        if (tbAttResEngBene !=null && tbAttResEngBene.getFlControlPerson() != null) {
            person = tbAttResEngBene.getFlControlPerson() / 10000.0;
            tableMap.put("flControlPerson", String.format("%.2f", person));
            tableMap.put("flControlPerson", WordUtil.removeTrailingZero(String.format("%.2f", person)));
        } else {
            tableMap.put("flControlPerson", "");
        }
        tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null?"":String.format("%.2f", tbAttResEngBene.getFlControlLand() / 10000));
        tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null?"":
            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?"":tbAttResEngBene.getMoyearIrrAvg());
        tableMap.put("desIrrArea", tbAttResEngBene==null?"":tbAttResEngBene.getDesIrrArea() == null ?"":String.format("%.2f", tbAttResEngBene.getDesIrrArea() / 10000));
        tableMap.put("checIrrArea", tbAttResEngBene==null?"":tbAttResEngBene.getChecIrrArea()==null?"":String.format("%.2f", tbAttResEngBene.getChecIrrArea() / 10000));
        tableMap.put("supplyObject", tbAttResEngBene==null?"":tbAttResEngBene.getSupplyObject()==null?"":tbAttResEngBene.getSupplyObject());
        tableMap.put("moyearIrrAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearIrrAvg() == null?"":
            WordUtil.removeTrailingZero(tbAttResEngBene.getMoyearIrrAvg().toString()));
        tableMap.put("desIrrArea", tbAttResEngBene==null?"":tbAttResEngBene.getDesIrrArea() == null ?"":
            WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getDesIrrArea() / 10000)));
        tableMap.put("checIrrArea", tbAttResEngBene==null?"":tbAttResEngBene.getChecIrrArea()==null?"":
            WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getChecIrrArea() / 10000)));
        tableMap.put("supplyObject", tbAttResEngBene==null?"":tbAttResEngBene.getSupplyObject()==null?"":
            tbAttResEngBene.getSupplyObject());
//        Double sup = 0.0;
//        String supS = "";
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java
@@ -201,7 +201,7 @@
        //大坝数量
        int damCount = tbAttResWaterBlockList.size();
        if (damCount > 1) {
            buildingList.add(StringUtil.format("副坝({})座", damCount - 1));
            buildingList.add(StringUtil.format("副坝({}座)", damCount - 1));
            //根据名字判断主坝
            List<TbAttResWaterBlock> mainDamList = tbAttResWaterBlockList.stream().filter(tbAttResWaterBlock -> tbAttResWaterBlock.getName().indexOf("主坝") > -1).collect(Collectors.toList());
@@ -327,7 +327,7 @@
        String disCharge = isNull(norspi.getCheckingFloodDischarge());
        String text = StringUtil.format("溢洪道为{},{},堰顶高程{}m,堰顶净宽{}m{},最大泄洪量{}m³/s。",
            typeName, gateText, StringUtil.format("", String.format("%.2f",norspi.getWeirTopElevation())), WordUtil.removeTrailingZero(weirTopWidth), holeText, WordUtil.removeTrailingZero(disCharge));
            typeName, gateText, String.format("%.2f",norspi.getWeirTopElevation()), WordUtil.removeTrailingZero(weirTopWidth), holeText, WordUtil.removeTrailingZero(disCharge));
        return text;
    }
@@ -395,7 +395,7 @@
            if (attResManagePerson.getType().equals("1")) {
                //行政
                this.administrativeInfo = StringUtil.format("{}({},{})",
                this.administrativeInfo = StringUtil.format("{}({},{})",
                    attResManagePerson.getUserName(), attResManagePerson.getPosition(), attResManagePerson.getUserPhone());
                this.administrativeUnit = attResManagePerson.getUserUnit();
@@ -403,7 +403,7 @@
            if (attResManagePerson.getType().equals("3")) {
                //主管
                this.competentDepartmentInfo = StringUtil.format("{}({},{})",
                this.competentDepartmentInfo = StringUtil.format("{}({},{})",
                    attResManagePerson.getUserName(), attResManagePerson.getPosition(), attResManagePerson.getUserPhone());
            }
@@ -518,7 +518,7 @@
            hydrologicalCharacteristicsList.add(StringUtil.format("死库容{}万m³", WordUtil.removeTrailingZero(tbAttResStagChar.getDeadCap().toString())));
        }
        if (tbAttResStagChar.getChecFlStag() != null) {
            hydrologicalCharacteristicsList2.add(StringUtil.format(this.resName + "校核洪水位{}m", String.format("%.2f",tbAttResStagChar.getChecFlStag())));
            hydrologicalCharacteristicsList2.add(StringUtil.format("校核洪水位{}m", String.format("%.2f",tbAttResStagChar.getChecFlStag())));
        }
        if (tbAttResStagChar.getDesFlStag() != null) {
            hydrologicalCharacteristicsList2.add(StringUtil.format("设计洪水位{}m", String.format("%.2f",tbAttResStagChar.getDesFlStag())));
@@ -541,13 +541,13 @@
        TbAttResWaterDelivery tbAttResWaterDelivery = tbAttResWaterDeliveryList.get(0);
        if (tbAttResWaterDeliveryList.size() > 1) {
            this.aqueductType = "水库主要采用输水";
            this.aqueductType = "水库主要采用";
        } else {
            this.aqueductType = "水库采用输水";
            this.aqueductType = "水库采用";
        }
        this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum");
        this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水";
        this.section = isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh());
@@ -572,19 +572,19 @@
        double person = tbAttResEngBene.getFlControlPerson() / 10000.0;
        if (person > 0) {
            this.protectPersonLand = String.format("%.2f",person) + "万人口";
            this.protectPersonLand = WordUtil.removeTrailingZero(String.format("%.2f",person)) + "万人口";
        }
        if (tbAttResEngBene.getFlControlLand() > 0) {
            if (StringUtil.isBlank(this.protectPersonLand)) {
                this.protectPersonLand = String.format("%.2f", tbAttResEngBene.getFlControlLand()) + "万亩耕地";
                this.protectPersonLand = WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand())) + "万亩耕地";
            } else {
                this.protectPersonLand = this.protectPersonLand + "、" + String.format("%.2f", tbAttResEngBene.getFlControlLand()) + "万亩耕地";
                this.protectPersonLand = this.protectPersonLand + "、" + WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand())) + "万亩耕地";
            }
        }
        this.protectPersonLand =
            StringUtil.format("{}万人口、{}万亩耕地", String.format("%.2f",person) , String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000));
            StringUtil.format("{}万人口、{}万亩耕地", WordUtil.removeTrailingZero(String.format("%.2f",person)) , WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000)));
        ////铁路、公路、管线、企业几个依次罗列,超过三个列出第二个后为“XX等”,后面不需罗列
        String railway = tbAttResEngBene.getRailway();
@@ -623,7 +623,10 @@
        if (StringUtils.isNotBlank(tbAttResEngBene.getIrrObject())) {
            this.economicBenefit =
                StringUtil.format("水库为{}提供灌溉用水,设计灌溉面积{}万亩,有效灌溉面积{}万亩,多年平均灌溉水量{}万m³。",
                    tbAttResEngBene.getIrrObject(), String.format("%.2f", tbAttResEngBene.getDesIrrArea() / 10000), String.format("%.2f", tbAttResEngBene.getChecIrrArea() / 10000), tbAttResEngBene.getMoyearIrrAvg());
                    tbAttResEngBene.getIrrObject(),
                    WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getDesIrrArea() / 10000)),
                    WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getChecIrrArea() / 10000)),
                    WordUtil.removeTrailingZero(tbAttResEngBene.getMoyearIrrAvg().toString()));
        }
        if (StringUtil.isNotBlank(tbAttResEngBene.getSupplyObject())) {
@@ -654,10 +657,10 @@
        String surveyProblem = tbAttResSafetyMonitor.getSurveyProblem();
        //(若一类坝,不介绍问题,二、三类坝介绍)
        if (tbAttResSafetyMonitor.getSafetyAppraisalResult().equals("1")) {
            this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为\"{}\"。",
            this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为“{}”。",
                time, type);
        } else {
            this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为\"{}\",工程主要存在问题为{}",
            this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为“{}”,工程主要存在问题为{}",
                time, type, surveyProblem);
        }
    }
@@ -669,7 +672,7 @@
        }
        this.mUnitName = tbAttResMgrSysB.getMUnitName();
        this.mUnitNature = tbAttResMgrSysB.getMUnitNature();
        this.mUnitNature = tbAttResMgrSysB.getMUnitNature().replace("公益类","事业单位");
        this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber().toString();
    }
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/resources/word/doc/skcgmb.docx
Binary files differ