首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

多条件查询,该如何处理

2012-01-26 
多条件查询在text框中可以选择要查询的条件,现在是通过一个编号,只要是这个编号!null和他关联的所有的表

多条件查询
在text框中可以选择要查询的条件,现在是通过一个编号,只要是这个编号!=null和他关联的所有的表中的信息全部显示,现在是我的action中判断了,但是页面老是报错,高手们,帮我看看阿,问题出在哪里啊
List   list   =   biz.Goods(goodsid,   starttime,   endtime,   arrivestage,
shipper,   consignee,   goodsname,   settlemen,   fillman,   operator
.getSpecialEmpInfo().getSpecialEmpInfoPlace());

System.out.println( "list===== "+list.size());
if   (list   !=   null   &&   list.size()   >   0)   {
System.out.println(list.size()   +   "&&&&&&&list ");
request.setAttribute( "list ",   list);
for(int   i=0;i <list.size();i++){
Goodsinfo   gd   =   (Goodsinfo)   list.get(i);
if(gd.getGiId()!=null   &&   gd.getGiId()!= " "){

//goodsinfo
System.out.println(gd.getGiId()+ "giid777777777 ");
List   goodsinfolist=biz.getGoods(gd.getGiId());
ListIterator   li=goodsinfolist.listIterator();
while(li.hasNext()){
goodsinfo=(Goodsinfo)li.next();
}
System.out.println(goodsinfolist.size()+ "goodsinfolist ");
if(goodsinfolist!=null   &&   goodsinfolist.size()> 0){
request.setAttribute( "goodsinfolist ",   goodsinfolist);
}
//arribrinfolist
List   arriveinfolist   =   biz.getArriveInfo(gd.getGiId());
System.out.println(arriveinfolist.size()+ "arriveinfo00000000 ");
if   (arriveinfolist   !=   null   &&   arriveinfolist.size()   >   0)   {

request.setAttribute( "arriveinfolist ",   arriveinfolist);
}

//arrivegoodsinfolist
List   arrivegoodslist   =   biz.getArriveGoods(gd.getGiId());
System.out.println(arrivegoodslist.size()+ "arrivegoodslist4444444 ");
if   (arrivegoodslist   !=   null   &&   arrivegoodslist.size()   >   0)   {
request.setAttribute( "arrivegoodslist ",   arrivegoodslist);
}
//transferinfolist
List   transferinfolist   =   biz.getTransferinfo(gd.getGiId());
System.out.println(transferinfolist.size()+ "transferinfolist9999999 ");
if   (transferinfolist   !=   null   &&   transferinfolist.size()   >   0)   {
  request.setAttribute( "transferinfolist ",   transferinfolist);
}
}
}

}else{
System.out.println( "else-------- ");
request.setAttribute( "flag ",   "1 ");
}
return   mapping.findForward( "go ");
          }catch(Exception   e){
e.printStackTrace();
  return   mapping.findForward( "error ");
}
       
}
这是action中的代码
<html:form     method= "post "   action= "/queryGoodsinfo.do "> 到货信息
<table   width= "853 "   border=0   cellspacing= "1 "     bgcolor= "#ccddee ">
<tr   align= "center "   bordercolor= "#ccccff "   bgcolor= "#83ACD6 ">
<td   width= "51 "> 到货时间 </td>
<td   width= "51 "> 专线员工姓名 </td>


<td   width= "51 "> 货物编号 </td>

</tr>
<logic:iterate   id= "list "   name= "arriveinfolist "   >
<tr   align= "center "   bgcolor= "#E8F1FF "   >
<td   width= "51 "> <bean:write   name= "list "   property= "arriveInfoTime "/> </td>
<td   width= "51 "> <bean:write   name= "list "   property= "specialEmpInfoName "/> </td>
<td   width= "51 "> <bean:write   name= "list "   property= "arriveInfoEaste "/> </td>
</tr>
</logic:iterate>
</table>
</html:form>


<html:form     method= "post "   action= "/queryGoodsinfo.do "> 货物交付信息
<table   width= "853 "   border=0   cellspacing= "1 "     bgcolor= "#ccddee ">
<tr   align= "center "   bordercolor= "#ccccff "   bgcolor= "#83ACD6 ">
<td   width= "51 "> 货物编号 </td>
<td   width= "51 "> 交付时间 </td>
<td   width= "51 "> 交付地点 </td>
<td   width= "51 "> 提货人姓名 </td>
<td   width= "51 "> 提货人电话 </td>
<td   width= "51 "> 提货人证件号 </td>
</tr>
<c:forEach   items= "${arrivegoodslist} "   var= "list ">
    <td   align= "center "> ${list.giGoodsid} </td>
  <td   align= "center "> ${list.arriveGoodsTime} </td>
  <td   align= "center "> ${list.arriveGoodsPlace} </td>
  <td   align= "center "> ${list.arriveGoodsName} </td>
  <td   align= "center "> ${list.arriveGoodsTel} </td>
  <td   align= "center "> ${list.arriveGoodsCard} </td>
</c:forEach>
</table>
</html:form>


<html:form     method= "post "   action= "/queryGoodsinfo.do "> 货物中转信息
<table   width= "853 "   border=0   cellspacing= "1 "     bgcolor= "#ccddee ">
<tr   align= "center "   bordercolor= "#ccccff "   bgcolor= "#83ACD6 ">
<td   width= "51 "> 货物编号 </td>
<td   width= "51 "> 中转交付时间 </td>
<td   width= "51 "> 发货站 </td>
<td   width= "51 "> 到货站 </td>
</tr>
<c:forEach   items= "${transferinfolist} "   var= "list ">
<td   align= "center "> ${list.giGoodsid} </td>
<td   align= "center "> ${list.tiDelivertime} </td>
<td   align= "center "> ${list.tiStartstation} </td>
<td   align= "center "> ${list.tiEndstation} </td>
</c:forEach>
</table>
</html:form>
这是叶面的


[解决办法]
这么多

------解决方案--------------------


楼主把调试信息也放上来看看

热点排行