Commit cc6b030f authored by vpathare's avatar vpathare

changes in battery usage and edetailing repor

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184183 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fd92d0aa
......@@ -131,6 +131,7 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
long totalMili=0;
String docName="";
boolean flag = true;
if( duration_data.length() > 0 )
{
String totalTime ="";
......@@ -150,7 +151,7 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalTime = String.valueOf(jsnObject.get("TOTAL_TIME"));
docName = String.valueOf(jsnObject.get("DOC_NAME"));
System.out.println("totalTime["+totalTime+"]docName["+docName+"]");
if( i>0 )
if( i>0 && flag )
{
JSONObject jsnObj = new JSONObject( jsonObject );
jsnArray.add( jsnObj );
......@@ -161,9 +162,27 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalMili =Integer.parseInt( totalTime );
System.out.println("totalMili["+totalMili+"]");
putTotalTimeInJsn( totalMili, jsonObject );
String time = String.valueOf( jsonObject.get("content_duration") );
System.out.println("time is 1111["+time+"]");
if( time.equalsIgnoreCase("0") )
{
flag = false;
continue;
}
else
{
flag = true;
}
}
jsonObject.put("content_name", docName );
}
if( !flag )
{
continue;
}
}
if( duration_data.startsWith("{") )
{
......@@ -177,6 +196,17 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalMili =Integer.parseInt( totalTime );
System.out.println("totalMili["+totalMili+"]");
putTotalTimeInJsn( totalMili, jsonObject );
String time = String.valueOf( jsonObject.get("content_duration") );
System.out.println("time is 1212["+time+"]");
if( time.equalsIgnoreCase("0") )
{
flag = false;
continue;
}
else
{
flag = true;
}
}
jsonObject.put("content_name", docName );
}
......@@ -187,6 +217,10 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
System.out.println("Exception in json ["+e.getMessage()+"]");
}
}
else
{
continue;
}
jsnArray.add(jsonObject );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment