Commit 8a51a41a authored by kmandhre's avatar kmandhre

change for receipt back flush generation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95133 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5ae839d6
...@@ -9,8 +9,8 @@ import ibase.utility.EMail; ...@@ -9,8 +9,8 @@ import ibase.utility.EMail;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.webitm.utility.*; import ibase.webitm.utility.*;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.mfg.ExplodeBom; import ibase.webitm.ejb.mfg.ExplodeBom;
import ibase.webitm.ejb.mfg.adv.RcpBackflushConfirm;
import ibase.webitm.ejb.sys.*; import ibase.webitm.ejb.sys.*;
import ibase.system.config.*; import ibase.system.config.*;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
...@@ -3964,7 +3964,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -3964,7 +3964,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
int ctr = 0,row = 0,rtn = 0, setRow =0, count = 0,currRowNoBom = 0; int ctr = 0,row = 0,rtn = 0, setRow =0, count = 0,currRowNoBom = 0;
int iRow = 0, currRow = 0, hdrRow = 0, updCnt = 0; int iRow = 0, currRow = 0, hdrRow = 0, updCnt = 0,rcpBackFlushDet = 0;
Timestamp ordDate = null,mfgDt = null, expDt = null,expDate=null; Timestamp ordDate = null,mfgDt = null, expDt = null,expDate=null;
boolean noBom = true; boolean noBom = true;
TransIDGenerator tg=null; TransIDGenerator tg=null;
...@@ -3975,7 +3975,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -3975,7 +3975,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
FinCommon finCommon=new FinCommon(); FinCommon finCommon=new FinCommon();
ExplodeBom bom =new ExplodeBom(); ExplodeBom bom =new ExplodeBom();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
RcpBackflushConfirm rcpBackflushConf = new RcpBackflushConfirm();
DateFormat dtFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); DateFormat dtFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
DateFormat dtFormatDb = new SimpleDateFormat(genericUtility.getDBDateFormat()); DateFormat dtFormatDb = new SimpleDateFormat(genericUtility.getDBDateFormat());
today = dtFormat.format(new java.util.Date()); today = dtFormat.format(new java.util.Date());
...@@ -4281,6 +4281,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4281,6 +4281,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
while (it.hasNext()) while (it.hasNext())
{ {
rcpBackFlushDet = 0;
Map.Entry entry = (Map.Entry) it.next(); Map.Entry entry = (Map.Entry) it.next();
/*ended by swati on 11 sep 2013*/ /*ended by swati on 11 sep 2013*/
...@@ -4381,17 +4382,22 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4381,17 +4382,22 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
} }
if ( acctGl.trim().length() == 0 ) if ( acctGl != null && acctGl.trim().length() == 0 )//change done by kunal on 21/may/14 handle null
{ {
acctGl = null; acctGl = null;
} }
if ( cctrGl.trim().length() == 0 ) if ( cctrGl!= null && cctrGl.trim().length() == 0 )
{ {
cctrGl = null; cctrGl = null;
} }
System.out.println("acctCode::"+acctGl); System.out.println("acctCode::"+acctGl);
System.out.println("cctr Code::"+cctrGl); System.out.println("cctr Code::"+cctrGl);
//added by kunal on 21/may/14
if(acctGl == null || acctGl.trim().length() == 0)
{
retString = itmDBAccessLocal.getErrorString("","VMACCTBK","");
return retString;
}
xmlValues=""; xmlValues="";
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>\r\n"; xmlValues = xmlValues + "<Header></Header>\r\n";
...@@ -4465,7 +4471,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4465,7 +4471,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbHdr.setTimestamp(14, expDt); pstmtRbHdr.setTimestamp(14, expDt);
} }
if( lotNo!=null ) if( lotNo!=null && lotNo.trim().length() > 0)
{ {
pstmtRbHdr.setString(19,lotNo); pstmtRbHdr.setString(19,lotNo);
...@@ -4741,7 +4747,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4741,7 +4747,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbDet.setDouble(16, conv ); pstmtRbDet.setDouble(16, conv );
pstmtRbDet.setDouble(17, convQty ); pstmtRbDet.setDouble(17, convQty );
pstmtRbDet.setDouble(18, convRate ); pstmtRbDet.setDouble(18, convRate );
rcpBackFlushDet++;
pstmtRbDet.addBatch(); pstmtRbDet.addBatch();
pstmtRbDet.clearParameters(); pstmtRbDet.clearParameters();
...@@ -4890,7 +4896,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4890,7 +4896,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbDet.setDouble(16, conv ); pstmtRbDet.setDouble(16, conv );
pstmtRbDet.setDouble(17, convQty ); pstmtRbDet.setDouble(17, convQty );
pstmtRbDet.setDouble(18, convRate ); pstmtRbDet.setDouble(18, convRate );
rcpBackFlushDet++;
pstmtRbDet.addBatch(); pstmtRbDet.addBatch();
pstmtRbDet.clearParameters(); pstmtRbDet.clearParameters();
amountHdrNoBom = amountHdrNoBom + (quantityNoBom * rateNoBom); amountHdrNoBom = amountHdrNoBom + (quantityNoBom * rateNoBom);
...@@ -4921,6 +4927,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4921,6 +4927,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
amountHdrNoBom=0; amountHdrNoBom=0;
rcbTranIdList.add(generatedTranId); rcbTranIdList.add(generatedTranId);
System.out.println("RECEIPT BACK FLUSH DET COUNT::"+rcpBackFlushDet);
if(rcpBackFlushDet == 0) //ADDED BY KUNAL ON 21/MAY/14
{
retString = itmDBAccessLocal.getErrorString("","VTBACKFREC","");
return retString;
}
} // end of main while } // end of main while
rs.close(); rs.close();
rs=null; rs=null;
...@@ -4931,13 +4944,18 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4931,13 +4944,18 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbHdr.clearBatch(); pstmtRbHdr.clearBatch();
pstmtRbDet.executeBatch(); pstmtRbDet.executeBatch();
pstmtRbDet.clearBatch(); pstmtRbDet.clearBatch();
conn.commit(); //conn.commit();
//* Confirmation Logic Come Here RECEIPT_BACKFLUSH //* Confirmation Logic Come Here RECEIPT_BACKFLUSH
retString=this.confirmWebService("receipt_backflush", generatedTranId, xtraParams,"",conn); //added by kunal on 20/MAY/14
if(retString !=null && retString.trim().length()> 0 && retString.indexOf("VTSUCC1")==-1) retString = rcpBackflushConf.confirmRcpBackflush(generatedTranId, xtraParams, "", conn,false);//change on 22/may/14 handle connection
System.out.println("retString 4953::"+retString);
//added by kunal on 20/MAY/14 END
//retString=this.confirmWebService("receipt_backflush", generatedTranId, xtraParams,"",conn);
if(retString !=null && retString.trim().length()> 0 && retString.indexOf("VTCONFIRM")==-1)
{ {
System.out.println("error in confirmRcpBackflush..");
return retString; return retString;
} }
......
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