Commit 74600fdf authored by sshinde's avatar sshinde

Remove sales order status updation code from auto backflush


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93623 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d985e741
......@@ -33,6 +33,7 @@ import javax.ejb.Stateless;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.hibernate.loader.custom.Return;
//import org.drools.runtime.pipeline.SmooksTransformerProvider;
import org.w3c.dom.*;
......@@ -93,7 +94,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
* @param connStatus (true or false) - This status indicate whether to commit the trasaction or not (true - commit, false - no commit)
*/
//public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException
public String confirm( String tranId, String xtraParams,String forcedFlag, Connection conn, boolean connStatus ) throws RemoteException,ITMException
public String confirm(String tranId, String xtraParams,String forcedFlag, Connection conn, boolean connStatus ) throws RemoteException,ITMException
{
//Connection conn = null; //Gulzar - 25/11/11
PreparedStatement pstmtSql = null;
......@@ -4615,7 +4616,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
{
amountHdr = amountHdr + (updQty * rateMap.get(iRow));
}
pstmtRbDet.setString(1, generatedTranId );
pstmtRbDet.setString(2, ""+currRow);
pstmtRbDet.setString(3, itemCodeDet );
......@@ -4641,7 +4641,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtRbDet.clearParameters();
//* Allocationg Stock*\\
hashMap.put("tran_date", this.getCurrtDate());
hashMap.put("ref_ser", "R-BFS");
hashMap.put("ref_id", generatedTranId);
......@@ -4650,7 +4649,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
hashMap.put("item_code",itemCodeDet);
//hashMap.put("loc_code",locCode[iRow]);
hashMap.put("loc_code",locCodeMap.get(iRow));
hashMap.put("lot_no",lotNoMap.get(iRow));
hashMap.put("lot_sl",lotSlMap.get(iRow));
hashMap.put("alloc_qty",updQty);
......@@ -4670,7 +4668,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmt1 = null;
rs1.close();
rs1 = null;
if ( !itemStru.equalsIgnoreCase("R") )
{
retString=allocTraceBean.updateInvallocTrace(hashMap, conn);
......@@ -4800,12 +4797,10 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
noBom = false;
}
}
if ( retString != null && retString.trim().length() > 0 )
{
break;
}
}
amountHdr = amountHdr + amountHdrNoBom;
pstmtRbHdr.setDouble(20, amountHdr );
......@@ -4831,12 +4826,15 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
//* 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);
//* Confirmation Logic Come Here
retString=this.confirmWebService("receipt_backflush", generatedTranId, xtraParams,"",conn);
if(retString !=null && retString.trim().length()> 0 && retString.indexOf("VTSUCC1")==-1)
{
return retString;
}
//* Confirmation Logic Come Here
/*---*** Despatch Start ***---*/
......@@ -4895,7 +4893,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmt = null;
rs.close();
rs=null;
if(saleOrder == null )
{
retString = itmDBAccessLocal.getErrorString("","no rec in sale ord","");
......@@ -5354,7 +5351,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtUpd.close();
pstmtUpd = null;
sql = "SELECT SUM(QUANTITY) - SUM(QTY_DESP) FROM SORDITEM WHERE SALE_ORDER = ? AND LINE_TYPE ='I'";
/* sql = "SELECT SUM(QUANTITY) - SUM(QTY_DESP) FROM SORDITEM WHERE SALE_ORDER = ? AND LINE_TYPE ='I'";
pstmt2 = conn.prepareStatement(sql);
pstmt2.setString(1, saleOrder );
rs2 = pstmt2.executeQuery();
......@@ -5362,12 +5359,10 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
{
qtyChk = rs2.getDouble(1);
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
if ( qtyChk > 0 )
{
status = "P";
......@@ -5382,10 +5377,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtUpd.setTimestamp(2, this.getCurrtDate());
pstmtUpd.setString(3, saleOrder);
updCnt = pstmtUpd.executeUpdate();
pstmtUpd.close();
pstmtUpd = null;
pstmtUpd = null;*/
}
pstmt1.close();
pstmt1 = null;
......@@ -5431,14 +5424,11 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmtDspDtl.executeBatch();
pstmtDspDtl.clearBatch();
conn.commit();
//Confirmation logic
//retString=shipmentConf.confirm(generatedTranId, xtraParams, "", conn);
retString=this.confirmWebService("w_despatch", generatedTranId, xtraParams, "", conn);
retString=this.confirmWebService("despatch", generatedTranId, xtraParams, "", conn);
//ls_errcode = nvo_despatch.gbf_retrieve_despatch(desp_hdr.describe("datawindow.data") ,desp_det.describe("datawindow.data"),1,sqlca_cp)
......@@ -6774,10 +6764,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
PreparedStatement pStmt = null;
ResultSet rs = null;
System.out.println("confirmReceipt(String businessObj, String tranIdFr,String xtraParams, String forcedFlag, Connection conn) called >>><!@#>");
try
{
methodName = "gbf_post";
actionURI = "http://NvoServiceurl.org/" + methodName;
......
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