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 ...@@ -131,6 +131,7 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
long totalMili=0; long totalMili=0;
String docName=""; String docName="";
boolean flag = true;
if( duration_data.length() > 0 ) if( duration_data.length() > 0 )
{ {
String totalTime =""; String totalTime ="";
...@@ -150,7 +151,7 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor ...@@ -150,7 +151,7 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalTime = String.valueOf(jsnObject.get("TOTAL_TIME")); totalTime = String.valueOf(jsnObject.get("TOTAL_TIME"));
docName = String.valueOf(jsnObject.get("DOC_NAME")); docName = String.valueOf(jsnObject.get("DOC_NAME"));
System.out.println("totalTime["+totalTime+"]docName["+docName+"]"); System.out.println("totalTime["+totalTime+"]docName["+docName+"]");
if( i>0 ) if( i>0 && flag )
{ {
JSONObject jsnObj = new JSONObject( jsonObject ); JSONObject jsnObj = new JSONObject( jsonObject );
jsnArray.add( jsnObj ); jsnArray.add( jsnObj );
...@@ -161,9 +162,27 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor ...@@ -161,9 +162,27 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalMili =Integer.parseInt( totalTime ); totalMili =Integer.parseInt( totalTime );
System.out.println("totalMili["+totalMili+"]"); System.out.println("totalMili["+totalMili+"]");
putTotalTimeInJsn( totalMili, jsonObject ); 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 ); jsonObject.put("content_name", docName );
} }
if( !flag )
{
continue;
}
} }
if( duration_data.startsWith("{") ) if( duration_data.startsWith("{") )
{ {
...@@ -177,6 +196,17 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor ...@@ -177,6 +196,17 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
totalMili =Integer.parseInt( totalTime ); totalMili =Integer.parseInt( totalTime );
System.out.println("totalMili["+totalMili+"]"); System.out.println("totalMili["+totalMili+"]");
putTotalTimeInJsn( totalMili, jsonObject ); 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 ); jsonObject.put("content_name", docName );
} }
...@@ -187,6 +217,10 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor ...@@ -187,6 +217,10 @@ public class EDetailingReportEJB extends ValidatorEJB implements EDetailingRepor
System.out.println("Exception in json ["+e.getMessage()+"]"); System.out.println("Exception in json ["+e.getMessage()+"]");
} }
} }
else
{
continue;
}
jsnArray.add(jsonObject ); 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