List<Map<String, Object>> detailList = new ArrayList<Map<String, Object>>();
for (Map<String, Object> map : list)
{
if (map != null && map.size() > 0)
{
detailMap = new HashMap<String, Object>();
++number;// 序号
detailMap.put("number", number);
detailList.add(detailMap);
}
Map<String, Object> detailMap = null;
List<Map<String, Object>> list = dao.queryDetailWarn(params, startRow, rowNum);
int number = 0;for (Map<String, Object> map : list)
{
if (map != null && map.size() > 0)
{
detailMap = new HashMap<String, Object>();
++number;// 序号
detailMap.put("number", number);
detailList.add(detailMap);
}
}
//main方法测试
public static void main(String[] args)
{
int num=0;
for(int i=0;i<10;i++){
++num;
System.out.println("num="+num);
}
}
//控制台打印:
num=1
num=2
num=3
num=4
num=5
num=6
num=7
num=8
num=9
num=10