- Iterator agitr = args.iterator();
- Set rst = new HashSet();
- Set rst1 = new HashSet();
- while (agitr.hasNext()) {
- String gpcode = (String) agitr.next();
- boolean isretain = true;
- if (grpusr_code != null && grpusr_code.length() > 0) {
- isretain &= cdlist.contains(gpcode);
- }
- if (grpusr_name != null && grpusr_name.length() > 0) {
- isretain &= nmlist.contains(gpcode);
- }
- if (citystr != null && citystr.length() > 0) {
- isretain &= arlist.contains(gpcode);
- }
- if (propstr != null && propstr.length() > 0) {
- isretain &= pplist.contains(gpcode);
- }
- isretain &= uslist.contains(gpcode);
- if (isretain) {
- if (rst.size() <=800){
- rst.add("'" + gpcode + "'");
- }else{
- rst1.add("'" + gpcode + "'");
- }
-
- }
- }
- String cdstr = StringUtils.join(rst.iterator(), ",");
- String cdstr1 = StringUtils.join(rst1.iterator(),",");
-
-
- if (cdstr != null && cdstr.length() > 0) {
- if (cdstr1 !=null && cdstr1.length()>0){
- String hql = "select tot_cash from TotalCashPromotionData as tot_cash where tot_cash.groupUserInfo.groupUserCode in ("
- + cdstr + ") or tot_cash.groupUserInfo.groupUserCode in ("+cdstr1+")";
- return this.paginatedDAO.getPaginatedList(hql, page, pageSize);
- }else{
- String hql = "select tot_cash from TotalCashPromotionData as tot_cash where tot_cash.groupUserInfo.groupUserCode in ("
- + cdstr + ")";
- return this.paginatedDAO.getPaginatedList(hql, page, pageSize);
- }
-
- } else {
- String hql = "select tot_cash from TotalCashPromotionData as tot_cash where tot_cash.groupUserInfo.groupUserCode in ('0')";
- return this.paginatedDAO.getPaginatedList(hql, page, pageSize);
- }
posted on
2011-09-23 14:22
snowolf
阅读(
1680)
评论()
编辑
收藏
举报