From 2bdec541de90a545e231f6fe5095837f8f5934bf Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Fri, 26 Jan 2024 19:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=A9=E7=8C=8E=E4=BA=BA=E5=91=98=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PoachingController.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java b/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java index eae5768..c4d58f4 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java @@ -72,29 +72,29 @@ public class PoachingController extends BaseController { double ffslaPerce = (double) ffslaCount / count * 100; ffslaPerce = Double.isNaN(ffslaPerce) ? 0 : ffslaPerce; - String ffslaPerceStr = String.format("%.0f%%", ffslaPerce); - double ffslbsPerce = (double) ffslbsCount / count * 100; ffslbsPerce = Double.isNaN(ffslbsPerce) ? 0 : ffslbsPerce; - String ffslbsPerceStr = String.format("%.0f%%", ffslbsPerce); + ffslaPerce = ffslbsPerce + ffslaPerce; +// String ffslbsPerceStr = String.format("%.0f%%", ffslbsPerce); + String ffslaPerceStr = String.format("%.0f%%", ffslaPerce); PersonStatissticsVo bean = new PersonStatissticsVo(); bean.setCount(count); Map ffblscMap = new HashMap(); - ffblscMap.put("name","非法捕捞水产品案"); - ffblscMap.put("value",ffblscCount); - ffblscMap.put("percentage",ffblscPerceStr); + ffblscMap.put("name", "非法捕捞水产品案"); + ffblscMap.put("value", ffblscCount); + ffblscMap.put("percentage", ffblscPerceStr); bean.setFfblsc(ffblscMap); Map ffslaMap = new HashMap(); - ffslaMap.put("name","非法狩猎案"); - ffslaMap.put("value",ffslaCount); - ffslaMap.put("percentage",ffslaPerceStr); + ffslaMap.put("name", "非法狩猎案"); + ffslaMap.put("value", ffslaCount); + ffslaMap.put("percentage", ffslaPerceStr); bean.setFfsla(ffslaMap); - Map ffslbsMap = new HashMap(); - ffslbsMap.put("name","非法猎捕杀害珍贵、濒危野生动物案"); - ffslbsMap.put("value",ffslbsCount); - ffslbsMap.put("percentage",ffslbsPerceStr); - bean.setFfslbs(ffslbsMap); +// Map ffslbsMap = new HashMap(); +// ffslbsMap.put("name", "非法猎捕杀害珍贵、濒危野生动物案"); +// ffslbsMap.put("value", ffslbsCount); +// ffslbsMap.put("percentage", ffslbsPerceStr); +// bean.setFfslbs(ffslbsMap); return AjaxResult.success(bean); } catch (Exception e) {