转换

    public Map<String, Object> findPromotionPro(int promotionId)

Map<String, Object> PromotionPromap =promotionDao.findPromotionPro(p.getId());

 

if(PromotionPromap !=null){
            int typeid = NumberUtils.toInt(ObjectUtils.toString(PromotionPromap.get("TYPEID")));
            int productid = NumberUtils.toInt(ObjectUtils.toString(PromotionPromap.get("PRODUCTID")));
           
        }

 

1 list 转map

  List list =userService.userDetail(SessionUtil.getUserId());

  Map map = (Map) list.get(0);

  this.setAttribute("user",map );

2

@Action("queryImeiRouteList")
@Powers( { @Power(PowerConsts.BILLMODULE_IMEI_ROUTE) })
public String queryImeiRouteList(){
String imei =this.getParameter("imei");
List<Map> itemscount = backService.queryImeiCount(imei);
this.setAttribute("itemscount", itemscount);
return "queryImeiRoute";
}

 

public List<Map> queryImeiCount(String imei) {
List<Map> list = backDao.queryImeiCount(imei);
for (Map map : list) {
int delivery_item_id = NumberUtils.toInt(ObjectUtils.toString(map.get("DELIVERYITEM")));
List<Map> routes = backDao.queryImeiList(delivery_item_id, imei);
map.put("routes", routes);
}
return list;
}

 

<div class="content">
<s:if test="#request.itemscount.size()==0">
<div id="imeis" class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<table cellspacing="0" cellpadding="0" border="0" class="table table-striped table-bordered table-hover table-condensed" >
<thead><tr height="27" align="center"><td><strong>暂无路由记录</strong></td></tr></thead>
</table>
</div>
</div>
</s:if>
<s:iterator value="#request.itemscount" var="item">
<div id="imeis" class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<table cellspacing="0" cellpadding="0" border="0" class="table table-striped table-bordered table-hover table-condensed" >
<thead><tr height="27" align="center"><td><strong>IMEI</strong></td><td><strong>信息</strong></td><td><strong>条码路由时间</strong></td></tr></thead>
<tbody>
<s:iterator value="#item.routes">
<tr height="27" align="center"><td>${IMEI} </td><td>${REMARK}</td><td>${ADDDATE}</td></tr>
</s:iterator>
</tbody>
</table>
</div>
</div>
</s:iterator>
</div>

posted @ 2017-08-09 10:55  jenliy  阅读(157)  评论(0)    收藏  举报