@Override
 protected String handlePage(HttpServletRequest request, PageSearch page) {
   PageSearch page1 = preparePage(request);
   PageSearch result = subOrderManager.findPhysicalReportOrder(page1);
   page.setTotalCount(result.getTotalCount());
   page.setList(result.getList());
   /*LogisticsCompany logisticsCompany = new LogisticsCompany();*/
   List<LogisticsCompany> logisticsCompanys = logisticsCompanyManager.getAll();
   request.setAttribute("logisticsCompanys", logisticsCompanys);
   afterPage(request, page, PageUtils.IS_NOT_BACK);
   return getFileBasePath() + "listPhysicalReport";
 }
Пример #2
0
 @RequestMapping("listNotice")
 public String listNotice(
     HttpServletRequest request,
     HttpServletResponse response,
     Infomation infomation,
     Integer backPage) {
   infomationManager.updateValidateInfomation();
   Long companyId = (Long) request.getSession().getAttribute(SecurityConstants.USER_COMPANY_ID);
   PageSearch page = PageUtils.preparePage(request, Infomation.class, true);
   User user = (User) request.getSession().getAttribute(SecurityConstants.SESSION_USER);
   page.getFilters()
       .add(new PropertyFilter(Infomation.class.getName(), "EQL_companyId", companyId.toString()));
   if (IBSConstants.USER_TYPE_COMPANY_HR == user.getType()) {
     page.getFilters()
         .add(
             new PropertyFilter(
                 Infomation.class.getName(), "EQL_createdBy", user.getObjectId().toString()));
   }
   String cp = request.getParameter("c_p");
   Integer currPage = 1;
   if (cp != null && !("").equals(cp)) {
     currPage = Integer.parseInt(cp);
   }
   page.setSortOrder("asc");
   page.setSortProperty("createdOn");
   page.setCurrentPage(currPage);
   handleFind(page);
   List<Infomation> items = page.getList();
   request.setAttribute("items", items);
   request.setAttribute("pageInfomation", page);
   return "info/listNotice";
 }
Пример #3
0
 /**
  * 查看发放详细
  *
  * @author zhliu
  * @date 2015年6月16日
  * @parm
  * @param request
  * @param distributeId :发放类目ID
  * @return
  */
 @RequestMapping("pointsGrantDetail")
 public String pointsGrantDetail(HttpServletRequest request, Long distributeId, String staffName) {
   try {
     PageSearch page = preparePage(request);
     PageSearchInit.initcurrentPage(page, request);
     PointDistrubute pointDistrubute = pointDistrubuteManager.getByObjectId(distributeId);
     String itemName = ""; // 发放名目
     if (pointDistrubute != null
         && pointDistrubute.getDistributeType() == IBSConstants.WELFAREITEM_TYPE_EXCITATION) {
       if (pointDistrubute.getItemType()
           == IBSConstants.ACTIVITY_ITEM_TYPE_RECOMMEND) { // 运营端推荐名目类的
         itemName = welfareManager.getByObjectId(pointDistrubute.getWelfareItemId()).getItemName();
       } else {
         itemName =
             activityItemManager
                 .getByObjectId(pointDistrubute.getWelfareItemId())
                 .getActivityName();
       }
     } else {
       itemName = welfareManager.getByObjectId(pointDistrubute.getWelfareItemId()).getItemName();
     }
     page.getFilters()
         .add(
             new PropertyFilter(
                 "PointDistrubute", "EQL_distributeId", String.valueOf(distributeId)));
     if (!org.apache.commons.lang3.StringUtils.isEmpty(staffName)) {
       page.getFilters()
           .add(new PropertyFilter("PointDistrubute", "EQS_staffName", String.valueOf(staffName)));
     }
     page = pointDistrubuteStaffManager.selectPointStaff(page);
     // 查询性别字典信息
     List<Dictionary> dictionaryList =
         dictionaryManager.getDictionariesByDictionaryId(IBSConstants.SEX_CONSTANT);
     request.setAttribute("dictionaryList", dictionaryList);
     request.setAttribute("staffName", staffName);
     request.setAttribute("pointDistrubute", pointDistrubute);
     request.setAttribute("pageActivity", page);
     request.setAttribute("distributeId", distributeId);
     request.setAttribute("itemName", itemName);
   } catch (Exception e) {
     logger.error("pointsGrantDetail", e);
   }
   return HOME_DIR + "/detailpointsGrant";
 }
Пример #4
0
 protected void handleFind(PageSearch page) {
   page.getFilters()
       .add(
           new PropertyFilter(
               Infomation.class.getName(), "EQI_deleted", ForeverEntity.DELETED_NO + ""));
   PageSearch result = infomationManager.findList(page);
   page.setTotalCount(result.getTotalCount());
   page.setList(result.getList());
 }
