ke
2024-07-26 cf119adeab46dcc843c4c7b28a719a0c027d7c88
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 = "";