Commit bdceeac8 authored by kdabholkar's avatar kdabholkar

commited new changes in gstcleardataPrc

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@163212 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 78a97051
......@@ -33,7 +33,7 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
Timestamp julyMonthStartDate = null;
double GST_B2CL_INV_VAL = 0.0;
StringBuffer errorMessage = new StringBuffer();
StringBuffer errorMessage =null;
public String process() throws RemoteException, ITMException
{
......@@ -75,11 +75,13 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException
{
StringBuffer errorMessage = new StringBuffer();
PreparedStatement pstmt = null;
ResultSet rs = null;
String fromDateStr = "", toDateStr = "", prcType = "", sitecode="" ;
int prdCnt = 0 , synDataCount= 0;
int prdCnt = 0 , synDataCount= 0, hdrCount=0;
String retString = "";
String period = "", type = "", sql = "";
......@@ -248,7 +250,7 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
pstmt.setTimestamp(4,toDate);
int hdrCount = pstmt.executeUpdate();
hdrCount = pstmt.executeUpdate();
if(pstmt != null)
{
......@@ -296,7 +298,14 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
{
System.out.println("inside commit");
connGST.commit();
retString = getError(errorMessage.toString(),"PRCSUCCESS",connGST);
if(hdrCount > 0)
{
retString = getError(errorMessage.toString(),"PRCSUCCESS",connGST);
}
else
{
retString = getError(errorMessage.toString(),"PRCNOTDONE",connGST);
}
}
if(connGST != null && !connGST.isClosed())
{
......
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