Пример #5
0
  /**
   * 积分发放记录
   *
   * @author zhliu
   * @date 2015年6月15日
   * @parm
   * @param request
   * @param response
   * @return
   */
  @RequestMapping(value = "")
  public String index(HttpServletRequest request) {
    try {
      User user = (User) request.getSession().getAttribute(SecurityConstants.SESSION_USER);
      PageSearch page = preparePage(request);
      PageSearchInit.initcurrentPage(page, request);

      /** 查询发放名目 */
      WelfareItem welfareItem = new WelfareItem();
      welfareItem.setItemType(IBSConstants.WELFAREITEM_TYPE_WELFARE);
      welfareItem.setItemGrade(IBSConstants.WELFAREITEM_GRADE_CLASSIFY);
      List<WelfareItem> welfareItems = welfareManager.getBySample(welfareItem);
      List<ActivityItem> acItemList =
          exActivityManager.queryActivityItemList(user.getCompanyId(), null);
      if (!UserUtils.isCompanyAdmin()) { // 非企业管理员
        page.getFilters()
            .add(
                new PropertyFilter(
                    "PointDistrubute", "EQL_userId", String.valueOf(user.getObjectId())));
      }
      page.getFilters()
          .add(
              new PropertyFilter(
                  "PointDistrubute", "EQL_companyId", String.valueOf(user.getCompanyId())));
      page.setSortProperty("createDate");
      page.setSortOrder("desc");

      page = pointDistrubuteManager.queryPointDistRelItem(page);
      // 查询发放对象字典信息
      List<Dictionary> dictionaryList =
          dictionaryManager.getDictionariesByDictionaryId(
              IBSConstants.POINTS_GRANT_OBJECT_CONSTANT);

      // 查询发放对象字典信息
      List<Dictionary> grantPointsStatusList =
          dictionaryManager.getDictionariesByDictionaryId(IBSConstants.GRANT_POINTS_STATUS);
      request.setAttribute("dictionaryList", dictionaryList);
      request.setAttribute("grantPointsStatusList", grantPointsStatusList);
      request.setAttribute("pageActivity", page);
      request.setAttribute("welfareItems", welfareItems);
      request.setAttribute("acItemList", acItemList);
      Date now = new Date();
      for (PointDistrubute distrubute : (List<PointDistrubute>) page.getList()) {
        // 借用字段
        distrubute.setUserId((long) distrubute.getDistributeDate().compareTo(now));
      }
    } catch (Exception e) {
      logger.error("index", e);
    }
    return HOME_DIR + "/listpointsGrant";
  }
Пример #6
0
 /** 查找所有的三级分类 */
 @Override
 public PageSearch findAllThirdCategory(PageSearch pageSearch) {
   List<ProductCategory> list = productCategoryDao.getAllThirdCategory(pageSearch);
   pageSearch.setList(list);
   return pageSearch;
 }
Пример #7
0
  /**
   * 导出积分发放详细
   *
   * @author zhliu
   * @date 2015年7月8日
   * @parm
   * @return
   */
  @RequestMapping("exportPointsGrantDetail")
  public String exportPointsGrantDetail(
      HttpServletResponse response,
      HttpServletRequest request,
      Long distributeId,
      String staffName) {
    List<Object[]> datas = new ArrayList<Object[]>();
    String[] titles = {"工号", "姓名", "性别", "手机号码", "部门", "邮箱", "状态"};
    String excelName = "pointsGrantDetail.xls";
    try {
      // 查询性别字典信息
      List<Dictionary> dictionaryList =
          dictionaryManager.getDictionariesByDictionaryId(IBSConstants.SEX_CONSTANT);
      PageSearch page = preparePage(request);
      PageSearchInit.initcurrentPage(page, request);
      page.setPageSize(Integer.MAX_VALUE);

      page.getFilters()
          .add(
              new PropertyFilter(
                  "PointDistrubute", "EQL_distributeId", String.valueOf(distributeId)));
      if (!org.apache.commons.lang3.StringUtils.isEmpty(staffName)) {
        page.getFilters()
            .add(new PropertyFilter("PointDistrubute", "EQS_staffName", String.valueOf(staffName)));
      }
      List<PointDistrubuteStaff> PointDistrubuteStaffList =
          pointDistrubuteStaffManager.selectPointStaffList(page);

      for (PointDistrubuteStaff pointDis : PointDistrubuteStaffList) {
        String sex = ""; // 性别
        String status = ""; // 状态
        for (Dictionary dict : dictionaryList) {
          if (pointDis.getSex() != null && pointDis.getSex().equals(dict.getValue())) {
            sex = dict.getName();
            break;
          }
        }
        if (pointDis.getStatus() == 0) {
          status = "未领取";
        } else if (pointDis.getStatus() == 1) {
          status = "已领取";
        } else {
          status = "待确认";
        }

        Object[] arr = new Object[titles.length];
        arr[0] = pointDis.getWorkNo();
        arr[1] = pointDis.getStaffName();
        arr[2] = sex;
        arr[3] = pointDis.getTelephone();
        arr[4] = pointDis.getDeptName();
        arr[5] = pointDis.getEmail();
        arr[6] = status;
        datas.add(arr);
      }
      ExcelUtil excelUtil = new ExcelUtil();
      excelUtil.exportExcel(response, datas, titles, excelName);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 /**
  * 取得面向企业价格信息
  *
  * @param null
  * @return 面向企业价List
  */
 @Override
 public PageSearch getCompanyPriceInfo(PageSearch page) {
   List<Map<String, Object>> list = productCompanyPriceDao.getCompanyPriceInfo(page);
   page.setList(list);
   return page;
 }