JsonArray转List<Map<String,Object>>

   
JSONObject projectSiteByProjectIdAndBidSectionId = baseFeignService.getProjectSiteByProjectIdAndBidSectionId(projectId, bidSectionId);

//如果该项目该工程下存在工点
String projectSiteAndBidSectionData = projectSiteByProjectIdAndBidSectionId.getJSONArray("data").toJSONString();

List<Map<String,Object>> projectSiteList = (List<Map<String,Object>>) JSONArray.parse(projectSiteAndBidSectionData);


for (int i = 0; i < projectSiteList.size(); i++) {
    Map<String,Object> map = projectSiteList.get(i);
    //先写死数据
    map.put("allPeopleCount",10);//工点所在总人数
    map.put("punchPeopleCount",5);//打卡人数

}

你可能感兴趣的:(JsonArray转List<Map<String,Object>>)