Ejemplo n.º 1
0
 public List<BaseBusinessDomain> selectAll(BaseBusinessDomain busDomain, UserDomain user)
     throws Exception {
   BgMpjDomain domain = (BgMpjDomain) busDomain;
   PageDomain page = domain.getPage();
   Map<String, String> map = new HashMap<String, String>();
   int start = page.getStart();
   int pagSize = page.getPageSize();
   map.put(XtglConstants.ORDER_STR, page.getOrderStr());
   if (domain.getGs() != null && !"".equals(domain.getGs())) {
     String gs = SysEncodeUtil.UTF82ISO(domain.getGs());
     map.put("gs", "%" + gs + "%");
   }
   if (domain.getXm() != null && !"".equals(domain.getXm())) {
     String xm = SysEncodeUtil.UTF82ISO(domain.getXm());
     map.put("xm", "%" + xm + "%");
   }
   if (domain.getDz() != null && !"".equals(domain.getDz())) {
     String dz = SysEncodeUtil.UTF82ISO(domain.getDz());
     map.put("dz", "%" + dz + "%");
   }
   map.put("czyDjxh", user.getCzyDjxh());
   int count =
       ((Integer) (businessSqlMapClientTemplate.queryForObject("getBgMpjRowCount", map)))
           .intValue();
   page.setTotalRecords(count);
   List<BaseBusinessDomain> dataList =
       businessSqlMapClientTemplate.queryForList("selectBgMpjPage", map, start, pagSize);
   return dataList;
 }
Ejemplo n.º 2
0
  @SuppressWarnings("unchecked")
  @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
  public List<BaseBusinessDomain> queryList(BaseBusinessDomain baseDomain) throws Exception {
    JcYxsjbDomain domain = (JcYxsjbDomain) baseDomain;
    // 分页相关
    PageDomain page = domain.getPage();

    List<BaseBusinessDomain> dataList = null;
    // 设置查询条件
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("ssJgbm", domain.getSsJgbm());
    map.put("fcrqS", domain.getFcrqS());
    map.put("fcrqZ", domain.getFcrqZ());

    if (StringUtils.isNotBlank(domain.getClhm())) {
      String clhm = SysEncodeUtil.UTF82ISO(domain.getClhm());
      map.put("clhm", clhm);
    }
    map.put("orderStr", page.getOrderStr());
    map.put("pageNum", page.getCurPageNo());
    map.put("pageSize", page.getPageSize());
    map.put("pageCount", 0);
    map.put("reccount", 0);
    map.put("dataList", dataList);

    businessSqlMapClientTemplate.queryForObjectByCurr("queryYxsjbPage", "dataList", map);
    page.setTotalRecords((Integer) map.get("pageCount"));
    dataList = (List<BaseBusinessDomain>) map.get("dataList");
    page.setReccount((Integer) map.get("reccount"));
    return dataList;
  }