Commit 4f3f7131 authored by agaikwad's avatar agaikwad

Request_id-W16ASUN022. Added two extra column in apr_loc_udf_inputs disparam Value.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101506 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d790c4e5
...@@ -4032,24 +4032,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4032,24 +4032,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmt2 = null; pstmt2 = null;
rs2.close(); rs2.close();
rs2 = null; rs2 = null;
} else if (("U".equalsIgnoreCase(apprLocLogic)) && apprLocUdf != null && apprLocUdf.trim().length() > 0)
{
String SiteCode1="";
String ItemCode1="";
sql = "select " + apprLocUdf + "('" + locCode + "','" + SiteCode1 + "','" + ItemCode1 + "') from dual";
//sql = "select " + apprLocUdf + "('" + locCode + "') from dual";
pstmt2 = conn.prepareStatement(sql);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
qcLotLocCode = rs2.getString(1);
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
} }
else//(apprLocUdfInput != null && apprLocUdfInput.trim().length() > 0)
else if (("U".equalsIgnoreCase(apprLocLogic)) && apprLocUdf != null && apprLocUdf.trim().length() > 0)
{
if(apprLocUdfInput != null && apprLocUdfInput.trim().length() > 0)
{ {
System.out.println("ApprLocationUdfinput"+ apprLocUdfInput); System.out.println("ApprLocationUdfinput"+ apprLocUdfInput);
String lotNoIssueOut = ""; String lotNoIssueOut = "";
...@@ -4081,7 +4070,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4081,7 +4070,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
lotNoIssueOut =lotNoIssueOut.substring(0,lotNoIssueOut.length()-1); lotNoIssueOut =lotNoIssueOut.substring(0,lotNoIssueOut.length()-1);
System.out.println("Value is------>" + lotNoIssueOut); System.out.println("Value is------>" + lotNoIssueOut);
sql = "select " + apprLocUdf + "('"+lotNoIssueOut + "') from dual"; sql = "select " + apprLocUdf + "("+lotNoIssueOut + ") from dual";
pstmt2 = conn.prepareStatement(sql); pstmt2 = conn.prepareStatement(sql);
rs2 = pstmt2.executeQuery(); rs2 = pstmt2.executeQuery();
if (rs2.next()) if (rs2.next())
...@@ -4095,6 +4084,24 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -4095,6 +4084,24 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
// } // }
System.out.println("qcLotLocCode"+qcLotLocCode); System.out.println("qcLotLocCode"+qcLotLocCode);
} }
else
{
//sql = "select " + apprLocUdf + "('" + locCode + "','" + SiteCode1 + "','" + ItemCode1 + "') from dual";
sql = "select " + apprLocUdf + "('" + locCode + "') from dual";
pstmt2 = conn.prepareStatement(sql);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
qcLotLocCode = rs2.getString(1);
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
System.out.println("qcLotLocCode Else ############"+qcLotLocCode);
}
}
// int // int
// rowcount=InsertQcOrderLots(qcNo,tranId,itemCode,unit,lotNoRcp,qcLotLocCode,conn); // rowcount=InsertQcOrderLots(qcNo,tranId,itemCode,unit,lotNoRcp,qcLotLocCode,conn);
......
...@@ -3321,28 +3321,13 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3321,28 +3321,13 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
errCode = "VTLOCUDF"; errCode = "VTLOCUDF";
retString = itmDBAccess.getErrorString("", errCode, "", "", conn); retString = itmDBAccess.getErrorString("", errCode, "", "", conn);
} }
if (!(locUdf.equalsIgnoreCase("NULLFOUND")|| locUdf.trim().length() == 0))
{
String SiteCode1="";
String ItemCode1="";
System.out.println("inside 2nd if locUdf *********");
sql = "select " + locUdf + "('" + locationCode + "','" + SiteCode1 + "','" + ItemCode1 + "') from dual";
pstmt = conn.prepareStatement(sql);
//loc = rs.getString(1);
rs = pstmt.executeQuery();
if(rs.next())
{
locCode = rs.getString(1);
}
else
{
errCode = "DS000";
retString = itmDBAccess.getErrorString("", errCode, "", "", conn);
}
pstmt.close();
//if (!(locUdf.equalsIgnoreCase("NULLFOUND")|| locUdf.trim().length() == 0))
System.out.println("Site Code####"+siteCode);
System.out.println("ApprLocationUdfinput#######"+ apprLocUdfInput);
System.out.println("locUdf#######"+ locUdf);
} }
else// if (apprLocUdfInput != null && apprLocUdfInput.trim().length() > 0) if (apprLocUdfInput != null && apprLocUdfInput.trim().length() > 0)
{ {
System.out.println("ApprLocationUdfinput"+ apprLocUdfInput); System.out.println("ApprLocationUdfinput"+ apprLocUdfInput);
String lotNoIssueOut = ""; String lotNoIssueOut = "";
...@@ -3374,7 +3359,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3374,7 +3359,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
} }
lotNoIssueOut =lotNoIssueOut.substring(0,lotNoIssueOut.length()-1); lotNoIssueOut =lotNoIssueOut.substring(0,lotNoIssueOut.length()-1);
System.out.println("Value is--------->"+ lotNoIssueOut); System.out.println("Value is--------->"+ lotNoIssueOut);
sql = "select " + locUdf + "('"+lotNoIssueOut + "') from dual"; sql = "select " + locUdf + "("+lotNoIssueOut + ") from dual";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
rs2 = pstmt.executeQuery(); rs2 = pstmt.executeQuery();
if (rs2.next()) if (rs2.next())
...@@ -3387,6 +3372,29 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3387,6 +3372,29 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
rs2 = null; rs2 = null;
// } // }
} }
else
{
if( locUdf != null && locUdf.trim().length() > 0)
{
String SiteCode1="";
String ItemCode1="";
System.out.println("inside 2nd if locUdf *********");
sql = "select " + locUdf + "(" + locationCode + ") from dual";
pstmt = conn.prepareStatement(sql);
//loc = rs.getString(1);
rs = pstmt.executeQuery();
if(rs.next())
{
locCode = rs.getString(1);
}
else
{
errCode = "DS000";
retString = itmDBAccess.getErrorString("", errCode, "", "", conn);
}
pstmt.close();
System.out.println("locUdf else "+locCode );
}
//else //else
//{ //{
//errCode = "VTLOCUDF"; //errCode = "VTLOCUDF";
......
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