50,530
社区成员
发帖
与我相关
我的任务
分享
int rowId = 0;
List content = new Vector();//在这里实例化,每次分配新的内存空间。所以不管是vector还是arraylist都不会引起安全问题???
List rowContent = null;
for (int n = 0; n < mpmsOrdersInfoList.size(); n++){
rowId ++;
//设置内容
rowContent = new Vector();
/** 组织订单信息 start */
MpmsOrdersInfo ordersI = (MpmsOrdersInfo)mpmsOrdersInfoList.get(n);
// 取出集合数据放入数组中
String[] labelContent = this.getLableContent(ordersI, radioValue);
int allColumn = rowOneLine.size();
//遍历订单信息写入Excel中
int lableContentLength = labelContent.length;
for (int i = 0; i < lableContentLength; i++) {
if (i == 0) {
rowContent.add("" + (n+1));
}
rowContent.add(labelContent[i]);
}
//填充空格
for (int i = 0; i < allColumn - lableContentLength-1; i++) {
rowContent.add(null);
}
content.add(rowContent);
/** 组织订单信息 end */
/** 组织订单详细信息 start */
MpmsOrdersInfo orderInfo = mpmsOrderBO.getMpmsOrdersInfo(ordersI.getOrderId());
orderInfo.getCiUserInfo();
//组织订单内容列表
Set contentSet = orderInfo.getMpmsStockRelations();
List contentList = new Vector();
Iterator contentIt = contentSet.iterator();
while(contentIt.hasNext()){
contentList.add((MpmsStockRelation)contentIt.next());
}
for (int ci = 0; ci < contentList.size(); ci++){
rowContent = new Vector();
MpmsStockRelation mpmsStockRelation=(MpmsStockRelation)contentList.get(ci);
//取出订单详细信息数据放入数组中
String[] orderInfoContent = getOrderInfoContent(mpmsStockRelation);
//填充空格
for (int j = 0; j < lableContentLength + 1; j++) {
rowContent.add(null);
}
//遍历订单详细信息
for (int oi = 0; oi < orderInfoContent.length; oi++) {
if (oi == 0) {
rowContent.add("" + (ci+1));
}
rowContent.add(orderInfoContent[oi]);
}
content.add(rowContent);
}
/** 组织订单详细信息 end */
}