|
|
@@ -148,12 +148,17 @@ public class invbal extends Controller {
|
|
|
}
|
|
|
if(!StringUtils.isBlank(agentinfo)){
|
|
|
sqlFactory =new SQLFactory(this,"订单明细未发商品列表", pageSize, pageNumber, pageSorting);
|
|
|
- where ="1=2";
|
|
|
- where=where+" or t6.agentnum like '%"+agentinfo+"%' or t5.enterprisename like '%"+agentinfo+"%' ";
|
|
|
+ //System.out.println(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0);
|
|
|
+ if(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0){
|
|
|
+ where=where+" or 1=1 and (t6.agentnum like '%"+agentinfo+"%' or t5.enterprisename like '%"+agentinfo+"%') ";
|
|
|
+ }else {
|
|
|
+ where=where+" and (t6.agentnum like '%"+agentinfo+"%' or t5.enterprisename like '%"+agentinfo+"%') ";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
- System.out.println(sqlFactory.getSQL());
|
|
|
+ //System.out.println(sqlFactory.getSQL());
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
Rows rowsitemclass = dbConnect.runSqlQuery(" select t7.itemclassname,t6.itemid,t8.brandname from sa_itemsaleclass t6 LEFT JOIN plm_itemclass t7 ON t7.itemclassid = t6.itemclassid AND t7.siteid = t6.siteid LEFT JOIN sa_brand t8 ON t8.sa_brandid = t7.sa_brandid AND t8.siteid = t7.siteid where t6.siteid='" + siteid + "'");
|
|
|
RowsMap itemclassRowsMap = rowsitemclass.toRowsMap("itemid");
|