|
@@ -133,10 +133,15 @@ public class invbal extends Controller {
|
|
|
}
|
|
|
}
|
|
|
if(whereObject.containsKey("itemclassids")){
|
|
|
- if (StringUtils.isNotBlank(whereObject.getString("itemclassids"))) {
|
|
|
+ if (whereObject.getJSONArray("itemclassids").size() > 0) {
|
|
|
ArrayList<Long> itemclassList = new ArrayList<Long>();
|
|
|
- itemclassList.add(whereObject.getLong("itemclassids"));
|
|
|
- itemclassList.addAll(ItemClass.getSubItemClassIds(this,whereObject.getLong("itemclassids")));
|
|
|
+ for (Object object : whereObject.getJSONArray("itemclassids")) {
|
|
|
+ //System.out.println(row.getLong("itemclassid"));
|
|
|
+
|
|
|
+ long itemclassid = Long.valueOf(String.valueOf(object));
|
|
|
+ itemclassList.add(itemclassid);
|
|
|
+ itemclassList.addAll(ItemClass.getSubItemClassIds(this,itemclassid));
|
|
|
+ }
|
|
|
String sql = " and t2.itemid in ( SELECT itemid from sa_itemsaleclass WHERE itemclassid IN " + itemclassList + " and siteid='" + siteid + "')";
|
|
|
sql = sql.replace("[", "(").replace("]", ")");
|
|
|
where=where+sql;
|