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, ...@@ -33,7 +33,7 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
Timestamp julyMonthStartDate = null; Timestamp julyMonthStartDate = null;
double GST_B2CL_INV_VAL = 0.0; double GST_B2CL_INV_VAL = 0.0;
StringBuffer errorMessage = new StringBuffer(); StringBuffer errorMessage =null;
public String process() throws RemoteException, ITMException public String process() throws RemoteException, ITMException
{ {
...@@ -75,11 +75,13 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal, ...@@ -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 public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException
{ {
StringBuffer errorMessage = new StringBuffer();
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String fromDateStr = "", toDateStr = "", prcType = "", sitecode="" ; String fromDateStr = "", toDateStr = "", prcType = "", sitecode="" ;
int prdCnt = 0 , synDataCount= 0; int prdCnt = 0 , synDataCount= 0, hdrCount=0;
String retString = ""; String retString = "";
String period = "", type = "", sql = ""; String period = "", type = "", sql = "";
...@@ -248,7 +250,7 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal, ...@@ -248,7 +250,7 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
pstmt.setTimestamp(4,toDate); pstmt.setTimestamp(4,toDate);
int hdrCount = pstmt.executeUpdate(); hdrCount = pstmt.executeUpdate();
if(pstmt != null) if(pstmt != null)
{ {
...@@ -296,8 +298,15 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal, ...@@ -296,8 +298,15 @@ public class GstClearDataPrc extends ProcessEJB implements GstClearDataPrcLocal,
{ {
System.out.println("inside commit"); System.out.println("inside commit");
connGST.commit(); connGST.commit();
if(hdrCount > 0)
{
retString = getError(errorMessage.toString(),"PRCSUCCESS",connGST); retString = getError(errorMessage.toString(),"PRCSUCCESS",connGST);
} }
else
{
retString = getError(errorMessage.toString(),"PRCNOTDONE",connGST);
}
}
if(connGST != null && !connGST.isClosed()) if(connGST != null && !connGST.isClosed())
{ {
connGST.close(); connGST.close();
......
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