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; }
@SuppressWarnings("unchecked") @Override @Transactional(readOnly = true, propagation = Propagation.REQUIRED) public List<BaseBusinessDomain> queryList(BaseBusinessDomain baseDomain) throws Exception { JcKhShQsDomain domain = (JcKhShQsDomain) baseDomain; // SysEncodeUtil.decodeURL(domain); // SysEncodeUtil.conGBK2ISO(domain); Map<String, Object> map = new HashMap<String, Object>(); List<BaseBusinessDomain> dataList = null; map.put("ssJgbm", domain.getSjJgbm()); map.put("rqq", domain.getRqq()); map.put("rqz", domain.getRqz()); map.put("fhrDjxh", domain.getFhrDjxh()); String fhrMc = domain.getFhrMc(); if (StringUtils.isNotBlank(fhrMc)) { fhrMc = SysEncodeUtil.GBK2ISO(fhrMc); } map.put("fhrMc", fhrMc); if ("Y".equals(domain.getXydjbz())) { // 协议登记时 dataList = businessSqlMapClientTemplate.queryForList("queryKhJyqkList2", map); } else { // 不需要协议登记 dataList = businessSqlMapClientTemplate.queryForList("queryKhJyqkList", map); } return dataList; }
@SuppressWarnings("unchecked") @Transactional(readOnly = true, propagation = Propagation.REQUIRED) public List<BaseBusinessDomain> downloadList(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("pageNum", 1); map.put("pageSize", 999999999); 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; }
public List<BaseBusinessDomain> downloadList( BaseBusinessDomain baseBusinessDomain, UserDomain user) throws Exception { BgMpjDomain domain = (BgMpjDomain) baseBusinessDomain; Map<String, String> map = new HashMap<String, String>(); 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()); // 检索数据 List<BaseBusinessDomain> dataList = businessSqlMapClientTemplate.queryForList("selectBgMpjAll", map); return dataList; }