コード例 #1
0
  public String index() throws Exception {
    // UserModel userModel = (UserModel)session.get("USER");
    baseModel = new EnterpriseBaseModel();
    audit = new EnterpriseAudit();

    try {
      audit.setAuditStatus(EnterpriseAudit.EStatus.Pass.getValue());
      audit.setAuditSecondStatus(EnterpriseAudit.EStatus.Reject.getValue());
      audit.setAuditType(1);
      PaginationSupport<EnterpriseAudit> page =
          auditService.getPageByYear(
              baseModel, audit, "", null, null, Constants.DefaultPageSize, 0, "priority", true);
      servletRequest.setAttribute("auditPage", page);
    } catch (ServiceException e) {
      LOGGER.debug(e.getMessage());
    }
    return "index";
  }
コード例 #2
0
  public String get() throws Exception {
    //	UserModel userModel = (UserModel)session.get("USER");
    // 查找审批情况
    audit.setAuditType(1);
    audit.setAuditStatus(EnterpriseAudit.EStatus.Pass.getValue());

    if (baseModel.getEnterpriseCity() != null && baseModel.getEnterpriseCity() != 0) {
      // 找到count
      audit.setAuditSecondStatus(EnterpriseAudit.EStatus.NotPass.getValue());
      notPass = auditService.getCount(baseModel, audit);
      audit.setAuditSecondStatus(EnterpriseAudit.EStatus.Reject.getValue());
      notAudit = auditService.getCount(baseModel, audit);
      audit.setAuditSecondStatus(EnterpriseAudit.EStatus.Pass.getValue());
      pass = auditService.getCount(baseModel, audit);

      servletRequest.setAttribute("enterpriseCity", baseModel.getEnterpriseCity());
    }
    int startIndex = (page - 1) * Constants.DefaultPageSize;
    try {
      audit.setAuditStatus(EnterpriseAudit.EStatus.Pass.getValue());
      audit.setAuditSecondStatus(EnterpriseAudit.EStatus.Reject.getValue());
      audit.setAuditType(1);
      PaginationSupport<EnterpriseAudit> audits =
          auditService.getPageByYear(
              baseModel,
              audit,
              "",
              null,
              null,
              Constants.DefaultPageSize,
              startIndex,
              "priority",
              true);
      servletRequest.setAttribute("auditPage", audits);
    } catch (ServiceException e) {
      LOGGER.debug(e.getMessage());
    }
    return "datagrid";
  }