Commit 086b73b4 authored by manohar's avatar manohar

DI89SUN223 file seq to be stored in invoice table and to be incremented for customer/date


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91155 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3f105075
...@@ -97,7 +97,12 @@ public class DownloadCSVBatchBean implements Schedule ...@@ -97,7 +97,12 @@ public class DownloadCSVBatchBean implements Schedule
isTemplateExist = true; isTemplateExist = true;
} }
System.out.println( " isTemplateExist :: [" + isTemplateExist + "]" );
System.out.println( " objName :: [" + objName + "]" );
System.out.println( " templUpld :: [" + templUpld + "]" );
System.out.println( " templTypeUpld :: [" + templTypeUpld + "]" );
System.out.println( " templDnld :: [" + templDnld + "]" );
System.out.println( " templTypeDnld :: [" + templTypeDnld + "]" );
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
...@@ -131,7 +136,7 @@ public class DownloadCSVBatchBean implements Schedule ...@@ -131,7 +136,7 @@ public class DownloadCSVBatchBean implements Schedule
client = new TranXmlData(); client = new TranXmlData();
// 11/09/09 manoharan DI89SUN223 to store the sequence number (file suffix) in invoice table and increment for the same day // 11/09/09 manoharan DI89SUN223 to store the sequence number (file suffix) in invoice table and increment for the same day
pstmtSeq = conn.prepareStatement("SELECT MAX(case when download_file_seq is null then 0 else download_file_seq end) as download_file_seq FROM INVOICE WHERE CUST_CODE = ? AND TRAN_DATE = ? AND download_YN = 'Y'"); pstmtSeq = conn.prepareStatement("SELECT MAX(case when download_file_seq is null then 0 else download_file_seq end) as download_file_seq FROM INVOICE WHERE CUST_CODE = ? AND TRAN_DATE = ? AND download_flag = 'Y'");
// end 11/09/09 manoharan to store the sequence number (file suffix) in invoice table and increment for the same day // end 11/09/09 manoharan to store the sequence number (file suffix) in invoice table and increment for the same day
//start - select all the undownloaded invoice, if found, then download for each. //start - select all the undownloaded invoice, if found, then download for each.
...@@ -169,10 +174,10 @@ public class DownloadCSVBatchBean implements Schedule ...@@ -169,10 +174,10 @@ public class DownloadCSVBatchBean implements Schedule
{ {
// 11/09/09 DI89SUN223 manoharan to store the sequence number (file suffix) in invoice table and increment for the same day // 11/09/09 DI89SUN223 manoharan to store the sequence number (file suffix) in invoice table and increment for the same day
//recCounter = 1; //recCounter = 1;
rsSeq = pstmtSeq.executeQuery();
pstmtSeq.setString(1,custCode); pstmtSeq.setString(1,custCode);
pstmtSeq.setTimestamp(2,tranDate); pstmtSeq.setTimestamp(2,tranDate);
if( rsSeq.next() ) rsSeq = pstmtSeq.executeQuery();
if( rsSeq.next() )
{ {
recCounter = rsSeq.getInt("download_file_seq"); recCounter = rsSeq.getInt("download_file_seq");
} }
......
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