map转换 bean和list
转实体类
JSONObject JSONObj = JSONObject.parseObject(JSON.toJSONString(resultMap));
String result = JSONObj.get("result").toString();
PalletFroSpx palletFroSpx = new Gson().fromJson(result, PalletFroSpx.class);
转List
JSONObject JSONObj = JSONObject.parseObject(JSON.toJSONString(resultMap.get("data")));
String data = JSONObj.get("records").toString();
Type type = new TypeToken<List<PartsResult>>() {
}.getType();
//spx数据
List<PartsResult> list = new Gson().fromJson(data, type);