/**
* UI页面三级参数后面的下拉框选择框及描述接口
*
* @param eventId
* @return
*/
@RequestMapping("conditionsChoose")
@ResponseBody
public Map<String, Object> conditionsChoose(String eventId) {
//返回数据
Map res = new HashMap();
try {
Map map = new HashMap();
map.put("eventId", eventId);
String province = ClyxUtils.findCurrentProvinceCode();
map.put("provinceCode", province);
logger.info("map======>" + map);
List<Map<String, Object>> dataList = new ArrayList<>();
dataList = addEventServiceImpl.conditionsChoose(map);
List<Map<String, Object>> listParams = new ArrayList<>();
//二级map里面的参数
Map<String, Object> resMap = new HashMap<>();
//用来存参数值
List<Map<String, Object>> listMap = new ArrayList<>();
Map<String, Object> map1 = dataList.get(0);
resMap.put("source_name", map1.get("source_name"));
resMap.put("params_code", map1.get("params_code"));
resMap.put("params_type", map1.get("params_type"));
resMap.put("param_desc", map1.get("expl_param"));
System.out.println("dataList =========================> " + dataList);
for (Map<String, Object> par : dataList) {
Map map2 = new HashMap();
map2.put("name", par.get("params_name"));
map2.put("value", par.get("params_value"));
map2.put("desc", par.get("desc_params"));
listMap.add(map2);
System.out.println("map2 =======================> " + map2);
}
System.out.println("listMap =========================> " + listMap);
resMap.put("paramList", listMap);
logger.info("==================>" + listParams);
logger.info("========================" + JSONObject.toJSON(dataList));
res.put("data", resMap);
res.put("msg", "success");
res.put("code", "0000");
} catch (Exception e) {
res.put("msg", e.getMessage());
}
return res;
}
2021-11-09
最新推荐文章于 2024-08-26 16:40:46 发布