/**
  * 初始化登录页面时调用的方法
  *
  * @author 方涛
  * @editor 秦建华(去掉角色内容)
  * @version 1.1 2008.7.2
  * @throws Exception
  */
 public ModelAndView index(HttpServletRequest request, HttpServletResponse response, Object obj)
     throws Exception {
   List curRptTimelst = indexService.getCurrentReportTimes();
   List hisRptTimelst = indexService.getHistoryReportTimes();
   HashMap map = new HashMap();
   map.put("curRptTimelst", curRptTimelst);
   map.put("hisRptTimelst", hisRptTimelst);
   return new ModelAndView(this.getIndex(), map);
 }
 /**
  * 注销登录时调用的方法
  *
  * @author 秦建华
  * @version 1.0 2008.7.10
  * @throws Exception
  */
 public ModelAndView logout(HttpServletRequest request, HttpServletResponse response, Object obj)
     throws Exception {
   HttpSession session = request.getSession();
   // session.removeAttribute("IAppTree");
   session.removeAttribute("UserBean");
   session.removeAttribute("reportTime");
   session.invalidate();
   List curRptTimelst = indexService.getCurrentReportTimes();
   List hisRptTimelst = indexService.getHistoryReportTimes();
   HashMap map = new HashMap();
   map.put("curRptTimelst", curRptTimelst);
   map.put("hisRptTimelst", hisRptTimelst);
   return new ModelAndView(this.getIndex(), map);
 }
示例#3
0
  @RequestMapping(value = "/index")
  public ModelAndView index(
      HttpServletRequest request, HttpServletResponse response, ModelAndView mv) {
    mv.addObject("currentTime", Tools.getLongTime());

    PageData pd = new PageData(request);
    HashMap<String, Object> borrowList = thisService.getBorrowList(pd, mv);
    mv.addObject("borrowList", borrowList);

    HashMap<String, Object> xborrow = thisService.getXBorrowList();
    mv.addObject("xborrow", xborrow.get("data"));
    // logger.info("s当是人城"+xborrow);

    HashMap<String, String> indexFlashAd = (HashMap<String, String>) Common.getCacheAd("51", false);
    if (!Common.isBlankInMap(indexFlashAd, "content"))
      mv.addObject(
          "indexAdImgs",
          (List<HashMap<String, String>>) JacksonUtil.listFromJson(indexFlashAd.get("content")));

    // 网站公告
    Map<String, Object> notice = categoryService.getCategoryArticle("427", 6);
    mv.addObject("notice", notice);
    // 公司动态
    Map<String, Object> trace = categoryService.getCategoryArticle("389", 3);
    mv.addObject("trace", trace);
    // 新闻动态
    Map<String, Object> news = categoryService.getCategoryArticle("377", 6);
    mv.addObject("news", news);
    // 图片新闻
    Map<String, Object> imgnews = categoryService.getCategoryArticleImg("539", 6);
    mv.addObject("imgnews", imgnews);

    WhereUtil mapUtil = new WhereUtil();
    mapUtil.getStringCondition("borrow_status", "2,4,6,7", "in");
    Map<String, String> summary =
        BaseService.getOne(
            "borrow_info",
            mapUtil.getParamConditionList(),
            "sum(repayment_interest) as repayment_interest,sum(borrow_money) as borrow_money");
    Map<String, String> userSum =
        BaseService.getOne("user", Tools.BuildWhereMap("id", "0", ">"), "count(id) as num");
    Tools.printData(summary);
    summary.put("user_count", userSum.get("num"));
    mv.addObject("summary", summary);

    return this.getTplView(request, response, tplPath, mv);
  }
示例#4
0
 public F.Promise<UpdateResponse> updateAsync(
     Map<String, Object> updateFieldValues,
     String updateScript,
     ScriptService.ScriptType scriptType,
     String lang) {
   return IndexService.updateAsync(
       getIndexPath(), id, updateFieldValues, updateScript, scriptType, lang);
 }
示例#5
0
 public UpdateResponse update(
     String indexName,
     Map<String, Object> updateFieldValues,
     String updateScript,
     ScriptService.ScriptType scriptType,
     String lang) {
   return IndexService.update(
       getIndexPath(indexName), id, updateFieldValues, updateScript, scriptType, lang);
 }
示例#6
0
 /**
  * Retrieves an entity by ID.
  *
  * @param id
  * @return
  */
 public T byId(String id) {
   return IndexService.get(queryPath, type, id);
 }
示例#7
0
 /**
  * Index this Document asynchronously
  *
  * @return
  * @throws Exception
  */
 public F.Promise<IndexResponse> indexAsync() {
   return IndexService.indexAsync(getIndexPath(), id, this);
 }
示例#8
0
 /**
  * Index this Document on this indexName
  *
  * @return
  * @throws Exception
  */
 public IndexResponse index(String indexName) {
   return IndexService.index(getIndexPath(indexName), id, this);
 }
示例#9
0
 /**
  * Index this Document
  *
  * @return
  * @throws Exception
  */
 public IndexResponse index() {
   return IndexService.index(getIndexPath(), id, this);
 }
示例#10
0
 public F.Promise<IndexResults<T>> searchAsync(IndexQuery<T> query, QueryBuilder filter) {
   return IndexService.searchAsync(queryPath, query, filter);
 }
示例#11
0
    public F.Promise<IndexResults<T>> searchAsync(IndexQuery<T> query) {

      return IndexService.searchAsync(queryPath, query, null);
    }
示例#12
0
    /**
     * Find method
     *
     * @param query
     * @return
     * @throws Exception
     */
    public IndexResults<T> search(IndexQuery<T> query) {

      return IndexService.search(queryPath, query);
    }
示例#13
0
 /**
  * Asynchronously retrieves an entity by ID.
  *
  * @param id
  * @return
  */
 public F.Promise<T> byIdAsync(String id) {
   return IndexService.getAsync(queryPath, type, id);
 };
示例#14
0
 /**
  * Index this Document asynchronously
  *
  * @return
  * @throws Exception
  */
 public F.Promise<IndexResponse> indexAsync(String indexName) {
   return IndexService.indexAsync(getIndexPath(indexName), id, this);
 }
示例#15
0
 /**
  * Delete this Document asynchronously for this indexName
  *
  * @return
  * @throws Exception
  */
 public F.Promise<DeleteResponse> deleteAsync(String indexName) {
   return IndexService.deleteAsync(getIndexPath(indexName), id);
 }
示例#16
0
 /**
  * Delete this Document asynchronously
  *
  * @return
  * @throws Exception
  */
 public F.Promise<DeleteResponse> deleteAsync() {
   return IndexService.deleteAsync(getIndexPath(), id);
 }
示例#17
0
 /**
  * Delete this Document for this indexName
  *
  * @return
  * @throws Exception
  */
 public DeleteResponse delete(String indexName) {
   return IndexService.delete(getIndexPath(indexName), id);
 }
示例#18
0
 /**
  * Delete this Document
  *
  * @return
  * @throws Exception
  */
 public DeleteResponse delete() {
   return IndexService.delete(getIndexPath(), id);
 }