狩猎人员统计接口更新

develop
hanrenchun 10 months ago
parent bccfb1bf32
commit 2bdec541de

@ -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) {

Loading…
Cancel
Save