Commit c3a4230e authored by manohar's avatar manohar

invalloctracebean method called instead of local code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93838 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 867fa470
......@@ -76,7 +76,7 @@ public class DistStkUpd implements DistStkUpdLocal, DistStkUpdRemote
{
String stkOpt = "", tranID = "", keyString = "", sql = "";
String refId = "", refLine = "", refSer = "", itemCode = "", siteCode = "", locCode = "", lotNo = "", lotSl = "";
String chgWin="", chgUser = "", chgTerm = "";
String chgWin="", chgUser = "", chgTerm = "", errString;
String sqlUpd = "";
PreparedStatement pstmt = null;
Statement stmt = null, stmt1 = null;
......@@ -88,7 +88,19 @@ public class DistStkUpd implements DistStkUpdLocal, DistStkUpdRemote
TransIDGenerator transIDGenerator = null;
try
{
stmt = conn.createStatement();
// 01/11/13 manoharan commented the local code and called the new component
InvAllocTraceBean invBean = new InvAllocTraceBean();
errString = invBean.updateInvallocTrace(hmp,conn);
if(errString != null && errString.trim().length() > 0)
{
retVal = 0;
}
else
{
retVal = 1;
}
/*stmt = conn.createStatement();
sql = "SELECT STK_OPT FROM ITEM WHERE ITEM_CODE = '" +hmp.get("item_code").toString()+"'";
System.out.println("sql :"+sql);
rs = stmt.executeQuery(sql);
......@@ -170,26 +182,6 @@ public class DistStkUpd implements DistStkUpdLocal, DistStkUpdRemote
{
retVal = 1;
}
/*--Commented Gulzar 18/01/07 - Temporarly until the space problem in case of PreparedStatement in Oracle Connection not Solved
sql = "UPDATE STOCK SET ALLOC_QTY = (CASE WHEN ALLOC_QTY IS NULL THEN 0 ELSE ALLOC_QTY END) + ? "
+"WHERE ITEM_CODE = ? "
+"AND SITE_CODE = ? "
+"AND LOC_CODE = ? "
+"AND LOT_NO = ? "
+"AND LOT_SL = ? ";
System.out.println("Update sql :"+sql);
System.out.println("AllocQty :"+hmp.get("alloc_qty")+"\n item_Code :"+hmp.get("item_code")+"\n sitecode :"+hmp.get("site_code")+"\nlocCode :"+hmp.get("loc_code"));
System.out.println("lotno :"+hmp.get("lot_no")+"\n lotSl :"+hmp.get("lot_sl"));
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,((Double)hmp.get("alloc_qty")).doubleValue());
pstmt.setString(2,hmp.get("item_code").toString());
pstmt.setString(3,hmp.get("site_code").toString());
pstmt.setString(4,hmp.get("loc_code").toString());
pstmt.setString(5,hmp.get("lot_no").toString());
pstmt.setString(6,hmp.get("lot_sl").toString());
updateCnt = pstmt.executeUpdate();
*///End Commented Gulzar 18/01/07
//Added By Gulzar 18/01/07 -
System.out.println("AllocQty :"+hmp.get("alloc_qty")+"\n item_Code :"+hmp.get("item_code")+"\n sitecode :"+hmp.get("site_code")+"\nlocCode :"+hmp.get("loc_code"));
System.out.println("lotno :"+hmp.get("lot_no")+"\n lotSl :"+hmp.get("lot_sl"));
......@@ -213,6 +205,7 @@ public class DistStkUpd implements DistStkUpdLocal, DistStkUpdRemote
{
retVal = 1;
}
*/
}
catch (SQLException sqx)
{
......
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