狩猎人员统计接口更新

develop
hanrenchun 10 months ago
parent bccfb1bf32
commit 2bdec541de

@ -72,29 +72,29 @@ public class PoachingController extends BaseController {
double ffslaPerce = (double) ffslaCount / count * 100; double ffslaPerce = (double) ffslaCount / count * 100;
ffslaPerce = Double.isNaN(ffslaPerce) ? 0 : ffslaPerce; ffslaPerce = Double.isNaN(ffslaPerce) ? 0 : ffslaPerce;
String ffslaPerceStr = String.format("%.0f%%", ffslaPerce);
double ffslbsPerce = (double) ffslbsCount / count * 100; double ffslbsPerce = (double) ffslbsCount / count * 100;
ffslbsPerce = Double.isNaN(ffslbsPerce) ? 0 : ffslbsPerce; 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(); PersonStatissticsVo bean = new PersonStatissticsVo();
bean.setCount(count); bean.setCount(count);
Map ffblscMap = new HashMap(); Map ffblscMap = new HashMap();
ffblscMap.put("name","非法捕捞水产品案"); ffblscMap.put("name", "非法捕捞水产品案");
ffblscMap.put("value",ffblscCount); ffblscMap.put("value", ffblscCount);
ffblscMap.put("percentage",ffblscPerceStr); ffblscMap.put("percentage", ffblscPerceStr);
bean.setFfblsc(ffblscMap); bean.setFfblsc(ffblscMap);
Map ffslaMap = new HashMap(); Map ffslaMap = new HashMap();
ffslaMap.put("name","非法狩猎案"); ffslaMap.put("name", "非法狩猎案");
ffslaMap.put("value",ffslaCount); ffslaMap.put("value", ffslaCount);
ffslaMap.put("percentage",ffslaPerceStr); ffslaMap.put("percentage", ffslaPerceStr);
bean.setFfsla(ffslaMap); bean.setFfsla(ffslaMap);
Map ffslbsMap = new HashMap(); // Map ffslbsMap = new HashMap();
ffslbsMap.put("name","非法猎捕杀害珍贵、濒危野生动物案"); // ffslbsMap.put("name", "非法猎捕杀害珍贵、濒危野生动物案");
ffslbsMap.put("value",ffslbsCount); // ffslbsMap.put("value", ffslbsCount);
ffslbsMap.put("percentage",ffslbsPerceStr); // ffslbsMap.put("percentage", ffslbsPerceStr);
bean.setFfslbs(ffslbsMap); // bean.setFfslbs(ffslbsMap);
return AjaxResult.success(bean); return AjaxResult.success(bean);
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save