Example usage for org.apache.poi.ss.usermodel DateUtil parseYYYYMMDDDate

List of usage examples for org.apache.poi.ss.usermodel DateUtil parseYYYYMMDDDate

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel DateUtil parseYYYYMMDDDate.

Prototype

public static Date parseYYYYMMDDDate(String dateStr) 

Source Link

Document

Converts a string of format "YYYY/MM/DD" to its (Excel) numeric equivalent

Usage

From source file:com.aiatss.coast.pmm.application.service.agreement.PolicyServiceTest.java

private List<PolicyProductBenefit> inputPolicyProductBenefits(Integer productId, Integer benefitId,
        String membershipType, String benefitPlanCode) {
    List<PolicyProductBenefit> policyProductBenefits = new ArrayList<PolicyProductBenefit>();
    PolicyProductBenefit policyProductBenefit = new PolicyProductBenefit();
    policyProductBenefit.setProductId(productId);
    policyProductBenefit.setBenefitId(benefitId);
    policyProductBenefit.setMembershipType(membershipType);
    policyProductBenefit.setSaCalculateType(("M"));
    policyProductBenefit.setMaxSaAmt(new BigDecimal("999999"));
    policyProductBenefit.setMinSaAmt(new BigDecimal("1000"));
    policyProductBenefit.setFlatAmt(new BigDecimal("10000"));
    policyProductBenefit.setMultipleFactor(new BigDecimal("30"));
    policyProductBenefit.setBenefitPlanCode(benefitPlanCode);
    policyProductBenefit.setStatus("A");
    policyProductBenefit.setEffectiveDate(EffectiveDateAll);
    policyProductBenefit.setExpireDate(ExpireDateAll);
    policyProductBenefit.setTransactionDate(TransactionDateAll);

    //PolicyProductBenefitSum
    List<PolicyProductBenefitSum> policyProductBenefitSums = new ArrayList<PolicyProductBenefitSum>();
    PolicyProductBenefitSum policyProductBenefitSum = new PolicyProductBenefitSum();

    policyProductBenefitSum.setPolicyProductBenefitId(policyProductBenefit.getPolicyProductBenefitId());
    policyProductBenefitSum.setSumSequenceNo(1);
    policyProductBenefitSum.setEffectiveDate(DateTimeUtil.getCurrentDate());
    policyProductBenefitSum.setExpireDate(DateUtil.parseYYYYMMDDDate("2099/12/31"));
    policyProductBenefitSum.setTransactionDate(DateTimeUtil.getCurrentDate());
    policyProductBenefitSum.setMemberShipType("L");
    policyProductBenefitSum.setSumCategory("L");
    policyProductBenefitSum.setSumType("L");
    policyProductBenefitSum.setSumTimeFrame("L");
    policyProductBenefitSum.setFamilyShareInd("L");
    policyProductBenefitSum.setSumSettingCode("L");
    policyProductBenefitSum.setOutNetworkSumValue(1);
    policyProductBenefitSum.setInNetworkSumValue(1);
    policyProductBenefitSum.setShareInd("L");
    policyProductBenefitSum.setStatus("L");
    policyProductBenefitSums.add(policyProductBenefitSum);
    policyProductBenefit.setPolicyProductBenefitSums(policyProductBenefitSums);

    policyProductBenefits.add(policyProductBenefit);

    return policyProductBenefits;
}

From source file:com.aiatss.coast.pmm.application.service.agreement.PolicyServiceTest.java

@Test
public void termintePolicy() {
    Date terminateDate = DateUtil.parseYYYYMMDDDate("2016/03/10");
    this.terminatePolicyService.terminatePolicy("3741180233", terminateDate);
}

From source file:com.aiatss.coast.pmm.application.service.agreement.PolicyServiceTest.java

@Test
public void findPolicyProductCode() {
    Date terminateDate = DateUtil.parseYYYYMMDDDate("2016/03/10");
    System.out.println("~~~~~~~~~~~~~~~~~~:" + this.policyService.findProductCodes(1, terminateDate).size());
}

From source file:com.aiatss.coast.pmm.application.service.agreement.PolicyServiceTest.java

@Test
public void findBenefitPlanCodes() {
    Date terminateDate = DateUtil.parseYYYYMMDDDate("2016/03/09");
    System.out/* ww  w . ja va2s. c  o  m*/
            .println("~~~~~~~~~~~~~~~~~~:" + this.policyService.findBenefitPlanCodes(1, terminateDate).get(0));
}

From source file:com.aiatss.coast.pmm.application.service.agreement.PolicyServiceTest.java

@Test
public void findPolicyProductHist() {
    Date terminateDate = DateUtil.parseYYYYMMDDDate("2016/03/09");
    PolicyProduct a = this.policyProductRepository.findPolicyProductByProductIdAndPolicyIdAndRangDate(1, 4,
            terminateDate);/* w w  w .  j a v a  2  s .  com*/
    System.out.println("~~~~~~~~~~~~~~~~~~:" + a.getStatus());
}