public String addplaninfolist(String eventId, String advise, ArrayList P_ARR) {
Object[] tmp = new Object[P_ARR.size()];//数组大小
for (int i = 0; i < tmp.length; i++) {
Object[] tmparc = new Object[3];
ASObject aso = (ASObject) P_ARR.get(i);//对集合中的Object进行强转
String PLANNAME = (String) (aso.get("name"));// 预案名称
String PLANSIZE = (String) (aso.get("size"));// 大小
String PLANTYPE = (String) (aso.get("type"));// 类型
tmparc[0] = PLANNAME;
tmparc[1] = PLANSIZE;
tmparc[2] = PLANTYPE;
tmp[i] = tmparc;
}
// 进行插入
String state = addplaninfo(eventId, advise, tmp);
return state;
}
Java 集合参数处理(转换Objcet对象)
最新推荐文章于 2024-07-13 02:54:23 发布