Commit 773d5459 authored by caluka's avatar caluka

Insert STOCK_TRANSFER table site_code__to column remove while executing scheduler


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98031 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c2e06b39
...@@ -4,6 +4,7 @@ import ibase.scheduler.utility.interfaces.Schedule; ...@@ -4,6 +4,7 @@ import ibase.scheduler.utility.interfaces.Schedule;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.*; import java.util.*;
import java.util.Date; import java.util.Date;
import java.util.Map.Entry;
import java.sql.*; import java.sql.*;
import java.io.*; import java.io.*;
...@@ -64,15 +65,17 @@ public class NearExpirySchedule implements Schedule ...@@ -64,15 +65,17 @@ public class NearExpirySchedule implements Schedule
{ {
String siteCode = ""; String siteCode = "";
ibase.utility.UserInfoBean userInfo = null; ibase.utility.UserInfoBean userInfo = null;
String xtraParams = "";
try try
{ {
System.out.println("************ ["+scheduleParamXML+"]"); System.out.println("************ ["+scheduleParamXML+"]");
userInfo = new ibase.utility.UserInfoBean( scheduleParamXML ); userInfo = new ibase.utility.UserInfoBean( scheduleParamXML );
siteCode = userInfo.getSiteCode(); siteCode = userInfo.getSiteCode();
System.out.println("Site code = "+siteCode); System.out.println("Site code = "+siteCode);
xtraParams = "loginCode="+userInfo.getEmpCode()+"~~chgTerm="+userInfo.getRemoteHost()+"~~loginSiteCode="+siteCode;
//changed by sumit on 02/10/12 changing method parameter //changed by sumit on 02/10/12 changing method parameter
//insNearExpProducts(siteCode); //insNearExpProducts(siteCode);
insNearExpProducts(siteCode,scheduleParamXML); insNearExpProducts(siteCode,scheduleParamXML,xtraParams);
//insNearExpProducts("TA821"); //insNearExpProducts("TA821");
} }
catch(Exception e) catch(Exception e)
...@@ -83,7 +86,7 @@ public class NearExpirySchedule implements Schedule ...@@ -83,7 +86,7 @@ public class NearExpirySchedule implements Schedule
} }
//changed by sumit on 02/10/12 changing method parameter //changed by sumit on 02/10/12 changing method parameter
//public String insNearExpProducts(String siteCode) throws RemoteException,ITMException //public String insNearExpProducts(String siteCode) throws RemoteException,ITMException
public String insNearExpProducts(String siteCode , String scheduleParamXML) throws RemoteException,ITMException public String insNearExpProducts(String siteCode , String scheduleParamXML, String xtraParams) throws RemoteException,ITMException
{ {
String salesPerson = ""; String salesPerson = "";
String itemCode = ""; String itemCode = "";
...@@ -272,7 +275,8 @@ public class NearExpirySchedule implements Schedule ...@@ -272,7 +275,8 @@ public class NearExpirySchedule implements Schedule
java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() ); java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() );
java.sql.Timestamp expDateCalc = null; java.sql.Timestamp expDateCalc = null;
java.sql.Timestamp expDateStock = null; java.sql.Timestamp expDateStock = null;
HashMap siteCodeExpeMap = new HashMap();
ArrayList tempList = null;
selectSql = "SELECT MIN_SHELF_LIFE FROM ITEM WHERE ITEM_CODE = ? "; selectSql = "SELECT MIN_SHELF_LIFE FROM ITEM WHERE ITEM_CODE = ? ";
pstmtItem = conn.prepareStatement(selectSql); pstmtItem = conn.prepareStatement(selectSql);
...@@ -340,7 +344,16 @@ public class NearExpirySchedule implements Schedule ...@@ -340,7 +344,16 @@ public class NearExpirySchedule implements Schedule
System.out.println("**********************"+stockNexpList); System.out.println("**********************"+stockNexpList);
} }
}*/ }*/
//Start Added by chandrashekar 0n 28-05-2015
if(siteCodeExpeMap.containsKey(siteCode))
{
tempList = (ArrayList) siteCodeExpeMap.get(siteCode);
}
else
{
tempList = new ArrayList();
}
//End Added by chandrashekar 0n 28-05-2015
count++; count++;
dataMap.put( "item_code", itemCode ); dataMap.put( "item_code", itemCode );
dataMap.put( "site_code", siteCode ); dataMap.put( "site_code", siteCode );
...@@ -355,7 +368,17 @@ public class NearExpirySchedule implements Schedule ...@@ -355,7 +368,17 @@ public class NearExpirySchedule implements Schedule
dataMap.put( "cctr_code__inv", cctrCodeInv ); dataMap.put( "cctr_code__inv", cctrCodeInv );
stockExpList.add(dataMap); stockExpList.add(dataMap);
System.out.println("stockExpList**********************"+stockExpList); System.out.println("stockExpList**********************"+stockExpList);
//Start Added by chandrashekar 0n 28-05-2015
tempList.add(dataMap);
if(siteCodeExpeMap.containsKey(siteCode))
{
siteCodeExpeMap.put(siteCode,tempList);
}
else
{
siteCodeExpeMap.put(siteCode,tempList);
}
//End Added by chandrashekar 0n 28-05-2015
//Changed by sumit on 02/10/12 start //Changed by sumit on 02/10/12 start
System.out.println("..............check for lock.................."); System.out.println("..............check for lock..................");
sql ="select D.HOLD_STATUS ,D.tran_id ,D.line_no from INV_HOLD H, INV_HOLD_DET D where H.tran_id= D.tran_id and H.lock_code =? and D.ITEM_CODE =? and D.SITE_CODE= ? and D.LOC_CODE=? and D.LOT_NO= ? " sql ="select D.HOLD_STATUS ,D.tran_id ,D.line_no from INV_HOLD H, INV_HOLD_DET D where H.tran_id= D.tran_id and H.lock_code =? and D.ITEM_CODE =? and D.SITE_CODE= ? and D.LOC_CODE=? and D.LOT_NO= ? "
...@@ -397,7 +420,8 @@ public class NearExpirySchedule implements Schedule ...@@ -397,7 +420,8 @@ public class NearExpirySchedule implements Schedule
pstmtStock.close(); pstmtStock.close();
pstmtStock = null; pstmtStock = null;
} }
HashMap siteCodeNeExpeMap = new HashMap();
ArrayList tempListNe = null;
//Changed by sumit sarkar on 03/06/12 SQL For near expiry process start. //Changed by sumit sarkar on 03/06/12 SQL For near expiry process start.
System.out.println(" Calling near expiry *******************************"); System.out.println(" Calling near expiry *******************************");
selectSql = ""; selectSql = "";
...@@ -454,6 +478,16 @@ public class NearExpirySchedule implements Schedule ...@@ -454,6 +478,16 @@ public class NearExpirySchedule implements Schedule
acctCodeInv = rsStock.getString("ACCT_CODE__INV"); acctCodeInv = rsStock.getString("ACCT_CODE__INV");
cctrCodeInv = rsStock.getString("CCTR_CODE__INV"); cctrCodeInv = rsStock.getString("CCTR_CODE__INV");
//Start Added by chandrashekar 0n 28-05-2015
if(siteCodeNeExpeMap.containsKey(siteCode))
{
tempListNe = (ArrayList) siteCodeNeExpeMap.get(siteCode);
}
else
{
tempListNe = new ArrayList();
}
//End Added by chandrashekar 0n 28-05-2015
count1++; count1++;
dataMap.put( "item_code", itemCode ); dataMap.put( "item_code", itemCode );
dataMap.put( "site_code", siteCode ); dataMap.put( "site_code", siteCode );
...@@ -468,6 +502,17 @@ public class NearExpirySchedule implements Schedule ...@@ -468,6 +502,17 @@ public class NearExpirySchedule implements Schedule
dataMap.put( "cctr_code__inv", cctrCodeInv ); dataMap.put( "cctr_code__inv", cctrCodeInv );
stockNexpList.add(dataMap); stockNexpList.add(dataMap);
System.out.println("stockNexpList **********************"+stockNexpList); System.out.println("stockNexpList **********************"+stockNexpList);
//Start Added by chandrashekar 0n 28-05-2015
tempListNe.add(dataMap);
if(siteCodeNeExpeMap.containsKey(siteCode))
{
siteCodeNeExpeMap.put(siteCode,tempListNe);
}
else
{
siteCodeNeExpeMap.put(siteCode,tempListNe);
}
//End Added by chandrashekar 0n 28-05-2015
} }
if ( rsStock != null) if ( rsStock != null)
{ {
...@@ -544,7 +589,8 @@ public class NearExpirySchedule implements Schedule ...@@ -544,7 +589,8 @@ public class NearExpirySchedule implements Schedule
{ {
if ( stockExpList.size() > 0 && count > 0 ) if ( stockExpList.size() > 0 && count > 0 )
{ {
retString = inventoryTransfer( stockExpList, "w_stock_transfer", "", conn ); //retString = inventoryTransfer( stockExpList, "w_stock_transfer", xtraParams, conn );
retString = inventoryTransfer( siteCodeExpeMap, "w_stock_transfer", xtraParams, conn );//Change by chandrashekar 0n 28-05-2015
} }
if ( retString != null && retString.trim().length() > 0 && retString.trim().equalsIgnoreCase("ERROR") ) if ( retString != null && retString.trim().length() > 0 && retString.trim().equalsIgnoreCase("ERROR") )
{ {
...@@ -553,7 +599,8 @@ public class NearExpirySchedule implements Schedule ...@@ -553,7 +599,8 @@ public class NearExpirySchedule implements Schedule
} }
if ( stockNexpList.size() > 0 && count1 > 0) if ( stockNexpList.size() > 0 && count1 > 0)
{ {
retString = inventoryTransfer( stockNexpList, "w_stock_transfer", "", conn ); //retString = inventoryTransfer( stockNexpList, "w_stock_transfer", xtraParams, conn );
retString = inventoryTransfer( siteCodeNeExpeMap, "w_stock_transfer", xtraParams, conn );//Change by chandrashekar 0n 28-05-2015
} }
if ( retString != null && retString.trim().length() > 0 && retString.trim().equalsIgnoreCase("ERROR") ) if ( retString != null && retString.trim().length() > 0 && retString.trim().equalsIgnoreCase("ERROR") )
{ {
...@@ -639,7 +686,321 @@ public class NearExpirySchedule implements Schedule ...@@ -639,7 +686,321 @@ public class NearExpirySchedule implements Schedule
System.out.println("retString........:: " + retString); System.out.println("retString........:: " + retString);
return retString; return retString;
} }
public String inventoryTransfer( ArrayList stockList, String windowName,String xtraParams, Connection conn ) throws RemoteException,ITMException public String inventoryTransfer( HashMap<String , ArrayList<String>> siteCodeNeExpeMap, String windowName,String xtraParams, Connection conn ) throws RemoteException,ITMException
{
String salesPerson = "";
String itemCode = "";
String retString = "";
String selectSql = "";
String locCode = "";
String siteCode = "";
String lotNo = "";
String lotSl = "";
String locCodeTo = "";
String reservLoc = "";
String nexpLoc = "";
String expLoc = "";
String tranID = "";
String loginSiteCode = "";
String userId = "";
String chgTerm = "";
String acctCodeInv = "";
String cctrCodeInv = "";
String insertSql = "";
String defReasCode = "";
int count = 0;
int updCnt = 0;
int lineNo = 0;
double quantity = 0d;
double allocQty = 0d;
double noArt = 0d;
double minSelfLife = 0d;
boolean isError = false;
ResultSet rsStock = null;
ResultSet rsItem = null;
PreparedStatement pstmtStock = null;
PreparedStatement pstmtItem = null;
PreparedStatement pstmtHdr = null;
PreparedStatement pstmtDet = null;
HashMap strAllocate = null;
ArrayList stockList = null;
GenericUtility genericUtility = GenericUtility.getInstance();
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
InvAllocTraceBean invAllocTrace = new InvAllocTraceBean();
try
{
DistCommon distComm = new DistCommon();
defReasCode = distComm.getDisparams("999999","DEFAULT_REAS_CODE",conn);
loginSiteCode = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" );
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
chgTerm = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "chgTerm" );
java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() );
java.sql.Timestamp expDateCalc = null;
java.sql.Timestamp expDateStock = null;
//Start Added by chandrashekar on 28-05-2015
Set setItem = siteCodeNeExpeMap.entrySet();
Iterator itrItem = setItem.iterator();
while(itrItem.hasNext())
{
Map.Entry itemMapEntry = (Map.Entry)itrItem.next();
siteCode = (String)itemMapEntry.getKey();
System.out.println("Site Code>>>>>>>>>>"+siteCode);
stockList = (ArrayList)siteCodeNeExpeMap.get(siteCode);
//insertSql = "INSERT INTO STOCK_TRANSFER(TRAN_ID, TRAN_DATE, SITE_CODE, REF_SER__FOR, CONFIRMED, CHG_DATE, CHG_TERM, CHG_USER, SITE_CODE__FR, SITE_CODE__TO, REAS_CODE) VALUES(?,?,?,?,?,?,?,?,?,?,?)";
insertSql = "INSERT INTO STOCK_TRANSFER(TRAN_ID, TRAN_DATE, SITE_CODE, REF_SER__FOR, CONFIRMED, CHG_DATE, CHG_TERM, CHG_USER, REAS_CODE) VALUES(?,?,?,?,?,?,?,?,?)";//Change by chandrashekar on 27-05-2015
pstmtHdr = conn.prepareStatement(insertSql);
insertSql = "INSERT INTO STOCK_TRANSFER_DET(TRAN_ID, LINE_NO, ITEM_CODE, QUANTITY, LOC_CODE__FR, LOC_CODE__TO, LOT_NO__FR, LOT_NO__TO, LOT_SL__FR, LOT_SL__TO, ACCT_CODE__CR, ACCT_CODE__DR, CCTR_CODE__DR, CCTR_CODE__CR, NO_ART) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmtDet = conn.prepareStatement(insertSql);
//generate the tran id for w_stock_transfer
tranID = generateTranId( "w_stock_transfer", conn );
//Insert into header table i.e stock_transfer
pstmtHdr.setString( 1, tranID );
pstmtHdr.setTimestamp( 2, currDate );
//pstmtHdr.setString( 3, loginSiteCode );
pstmtHdr.setString( 3, siteCode );
pstmtHdr.setString( 4, "XFRX" );
pstmtHdr.setString( 5, "N" );
pstmtHdr.setTimestamp( 6, currDate );
pstmtHdr.setString( 7, chgTerm );
pstmtHdr.setString( 8, userId );
//pstmtHdr.setString( 9, siteCode );
//pstmtHdr.setString( 10, siteCode );
pstmtHdr.setString( 9, defReasCode );
updCnt = pstmtHdr.executeUpdate();
pstmtHdr.close();
pstmtHdr = null;
for ( int ctr = 0; ctr < stockList.size(); ctr++ )
{
lineNo++;
HashMap dataMap = null;
dataMap = (HashMap) stockList.get(ctr);
itemCode = "";
siteCode = "";
locCode = "";
lotNo = "";
lotSl = "";
acctCodeInv = "";
cctrCodeInv = "";
locCodeTo = "";
quantity = 0d;
allocQty = 0d;
noArt = 0d;
if (dataMap.get("item_code") != null)
{
itemCode = (String) dataMap.get("item_code");
}
if (dataMap.get("site_code") != null)
{
siteCode = (String) dataMap.get("site_code");
}
if (dataMap.get("loc_code") != null)
{
locCode = (String) dataMap.get("loc_code");
}
if (dataMap.get("loc_code__to") != null)
{
locCodeTo = (String) dataMap.get("loc_code__to");
}
if (dataMap.get("lot_no") != null)
{
lotNo = (String) dataMap.get("lot_no");
}
if (dataMap.get("lot_sl") != null)
{
lotSl = (String) dataMap.get("lot_sl");
}
if (dataMap.get("quantity") != null)
{
quantity = Double.parseDouble(dataMap.get("quantity").toString());
}
if (dataMap.get("alloc_qty") != null)
{
allocQty = Double.parseDouble(dataMap.get("alloc_qty").toString());
}
if (dataMap.get("no_art") != null)
{
noArt = Double.parseDouble(dataMap.get("no_art").toString());
}
if (dataMap.get("acct_code__inv") != null)
{
acctCodeInv = (String) dataMap.get("acct_code__inv");
}
if (dataMap.get("cctr_code__inv") != null)
{
cctrCodeInv = (String) dataMap.get("cctr_code__inv");
}
pstmtDet.setString(1, tranID);
pstmtDet.setInt(2, lineNo);
pstmtDet.setString(3, itemCode);
pstmtDet.setDouble(4, (quantity - allocQty));
pstmtDet.setString(5, locCode);
pstmtDet.setString(6, locCodeTo);// expired / Near Expiry
// location to which stock
// will be transfer
pstmtDet.setString(7, lotNo);
pstmtDet.setString(8, lotNo);
pstmtDet.setString(9, lotSl);
pstmtDet.setString(10, lotSl);
pstmtDet.setString(11, acctCodeInv);
pstmtDet.setString(12, acctCodeInv);
pstmtDet.setString(13, cctrCodeInv);
pstmtDet.setString(14, cctrCodeInv);
pstmtDet.setDouble(15, noArt);
pstmtDet.addBatch();
pstmtDet.clearParameters();
dataMap.clear();
strAllocate = new HashMap();
strAllocate.put("tran_date", currDate);
strAllocate.put("ref_ser", "XFRX");
strAllocate.put("ref_id", tranID);
strAllocate.put("ref_line", "" + lineNo);
strAllocate.put("site_code", siteCode);
strAllocate.put("item_code", itemCode);
strAllocate.put("loc_code", locCode);
strAllocate.put("lot_no", lotNo);
strAllocate.put("lot_sl", lotSl);
strAllocate.put("alloc_qty", new Double(quantity));
strAllocate.put("chg_user", userId);
strAllocate.put("chg_term", chgTerm);
// strAllocate.put("chg_win","w_stock_transfer");
strAllocate.put("chg_win", "W_STOCK_TRANSFER_MULTI");// change
// by
// chandrashekar
// on
// 27-05-2015
retString = invAllocTrace.updateInvallocTrace(strAllocate, conn);
strAllocate = null;
System.out.println("retString ::: " + retString);
if (retString != null && retString.trim().length() > 0)
{
isError = true;
retString = "ERROR";
return retString;
}
}
pstmtDet.executeBatch();
pstmtDet.clearBatch();
}//End Added by chandrashekar on 28-05-2015
}
catch(BatchUpdateException buex)
{
isError = true;
retString = "ERROR";
int [] updateCounts = buex.getUpdateCounts();
for (int i = 0; i < updateCounts.length; i++)
{
System.err.println(" Statement " + i + ":" + updateCounts[i]);
}
System.err.println(" Message: " + buex.getMessage());
System.err.println(" SQLSTATE: " + buex.getSQLState());
System.err.println(" Error code: " + buex.getErrorCode());
SQLException ex = buex.getNextException();
while (ex != null)
{
System.err.println("SQL exception:");
System.err.println(" Message: " + ex.getMessage());
System.err.println(" SQLSTATE: " + ex.getSQLState());
System.err.println(" Error code: " + ex.getErrorCode());
ex = ex.getNextException();
}
}
catch(SQLException se)
{
isError = true;
retString = "ERROR";
System.out.println("Exception : NearExpiryPrc : process()" +se.getMessage());
try
{
conn.rollback();
}
catch(Exception se1){}
//throw new ITMException(se);
}
catch(Exception e)
{
isError = true;
retString = "ERROR";
System.out.println("Exception :NearExpiryPrc :process():"+e.getMessage());
try
{
conn.rollback();
}
catch(Exception e1){}
//throw new ITMException(e);
}
finally
{
try
{
invAllocTrace = null;
strAllocate = null;
if ( isError )
{
System.out.println("ROLLBACK the changes......");
conn.rollback();
retString = "ERROR";
}
System.out.println("Closing Database Connection......");
if (rsItem != null)
{
rsItem.close();
rsItem = null;
}
if (pstmtItem != null)
{
pstmtItem.close();
pstmtItem = null;
}
if (rsStock != null)
{
rsStock.close();
rsStock = null;
}
if (pstmtStock != null)
{
pstmtStock.close();
pstmtStock = null;
}
if (pstmtHdr != null)
{
pstmtHdr.close();
pstmtHdr = null;
}
if (pstmtDet != null)
{
pstmtDet.close();
pstmtDet = null;
}
}catch(Exception se){}
}
System.out.println("retString........:: " + retString);
return retString;
}
/*public String inventoryTransfer( ArrayList stockList, String windowName,String xtraParams, Connection conn ) throws RemoteException,ITMException
{ {
String salesPerson = ""; String salesPerson = "";
String itemCode = ""; String itemCode = "";
...@@ -700,7 +1061,8 @@ public class NearExpirySchedule implements Schedule ...@@ -700,7 +1061,8 @@ public class NearExpirySchedule implements Schedule
java.sql.Timestamp expDateCalc = null; java.sql.Timestamp expDateCalc = null;
java.sql.Timestamp expDateStock = null; java.sql.Timestamp expDateStock = null;
insertSql = "INSERT INTO STOCK_TRANSFER(TRAN_ID, TRAN_DATE, SITE_CODE, REF_SER__FOR, CONFIRMED, CHG_DATE, CHG_TERM, CHG_USER, SITE_CODE__FR, SITE_CODE__TO, REAS_CODE) VALUES(?,?,?,?,?,?,?,?,?,?,?)"; //insertSql = "INSERT INTO STOCK_TRANSFER(TRAN_ID, TRAN_DATE, SITE_CODE, REF_SER__FOR, CONFIRMED, CHG_DATE, CHG_TERM, CHG_USER, SITE_CODE__FR, SITE_CODE__TO, REAS_CODE) VALUES(?,?,?,?,?,?,?,?,?,?,?)";
insertSql = "INSERT INTO STOCK_TRANSFER(TRAN_ID, TRAN_DATE, SITE_CODE, REF_SER__FOR, CONFIRMED, CHG_DATE, CHG_TERM, CHG_USER, REAS_CODE) VALUES(?,?,?,?,?,?,?,?,?)";//Change by chandrashekar on 27-05-2015
pstmtHdr = conn.prepareStatement(insertSql); pstmtHdr = conn.prepareStatement(insertSql);
insertSql = "INSERT INTO STOCK_TRANSFER_DET(TRAN_ID, LINE_NO, ITEM_CODE, QUANTITY, LOC_CODE__FR, LOC_CODE__TO, LOT_NO__FR, LOT_NO__TO, LOT_SL__FR, LOT_SL__TO, ACCT_CODE__CR, ACCT_CODE__DR, CCTR_CODE__DR, CCTR_CODE__CR, NO_ART) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; insertSql = "INSERT INTO STOCK_TRANSFER_DET(TRAN_ID, LINE_NO, ITEM_CODE, QUANTITY, LOC_CODE__FR, LOC_CODE__TO, LOT_NO__FR, LOT_NO__TO, LOT_SL__FR, LOT_SL__TO, ACCT_CODE__CR, ACCT_CODE__DR, CCTR_CODE__DR, CCTR_CODE__CR, NO_ART) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
...@@ -718,9 +1080,9 @@ public class NearExpirySchedule implements Schedule ...@@ -718,9 +1080,9 @@ public class NearExpirySchedule implements Schedule
pstmtHdr.setTimestamp( 6, currDate ); pstmtHdr.setTimestamp( 6, currDate );
pstmtHdr.setString( 7, chgTerm ); pstmtHdr.setString( 7, chgTerm );
pstmtHdr.setString( 8, userId ); pstmtHdr.setString( 8, userId );
pstmtHdr.setString( 9, siteCode ); //pstmtHdr.setString( 9, siteCode );
pstmtHdr.setString( 10, siteCode ); //pstmtHdr.setString( 10, siteCode );
pstmtHdr.setString( 11, defReasCode ); pstmtHdr.setString( 9, defReasCode );
updCnt = pstmtHdr.executeUpdate(); updCnt = pstmtHdr.executeUpdate();
pstmtHdr.close(); pstmtHdr.close();
pstmtHdr = null; pstmtHdr = null;
...@@ -822,7 +1184,8 @@ public class NearExpirySchedule implements Schedule ...@@ -822,7 +1184,8 @@ public class NearExpirySchedule implements Schedule
strAllocate.put("alloc_qty",new Double(quantity)); strAllocate.put("alloc_qty",new Double(quantity));
strAllocate.put("chg_user",userId); strAllocate.put("chg_user",userId);
strAllocate.put("chg_term",chgTerm); strAllocate.put("chg_term",chgTerm);
strAllocate.put("chg_win","w_stock_transfer"); //strAllocate.put("chg_win","w_stock_transfer");
strAllocate.put("chg_win","W_STOCK_TRANSFER_MULTI");//change by chandrashekar on 27-05-2015
retString = invAllocTrace.updateInvallocTrace(strAllocate, conn); retString = invAllocTrace.updateInvallocTrace(strAllocate, conn);
strAllocate = null; strAllocate = null;
...@@ -932,7 +1295,7 @@ public class NearExpirySchedule implements Schedule ...@@ -932,7 +1295,7 @@ public class NearExpirySchedule implements Schedule
System.out.println("retString........:: " + retString); System.out.println("retString........:: " + retString);
return retString; return retString;
} }
private String generateTranId( String windowName, Connection conn )throws ITMException */ private String generateTranId( String windowName, Connection conn )throws ITMException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
......
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