|
|
@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
@ -157,6 +158,10 @@ public class EhsIndexStatisticsController extends BaseController {
|
|
|
|
List<Map<String,Object>> list = ehsIndexStatisticsService.getHiddenDangerTypeMapList();
|
|
|
|
List<Map<String,Object>> list = ehsIndexStatisticsService.getHiddenDangerTypeMapList();
|
|
|
|
return AjaxResult.success(list);
|
|
|
|
return AjaxResult.success(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
System.out.println(DateUtil.year(new Date()));
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 隐患数据统计分析
|
|
|
|
* 隐患数据统计分析
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -165,6 +170,9 @@ public class EhsIndexStatisticsController extends BaseController {
|
|
|
|
public AjaxResult getHiddenDangerDataMapList(String year)
|
|
|
|
public AjaxResult getHiddenDangerDataMapList(String year)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
JSONArray row = new JSONArray();
|
|
|
|
JSONArray row = new JSONArray();
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(year)){
|
|
|
|
|
|
|
|
year = DateUtil.year(new Date())+"";
|
|
|
|
|
|
|
|
}
|
|
|
|
List<Map<String,Object>> list = ehsIndexStatisticsService.getHiddenDangerDataMapList(year);
|
|
|
|
List<Map<String,Object>> list = ehsIndexStatisticsService.getHiddenDangerDataMapList(year);
|
|
|
|
if(StringUtils.isNotEmpty(list)){
|
|
|
|
if(StringUtils.isNotEmpty(list)){
|
|
|
|
LinkedHashMap<Object, List<Map<String, Object>>> nameList = list.stream().collect(Collectors.groupingBy(e -> e.get("name"), LinkedHashMap::new, Collectors.toList()));
|
|
|
|
LinkedHashMap<Object, List<Map<String, Object>>> nameList = list.stream().collect(Collectors.groupingBy(e -> e.get("name"), LinkedHashMap::new, Collectors.toList()));
|
|
|
|