@Test
  public void getListForExcelTest() throws Exception {
    String url = "http://employeeservice.hzfh.com:8080/service-employee/empCompilePlan";
    HessianProxyFactory factory = new HessianProxyFactory();
    EmpCompilePlanService empCompilePlanService =
        (EmpCompilePlanService) factory.create(EmpCompilePlanService.class, url);
    //        ApplicationContext context = new ClassPathXmlApplicationContext(
    //                "applicationContext.xml");
    //        EmpCompilePlanService empCompilePlanService = (EmpCompilePlanService) context
    //                .getBean("empCompilePlanService");

    EmpCompilePlanCondition empCompilePlanCondition = new EmpCompilePlanCondition();
    // productCondition.setId(1);
    empCompilePlanCondition.setPageIndex(1);
    empCompilePlanCondition.setPageSize(4);
    empCompilePlanCondition.setTotalCount(9);

    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem1 = new SortItem();
    sortItem1.setSortFeild("id");
    sortItem1.setSortType(SortType.DESC);
    sortItemList.add(sortItem1);
    empCompilePlanCondition.setSortItemList(sortItemList);

    // empCompilePlanCondition.setByPosition(2);
    empCompilePlanCondition.setByYear(2015);
    List<EmpCompilePlan> empCompilePlanList =
        empCompilePlanService.getListForExcel(empCompilePlanCondition);
    System.out.println("getPagingListTest");
    System.out.println(empCompilePlanList.size());
  }
  public PaymentMoneyWithdrawCondition getCondition() {
    PaymentMoneyWithdrawCondition paymentMoneyWithdrawCondition =
        new PaymentMoneyWithdrawCondition();
    paymentMoneyWithdrawCondition.setPageSize(this.getPageSize());
    paymentMoneyWithdrawCondition.setPageIndex(this.getPageIndex());

    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem = new SortItem();
    sortItem.setSortFeild("sn");
    sortItem.setSortType(this.getSortType());
    sortItemList.add(sortItem);
    paymentMoneyWithdrawCondition.setSortItemList(sortItemList);

    if (!StringHelper.isNullOrEmpty(bySn)) {
      paymentMoneyWithdrawCondition.setSn(bySn);
    }
    if (!StringHelper.isNullOrEmpty(byState)) {
      paymentMoneyWithdrawCondition.setState("0" + byState);
    }
    if (!StringHelper.isNullOrEmpty(byDate)) {
      paymentMoneyWithdrawCondition.setDateDown(byDate + " 00:00:00");
      paymentMoneyWithdrawCondition.setDateUp(byDate + " 23:59:59");
    }
    return paymentMoneyWithdrawCondition;
  }
  public PaymentRefundCondition getCondition() {
    PaymentRefundCondition paymentRefundCondition = new PaymentRefundCondition();
    paymentRefundCondition.setPageSize(this.getPageSize());
    paymentRefundCondition.setPageIndex(this.getPageIndex());
    if ("query".equals(this.showAllList)) {
      paymentRefundCondition.setSalesNos(null);
    } else {
      List<Integer> workmate = UserHelper.getUserCache().getWorkMate();
      String workMateString = "";
      if (workmate != null) {
        workmate.add(UserHelper.getUserCache().getUserId());
        workMateString = StringHelper.listToString(workmate);
      } else {
        workMateString = String.valueOf(UserHelper.getUserCache().getUserId());
      }
      List<Sales> salesList = SalesModel.getListByEmps(workMateString);
      List<Integer> salesNos = new ArrayList<Integer>();
      for (Sales sales : salesList) {
        salesNos.add(sales.getId());
      }
      paymentRefundCondition.setSalesNos(StringHelper.listToString(salesNos));
    }

    if (!StringHelper.isNullOrEmpty(this.getIsTest())) {
      paymentRefundCondition.setIsTest(Byte.valueOf(this.getIsTest()));
    } else {
      paymentRefundCondition.setIsTest((byte) 0);
    }
    if (!StringHelper.isNullOrEmpty(this.byP2pProduct)) {
      paymentRefundCondition.setP2pProductNo(Integer.valueOf(this.byP2pProduct));
    }
    if (!StringHelper.isNullOrEmpty(this.byStatus)) {
      paymentRefundCondition.setStatus(Byte.valueOf(this.byStatus));
    }
    if (!StringHelper.isNullOrEmpty(this.byStartRepayIssue)) {
      paymentRefundCondition.setByStartRepayIssue(this.byStartRepayIssue);
    }
    if (!StringHelper.isNullOrEmpty(this.byEndRepayIssue)) {
      paymentRefundCondition.setByEndRepayIssue(this.byEndRepayIssue);
    }
    if (!StringHelper.isNullOrEmpty(this.smsStatus)) {
      paymentRefundCondition.setSmsStatus(Integer.parseInt(this.smsStatus));
    } else {
      paymentRefundCondition.setSmsStatus(-1);
    }
    if (!StringHelper.isNullOrEmpty(this.byPayType)) {
      paymentRefundCondition.setPayType(Byte.valueOf(this.byPayType));
    }
    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem = new SortItem();
    sortItem.setSortFeild(this.getSidx());
    sortItem.setSortType(this.getSortType());
    sortItemList.add(sortItem);
    paymentRefundCondition.setSortItemList(sortItemList);
    return paymentRefundCondition;
  }
  @Override
  public String execute() throws Exception {
    TempRecruitDetailCondition tempRecruitDetailCondition = new TempRecruitDetailCondition();
    tempRecruitDetailCondition.setPageSize(this.getPageSize());
    tempRecruitDetailCondition.setPageIndex(this.getPageIndex());

    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem = new SortItem();
    sortItem.setSortFeild(this.getSidx());
    sortItem.setSortType(this.getSortType());
    sortItemList.add(sortItem);
    tempRecruitDetailCondition.setSortItemList(sortItemList);

    PagedList<TempRecruitDetail> tempRecruitDetailPagedList =
        TempRecruitDetailModel.getPagingList(tempRecruitDetailCondition);
    this.setResultList(tempRecruitDetailPagedList.getResultList());
    this.setPageCount(tempRecruitDetailPagedList.getPagingInfo().getPageCount());
    this.setPageIndex(tempRecruitDetailPagedList.getPagingInfo().getPageIndex());
    this.setRecordCount(tempRecruitDetailPagedList.getPagingInfo().getTotalCount());
    return SUCCESS;
  }