From 1c5e273bbd5751664dd9b65149c4b2dd3ede94ec Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 08 Sep 2021 11:30:37 +0800
Subject: [PATCH] 1.单位

---
 src/main/java/org/springblade/modules/regionWeight/controller/RegionWeightController.java |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/main/java/org/springblade/modules/regionWeight/controller/RegionWeightController.java b/src/main/java/org/springblade/modules/regionWeight/controller/RegionWeightController.java
index 3a26f88..f1f76b1 100644
--- a/src/main/java/org/springblade/modules/regionWeight/controller/RegionWeightController.java
+++ b/src/main/java/org/springblade/modules/regionWeight/controller/RegionWeightController.java
@@ -427,7 +427,7 @@
 		if (maps.size() == 0) {
 			a = yday + "暂无降雨信息。";
 		} else {
-			a = yday + "点降雨量前三为:" + text.substring(0,text.length()-1)+"。";
+			a = yday + "点降雨量前三为:" + text.substring(0, text.length() - 1) + "。";
 		}
 		map.put("text", a);
 		lists.add(map);
@@ -514,13 +514,13 @@
 		List<Map<String, Object>> list2 = regionWeightService.selectLALL();
 		List<Map<String, Object>> list3 = regionWeightService.selectLNam();
 		Map mc = new HashMap();
-		for (int a=0;a<list2.size();a++){
-			for (int b=0;b<list3.size();b++){
+		for (int a = 0; a < list2.size(); a++) {
+			for (int b = 0; b < list3.size(); b++) {
 				String code = list2.get(a).get("code").toString();
 				String num = list2.get(a).get("num").toString();
 				String code1 = list3.get(b).get("code").toString();
-				if (code.equals(code1)){
-                      mc.put(list3.get(b).get("cname").toString(),num);
+				if (code.equals(code1)) {
+					mc.put(list3.get(b).get("cname").toString(), num);
 				}
 			}
 		}
@@ -625,24 +625,25 @@
 
 				}
 			}
-			Collections.sort(listc, new Comparator<Map<String,Object>>(){
-				public int compare(Map<String,Object> o1,Map<String,Object> o2){
-					return  (Double)o1.get("dyp")<(Double)o2.get("dyp")?1:( (Double)o1.get("dyp")==(Double)o2.get("dyp")?0:-1);
+			Collections.sort(listc, new Comparator<Map<String, Object>>() {
+				public int compare(Map<String, Object> o1, Map<String, Object> o2) {
+					return (Double) o1.get("dyp") < (Double) o2.get("dyp") ? 1 : ((Double) o1.get("dyp") == (Double) o2.get("dyp") ? 0 : -1);
 				}
 			});
-			for (int c=0;c<listc.size();c++){
-				if (c<3){
-					text+=listc.get(c).get("region").toString()+":"+listc.get(c).get("dyp")+"(mm),";
+			for (int c = 0; c < listc.size(); c++) {
+				if (c < 3) {
+					text += listc.get(c).get("region").toString() + ":" + listc.get(c).get("dyp") + "(mm),";
 				}
 			}
-			String a="流域前三的为:"+text.substring(0,text.length()-1)+"。";
+			String a = "流域前三的为:" + text.substring(0, text.length() - 1) + "。";
 			mapc.put("List", listc);
 			mapc.put("Num", mc);
-			mapc.put("text", yday+a);
+			mapc.put("text", yday + a);
 			lists.add(mapc);
 		}
 		return R.data(lists);
 	}
+
 	/**
 	 * @param type        类型 0:实时 1 历史
 	 * @param timez       当前时间 yyyy-MM-dd HH:00:00
@@ -696,8 +697,7 @@
 				lists.add(map);
 			}
 			return R.data(lists);
-		}
-		else {
+		} else {
 			//当前时间
 			String time = timez;
 
@@ -840,7 +840,7 @@
 		if (maps.size() == 0) {
 			a = yday + "暂无降雨信息。";
 		} else {
-			a = yday + "点降雨量前三为:" + text.substring(0,text.length()-1)+"。";
+			a = yday + "点降雨量前三为:" + text.substring(0, text.length() - 1) + "。";
 		}
 		map.put("text", a);
 		lists.add(map);

--
Gitblit v1.9.3