3.3 数据库设计.........................................................................................................................22
3.3.1 数据库设计的原则...................................................................................................22
3.3.2 数据库表的设计.......................................................................................................22
4 系统功能模块实现...................................................................................................................23
4.1 页面功能实现.........................................................................................................................24
4.1.1 公交线路模块实现........................................................................................................24
/**.....................................................................................................................................................25
* 找到所有的路线.......................................................................................................................25
* @return..........................................................................................................................................25
*/.......................................................................................................................................................25
@RequestMapping(value = "/roadline_findAllRoadlineByJson.action",.......................................25
produces = "application/json;charset=UTF-8")...............................................................................25
@ResponseBody..............................................................................................................................25
public String findAllRoadlineByJson(){.........................................................................................25
List<Roadline> roadlist=roadlineDAO.findAll();...........................................................................25
gson=new GsonBuilder().setExclusionStrategies(exclusionStrategy).create();..............................25
Map pageMap=new HashMap<>();.................................................................................................25
pageMap.put("rows",roadlist);.........................................................................................................25
pageMap.put("linestring",roadUtil.getLineStringPointsFromRoadList(roadlist));........................25
return gson.toJson(pageMap);..........................................................................................................25
}........................................................................................................................................................25
4.1.2 公交路段管理模块实现...............................................................................................26
@RequestMapping(value = "/roadsection_queryRoadSection.action",...........................................27
produces = "application/json;charset=UTF-8")...............................................................................27
@ResponseBody..............................................................................................................................27
public String queryRoadSection(Roadsection model, @RequestParam Integer
page,@RequestParam Integer rows){...............................................................................................27
Map pageMap=new HashMap<String, Object>();..........................................................................27
pageMap.put("total", roadsectionDAO.getCount(model.getName()));..........................................27
System.out.println(roadsectionDAO.getCount(model.getName()));..............................................27
List<Roadsection> roadSectionList=roadsectionDAO.queryWithPageAndSize(model.getName(),
page, rows);.......................................................................................................................................27
pageMap.put("rows", jsonUtil.roadsectionList(roadSectionList));.................................................27
return gson.toJson(pageMap);..........................................................................................................27
}........................................................................................................................................................27
评论5
最新资源