From 39081183f7cc171aefc435f33b077d3ce41fd2ea Mon Sep 17 00:00:00 2001
From: aix <vip_xiaobin810@163.com>
Date: Sat, 17 Aug 2024 13:11:01 +0800
Subject: [PATCH] 资料整编

---
 skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java |   73 ++++++++++++++++++++++++++++--------
 1 files changed, 56 insertions(+), 17 deletions(-)

diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java
index bc389dc..fc99b81 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/vo/TbWordVO.java
+++ b/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 = "水库采用";
 		}
 
-
-		this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水";
-
-
-		if (null == tbAttResWaterDelivery.getSectionHigh()) {
-			this.section = "φ" + isNull(tbAttResWaterDelivery.getSectionWide());
+		if (StringUtil.isNotBlank(tbAttResWaterDelivery.getAqueductType())) {
+			this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水";
 		} 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() + "";
 	}
 
 	//对有补充说明的选项进行转换

--
Gitblit v1.9.3