Commit e7323caa authored by sshinde's avatar sshinde

Change tag tarn_date to desp_date for generating despatch tran id


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93666 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 262823ab
...@@ -4129,7 +4129,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4129,7 +4129,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
return retString; return retString;
} }
pstmt1.close(); pstmt1.close();
pstmt1= null; pstmt1= null;
rs1.close(); rs1.close();
...@@ -4211,7 +4210,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4211,7 +4210,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
Iterator it = outerHashMap.entrySet().iterator(); Iterator it = outerHashMap.entrySet().iterator();
ArrayList<String> rcbTranIdList=new ArrayList<String>();
while (it.hasNext()) while (it.hasNext())
{ {
...@@ -4256,9 +4255,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4256,9 +4255,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
rs1 = null; rs1 = null;
sql = "SELECT LOC_CODE__APRV FROM SITEITEM WHERE ITEM_CODE = ? AND SITE_CODE = ? "; sql = "SELECT LOC_CODE__APRV FROM SITEITEM WHERE ITEM_CODE = ? AND SITE_CODE = ? ";
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
//pstmt1.setString(1, itemCodeRcp.get(lnoPoRcpDetInInt));//replaced by swati //pstmt1.setString(1, itemCodeRcp.get(lnoPoRcpDetInInt));//replaced by swati
...@@ -4309,7 +4305,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4309,7 +4305,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
{ {
acctGl = Dr[0]; acctGl = Dr[0];
} }
if(Dr.length > 1)//change done by kunal on 13/04/13 for set cctr code if(Dr.length > 1)
{ {
cctrGl = Dr[1]; cctrGl = Dr[1];
} }
...@@ -4319,7 +4315,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4319,7 +4315,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
} }
if ( acctGl.trim().length() == 0 ) if ( acctGl.trim().length() == 0 )
{ {
acctGl = null; acctGl = null;
...@@ -4353,14 +4348,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4353,14 +4348,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
System.out.println("generatedTranId is :"+generatedTranId); System.out.println("generatedTranId is :"+generatedTranId);
System.out.println("outer hash key:"+Integer.parseInt(entry.getKey().toString())); System.out.println("outer hash key:"+Integer.parseInt(entry.getKey().toString()));
//lotNoMap.put(Integer.parseInt(entry.getKey().toString()), tg.generateTranSeqID("QC-ORD", "lot_no", keyStr, conn));
if (("ERROR").equalsIgnoreCase(lotNoMap.get(Integer.parseInt(entry.getKey().toString()))))
{
retString = itmDBAccessLocal.getErrorString("","VTTRANID","");
return retString;
}
pstmtRbHdr.setString(1, generatedTranId); pstmtRbHdr.setString(1, generatedTranId);
pstmtRbHdr.setTimestamp(2, this.getCurrtDate() ); pstmtRbHdr.setTimestamp(2, this.getCurrtDate() );
pstmtRbHdr.setString(3, sordSite ); pstmtRbHdr.setString(3, sordSite );
...@@ -4384,7 +4371,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4384,7 +4371,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbHdr.setString(17, acctGl ); pstmtRbHdr.setString(17, acctGl );
pstmtRbHdr.setString(18, cctrGl ); pstmtRbHdr.setString(18, cctrGl );
//pstmtRbHdr.setString(19, lotNo.get(lnoPoRcpDetInInt)); // replaced by swati
sql="select lot_no__passign,exp_date__passign FROM porddet where purc_order = ? and trim(line_no) = ? "; sql="select lot_no__passign,exp_date__passign FROM porddet where purc_order = ? and trim(line_no) = ? ";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
...@@ -4411,13 +4397,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4411,13 +4397,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbHdr.setTimestamp(14, expDt); pstmtRbHdr.setTimestamp(14, expDt);
} }
if( lotNo!=null ) if( lotNo!=null )
{ {
pstmtRbHdr.setString(19,lotNo); pstmtRbHdr.setString(19,lotNo);
lotNoMap.put(Integer.parseInt(entry.getKey().toString()),lotNo); lotNoMap.put(Integer.parseInt(entry.getKey().toString()),lotNo);
pstmtRbHdr.setString(19, lotNoMap.get(Integer.parseInt(entry.getKey().toString()))); pstmtRbHdr.setString(19, lotNoMap.get(Integer.parseInt(entry.getKey().toString())));
System.out.println("Lot No is = ["+lotNo+"] and key is "+Integer.parseInt(entry.getKey().toString()));
} }
else else
...@@ -4862,6 +4848,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4862,6 +4848,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbHdr.clearParameters(); pstmtRbHdr.clearParameters();
amountHdr = 0; amountHdr = 0;
amountHdrNoBom=0; amountHdrNoBom=0;
rcbTranIdList.add(generatedTranId);
} // end of main while } // end of main while
rs.close(); rs.close();
rs=null; rs=null;
...@@ -4875,10 +4863,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4875,10 +4863,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
conn.commit(); conn.commit();
//* Confirmation Logic Come Here RECEIPT_BACKFLUSH //* Confirmation Logic Come Here RECEIPT_BACKFLUSH
//ls_errcode = nvo_bkflush.gbf_retrieve_backflush(ls_tran_id,transer,1)
retString=this.confirmWebService("receipt_backflush", generatedTranId, xtraParams,"",conn);
retString=this.confirmWebService("receipt_backflush", generatedTranId, xtraParams,"",conn);
if(retString !=null && retString.trim().length()> 0 && retString.indexOf("VTSUCC1")==-1) if(retString !=null && retString.trim().length()> 0 && retString.indexOf("VTSUCC1")==-1)
{ {
return retString; return retString;
...@@ -4988,8 +4974,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4988,8 +4974,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
rs=null; rs=null;
//generatedTranId=this.generateTranId("w_despatch", sordSite,today, conn);
xmlValues=""; xmlValues="";
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
...@@ -4997,12 +4981,12 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4997,12 +4981,12 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
xmlValues = xmlValues + "<Detail1>\r\n"; xmlValues = xmlValues + "<Detail1>\r\n";
xmlValues = xmlValues + "<tran_id></tran_id>\r\n"; xmlValues = xmlValues + "<tran_id></tran_id>\r\n";
xmlValues = xmlValues + "<site_code>" + sordSite + "</site_code>\r\n"; xmlValues = xmlValues + "<site_code>" + sordSite + "</site_code>\r\n";
xmlValues = xmlValues + "<tran_date>"+ getCurrdateAppFormat() + "</tran_date>\r\n"; xmlValues = xmlValues + "<desp_date>"+ getCurrdateAppFormat() + "</desp_date>\r\n";
xmlValues = xmlValues + "</Detail1>\r\n</Root>"; xmlValues = xmlValues + "</Detail1>\r\n</Root>";
System.out.println("xmlValues :["+xmlValues+"]"); System.out.println("xmlValues :["+xmlValues+"]");
tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME); tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
generatedTranId=tg.generateTranSeqID("S-DSP", "tran_id",keyStrFrDepatch, conn); generatedTranId=tg.generateTranSeqID("S-DSP", "desp_id",keyStrFrDepatch, conn);
System.out.println(" generatedTranId for despatch is ="+generatedTranId); System.out.println(" generatedTranId for despatch is ="+generatedTranId);
if("ERROR".equalsIgnoreCase(generatedTranId)) if("ERROR".equalsIgnoreCase(generatedTranId))
......
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