コード例 #1
0
 protected BudgetPersonnelDetails getPersonnelDetails(Date startDate, Date endDate) {
   BudgetPersonnelDetails details = new BudgetPersonnelDetails();
   details.setJobCode("AA000");
   details.setPercentCharged(new ScaleTwoDecimal(100L));
   details.setPercentEffort(new ScaleTwoDecimal(100L));
   details.setPersonId("1000001");
   details.setPersonNumber(2);
   details.setSalaryRequested(new ScaleTwoDecimal(100000L));
   if (startDate != null) {
     details.setStartDate(startDate);
   }
   if (endDate != null) {
     details.setEndDate(endDate);
   }
   return details;
 }
コード例 #2
0
  protected BudgetLineItem getPersonnelLineItem(
      BudgetPeriod budgetPeriod, Date startDate, Date endDate) {
    BudgetLineItem lineItem = new BudgetLineItemMock();
    lineItem.setBudgetCategory(createBudgetCategory("26", "Test", "E"));
    lineItem.setBudgetCategoryCode("26");
    lineItem.setCostElement("400350");
    lineItem.setLineItemCost(new ScaleTwoDecimal(10000.00));
    lineItem.setEndDate(endDate);
    lineItem.setStartDate(startDate);
    lineItem.setCostElementBO(getCostElementTravel());
    lineItem.setApplyInRateFlag(Boolean.TRUE);
    lineItem.setOnOffCampusFlag(Boolean.TRUE);
    lineItem.setBudgetPeriodBO(budgetPeriod);
    lineItem.setBudgetPeriod(1);
    lineItem.setBudgetLineItemId(5L);
    lineItem.setLineItemNumber(3);
    lineItem.setBudgetCategoryCode(PERSONNEL_CATEGORY_CODE);
    final BudgetCategory budgetCategory = new BudgetCategory();
    budgetCategory.setBudgetCategoryTypeCode(PERSONNEL_CATEGORY_CODE);
    lineItem.setBudgetCategory(budgetCategory);

    BudgetPersonnelDetails budgetPersonnelDetails = new BudgetPersonnelDetails();
    budgetPersonnelDetails.setLineItemNumber(3);
    budgetPersonnelDetails.setPersonNumber(1);
    budgetPersonnelDetails.setOnOffCampusFlag(Boolean.TRUE);
    budgetPersonnelDetails.setEndDate(endDate);
    budgetPersonnelDetails.setStartDate(startDate);
    budgetPersonnelDetails.setApplyInRateFlag(Boolean.TRUE);
    budgetPersonnelDetails.setJobCode("AA000");
    budgetPersonnelDetails.setPercentCharged(ScaleTwoDecimal.ONE_HUNDRED);
    budgetPersonnelDetails.setPercentEffort(ScaleTwoDecimal.ONE_HUNDRED);
    budgetPersonnelDetails.setPersonId("10000000002");
    budgetPersonnelDetails.setSalaryRequested(new ScaleTwoDecimal(102000L));
    budgetPersonnelDetails.setCostElement("400350");
    budgetPersonnelDetails.setCostElementBO(getCostElementPersonnel());
    budgetPersonnelDetails.setBudgetLineItem(lineItem);
    budgetPersonnelDetails.setBudgetPeriod(1);
    budgetPersonnelDetails.setBudgetPeriodBO(budgetPeriod);
    lineItem.getBudgetPersonnelDetailsList().add(budgetPersonnelDetails);
    lineItem.setCostElementBO(getCostElementPersonnel());
    return lineItem;
  }