1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
int i = 0 ;
String type="";
while(itr.hasNext()){
Iterator itr = infoCompte.getInformationSolde().getDetailCompte().iterator();
if (type.equals("Euros"))
{
try {
balance = Double.parseDouble(infoCompte.getInformationSolde().getDetailCompte().get(i).getMontant());
String date = infoCompte.getInformationSolde().getDetailCompte().get(i).getDateFinValidite();
date = date.substring(beginIndex, endIndex);
endValDate = sf.parse(date);
createBalance( ConsumptionConstants.BALANCE_TYPE_INITIAL, UnitCode.EURO, balance, 0, 0, null,
endValDate, false );
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
else if (type.equals("Secondes")){
try {
balance = Double.parseDouble(rihelper.getWsriService().getInfoAccountWithOptions(applicationId, msisdn).getInformationSoldeWithOptions().getListeComptesWithOptions().get(i).getCompte().getMontant());
String date = rihelper.getWsriService().getInfoAccount(applicationId, msisdn).getInformationSolde().getDetailCompte().get(i).getDateFinValidite();
date = date.substring(beginIndex, endIndex);
endValDate = sf.parse(date);
createBalance( ConsumptionConstants.USAGE_TIME, UnitCode.SECOND, balance, 0, 0, null,
endValDate, false );
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
i++;
itr.next(); |
Partager