Esempio n. 1
0
  /**
   * @Description: 获取所有的可用的 积分扣除类型
   *
   * @param request
   * @return String 返回值描述
   * @author chenbin
   * @create_date 2014-8-11 下午1:20:51
   */
  @RequestMapping("/getAllIntegalAdds")
  @ResponseBody
  public Map<String, Object> getAllIntegalAdds(HttpServletRequest request) {
    Page page = ServiceUtil.getcurrPage(request);

    HqlHelper hql = new HqlHelper(TIntegalAdd.class);
    hql.addOrderBy("id", "desc");
    hql.addEqual("NEnable", SystemConstants.SYS_ENABLE);
    hql.setQueryPage(page);

    String vcCode = request.getParameter("vcCode");
    if (StringUtils.isNotBlank(vcCode)) {
      System.out.println("vcCode=" + vcCode);
      hql.addLike("vcCode", vcCode);
    }

    String vcCause = request.getParameter("vcCause");
    if (StringUtils.isNotBlank(vcCause)) {
      System.out.println("vcCause=" + vcCause);
      hql.addLike("vcCause", vcCause);
    }

    Map<String, Object> resuMap = integalCutService.findAllByHqlHelp(hql);
    return resuMap;
  }
Esempio n. 2
0
 /**
  * @Description: 获取该分供方所有的车型信息
  *
  * @return String 跳转的页面
  * @throws
  */
 @RequestMapping(value = "/getAllSubCarStyle", method = RequestMethod.POST)
 @ResponseBody
 public Map<String, Object> getAllSubCarStyle(HttpServletRequest request) {
   HttpSession session = request.getSession();
   TUser user = (TUser) session.getAttribute("user");
   int archid = user.getIArchiveType();
   String subno = subService.get(user.getiArchive()).getVcSubno();
   Page page = ServiceUtil.getcurrPage(request);
   HqlHelper hql = new HqlHelper(TSubCarStyle.class);
   hql.addEqual("vcSubno", subno);
   // hql.addEqual( "NEnable" , SystemConstants.SYS_ENABLE );
   hql.setQueryPage(page);
   Map<String, Object> resultMap = null;
   // 该用户类型等于分供方
   if (archid == SystemConstants.SYS_TARCHIVE_SUB) {
     try {
       resultMap = subCarStyleService.findAllByHql(hql);
       return resultMap;
     } catch (Exception e) {
       return AjaxUtil.getMapByException(e);
     }
   }
   return resultMap;
 }